[PATCH 1/4] Emerson ATCA-C125 bootwrapper

David Gibson david at gibson.dropbear.id.au
Sat Mar 15 11:10:36 EST 2008


On Fri, Mar 14, 2008 at 05:27:03PM +0300, Alexandr Smirnov wrote:
> 
> Bootwraper for Emerson ATCA-C125 board. This board has
> four ethernet ports, so it has to use this code instead
> of generic.

[snip]
> +	/* Unfortunately, the specific model number is encoded in the
> +	 * soc node name in existing dts files -- once that is fixed,
> +	 * this can do a simple path lookup.
> +	 */

Since this is a new board, couldn't you name the soc node /soc and
dispense with this more complicated way of doing things?  Or would
that break other versions of u-boot that are in use?

> +	soc = find_node_by_devtype(NULL, "soc");
> +	if (soc) {
> +		void *serial = NULL;
> +
> +		setprop(soc, "bus-frequency", &bd.bi_busfreq,
> +			sizeof(bd.bi_busfreq));
> +
> +		while ((serial = find_node_by_devtype(serial, "serial"))) {
> +			if (get_parent(serial) != soc)
> +				continue;
> +
> +			setprop(serial, "clock-frequency", &bd.bi_busfreq,
> +				sizeof(bd.bi_busfreq));
> +		}
> +	}
> +}
> +
> +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
> +		   unsigned long r6, unsigned long r7)
> +{
> +	CUBOOT_INIT();
> +	fdt_init(_dtb_start);
> +	serial_console_init();
> +	platform_ops.fixups = platform_fixups;
> +}

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson



More information about the Linuxppc-dev mailing list