diff options
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/mx35_3stack/lowlevel_init.S | 15 | ||||
-rw-r--r-- | board/freescale/mx35_3stack/mx35_3stack.c | 10 |
2 files changed, 17 insertions, 8 deletions
diff --git a/board/freescale/mx35_3stack/lowlevel_init.S b/board/freescale/mx35_3stack/lowlevel_init.S index 0b47ef1..c255e98 100644 --- a/board/freescale/mx35_3stack/lowlevel_init.S +++ b/board/freescale/mx35_3stack/lowlevel_init.S @@ -33,8 +33,8 @@ ldr \tmp, =IIM_BASE_ADDR ldr \ret, [\tmp, #IIM_SREV] cmp \ret, #0x00 - moveq \tmp, #ROMPATCH_BASE_ADDR - ldreq \ret, [\tmp, #ROMPATCH_REV] + moveq \tmp, #ROMPATCH_REV + ldreq \ret, [\tmp] moveq \ret, \ret, lsl #4 addne \ret, \ret, #0x10 .endm @@ -62,6 +62,13 @@ orr r1, r1, r2 str r1, [r0, #L2_CACHE_AUX_CTL_REG] + /* Workaournd for TO1 DDR issue:WT*/ + check_soc_version r1, r2 + cmp r1, #CHIP_REV_2_0 + ldrlo r1, [r0, #L2_CACHE_DBG_CTL_REG] + orrlo r1, r1, #2 + strlo r1, [r0, #L2_CACHE_DBG_CTL_REG] + /* Invalidate L2 */ mov r1, #0x000000FF str r1, [r0, #L2_CACHE_INV_WAY_REG] @@ -196,7 +203,7 @@ str r2, [r0, #CLKCTL_CCMR] check_soc_version r1, r2 - cmp r1, #0x20 + cmp r1, #CHIP_REV_2_0 ldrhs r3, =CCM_MPLL_399_HZ bhs 1f ldr r2, [r0, #CLKCTL_PDR0] @@ -247,7 +254,7 @@ mov lr, fp check_soc_version r3, r4 - cmp r1, #0x20 + cmp r1, #CHIP_REV_2_0 bhs 1f cmp r5, #0 movne r3, #L2CC_BASE_ADDR diff --git a/board/freescale/mx35_3stack/mx35_3stack.c b/board/freescale/mx35_3stack/mx35_3stack.c index 7854f86..267e9f1 100644 --- a/board/freescale/mx35_3stack/mx35_3stack.c +++ b/board/freescale/mx35_3stack/mx35_3stack.c @@ -43,19 +43,20 @@ static inline void setup_soc_rev(void) int reg; reg = __REG(IIM_BASE_ADDR + IIM_SREV); if (!reg) { - reg = __REG(ROMPATCH_BASE_ADDR + ROMPATCH_REV); + reg = __REG(ROMPATCH_REV); reg <<= 4; } else - reg += 0x10; + reg += CHIP_REV_1_0; system_rev = 0x35000 + (reg & 0xFF); } static inline void set_board_rev(int rev) { - system_rev |= (rev & 0xF) << 8; + int reg; + system_rev = (system_rev & ~(0xF << 8)) | (rev & 0xF) << 8; } -static inline int is_soc_rev(int rev) +int is_soc_rev(int rev) { return (system_rev & 0xFF) - rev; } @@ -171,6 +172,7 @@ static inline int board_detect(void) set_board_rev(1); return 1; } + set_board_rev(0); return 0; } |