]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined
authorHaiying Wang <Haiying.Wang@freescale.com>
Wed, 1 Dec 2010 15:35:30 +0000 (10:35 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 1 Dec 2010 16:01:14 +0000 (10:01 -0600)
This fixes the compiling error for the board  which doesn't have NOR flash
(so CONFIG_FLASH_BASE is not defined)

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc85xx/cpu_init.c

index 27236a0bad5082c943cb16df870dc54d94348520..4b8faa5daf31a08da29a89d125d4342ece85fa0c 100644 (file)
@@ -327,7 +327,7 @@ int cpu_init_r(void)
        if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
                puts("already enabled");
                l2srbar = l2cache->l2srbar0;
-#ifdef CONFIG_SYS_INIT_L2_ADDR
+#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
                if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
                                && l2srbar >= CONFIG_SYS_FLASH_BASE) {
                        l2srbar = CONFIG_SYS_INIT_L2_ADDR;