diff options
-rw-r--r-- | arch/arm/mach-mx3/clock-imx35.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index d3af0fdf8475..32adf8d5b1f8 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -485,10 +485,10 @@ static struct clk_lookup lookups[] = { | |||
485 | 485 | ||
486 | int __init mx35_clocks_init() | 486 | int __init mx35_clocks_init() |
487 | { | 487 | { |
488 | unsigned int ll = 0; | 488 | unsigned int cgr2 = 3 << 26, cgr3 = 0; |
489 | 489 | ||
490 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) | 490 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) |
491 | ll = (3 << 16); | 491 | cgr2 |= 3 << 16; |
492 | #endif | 492 | #endif |
493 | 493 | ||
494 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 494 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
@@ -499,8 +499,20 @@ int __init mx35_clocks_init() | |||
499 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); | 499 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); |
500 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), | 500 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), |
501 | CCM_BASE + CCM_CGR1); | 501 | CCM_BASE + CCM_CGR1); |
502 | __raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2); | 502 | |
503 | __raw_writel(0, CCM_BASE + CCM_CGR3); | 503 | /* |
504 | * Check if we came up in internal boot mode. If yes, we need some | ||
505 | * extra clocks turned on, otherwise the MX35 boot ROM code will | ||
506 | * hang after a watchdog reset. | ||
507 | */ | ||
508 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { | ||
509 | /* Additionally turn on UART1, SCC, and IIM clocks */ | ||
510 | cgr2 |= 3 << 16 | 3 << 4; | ||
511 | cgr3 |= 3 << 2; | ||
512 | } | ||
513 | |||
514 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | ||
515 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | ||
504 | 516 | ||
505 | mxc_timer_init(&gpt_clk, | 517 | mxc_timer_init(&gpt_clk, |
506 | MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); | 518 | MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); |