summaryrefslogtreecommitdiff
path: root/board/amcc
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-12-13 14:52:53 +0100
committerStefan Roese <sr@denx.de>2007-12-13 14:52:53 +0100
commit8697e6a19b10f514511b6a9c86de88bd108c4f8d (patch)
tree23a68aea2617271069d52c6ef1d49d8636160d5f /board/amcc
parenta449c500b1abf8d63e774145f85c35efaecef3e5 (diff)
downloadu-boot-imx-8697e6a19b10f514511b6a9c86de88bd108c4f8d.zip
u-boot-imx-8697e6a19b10f514511b6a9c86de88bd108c4f8d.tar.gz
u-boot-imx-8697e6a19b10f514511b6a9c86de88bd108c4f8d.tar.bz2
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')
-rw-r--r--board/amcc/kilauea/kilauea.c1
-rw-r--r--board/amcc/sequoia/sequoia.c25
2 files changed, 25 insertions, 1 deletions
diff --git a/board/amcc/kilauea/kilauea.c b/board/amcc/kilauea/kilauea.c
index 96c0dd4..2ee896a 100644
--- a/board/amcc/kilauea/kilauea.c
+++ b/board/amcc/kilauea/kilauea.c
@@ -25,6 +25,7 @@
#include <ppc4xx.h>
#include <ppc405.h>
#include <libfdt.h>
+#include <fdt_support.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index 4e47ab3..f81f071 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) */