Flat device tree support for 85xx ADS and CDS boards
PATCH 3/7 Flat device tree support for 85xx ADS and CDS boards
* Fixed a bug where RAM size was not properly passed to Linux on 85xx in the flat device tree
Patch by John Traill 17-Mar-2006
---
cpu/mpc85xx/cpu.c +6 -0
@@ -253,6 +253,12 @@ ft_cpu_setup(void *blob, bd_t *bd)if (p !=NULL ) *p =cpu_to_be32 (clock); + p =ft_get_prop (blob,"/memory/reg" , &len); +if (p !=NULL ) { + *p++ =cpu_to_be32 (bd->bi_memstart); + *p =cpu_to_be32 (bd->bi_memsize); + } +#if defined(CONFIG_MPC85XX_TSEC1 ) p =ft_get_prop (blob,"/" OF_SOC "/ethernet at 24000/address" , &len);memcpy (p, bd->bi_enetaddr,6 );
Signature · 1 line
1.2.4
PATCH 3/7 Flat device tree support for 85xx ADS and CDS boards
Quoted 5 lines · Andy Fleming
* Fixed a bug where RAM size was not properly passed to Linux on 85xx in the flat device tree
Patch by John Traill 17-Mar-2006Signed-off-by Andy Fleming <[email protected]>
Should this really go into the generic flat dev tree code?
If nothing else this shouldn't be in cpu/mpc85xx/cpu.c but in board code. You are assuming the layout of the memory/reg property will only be a single value which is necessarily true. It would be completely reasonable to have the memory/reg represent each bank of memory as a unique pair in the reg property. I believe this is what Apple does in its OF.
- kumar
Quoted 37 lines
---
cpu/mpc85xx/cpu.c +6
-0@@ -253,6 +253,12 @@ ft_cpu_setup(void *blob, bd_t *bd)if (p !=NULL ) *p =cpu_to_be32 (clock); + p =ft_get_prop (blob,"/memory/reg" , &len); +if (p !=NULL ) { + *p++ =cpu_to_be32 (bd->bi_memstart); + *p =cpu_to_be32 (bd->bi_memsize); + } +#if defined(CONFIG_MPC85XX_TSEC1 ) p =ft_get_prop (blob,"/" OF_SOC "/ethernet at 24000/address" , &len);memcpy (p, bd->bi_enetaddr,6 );Signature · 17 lines
1.2.4 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ U-Boot-Users mailing list U-Boot-Users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
PATCH 3/7 Flat device tree support for 85xx ADS and CDS boards
Quoted 2 lines · In message <[email protected]> you wrote:
Should this really go into the generic flat dev tree code?
I don't think so.
Quoted 3 lines
If nothing else this shouldn't be in
cpu/mpc85xx/cpu.cbut in board code. You are assuming the layout of the memory/reg property will only be a single value which is necessarily true. It would be
----^----
"not" missing here, I guess.
Quoted 3 lines
completely reasonable to have the memory/reg represent each bank of memory as a unique pair in the reg property. I believe this is what Apple does in its OF.
Best regards,
Wolfgang Denk
Signature · 6 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The games have always strengthened us. Death becomes a familiar pattern. We don't fear it as you do. -- Proconsul Marcus Claudius, "Bread and Circuses", stardate 4041.2