Ethernet driver for Linux kernel 2.6 running on ML403
Grant Likely
grant.likely at secretlab.ca
Wed Sep 20 07:27:01 EST 2006
On 9/19/06, David H. Lynch Jr. <dhlii at dlasys.net> wrote:
>
> Grant Likely wrote:
>
> Avast! After getting quizzed on IRC about this off-the-cuff comment,
> I should probably clarify. Since the Xilinx IP could be wired up to a
> ublaze core or an off-chip processor, the drivers still need to use a
> platform bus attachment to keep it all cross platform.
>
> So, replace above comment with the following:
>
> Populating the platform device with static code during initialization
> is sooo last year.
>
> Time to hack device trees to populate it instead.
>
> So I got another X V4 board. I hacked in the Platform device stuff from
> you ml403 code with changes needed for my hardware.
> and my brain is slowly begining to actually grasp what is going on - I
> am begining to grasp the platform devices big picture (over a mountain
> through a spyglass in the fog)
>
> Where do I begin with Device Trees ?
Step 1: run away
Step 2: don't look back.
Just kidding. Unless you want to help move Virtex support from
arch/ppc to arch/powerpc, you don't really need to worry about device
trees for a while.
If you are interested, look at
Documentation/powerpc/booting-without-of.txt. Then start poking Matt
Porter about when he's going to get 4xx ported to arch/powerpc.
I've been half heartedly looking at what needs to be done to generate
a device tree based on either system.mhs or xparameters.h. I'm
probably going to write a tiny C program that is compiled against
xparameters.h and spits out a valid dts file. The dts file can then
be run through the device tree compiler to produce the flattened
device tree structure.
>
> The vague Picture I have is the have something to do with some
> datastructure that Mac's typically create at or prior to boot. And that for
> embedded systems we are building them
> externally compiling them and then attaching the compiled device tree
> to our project.
That right. You don't compile device base addresses, irqs, etc into
the kernel. You pass them in at boot time with a data structure.
>
> I got a Xilinv V4 device currently with a Pic, UartLite, TEMAC, Flash
> and Keyhole (pseuodo serial host interface). Of those it is only certain
> that the flash will always be there.
> We have bit images with Keyhole only, Uartlite only TEMAC only,
> Sometimes we have a Pic sometimes not. I was trying to get to the point were
> I could dynamically add what was there
> to Platform devices during initialization.
>
> If Device trees are static, then do they even apply to what I have to
> deal with ?
Device trees don't have to be static. They can be generated/modified
on the fly if the bootloader supports it. Or you can pass a different
tree depending on what IP you have on the board.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
More information about the Linuxppc-embedded
mailing list