[U-Boot-Users] [PATCH 3/7] Flat device tree support for 85xx ADS and CDS boards
Andy Fleming
afleming at freescale.com
Thu Mar 23 04:01:50 CET 2006
This is a new version of the previous patch, which modifies the board
files, instead.
* Fixed a bug where memory size was not passed through the flat
device tree on 85xx boards
Patch by Andy Fleming 22-Mar-2006
Signed-off-by: Andy Fleming<afleming at freescale.com>
---
board/cds/common/ft_board.c | 10 ++++++++++
board/mpc8540ads/mpc8540ads.c | 10 ++++++++++
4837c2c0333264cd7454a1d57950cf50e7bec5f3
diff --git a/board/cds/common/ft_board.c b/board/cds/common/ft_board.c
index f167e5f..1a9ccb9 100644
--- a/board/cds/common/ft_board.c
+++ b/board/cds/common/ft_board.c
@@ -32,9 +32,19 @@ extern void ft_cpu_setup(void *blob, bd_
void
ft_board_setup(void *blob, bd_t *bd)
{
+ u32 *p;
+ int len;
+
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
ft_cpu_setup(blob, bd);
+
+ 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);
+ }
+
}
#endif
diff --git a/board/mpc8540ads/mpc8540ads.c b/board/mpc8540ads/mpc8540ads.c
index e7db14b..01723f6 100644
--- a/board/mpc8540ads/mpc8540ads.c
+++ b/board/mpc8540ads/mpc8540ads.c
@@ -338,9 +338,19 @@ pci_init_board(void)
void
ft_board_setup(void *blob, bd_t *bd)
{
+ u32 *p;
+ int len;
+
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
ft_cpu_setup(blob, bd);
+
+ 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);
+ }
+
}
#endif
More information about the U-Boot
mailing list