Device Tree setup for 8272-based board
Scott Wood
scottwood at freescale.com
Tue Jan 20 04:29:34 EST 2009
On Mon, Jan 19, 2009 at 12:58:41PM +1100, Daniel Ng wrote:
> Hi Scott,
> On Sat, Jan 17, 2009 at 5:14 AM, Scott Wood <scottwood at freescale.com> wrote:
> >
> >> /dts-v1/;
> >>
> >> / {
> >> model = "HPXRED";
> >> compatible = "fsl,mpc8272ads";
> >
> > Is it 100% compatible? If not, change the compatible to something else
> > (and make sure your board code matches it).
>
> My board is similar to the mpc8272ads, so it is not 100% compatible. So I guess
> I will have to define my own DTS, correct?
Yes.
> How would I be able to tell if I need my own cuboot-*.c file as well?
The separate cuboot files are based on separate bd_t layouts -- if bd_t
is the same, you don't need a new file. That said, if you're dealing
with modern u-boot, it'd be better to just pass a device tree and use
uImage.
> > Do you currently have mpc8272ads support enabled in the kernel? If the
> > kernel doesn't find a matching ppc_md, you won't get any debug output.
>
> No, since it is not an mpc8272ads board.
But the device tree claims that it is.
> What exactly are we matching here?
> Is it just the Platform Name in the .config file eg. CONFIG_MPC8272_ADS?
> If I use [compatible = "fsl,hpxred";] this doesn't seem to make a difference
> in the behaviour.
In order for the kernel to boot, there has to be platform code built in
whose probe() function recognizes the device tree as one that it
supports.
> Is the ppc_md generated from the Device Tree? Can you please point me to
> the relevant file/s to see how this is done?
ppc_md is in platform files such as
arch/powerpc/platforms/82xx/mpc8272_ads.c.
> Also, which kernel file deals with searching for/reading the ppc_md?
probe_machine() in arch/powerpc/kernel/setup-common.c.
> > You can use udbg_printf() directly after the call to udbg_early_init()
> > though.
>
> Would I use these in cuboot-*.c?
No, this is in the kernel, not the bootwrapper.
-Scott
More information about the Linuxppc-dev
mailing list