소스 검색

ppc/85xx: Make flash TLB entry determined at runtime on FSL boards

Rather than hard coding which TLB entry the FLASH is mapped with we can
use find_tlb_idx to determine the entry.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala 15 년 전
부모
커밋
5fb6ea3ad3
4개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      board/freescale/mpc8536ds/mpc8536ds.c
  2. 1 1
      board/freescale/mpc8572ds/mpc8572ds.c
  3. 1 1
      board/freescale/p1_p2_rdb/p1_p2_rdb.c
  4. 1 1
      board/freescale/p2020ds/p2020ds.c

+ 1 - 1
board/freescale/mpc8536ds/mpc8536ds.c

@@ -313,7 +313,7 @@ void pci_init_board(void)
 int board_early_init_r(void)
 {
 	const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
-	const u8 flash_esel = 1;
+	const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
 
 	/*
 	 * Remap Boot flash + PROMJET region to caching-inhibited

+ 1 - 1
board/freescale/mpc8572ds/mpc8572ds.c

@@ -264,7 +264,7 @@ void pci_init_board(void)
 int board_early_init_r(void)
 {
 	const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
-	const u8 flash_esel = 2;
+	const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
 
 	/*
 	 * Remap Boot flash + PROMJET region to caching-inhibited

+ 1 - 1
board/freescale/p1_p2_rdb/p1_p2_rdb.c

@@ -131,7 +131,7 @@ int checkboard (void)
 int board_early_init_r(void)
 {
 	const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
-	const u8 flash_esel = 2;
+	const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
 
 	/*
 	 * Remap Boot flash region to caching-inhibited

+ 1 - 1
board/freescale/p2020ds/p2020ds.c

@@ -298,7 +298,7 @@ void pci_init_board(void)
 int board_early_init_r(void)
 {
 	const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
-	const u8 flash_esel = 2;
+	const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
 
 	/*
 	 * Remap Boot flash + PROMJET region to caching-inhibited