summaryrefslogtreecommitdiff
path: root/board/amcc/sequoia/sequoia.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-12-13 14:52:53 +0100
committerStefan Roese <sr@denx.de>2007-12-27 19:35:32 +0100
commit136288847e3b04f2ff357a067ad45e10afa0a24c (patch)
tree400169375283ceaed24da68c454c8be4bcd4b8f8 /board/amcc/sequoia/sequoia.c
parent3b9abdc448a1c2c6a4c2aa292724b4d1a05166a9 (diff)
ppc4xx: Bring 4xx fdt support up-to-date
This patch update the 4xx fdt support. It enabled fdt booting on the AMCC Kilauea and Sequoia for now. More can follow later quite easily. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/amcc/sequoia/sequoia.c')
-rw-r--r--board/amcc/sequoia/sequoia.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index 4e47ab395b..f81f07146d 100644
--- a/board/amcc/sequoia/sequoia.c
+++ b/board/amcc/sequoia/sequoia.c
@@ -23,9 +23,11 @@
*/
#include <common.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <ppc440.h>
#include <asm/processor.h>
#include <asm/io.h>
-#include <ppc440.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -583,3 +585,24 @@ int post_hotkeys_pressed(void)
return 0; /* No hotkeys supported */
}
#endif /* CONFIG_POST */
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+ u32 val[4];
+ int rc;
+
+ ft_cpu_setup(blob, bd);
+
+ /* Fixup NOR mapping */
+ val[0] = 0; /* chip select number */
+ val[1] = 0; /* always 0 */
+ val[2] = gd->bd->bi_flashstart;
+ val[3] = gd->bd->bi_flashsize;
+ rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
+ val, sizeof(val), 1);
+ if (rc)
+ printf("Unable to update property NOR mapping, err=%s\n",
+ fdt_strerror(rc));
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */