]> git.sur5r.net Git - u-boot/commitdiff
powerpc/b4860: Enable law creation of MAPLE
authorShaveta Leekha <shaveta@freescale.com>
Wed, 12 Nov 2014 08:53:26 +0000 (14:23 +0530)
committerYork Sun <yorksun@freescale.com>
Fri, 5 Dec 2014 16:06:12 +0000 (08:06 -0800)
B4860, B4440, B4420 and B4220 have MAPLE, so enable law creation
for them only. Remove static LAW creation for MAPLE.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Sandeep Singh <Sandeep@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/b4860qds/b4860qds.c
board/freescale/b4860qds/law.c

index bed8f56be43a0adb187e7bd87cdede01b89d6b1f..9f10cee0e3687784edf3000ce62111223fd68288 100644 (file)
@@ -915,6 +915,14 @@ int board_early_init_r(void)
        const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
        int flash_esel = find_tlb_idx((void *)flashbase, 1);
        int ret;
+       u32 svr = SVR_SOC_VER(get_svr());
+
+       /* Create law for MAPLE only for personalities having MAPLE */
+       if ((svr == SVR_B4860) || (svr == SVR_B4440) ||
+           (svr == SVR_B4420) || (svr == SVR_B4220)) {
+               set_next_law(CONFIG_SYS_MAPLE_MEM_PHYS, LAW_SIZE_16M,
+                            LAW_TRGT_IF_MAPLE);
+       }
 
        /*
         * Remap Boot flash + PROMJET region to caching-inhibited
index 5b327ccee9fb29a7c7d4eabe61766309d0b5b7c5..047c3cbb3f0ae1e9b92d81beb2496ccbbd0f38b4 100644 (file)
@@ -17,9 +17,6 @@ struct law_entry law_table[] = {
        SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_QMAN),
 #endif
        SET_LAW(QIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_IFC),
-#ifdef CONFIG_SYS_MAPLE_MEM_PHYS
-       SET_LAW(CONFIG_SYS_MAPLE_MEM_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_MAPLE),
-#endif
 #ifdef CONFIG_SYS_DCSRBAR_PHYS
        /* Limit DCSR to 32M to access NPC Trace Buffer */
        SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_DCSR),