From: Andy Fleming Date: Wed, 22 Mar 2006 21:01:50 -0600 (CST) Subject: [U-Boot-Users] [PATCH 3/7] Flat device tree support for 85xx ADS and CDS boards Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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