diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 644550bfa330..f491025a0c82 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -144,7 +144,7 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk) | |||
144 | return hsio_clk; | 144 | return hsio_clk; |
145 | } | 145 | } |
146 | 146 | ||
147 | static void clk_pxa3xx_cken_enable(struct clk *clk) | 147 | void clk_pxa3xx_cken_enable(struct clk *clk) |
148 | { | 148 | { |
149 | unsigned long mask = 1ul << (clk->cken & 0x1f); | 149 | unsigned long mask = 1ul << (clk->cken & 0x1f); |
150 | 150 | ||
@@ -154,7 +154,7 @@ static void clk_pxa3xx_cken_enable(struct clk *clk) | |||
154 | CKENB |= mask; | 154 | CKENB |= mask; |
155 | } | 155 | } |
156 | 156 | ||
157 | static void clk_pxa3xx_cken_disable(struct clk *clk) | 157 | void clk_pxa3xx_cken_disable(struct clk *clk) |
158 | { | 158 | { |
159 | unsigned long mask = 1ul << (clk->cken & 0x1f); | 159 | unsigned long mask = 1ul << (clk->cken & 0x1f); |
160 | 160 | ||
@@ -164,7 +164,7 @@ static void clk_pxa3xx_cken_disable(struct clk *clk) | |||
164 | CKENB &= ~mask; | 164 | CKENB &= ~mask; |
165 | } | 165 | } |
166 | 166 | ||
167 | static const struct clkops clk_pxa3xx_cken_ops = { | 167 | const struct clkops clk_pxa3xx_cken_ops = { |
168 | .enable = clk_pxa3xx_cken_enable, | 168 | .enable = clk_pxa3xx_cken_enable, |
169 | .disable = clk_pxa3xx_cken_disable, | 169 | .disable = clk_pxa3xx_cken_disable, |
170 | }; | 170 | }; |
@@ -196,24 +196,6 @@ static const struct clkops clk_pout_ops = { | |||
196 | .disable = clk_pout_disable, | 196 | .disable = clk_pout_disable, |
197 | }; | 197 | }; |
198 | 198 | ||
199 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | ||
200 | { \ | ||
201 | .name = _name, \ | ||
202 | .dev = _dev, \ | ||
203 | .ops = &clk_pxa3xx_cken_ops, \ | ||
204 | .rate = _rate, \ | ||
205 | .cken = CKEN_##_cken, \ | ||
206 | .delay = _delay, \ | ||
207 | } | ||
208 | |||
209 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | ||
210 | { \ | ||
211 | .name = _name, \ | ||
212 | .dev = _dev, \ | ||
213 | .ops = _ops, \ | ||
214 | .cken = CKEN_##_cken, \ | ||
215 | } | ||
216 | |||
217 | static struct clk pxa3xx_clks[] = { | 199 | static struct clk pxa3xx_clks[] = { |
218 | { | 200 | { |
219 | .name = "CLK_POUT", | 201 | .name = "CLK_POUT", |
@@ -231,7 +213,7 @@ static struct clk pxa3xx_clks[] = { | |||
231 | PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | 213 | PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), |
232 | 214 | ||
233 | PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | 215 | PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), |
234 | PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), | 216 | PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev), |
235 | PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), | 217 | PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), |
236 | PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), | 218 | PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), |
237 | 219 | ||
@@ -239,10 +221,11 @@ static struct clk pxa3xx_clks[] = { | |||
239 | PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), | 221 | PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), |
240 | PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), | 222 | PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), |
241 | PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev), | 223 | PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev), |
224 | PXA3xx_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev), | ||
225 | PXA3xx_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev), | ||
242 | 226 | ||
243 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), | 227 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), |
244 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), | 228 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), |
245 | PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev), | ||
246 | }; | 229 | }; |
247 | 230 | ||
248 | #ifdef CONFIG_PM | 231 | #ifdef CONFIG_PM |
@@ -520,7 +503,7 @@ void __init pxa3xx_init_irq(void) | |||
520 | */ | 503 | */ |
521 | 504 | ||
522 | static struct platform_device *devices[] __initdata = { | 505 | static struct platform_device *devices[] __initdata = { |
523 | &pxa_device_udc, | 506 | /* &pxa_device_udc, The UDC driver is PXA25x only */ |
524 | &pxa_device_ffuart, | 507 | &pxa_device_ffuart, |
525 | &pxa_device_btuart, | 508 | &pxa_device_btuart, |
526 | &pxa_device_stuart, | 509 | &pxa_device_stuart, |
@@ -530,6 +513,8 @@ static struct platform_device *devices[] __initdata = { | |||
530 | &pxa27x_device_ssp2, | 513 | &pxa27x_device_ssp2, |
531 | &pxa27x_device_ssp3, | 514 | &pxa27x_device_ssp3, |
532 | &pxa3xx_device_ssp4, | 515 | &pxa3xx_device_ssp4, |
516 | &pxa27x_device_pwm0, | ||
517 | &pxa27x_device_pwm1, | ||
533 | }; | 518 | }; |
534 | 519 | ||
535 | static struct sys_device pxa3xx_sysdev[] = { | 520 | static struct sys_device pxa3xx_sysdev[] = { |