All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values
@ 2007-10-24 16:41 Martin Krause
  2007-10-24 22:54 ` Kim Phillips
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Krause @ 2007-10-24 16:41 UTC (permalink / raw)
  To: u-boot

Hi,

I looked a bit into the fdt code in the bootm command. If I'm not wrong, 
the start of the memory and its size are fixed values in the 
fdt blob (node "memory"). U-Boot does not touch this values. I'm wondering,
why there is no fixup with the real values detected by U-Boot (stored in
bd->bi_mestart and bd->bi_memsize). For other properties, like 
"buf-frequency" a fixup with the real (detected) values is done (at least
on ppc processors).

If I want to do a fixup of the memory node befor starting Linux on our 
TQM5200 board, where would be the best place to do this? ft_board_setup()
seems to be right. But maybe it makes sense, to make this a global 
feature for all boards? AFAIK bd->bi_mestart and bd->bi_memsize
should contain valid values on all boards. So why not fixup the "memory"
node for all boards in ft_setup()? Does this make sense?

Best Regards,
Martin Krause

--
Entwicklung
Tel. +49 8153 93 08-157, Fax +49 8153 93 08-7157
mailto:martin.krause at tqs.de

TQ-Systems GmbH
M?hlstra?e 2, Gut Delling, D-82229 Seefeld
Amtsgericht M?nchen, HRB 105 018, UST-IdNr. DE 811 607 913
Gesch?ftsf?hrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) R?diger Stahl
http://www.tq-group.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values
  2007-10-24 16:41 [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values Martin Krause
@ 2007-10-24 22:54 ` Kim Phillips
  2007-10-25  7:11   ` Martin Krause
  0 siblings, 1 reply; 5+ messages in thread
From: Kim Phillips @ 2007-10-24 22:54 UTC (permalink / raw)
  To: u-boot

On Wed, 24 Oct 2007 18:41:51 +0200
"Martin Krause" <Martin.Krause@tqs.de> wrote:

> feature for all boards? AFAIK bd->bi_mestart and bd->bi_memsize
> should contain valid values on all boards. So why not fixup the "memory"
> node for all boards in ft_setup()? Does this make sense?

I think you're looking at the old CONFIG_OF_FLAT_TREE code, which has
since been superseded by CONFIG_OF_LIBFDT code.

In 83xx, all boards' /memory fixup occurs in ft_cpu_setup in
cpu/mpc83xx/cpu.c, but, yes, I agree, it should be put somewhere even
more common.

Kim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values
  2007-10-24 22:54 ` Kim Phillips
@ 2007-10-25  7:11   ` Martin Krause
  2007-10-25 11:14     ` Jerry Van Baren
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Krause @ 2007-10-25  7:11 UTC (permalink / raw)
  To: u-boot

Kim Phillips wrote on Thursday, October 25, 2007 12:55 AM:
> On Wed, 24 Oct 2007 18:41:51 +0200
> "Martin Krause" <Martin.Krause@tqs.de> wrote:
> 
> > feature for all boards? AFAIK bd->bi_mestart and bd->bi_memsize
> > should contain valid values on all boards. So why not fixup the
> > "memory" node for all boards in ft_setup()? Does this make sense?
> 
> I think you're looking at the old CONFIG_OF_FLAT_TREE code, which has
> since been superseded by CONFIG_OF_LIBFDT code.

You are right, I mixed up the two methods ...

> In 83xx, all boards' /memory fixup occurs in ft_cpu_setup in
> cpu/mpc83xx/cpu.c, but, yes, I agree, it should be put somewhere even
> more common.

What about moving the 83xx fixup code to cmd_bootm.c directly before/after
the ft_board_setup() call? Then the memory fixup is done globally for all
boards and dont't has to be implemented many times in the several 
ft_cpu_setup() or ft_board_setup() functions. Any Comments? Otherwise
I'm fine with doing it in ft_board_setup() for the TQM5200 board (copy &
paste it from cpu/mpc83xx/cpu.c ;-)

Best Regards,
Martin Krause

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values
  2007-10-25  7:11   ` Martin Krause
@ 2007-10-25 11:14     ` Jerry Van Baren
  2007-10-25 12:28       ` Martin Krause
  0 siblings, 1 reply; 5+ messages in thread
From: Jerry Van Baren @ 2007-10-25 11:14 UTC (permalink / raw)
  To: u-boot

Martin Krause wrote:
> Kim Phillips wrote on Thursday, October 25, 2007 12:55 AM:
>> On Wed, 24 Oct 2007 18:41:51 +0200
>> "Martin Krause" <Martin.Krause@tqs.de> wrote:
>>
>>> feature for all boards? AFAIK bd->bi_mestart and bd->bi_memsize
>>> should contain valid values on all boards. So why not fixup the
>>> "memory" node for all boards in ft_setup()? Does this make sense?
>> I think you're looking at the old CONFIG_OF_FLAT_TREE code, which has
>> since been superseded by CONFIG_OF_LIBFDT code.
> 
> You are right, I mixed up the two methods ...
> 
>> In 83xx, all boards' /memory fixup occurs in ft_cpu_setup in
>> cpu/mpc83xx/cpu.c, but, yes, I agree, it should be put somewhere even
>> more common.
> 
> What about moving the 83xx fixup code to cmd_bootm.c directly before/after
> the ft_board_setup() call? Then the memory fixup is done globally for all
> boards and dont't has to be implemented many times in the several 
> ft_cpu_setup() or ft_board_setup() functions. Any Comments? Otherwise
> I'm fine with doing it in ft_board_setup() for the TQM5200 board (copy &
> paste it from cpu/mpc83xx/cpu.c ;-)
> 
> Best Regards,
> Martin Krause

Hi Martin, et al.

I would rather see it in common/fdt_support.c.  The bootm command source 
file has already collected so much loosely related stuff it is hard to 
understand, so I hate to add more stuff to it.

gvb

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values
  2007-10-25 11:14     ` Jerry Van Baren
@ 2007-10-25 12:28       ` Martin Krause
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Krause @ 2007-10-25 12:28 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote on Thursday, October 25, 2007 1:14 PM:
> > What about moving the 83xx fixup code to cmd_bootm.c directly
> > before/after the ft_board_setup() call? Then the memory fixup is
> > done globally for all boards and dont't has to be implemented many
> > times in the several ft_cpu_setup() or ft_board_setup() functions.
> > Any Comments? Otherwise 
> > I'm fine with doing it in ft_board_setup() for the TQM5200 board
> > (copy & paste it from cpu/mpc83xx/cpu.c ;-)
> > 
> > Best Regards,
> > Martin Krause
> 
> Hi Martin, et al.
> 
> I would rather see it in common/fdt_support.c.  The bootm command
> source file has already collected so much loosely related stuff it is
> hard to understand, so I hate to add more stuff to it.

OK, I'll send a patch as further discussion basis.

Best Regards,
Martin Krause

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-25 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:41 [U-Boot-Users] Fixup of fdt with detected memory size instead of fixed values Martin Krause
2007-10-24 22:54 ` Kim Phillips
2007-10-25  7:11   ` Martin Krause
2007-10-25 11:14     ` Jerry Van Baren
2007-10-25 12:28       ` Martin Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.