summaryrefslogtreecommitdiffstats
path: root/board/amcc
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-12-19 09:05:40 +0100
committerStefan Roese <sr@denx.de>2007-12-27 19:35:34 +0100
commitbf8324e4a50758daff8cddd04c6a2ff8ed775bea (patch)
treebb3076de5620f2627363e723aba257725970ac84 /board/amcc
parent328a340392a5df9aaf00792be989df73e750859e (diff)
downloadu-boot-bf8324e4a50758daff8cddd04c6a2ff8ed775bea.tar.gz
u-boot-bf8324e4a50758daff8cddd04c6a2ff8ed775bea.tar.xz
u-boot-bf8324e4a50758daff8cddd04c6a2ff8ed775bea.zip
ppc4xx: Add fdt support to AMCC Katmai eval board
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/amcc')
-rw-r--r--board/amcc/katmai/katmai.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/amcc/katmai/katmai.c b/board/amcc/katmai/katmai.c
index 39a3ef1695..25c9a22fea 100644
--- a/board/amcc/katmai/katmai.c
+++ b/board/amcc/katmai/katmai.c
@@ -25,6 +25,8 @@
#include <common.h>
#include <ppc4xx.h>
#include <i2c.h>
+#include <libfdt.h>
+#include <fdt_support.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/gpio.h>
@@ -533,3 +535,24 @@ int post_hotkeys_pressed(void)
return (ctrlc());
}
#endif
+
+#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) */