Selaa lähdekoodia

Change DDR tlb start entry to CONFIG param for 85xx

So that we can locate the DDR tlb start entry to the value other than 8. By
default, it is still 8.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Haiying Wang 16 vuotta sitten
vanhempi
commit
950264317e
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      cpu/mpc85xx/tlb.c

+ 5 - 1
cpu/mpc85xx/tlb.c

@@ -125,6 +125,10 @@ void init_addr_map(void)
 }
 }
 #endif
 #endif
 
 
+#ifndef CONFIG_SYS_DDR_TLB_START
+#define CONFIG_SYS_DDR_TLB_START 8
+#endif
+
 unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
 unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
 {
 {
 	unsigned int tlb_size;
 	unsigned int tlb_size;
@@ -171,7 +175,7 @@ unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
 	 * Configure DDR TLB1 entries.
 	 * Configure DDR TLB1 entries.
 	 * Starting at TLB1 8, use no more than 8 TLB1 entries.
 	 * Starting at TLB1 8, use no more than 8 TLB1 entries.
 	 */
 	 */
-	ram_tlb_index = 8;
+	ram_tlb_index = CONFIG_SYS_DDR_TLB_START;
 	ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE;
 	ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE;
 	while (ram_tlb_address < (memsize_in_meg * 1024 * 1024)
 	while (ram_tlb_address < (memsize_in_meg * 1024 * 1024)
 	      && ram_tlb_index < 16) {
 	      && ram_tlb_index < 16) {