[U-Boot] ARM CONFIG_OF_CONTROL status

Michal Simek monstr at monstr.eu
Wed Jun 27 16:35:40 CEST 2012


Hi Simon,

On 06/27/2012 03:58 PM, Simon Glass wrote:
> Hi,
>
> On Wed, Jun 27, 2012 at 2:29 AM, Michal Simek <monstr at monstr.eu <mailto:monstr at monstr.eu>> wrote:
>
>     Hi,
>
>     can you please update me about current state of CONFIG_OF_CONTROL for ARM?
>     Are there any other archs/boards which will use this option?
>
>     Or any other git repo out of mainline u-boot?
>
>
> Exynos is in progress - development is happening in the Chromium tree and being upstreamed in chunks (although no fdt patches have been sent yet).

ok.

>
>
>     Has someone tried to look for devices based on compatible property?
>     I see that in usb driver it is based on aliases which is not the best solution.
>
>
> U-Boot doesn't yet have a device model which would allow this in the general case. For now, drivers look for their own compatible nodes. This works well enough until we have a device model.
>
> There are other limitations also - for example USB supports only a single controller type working at one time (a restriction we may need to look at to support USB2 and USB3 together). So even if two USB drivers decided that they both found compatible nodes, only one of them could operate. So for now aliases provide just an ordering, nothing else.


I have looked at the code and did some tests on Microblaze.

Firstly I have tried to change emaclite ethernet initialization and I ended with this code fragment which could be
broadly used by other drivers.

	int offset = 0;
	do {
		offset = fdt_node_offset_by_compatible(gd->fdt_blob, offset, "xlnx,xps-ethernetlite-1.00.a" );
		u32 rxpp = fdtdec_get_int(gd->fdt_blob, offset, "xlnx,rx-ping-pong", 0);
		u32 txpp = fdtdec_get_int(gd->fdt_blob, offset, "xlnx,tx-ping-pong", 0);
		u32 reg = fdtdec_get_int(gd->fdt_blob, offset, "reg", 0);
		if (reg)
			ret |= xilinx_emaclite_initialize(bis, reg, txpp, rxpp);
	} while (offset != -1);

What do you think? This code is in platform file.

Also I have tested code around aliases which parse DTS aliases list for console initialization
and I have also get it work for !CONSOLE_SERIAL_MULTI case.

What was the reason to use compat_names table in fdtdec.c file?

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian


More information about the U-Boot mailing list