From f6ae78e016e719fa92f49094b5a3935ec7b155fe Mon Sep 17 00:00:00 2001 From: Valentin Longchamp Date: Thu, 28 May 2009 16:46:21 +0200 Subject: [PATCH] --- yaml --- r: 149183 b: refs/heads/master c: 0573cb5f45f1b98b74348c3f1ed4f26e56e774e5 h: refs/heads/master i: 149181: add93a3853d9be194a7ab8007dce045c3380ee3c 149179: 7036fe6c3c5bf47fe347f28238468b98cccc21b5 149175: bdcb3d9eda2387b0ebf4bcd2ee0e8723b6b4390b 149167: 00f4f626a82fd9d45ee38e1a1832b45bfdf1505b 149151: ad2e7468741486c206add3d50d4652b5f9853be1 149119: 2ac15d8f8edabd99c34a2e15b84a59ed57897d17 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mx3/clock.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0fef723f77a5..f9af91fe4a6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b0ef442958d74e5749c460b0ae68606e317fe01 +refs/heads/master: 0573cb5f45f1b98b74348c3f1ed4f26e56e774e5 diff --git a/trunk/arch/arm/mach-mx3/clock.c b/trunk/arch/arm/mach-mx3/clock.c index 28bd11dc89b8..217d114b177a 100644 --- a/trunk/arch/arm/mach-mx3/clock.c +++ b/trunk/arch/arm/mach-mx3/clock.c @@ -483,7 +483,7 @@ DEFINE_CLOCK(i2c3_clk, 2, MXC_CCM_CGR0, 30, NULL, NULL, &perclk_clk); DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); -DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &ahb_clk); +DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); @@ -571,6 +571,13 @@ int __init mx31_clocks_init(unsigned long fref) for (i = 0; i < ARRAY_SIZE(lookups); i++) clkdev_add(&lookups[i]); + /* change the csi_clk parent if necessary */ + reg = __raw_readl(MXC_CCM_CCMR); + if (!(reg & MXC_CCM_CCMR_CSCS)) + if (clk_set_parent(&csi_clk, &usb_pll_clk)) + pr_err("%s: error changing csi_clk parent\n", __func__); + + /* Turn off all possible clocks */ __raw_writel((3 << 4), MXC_CCM_CGR0); __raw_writel(0, MXC_CCM_CGR1);