summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel@ziswiler.com>2009-10-01 23:55:17 +0200
committerWolfgang Denk <wd@denx.de>2009-11-22 23:16:28 +0100
commitcada315100c88894b85972a91309a6f2413966b6 (patch)
tree2f4e2ad816488a3162ba43302fc424e336d72561 /board
parentf2cea405f83da46b72098ea874fb3eefe185d312 (diff)
mpc8260: move FDT memory node fixup into common CPU code.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com> Tested-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mpc8260ads/mpc8260ads.c13
-rw-r--r--board/ids8247/ids8247.c16
-rw-r--r--board/keymile/mgcoge/mgcoge.c8
-rw-r--r--board/muas3001/muas3001.c16
4 files changed, 1 insertions, 52 deletions
diff --git a/board/freescale/mpc8260ads/mpc8260ads.c b/board/freescale/mpc8260ads/mpc8260ads.c
index 49a88bbdd1..be55626104 100644
--- a/board/freescale/mpc8260ads/mpc8260ads.c
+++ b/board/freescale/mpc8260ads/mpc8260ads.c
@@ -550,24 +550,11 @@ void pci_init_board(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_blob_update(void *blob, bd_t *bd)
-{
- int ret;
-
- ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
-
- if (ret < 0) {
- printf("ft_blob_update(): cannot set /memory/reg "
- "property err:%s\n", fdt_strerror(ret));
- }
-}
-
void ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
- ft_blob_update(blob, bd);
}
#endif
diff --git a/board/ids8247/ids8247.c b/board/ids8247/ids8247.c
index 79fe9da5ba..d621833cc1 100644
--- a/board/ids8247/ids8247.c
+++ b/board/ids8247/ids8247.c
@@ -400,24 +400,8 @@ int board_nand_init(struct nand_chip *nand)
#endif /* CONFIG_CMD_NAND */
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-/*
- * update "memory" property in the blob
- */
-void ft_blob_update(void *blob, bd_t *bd)
-{
- int ret;
-
- ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
-
- if (ret < 0) {
- printf("ft_blob_update(): cannot set /memory/reg "
- "property err:%s\n", fdt_strerror(ret));
- }
-}
-
void ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup( blob, bd);
- ft_blob_update(blob, bd);
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index b16a01ccc5..932a80547f 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -312,11 +312,10 @@ int hush_init_var (void)
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
/*
- * update "memory" property in the blob
+ * update "flash" property in the blob
*/
void ft_blob_update (void *blob, bd_t *bd)
{
- ulong memory_data[2] = {0};
ulong *flash_data = NULL;
ulong flash_reg[6] = {0};
flash_info_t *info;
@@ -324,11 +323,6 @@ void ft_blob_update (void *blob, bd_t *bd)
int size;
int i = 0;
- memory_data[0] = cpu_to_be32 (bd->bi_memstart);
- memory_data[1] = cpu_to_be32 (bd->bi_memsize);
- fdt_set_node_and_value (blob, "/memory", "reg", memory_data,
- sizeof (memory_data));
-
len = fdt_get_node_and_value (blob, "/localbus", "ranges",
(void *)&flash_data);
diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index 36caed813d..e0a7f32fd9 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -308,25 +308,9 @@ int board_early_init_r (void)
void ft_blob_update (void *blob, bd_t *bd)
{
int ret, nodeoffset = 0;
- ulong memory_data[2] = {0};
ulong flash_data[4] = {0};
ulong speed = 0;
- memory_data[0] = cpu_to_be32 (bd->bi_memstart);
- memory_data[1] = cpu_to_be32 (bd->bi_memsize);
-
- nodeoffset = fdt_path_offset (blob, "/memory");
- if (nodeoffset >= 0) {
- ret = fdt_setprop (blob, nodeoffset, "reg", memory_data,
- sizeof(memory_data));
- if (ret < 0)
- printf ("ft_blob_update): cannot set /memory/reg "
- "property err:%s\n", fdt_strerror (ret));
- } else {
- /* memory node is required in dts */
- printf ("ft_blob_update(): cannot find /memory node "
- "err:%s\n", fdt_strerror(nodeoffset));
- }
/* update Flash addr, size */
flash_data[2] = cpu_to_be32 (CONFIG_SYS_FLASH_BASE);
flash_data[3] = cpu_to_be32 (CONFIG_SYS_FLASH_SIZE);