[U-Boot] [PATCH][RESEND] 85xx/p1_p2_rdb: Added RevD board support.

Poonam Aggrwal poonam.aggrwal at freescale.com
Tue Jun 22 07:58:01 CEST 2010


  - Removed RevB, as it was a development stage board.
  - From now only RevC and RevD will be supported.

Signed-off-by: Dipen Dudhat <dipen.dudhat at freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal at freescale.com>
---
 board/freescale/p1_p2_rdb/p1_p2_rdb.c |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/board/freescale/p1_p2_rdb/p1_p2_rdb.c b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
index 31cdf9a..d870a3b 100644
--- a/board/freescale/p1_p2_rdb/p1_p2_rdb.c
+++ b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
@@ -52,32 +52,23 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define SYSCLK_MASK	0x00200000
 #define BOARDREV_MASK	0x10100000
-#define BOARDREV_B	0x10100000
 #define BOARDREV_C	0x00100000
+#define BOARDREV_D	0x00000000
 
 #define SYSCLK_66	66666666
-#define SYSCLK_50	50000000
 #define SYSCLK_100	100000000
 
 unsigned long get_board_sys_clk(ulong dummy)
 {
 	volatile ccsr_gpio_t *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
-	u32 val_gpdat, sysclk_gpio, board_rev_gpio;
+	u32 val_gpdat, sysclk_gpio;
 
 	val_gpdat = pgpio->gpdat;
 	sysclk_gpio = val_gpdat & SYSCLK_MASK;
-	board_rev_gpio = val_gpdat & BOARDREV_MASK;
-	if (board_rev_gpio == BOARDREV_C) {
-		if(sysclk_gpio == 0)
-			return SYSCLK_66;
-		else
-			return SYSCLK_100;
-	} else if (board_rev_gpio == BOARDREV_B) {
-		if(sysclk_gpio == 0)
-			return SYSCLK_66;
-		else
-			return SYSCLK_50;
-	}
+	if(sysclk_gpio == 0)
+		return SYSCLK_66;
+	else
+		return SYSCLK_100;
 	return 0;
 }
 
@@ -104,8 +95,8 @@ int checkboard (void)
 	board_rev_gpio = val_gpdat & BOARDREV_MASK;
 	if (board_rev_gpio == BOARDREV_C)
 		board_rev = 'C';
-	else if (board_rev_gpio == BOARDREV_B)
-		board_rev = 'B';
+	else if (board_rev_gpio == BOARDREV_D)
+		board_rev = 'D';
 	else
 		panic ("Unexpected Board REV %x detected!!\n", board_rev_gpio);
 
-- 
1.5.6.5



More information about the U-Boot mailing list