]> git.sur5r.net Git - u-boot/commitdiff
board/freescale: Use unified setup_ddr_tlbs for spl boot and non-spl boot
authorShengzhou Liu <Shengzhou.Liu@nxp.com>
Tue, 31 May 2016 07:39:06 +0000 (15:39 +0800)
committerYork Sun <york.sun@nxp.com>
Sat, 4 Jun 2016 05:12:54 +0000 (22:12 -0700)
We should use unified setup_ddr_tlbs() for spl boot and non-spl boot
to make sure 'M' bit is set for DDR TLB to maintain cache coherence.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/b4860qds/ddr.c
board/freescale/t102xqds/ddr.c
board/freescale/t102xrdb/ddr.c
board/freescale/t104xrdb/ddr.c
board/freescale/t208xqds/ddr.c
board/freescale/t208xrdb/ddr.c
board/freescale/t4qds/ddr.c
board/freescale/t4rdb/ddr.c

index eb10a6f364af2e9842084ded5993f82976b5245a..31b186ea8ce9c51aaf35ed26dfc32d0a763ee764 100644 (file)
@@ -179,15 +179,13 @@ phys_size_t initdram(int board_type)
 
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        puts("Initializing....using SPD\n");
-
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
-
 #else
        dram_size =  fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
+
        return dram_size;
 }
 
index 2d4d10f351a1082a8eabc47ce19fc132e6314829..fa1394d9f0a36ac04b8d2a752520f282e8bec03a 100644 (file)
@@ -172,14 +172,13 @@ phys_size_t initdram(int board_type)
 
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        puts("Initializing....using SPD\n");
-
        dram_size = fsl_ddr_sdram();
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size =  fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
 
 #if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
        fsl_dp_resume();
index adf9fd5f78b448cb010cb2a5493abe9b347570f4..b13692bb4a88bb855175c7af3657de8feaa90ba4 100644 (file)
@@ -234,12 +234,12 @@ phys_size_t initdram(int board_type)
        puts("Initializing....using SPD\n");
 #endif
        dram_size = fsl_ddr_sdram();
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size =  fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
 
 #if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
        fsl_dp_resume();
index cf79d2ddb2d462b7051ee473cbfc5909952f22e7..22d6a5f617693c71bca2050627aa46788a4b66a3 100644 (file)
@@ -124,15 +124,12 @@ phys_size_t initdram(int board_type)
 
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        puts("Initializing....using SPD\n");
-
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
-
 #else
        dram_size =  fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
 
 #if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
        fsl_dp_resume();
index f1aff5481e49aeeb8a4c7d549ac7709cfaadc5aa..f96470f0206b551d2351369e784cca665040fc2b 100644 (file)
@@ -108,13 +108,12 @@ phys_size_t initdram(int board_type)
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        puts("Initializing....using SPD\n");
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size =  fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
 
        return dram_size;
 }
index 053f128e5b2286d84f727d022151839f36c2d8c5..f6c8ca30ac44388f35d2579e37cb2fb8c3c91098 100644 (file)
@@ -101,12 +101,12 @@ phys_size_t initdram(int board_type)
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        puts("Initializing....using SPD\n");
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size = fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
+
        return dram_size;
 }
index 62d58c5b1f10c183c628ecdfa59f812a04977966..d533924a0dd38ac76860870ba388e99d5b6383a2 100644 (file)
@@ -117,13 +117,12 @@ phys_size_t initdram(int board_type)
 
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
-
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size = fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
+
        return dram_size;
 }
index 27b37b5cc42284c2bedc732da48bed95bcc601e8..230f031a3bf8d9319869f6d22f8bc8709a2f3504 100644 (file)
@@ -110,13 +110,12 @@ phys_size_t initdram(int board_type)
 
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        dram_size = fsl_ddr_sdram();
-
-       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
-       dram_size *= 0x100000;
 #else
        /* DDR has been initialised by first stage boot loader */
        dram_size = fsl_ddr_sdram_size();
 #endif
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
 
        return dram_size;
 }