]> git.sur5r.net Git - u-boot/commitdiff
ppc4xx: Fix FDT EBC mappings on Canyonlands
authorFelix Radensky <felix@embedded-sol.com>
Mon, 22 Jun 2009 12:30:42 +0000 (15:30 +0300)
committerStefan Roese <sr@denx.de>
Wed, 8 Jul 2009 08:59:06 +0000 (10:59 +0200)
This patch fixes 2 problems with FDT EBC mappings on Canyonlands.
First, NAND EBC mapping was missing, making Linux NAND driver
unusable on this board. Second, NOR remapping code assumed that
NOR is always on CS0, however when booting from NAND NOR is on CS3.

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: Stefan Roese <sr@denx.de>
board/amcc/canyonlands/canyonlands.c
include/configs/canyonlands.h

index 2b7468923125e0895342da6d6b0905fba926a750..cfc1023f4fcb5d267c8d80b3e6159057cde323df 100644 (file)
@@ -575,15 +575,17 @@ int misc_init_r(void)
 #endif /* !defined(CONFIG_ARCHES) */
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+extern void __ft_board_setup(void *blob, bd_t *bd);
+
 void ft_board_setup(void *blob, bd_t *bd)
 {
        u32 val[4];
        int rc;
 
-       ft_cpu_setup(blob, bd);
+       __ft_board_setup(blob, bd);
 
        /* Fixup NOR mapping */
-       val[0] = 0;                             /* chip select number */
+       val[0] = CONFIG_SYS_NOR_CS;             /* chip select number */
        val[1] = 0;                             /* always 0 */
        val[2] = CONFIG_SYS_FLASH_BASE_PHYS_L;          /* we fixed up this address */
        val[3] = gd->bd->bi_flashsize;
index d814012c415ee08e952e7397d8eff5b2f18bd902..48c51988af4ce0ed7e1baac6c598d039a5b632f0 100644 (file)
  */
 #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
 #define        CONFIG_ENV_IS_IN_FLASH  1       /* use FLASH for environment vars */
+#define CONFIG_SYS_NOR_CS              0       /* NOR chip connected to CSx */
 #define CONFIG_SYS_NAND_CS             3       /* NAND chip connected to CSx */
 #else
 #define        CONFIG_ENV_IS_IN_NAND   1       /* use NAND for environment vars  */
+#define CONFIG_SYS_NOR_CS              3       /* NOR chip connected to CSx */
 #define CONFIG_SYS_NAND_CS             0       /* NAND chip connected to CSx */
 #define CONFIG_ENV_IS_EMBEDDED 1       /* use embedded environment */
 #endif