* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 10:56 ` Andrei Konovalov
@ 2005-04-04 11:01 ` Jon Masters
2005-04-04 11:08 ` Jakob Viketoft
` (2 subsequent siblings)
3 siblings, 0 replies; 23+ messages in thread
From: Jon Masters @ 2005-04-04 11:01 UTC (permalink / raw)
To: Andrei Konovalov; +Cc: Linux PPC Embedded list, Sylvain Munaut, Jakob Viketoft
Andrei Konovalov wrote:
> Should we rely on U-Boot to give that device tree structure to
> the kernel?
I think this is the best way to do it - there's already a ppc_md struct
kicking around which is semi-meant for this kind of thing.
> If I got it correct this is how the Freescale team plans to proceed.
Good. It might actually happen if enough of us want it to :-)
> Jon (Masters), are you going the same way?
Yes, but I'm more than willing to pitch in with the Freescale guys if
that'll get things done faster - they've obviously got more manpower. I
wanted to get this thing done already! :-)
> Anyone using arch/ppc/boot/simple bootwrapper with his Virtex 2 Pro
> board? If we drop Virtex 2 Pro support in arch/ppc/boot and move to
> U-Boot would it hurt anyone?
I don't use it. I have a very simple bootloader which I use on our Memec
based design - comes in straight off sysace and jumps at the kernel
after doing simple diagnostics, avoided the need for porting an existing
boot loader and it's reasonably able to cope with braindead Xilinx HALs.
Jon.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 10:56 ` Andrei Konovalov
2005-04-04 11:01 ` Jon Masters
@ 2005-04-04 11:08 ` Jakob Viketoft
2005-04-04 16:45 ` Wolfgang Denk
2005-04-07 17:20 ` Tom Rini
3 siblings, 0 replies; 23+ messages in thread
From: Jakob Viketoft @ 2005-04-04 11:08 UTC (permalink / raw)
To: Andrei Konovalov; +Cc: Jon Masters, Sylvain Munaut, Linux PPC Embedded list
Hello Andrei!
Andrei Konovalov wrote:
> Hi Jakob!
>
> Yes, Jon Loeliger's implementation plan looks OK for me
> (as far as I understood Jon's posting; having look at
> the current patch would be great). And I could participate
> in the implementation for Xilinx if needed too, but don't
> object if you do it by yourself (at the moment, I know
> little about the OF device tree, so just testing the patch
> on ML300 would be fine for me as well).
Great! I could start and ask for assistance when needed... :)
> Should we rely on U-Boot to give that device tree structure to
> the kernel? If I got it correct this is how the Freescale team
> plans to proceed. Jon (Masters), are you going the same way?
> Anyone using arch/ppc/boot/simple bootwrapper with his Virtex 2 Pro
> board? If we drop Virtex 2 Pro support in arch/ppc/boot and move to
> U-Boot would it hurt anyone?
>
> Thanks,
> Andrei
My end intention is to write something that both builds the OF device
tree from a listed number of (ip-)devices and a small FPGA-suitable
bootloader (as a small prog separated from the kernel). It'll probably
end up being an entire "Linux on Xilinx" howto... I say we can drop the
simple bootwrapper once all the stages of the OF adaptation is in place
(which might not happen overnight :).
Cheers!
/Jakob
>
> Jakob Viketoft wrote:
>
>> Hi!
>>
>> You don't happen to have a patch of your current work against one of
>> the trees (83xx and 85xx)? It would be much easier to do work in
>> parallell, and I'd be happy to do it on the "Xilinx" tree (and help
>> out where I can, of course).
>>
>> Jon Masters and Andrei: Does Jon Loeliger's implementation plan sound
>> alright to you? Since you seem quite full-handed on your end anyway,
>> Jon, I'll be happy to do the work needed unless anyone has any
>> objections...
>>
>> Cheers!
>>
>> /Jakob
>>
>> Jon Loeliger wrote:
>>
>>> On Thu, 2005-03-31 at 06:33, Jon Masters wrote:
>>>
>>>> Kumar Gala wrote:
>>>>
>>>> |> My intention was to give a device tree structure to the kernel at
>>>> boot
>>>> |> time via a (pseudo?) pointer in bd_info or similar.
>>>
>>>
>>>
>>>
>>>> This got resurrected recently.
>>>
>>>
>>>
>>>
>>> Hi!
>>>
>>>
>>>> | I think this is reasonable. The best device tree would be a
>>>> flattened
>>>> | OF tree since we are trying to move the world in that direction. Jon
>>>> | Masters around?
>>>>
>>>> Yes, but I've been tied up with worky and magazine stuff again. If
>>>> someone wants to work with me then this might actually happen.
>>>
>>>
>>>
>>>
>>> Hi Jon,
>>>
>>> I'm here and actively(!) working on it now. Here is the very
>>> rough plan as Kumar and I have discussed it. Please feel free
>>> to comment on it or offer suggestions. Ben has suggested that
>>> I start with the "second step" below. I'd like to do a round
>>> of cleanup first.
>>>
>>> So far, I have taken the first step of isolating the references
>>> to the global __res[] variable into one file and replacing all
>>> references to the data in the bd_t structure with a thin, shim
>>> layer of function calls that are nominally into an OF-like
>>> interface. I have done this for all the 85xx and 83xx boards
>>> in my development tree, and am working on the others now.
>>> This step effectively isolates the __res[] references to one
>>> file where a well defined interface can be created to pose as
>>> an OF Device Tree layer (briefly).
>>>
>>> As a follow-up second step, I plan on introducing essentially
>>> the same code currently in ppc64 to handle the flat device tree
>>> and provide an interface to that data in exactly the same manner
>>> as the ppc64 currently has. I understand the desire to have the
>>> flat-tree handling be "outside the kernel".
>>>
>>> As a third step, the shim layer will be rewritten/augmented to
>>> use the actual OF device tree data where it currently fronts
>>> for the bd_t data.
>>>
>>> Finally, as time permits and maintainers allow (read: prod),
>>> the other (not 85xx, not 83xx) boards can have their setup code
>>> converted to use the "real" OF device tree function calls.
>>>
>>> When all of that is done, the shim layer can be removed, as needed.
>>>
>>>
>>> Oh, yeah. Um, also on my plate will be to construct the
>>> original flat-tree blob in U-Boot to be handed to the kernel.
>>> (I'll start with 85xx and 83xx, naturlich.)
>>>
>>> We have not yet decided on the layout of that tree to determine
>>> where all the attributes and devices really belong. I will
>>> also discuss with Wolfgang and crew how to generate that tree
>>> over in U-Boot land.
>>>
>>> Right?
>>>
>>> Thanks,
>>> jdl
>>>
>>
>>
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 10:56 ` Andrei Konovalov
2005-04-04 11:01 ` Jon Masters
2005-04-04 11:08 ` Jakob Viketoft
@ 2005-04-04 16:45 ` Wolfgang Denk
2005-04-04 16:58 ` Andrei Konovalov
2005-04-07 17:20 ` Tom Rini
3 siblings, 1 reply; 23+ messages in thread
From: Wolfgang Denk @ 2005-04-04 16:45 UTC (permalink / raw)
To: Andrei Konovalov
Cc: Jon Masters, Sylvain Munaut, Linux PPC Embedded list,
Jakob Viketoft
In message <42511D55.4040507@ru.mvista.com> you wrote:
>
> Should we rely on U-Boot to give that device tree structure to
> the kernel? If I got it correct this is how the Freescale team
> plans to proceed. Jon (Masters), are you going the same way?
Who said this, and where? I am not aware of such a discussion.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"The best index to a person's character is a) how he treats people
who can't do him any good and b) how he treats people who can't fight
back." - Abigail Van Buren
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 16:45 ` Wolfgang Denk
@ 2005-04-04 16:58 ` Andrei Konovalov
2005-04-04 16:56 ` Jon Masters
0 siblings, 1 reply; 23+ messages in thread
From: Andrei Konovalov @ 2005-04-04 16:58 UTC (permalink / raw)
To: Wolfgang Denk
Cc: Jon Masters, Sylvain Munaut, Linux PPC Embedded list,
Jakob Viketoft
Wolfgang Denk wrote:
> In message <42511D55.4040507@ru.mvista.com> you wrote:
>
>>Should we rely on U-Boot to give that device tree structure to
>>the kernel? If I got it correct this is how the Freescale team
>>plans to proceed. Jon (Masters), are you going the same way?
>
>
> Who said this, and where? I am not aware of such a discussion.
These are just plans:
http://ozlabs.org/pipermail/linuxppc-embedded/2005-April/017561.html
-------- Original Message --------
Subject: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
Date: Thu, 31 Mar 2005 09:55:42 -0600
From: Jon Loeliger <jdl@freescale.com>
<snip>
Oh, yeah. Um, also on my plate will be to construct the
original flat-tree blob in U-Boot to be handed to the kernel.
(I'll start with 85xx and 83xx, naturlich.)
-------- End Original Message --------
Thanks,
Andrei
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 16:58 ` Andrei Konovalov
@ 2005-04-04 16:56 ` Jon Masters
0 siblings, 0 replies; 23+ messages in thread
From: Jon Masters @ 2005-04-04 16:56 UTC (permalink / raw)
To: Andrei Konovalov; +Cc: Sylvain Munaut, Linux PPC Embedded list, Jakob Viketoft
Andrei Konovalov wrote:
> Wolfgang Denk wrote:
>> Who said this, and where? I am not aware of such a discussion.
> These are just plans:
>
> http://ozlabs.org/pipermail/linuxppc-embedded/2005-April/017561.html
>
> -------- Original Message --------
> Subject: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
> Date: Thu, 31 Mar 2005 09:55:42 -0600
> From: Jon Loeliger <jdl@freescale.com>
>
> <snip>
> Oh, yeah. Um, also on my plate will be to construct the
> original flat-tree blob in U-Boot to be handed to the kernel.
> (I'll start with 85xx and 83xx, naturlich.)
> -------- End Original Message --------
The magic bit will be when we have automatic SYSTEM.MHS -> FlatOF BLOB
on stuff like Virtex. That'll assist in doing away with the HAL :-)
Jon.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-04 10:56 ` Andrei Konovalov
` (2 preceding siblings ...)
2005-04-04 16:45 ` Wolfgang Denk
@ 2005-04-07 17:20 ` Tom Rini
2005-04-07 17:35 ` Jon Loeliger
3 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2005-04-07 17:20 UTC (permalink / raw)
To: Andrei Konovalov
Cc: Jon Masters, Sylvain Munaut, Linux PPC Embedded list,
Jakob Viketoft
On Mon, Apr 04, 2005 at 02:56:21PM +0400, Andrei Konovalov wrote:
> Should we rely on U-Boot to give that device tree structure to
> the kernel? If I got it correct this is how the Freescale team
It shouldn't matter who passes the flattened tree really, so long as the
information is correct. arch/ppc/boot/simple/ should translate
older-non-uboot-bd_t, or PReP residual, or statically construct, or
some combination, into the tree and pass it in. U-Boot (or yaboot or
grub or whatever) can just pass it right to the kernel.
Part of the point of this is to move to a defined interface :)
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-07 17:20 ` Tom Rini
@ 2005-04-07 17:35 ` Jon Loeliger
2005-04-07 17:49 ` Tom Rini
0 siblings, 1 reply; 23+ messages in thread
From: Jon Loeliger @ 2005-04-07 17:35 UTC (permalink / raw)
To: Tom Rini
Cc: Jon Masters, Andrei Konovalov, Sylvain Munaut, Jakob Viketoft,
Linux PPC Embedded list
On Thu, 2005-04-07 at 12:20, Tom Rini wrote:
> Part of the point of this is to move to a defined interface :)
I've extracted a defined interface for the _current_ bd_t
structure so far. I'm telling you, you're not going to
like it... :-)
So what do you want to do with it? Specifically, my tree
is in this state:
- I have made two files, a .c and a .h that contain
essentially a grand-union of all of the bd_t and
board_info structure definitions that I could find.
- I have introduced shim function definitions that are
simple accessor functions to front the common structure
definition.
It is semi gross in that this file contains a plethora of
#ifdef messes that span multiple PPC32 boards and architectures.
Whereas these used to be nicely distributed (:-)) they are
all gathered into one place that clearly demonstrates a
few things:
- This is wrong and needs to be cleaned up more :-),
- Obvious refactoring for common functionality that
is NOT board-specific is still needed,
- There are 51 unique fields in all the bd_t defs.
I am currently proving that various platforms still build.
I'm not going to be able to run-test any boards except
a limited few.
I will happily supply a diff of my messings to the list or
a few individuals who want it.
jdl
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-07 17:35 ` Jon Loeliger
@ 2005-04-07 17:49 ` Tom Rini
2005-04-11 15:58 ` Jon Loeliger
0 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2005-04-07 17:49 UTC (permalink / raw)
To: Jon Loeliger
Cc: Jon Masters, Andrei Konovalov, Sylvain Munaut,
Linux PPC Embedded list, Jakob Viketoft
On Thu, Apr 07, 2005 at 12:35:51PM -0500, Jon Loeliger wrote:
> On Thu, 2005-04-07 at 12:20, Tom Rini wrote:
> > Part of the point of this is to move to a defined interface :)
>
> I've extracted a defined interface for the _current_ bd_t
> structure so far. I'm telling you, you're not going to
> like it... :-)
>
> So what do you want to do with it? Specifically, my tree
> is in this state:
>
> - I have made two files, a .c and a .h that contain
> essentially a grand-union of all of the bd_t and
> board_info structure definitions that I could find.
>
> - I have introduced shim function definitions that are
> simple accessor functions to front the common structure
> definition.
It sounds like a start certainly.
> It is semi gross in that this file contains a plethora of
> #ifdef messes that span multiple PPC32 boards and architectures.
> Whereas these used to be nicely distributed (:-)) they are
> all gathered into one place that clearly demonstrates a
> few things:
>
> - This is wrong and needs to be cleaned up more :-),
>
> - Obvious refactoring for common functionality that
> is NOT board-specific is still needed,
>
> - There are 51 unique fields in all the bd_t defs.
The vauge idea was that we would contruct the flattened tree, somehow
along the lines of
cat totally_common.txt > tree.txt
cat cpu_specific.txt >> tree.txt
cat board_specific.txt >> tree.txt
... autogen a header, or whatever ...
But basically yes, we should and must refactor things a bit so that,
ideally, a new 440GX-based platform would just need to supply its own
board_specific.txt (or whatever) and get the rest of the truely common
bits easily.
And ideally, a lot of the generation code can be shared between
kernel/U-Boot/whatever.
> I am currently proving that various platforms still build.
> I'm not going to be able to run-test any boards except
> a limited few.
>
> I will happily supply a diff of my messings to the list or
> a few individuals who want it.
Please post to the list as an RFC. Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-07 17:49 ` Tom Rini
@ 2005-04-11 15:58 ` Jon Loeliger
2005-04-14 9:54 ` Jakob Viketoft
0 siblings, 1 reply; 23+ messages in thread
From: Jon Loeliger @ 2005-04-11 15:58 UTC (permalink / raw)
To: Tom Rini
Cc: Jon Masters, Andrei Konovalov, Sylvain Munaut,
Linux PPC Embedded list, Jakob Viketoft
On Thu, 2005-04-07 at 12:49, Tom Rini wrote:
> Please post to the list as an RFC. Thanks.
Folks,
Apologies to those who have received this notice twice.
I first sent it to the list where it was summarily
denied for size reasons.
I have now posted a tgz file here instead:
http://www.jdl.com/bdt_cleanup.tgz
What follows is my original email content.
OK, for those keeping score over on the U-Boot list, _this_
message is really intended to be sent to the public list. :-)
Here (as noted above) are my diffs against a clone of
http://linux.bkbits.net/linux-2.6
as last pulled a couple days ago. (*)
Please consider this a Request For Comments for now. Feel free
to apply it and test it out as well, of course. :-) I'll sign-off
on it when it has ripened some more and gets a nod or two...
These changes relocate almost all of the ppcboot.h definitions
into new files, arc/ppc/syslib/fw_bdt.[ch] and front them
with a new, shim interface in include/asm-ppc/firmware.h.
There is a Kconfig option that allows you to select between
a "bd_t" interface and a non-existant "OF Flat dev tree"
interface. Choose wisely (default) for now. It adds the
new fw_bdt.o file.
Some potential gotchas or points to note:
- As of this patch, no interface to any board should change.
This just isolates the scattered bd_t references to one place.
- On Kumar's advice arch/ppc/boot/simple was totally ignored.
For now; this round. It can be next on the hit parade easily.
It holds the last reference to ppcboot.h still.
- Earlier cut-n-paste of some devices led to me changing a few
files over in 68k land to remove some now-obsolete ppcboot.h
related comments justs for completeness.
- I've compiled uImage using defconfigs for the following boards:
8560_ads cpci690 ash redwood5
8540_ads ads_8272 TQM8260 est8260
rpx8260 bseip mbx mpc834x_sys
ocotea lite5200 hdpu lopec
TQM860L rpxlite radstone_ppc7d walnut
- The file include/asm-ppc/ppcboot.h used to contain a nested
include of linux/types.h that was tacitly used by many files.
In ripping ppcboot.h out of many platform .h files, I've had
to add direct #include <linux/types.h> in several places.
If your board isn't listed above and it looks really broken,
consider if it needs a <linux/types.h>?
Enjoy,
jdl
--
(*) -- BK is dead. Long live BK!
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-11 15:58 ` Jon Loeliger
@ 2005-04-14 9:54 ` Jakob Viketoft
2005-04-15 14:22 ` Jon Loeliger
2005-04-22 17:33 ` Andrei Konovalov
0 siblings, 2 replies; 23+ messages in thread
From: Jakob Viketoft @ 2005-04-14 9:54 UTC (permalink / raw)
To: Jon Loeliger
Cc: Jon Masters, Tom Rini, Andrei Konovalov, Sylvain Munaut,
Linux PPC Embedded list
Has any more happened on this off-list, or it is just in testing-mode
right now?
I applied the changes to a 2.6.12-rc2 tree (with some minor rejects to
sort out) and it compiles and boots fine on my Memec FF1152 board with
the Virtex-II Pro chip (Xilinx ML300 config).
A couple of small changes to be able to use the simple boot-loader is below.
Cheers!
/Jakob
diff -ruN org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
--- org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
2005-04-04 18:38:03.000000000 +0200
+++ nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
2005-04-14 11:36:49.000000000 +0200
@@ -23,6 +23,8 @@
#endif
extern unsigned long timebase_period_ns;
+#include <syslib/fw_bdt.h>
+
/* For those boards that don't provide one.
*/
#if !defined(CONFIG_MBX)
@@ -776,8 +778,7 @@
bd->bi_intfreq = XPAR_CORE_CLOCK_FREQ_HZ;
bd->bi_busfreq = XPAR_PLB_CLOCK_FREQ_HZ;
bd->bi_pci_busfreq = XPAR_PCI_0_CLOCK_FREQ_HZ;
- timebase_period_ns = 1000000000 / bd->bi_tbfreq;
- /* see bi_tbfreq definition in
arch/ppc/platforms/4xx/xilinx_ml300.h */
+ timebase_period_ns = 1000000000 / bd->bi_intfreq;
}
#endif /* CONFIG_XILINX_ML300 */
diff -ruN org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
--- org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
2005-04-04 18:38:04.000000000 +0200
+++ nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
2005-04-14 10:22:38.000000000 +0200
@@ -22,6 +22,7 @@
#endif
#include "nonstdio.h"
+#include <syslib/fw_bdt.h>
/* The linker tells us where the image is. */
extern char __image_begin, __image_end;
Jon Loeliger wrote:
> On Thu, 2005-04-07 at 12:49, Tom Rini wrote:
>
>
>>Please post to the list as an RFC. Thanks.
>
>
> Folks,
>
> Apologies to those who have received this notice twice.
> I first sent it to the list where it was summarily
> denied for size reasons.
>
> I have now posted a tgz file here instead:
>
> http://www.jdl.com/bdt_cleanup.tgz
>
> What follows is my original email content.
>
>
> OK, for those keeping score over on the U-Boot list, _this_
> message is really intended to be sent to the public list. :-)
>
> Here (as noted above) are my diffs against a clone of
> http://linux.bkbits.net/linux-2.6
> as last pulled a couple days ago. (*)
>
> Please consider this a Request For Comments for now. Feel free
> to apply it and test it out as well, of course. :-) I'll sign-off
> on it when it has ripened some more and gets a nod or two...
>
> These changes relocate almost all of the ppcboot.h definitions
> into new files, arc/ppc/syslib/fw_bdt.[ch] and front them
> with a new, shim interface in include/asm-ppc/firmware.h.
>
> There is a Kconfig option that allows you to select between
> a "bd_t" interface and a non-existant "OF Flat dev tree"
> interface. Choose wisely (default) for now. It adds the
> new fw_bdt.o file.
>
> Some potential gotchas or points to note:
>
> - As of this patch, no interface to any board should change.
> This just isolates the scattered bd_t references to one place.
>
> - On Kumar's advice arch/ppc/boot/simple was totally ignored.
> For now; this round. It can be next on the hit parade easily.
> It holds the last reference to ppcboot.h still.
>
> - Earlier cut-n-paste of some devices led to me changing a few
> files over in 68k land to remove some now-obsolete ppcboot.h
> related comments justs for completeness.
>
> - I've compiled uImage using defconfigs for the following boards:
>
> 8560_ads cpci690 ash redwood5
> 8540_ads ads_8272 TQM8260 est8260
> rpx8260 bseip mbx mpc834x_sys
> ocotea lite5200 hdpu lopec
> TQM860L rpxlite radstone_ppc7d walnut
>
> - The file include/asm-ppc/ppcboot.h used to contain a nested
> include of linux/types.h that was tacitly used by many files.
> In ripping ppcboot.h out of many platform .h files, I've had
> to add direct #include <linux/types.h> in several places.
> If your board isn't listed above and it looks really broken,
> consider if it needs a <linux/types.h>?
>
>
> Enjoy,
> jdl
>
> --
> (*) -- BK is dead. Long live BK!
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-14 9:54 ` Jakob Viketoft
@ 2005-04-15 14:22 ` Jon Loeliger
2005-04-22 17:33 ` Andrei Konovalov
1 sibling, 0 replies; 23+ messages in thread
From: Jon Loeliger @ 2005-04-15 14:22 UTC (permalink / raw)
To: Jakob Viketoft
Cc: Jon Masters, Tom Rini, Andrei Konovalov, Sylvain Munaut,
Linux PPC Embedded list
On Thu, 2005-04-14 at 04:54, Jakob Viketoft wrote:
> Has any more happened on this off-list,
Not by me. A couple folks are also known to be on vacation.
> or it is just in testing-mode right now?
likely. Still waiting for feedback such as yours! (Thanks!)
> I applied the changes to a 2.6.12-rc2 tree (with some minor rejects to
> sort out) and it compiles and boots fine on my Memec FF1152 board with
> the Virtex-II Pro chip (Xilinx ML300 config).
Excellent.
> A couple of small changes to be able to use the simple boot-loader is below.
I'll add these to my mix!
Thanks,
jdl
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
2005-04-14 9:54 ` Jakob Viketoft
2005-04-15 14:22 ` Jon Loeliger
@ 2005-04-22 17:33 ` Andrei Konovalov
1 sibling, 0 replies; 23+ messages in thread
From: Andrei Konovalov @ 2005-04-22 17:33 UTC (permalink / raw)
To: Jakob Viketoft
Cc: Jon Masters, Tom Rini, Sylvain Munaut, Linux PPC Embedded list
Hi,
I've tested the Jon's patch with the changes by Jakob on ML300 board
couple days ago (just before 2.6.12-rc3) - works OK.
(got few rejects for some lite5200 files)
Thanks,
Andrei
Jakob Viketoft wrote:
> Has any more happened on this off-list, or it is just in testing-mode
> right now?
>
> I applied the changes to a 2.6.12-rc2 tree (with some minor rejects to
> sort out) and it compiles and boots fine on my Memec FF1152 board with
> the Virtex-II Pro chip (Xilinx ML300 config).
>
> A couple of small changes to be able to use the simple boot-loader is
> below.
>
> Cheers!
>
> /Jakob
>
> diff -ruN org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
> nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
> --- org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c
> 2005-04-04 18:38:03.000000000 +0200
> +++ nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/embed_config.c 2005-04-14
> 11:36:49.000000000 +0200
> @@ -23,6 +23,8 @@
> #endif
> extern unsigned long timebase_period_ns;
>
> +#include <syslib/fw_bdt.h>
> +
> /* For those boards that don't provide one.
> */
> #if !defined(CONFIG_MBX)
> @@ -776,8 +778,7 @@
> bd->bi_intfreq = XPAR_CORE_CLOCK_FREQ_HZ;
> bd->bi_busfreq = XPAR_PLB_CLOCK_FREQ_HZ;
> bd->bi_pci_busfreq = XPAR_PCI_0_CLOCK_FREQ_HZ;
> - timebase_period_ns = 1000000000 / bd->bi_tbfreq;
> - /* see bi_tbfreq definition in
> arch/ppc/platforms/4xx/xilinx_ml300.h */
> + timebase_period_ns = 1000000000 / bd->bi_intfreq;
> }
> #endif /* CONFIG_XILINX_ML300 */
>
> diff -ruN org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
> nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
> --- org-nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
> 2005-04-04 18:38:04.000000000 +0200
> +++ nobd-linux-2.6.12-rc2/arch/ppc/boot/simple/misc-embedded.c
> 2005-04-14 10:22:38.000000000 +0200
> @@ -22,6 +22,7 @@
> #endif
>
> #include "nonstdio.h"
> +#include <syslib/fw_bdt.h>
>
> /* The linker tells us where the image is. */
> extern char __image_begin, __image_end;
>
>
> Jon Loeliger wrote:
>
>> On Thu, 2005-04-07 at 12:49, Tom Rini wrote:
>>
>>
>>> Please post to the list as an RFC. Thanks.
>>
>>
>>
>> Folks,
>>
>> Apologies to those who have received this notice twice.
>> I first sent it to the list where it was summarily
>> denied for size reasons.
>>
>> I have now posted a tgz file here instead:
>>
>> http://www.jdl.com/bdt_cleanup.tgz
>>
>> What follows is my original email content.
>>
>>
>> OK, for those keeping score over on the U-Boot list, _this_
>> message is really intended to be sent to the public list. :-)
>>
>> Here (as noted above) are my diffs against a clone of
>> http://linux.bkbits.net/linux-2.6
>> as last pulled a couple days ago. (*)
>>
>> Please consider this a Request For Comments for now. Feel free
>> to apply it and test it out as well, of course. :-) I'll sign-off
>> on it when it has ripened some more and gets a nod or two...
>>
>> These changes relocate almost all of the ppcboot.h definitions
>> into new files, arc/ppc/syslib/fw_bdt.[ch] and front them
>> with a new, shim interface in include/asm-ppc/firmware.h.
>>
>> There is a Kconfig option that allows you to select between
>> a "bd_t" interface and a non-existant "OF Flat dev tree"
>> interface. Choose wisely (default) for now. It adds the
>> new fw_bdt.o file.
>>
>> Some potential gotchas or points to note:
>>
>> - As of this patch, no interface to any board should change.
>> This just isolates the scattered bd_t references to one place.
>>
>> - On Kumar's advice arch/ppc/boot/simple was totally ignored.
>> For now; this round. It can be next on the hit parade easily.
>> It holds the last reference to ppcboot.h still.
>>
>> - Earlier cut-n-paste of some devices led to me changing a few
>> files over in 68k land to remove some now-obsolete ppcboot.h
>> related comments justs for completeness.
>>
>> - I've compiled uImage using defconfigs for the following boards:
>>
>> 8560_ads cpci690 ash redwood5
>> 8540_ads ads_8272 TQM8260 est8260
>> rpx8260 bseip mbx mpc834x_sys
>> ocotea lite5200 hdpu lopec
>> TQM860L rpxlite radstone_ppc7d walnut
>>
>> - The file include/asm-ppc/ppcboot.h used to contain a nested
>> include of linux/types.h that was tacitly used by many files.
>> In ripping ppcboot.h out of many platform .h files, I've had
>> to add direct #include <linux/types.h> in several places.
>> If your board isn't listed above and it looks really broken,
>> consider if it needs a <linux/types.h>?
>>
>>
>> Enjoy,
>> jdl
>>
>> --
>> (*) -- BK is dead. Long live BK!
>>
>
>
^ permalink raw reply [flat|nested] 23+ messages in thread