[PATCH] devicetree probe support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Sep 20 14:45:15 EDT 2012


On 22:06 Wed 12 Sep     , Sascha Hauer wrote:
> Hi All,
> 
> The following patch series adds support for probing barebox from
> devicetree.
> 
> Most of the of helper code is taken directly from the Linux Kernel,
> only little glue code is needed to populate the barebox devicetree
> from a dtb.
> 
> Currently the dtb can be probed with 'oftree -p <dtb>'. After calling
> this command the devices found in the dtb are probed. Devices which
> were present before are not probed again, instead the corresponding
> device nodes are attached to the barebox devices.
> 
> Further directions could be that barebox takes the dtb directly from
> a first stage loader, so a second stage barebox could be started just
> like a Linux Kernel. I have some experimental code for that. Another
> possibility would be to compile a dtb into barebox, but this is not
> done yet.
> 
> This series contains support for the basic probing, GPIO, SPI and
> several i.MX devices. The devicetree probe support nearly compiles
> away if disabled and takes about 6k in an uncompressed image when
> enabled.
> 
> Here is an example session:
> 
> barebox at Phytec phyCORE-i.MX27:/ oftree -p mnt/tftp/sha-oftree-pcm038
> barebox at Phytec phyCORE-i.MX27:/ devinfo 1000c000.serial
> resources:
> num   : 0
> start : 0x1000c000
> size  : 0x00001000
> driver: imx_serial
> 
> no info available for 1000c000.serial
> no parameters available
> 
> device node: /soc/aipi at 10000000/serial at 1000c000
> serial at 1000c000 {
>         compatible: "fsl,imx27-uart", "fsl,imx21-uart"
>         reg: <0x1000c000 0x1000>
>         interrupts: <0x12>
>         status: "okay"
>         fsl,uart-has-rtscts:
> };
this break the fb support as those framework register device
whith resource but that may not init as the start of the ressource is
screen_base which could be 0 as no mode is selected

we really need to finish to clean the bus before applying this one

Best Regards,
J.



More information about the barebox mailing list