aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-03-23 05:07:48 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-07 10:15:13 -0400
commitd16caf69ce26dbd2ec3ae4e0072c2a60f1896c89 (patch)
tree4341ada8d04580efe80b5b5feee2ad4ae3832964
parent54df526819d3bfbc1af3f13aed7a3f9b9fdbdd04 (diff)
i.MX35 clock support: remove automotive path
It is no longer present in newer cores. Unfortunately Freescale decided to put the bit which decides between automotive clock path and consumer clock path in the automotive clock path direction. With current code we cannot detect the core revision, so just remove automotive path completely. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-mx3/clock-imx35.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 53a112d4e04a..db4aba7e5c6f 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -147,34 +147,16 @@ static struct arm_ahb_div clk_consumer[] = {
147 { .arm = 0, .ahb = 0, .sel = 0}, 147 { .arm = 0, .ahb = 0, .sel = 0},
148}; 148};
149 149
150static struct arm_ahb_div clk_automotive[] = {
151 { .arm = 1, .ahb = 3, .sel = 0},
152 { .arm = 1, .ahb = 2, .sel = 1},
153 { .arm = 2, .ahb = 1, .sel = 1},
154 { .arm = 0, .ahb = 0, .sel = 0},
155 { .arm = 1, .ahb = 6, .sel = 0},
156 { .arm = 1, .ahb = 4, .sel = 1},
157 { .arm = 2, .ahb = 2, .sel = 1},
158 { .arm = 0, .ahb = 0, .sel = 0},
159};
160
161static unsigned long get_rate_arm(void) 150static unsigned long get_rate_arm(void)
162{ 151{
163 unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); 152 unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0);
164 struct arm_ahb_div *aad; 153 struct arm_ahb_div *aad;
165 unsigned long fref = get_rate_mpll(); 154 unsigned long fref = get_rate_mpll();
166 155
167 if (pdr0 & 1) { 156 aad = &clk_consumer[(pdr0 >> 16) & 0xf];
168 /* consumer path */ 157 if (aad->sel)
169 aad = &clk_consumer[(pdr0 >> 16) & 0xf]; 158 fref = fref * 2 / 3;
170 if (aad->sel) 159
171 fref = fref * 2 / 3;
172 } else {
173 /* auto path */
174 aad = &clk_automotive[(pdr0 >> 9) & 0x7];
175 if (aad->sel)
176 fref = fref * 3 / 4;
177 }
178 return fref / aad->arm; 160 return fref / aad->arm;
179} 161}
180 162
@@ -184,12 +166,7 @@ static unsigned long get_rate_ahb(struct clk *clk)
184 struct arm_ahb_div *aad; 166 struct arm_ahb_div *aad;
185 unsigned long fref = get_rate_mpll(); 167 unsigned long fref = get_rate_mpll();
186 168
187 if (pdr0 & 1) 169 aad = &clk_consumer[(pdr0 >> 16) & 0xf];
188 /* consumer path */
189 aad = &clk_consumer[(pdr0 >> 16) & 0xf];
190 else
191 /* auto path */
192 aad = &clk_automotive[(pdr0 >> 9) & 0x7];
193 170
194 return fref / aad->ahb; 171 return fref / aad->ahb;
195} 172}