aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c87
1 files changed, 51 insertions, 36 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 041b8abb9e1a..490893824e78 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -217,43 +217,58 @@ static const struct clkops clk_dummy_ops = {
217 .disable = clk_dummy_disable, 217 .disable = clk_dummy_disable,
218}; 218};
219 219
220static struct clk pxa3xx_clks[] = { 220static struct clk clk_pxa3xx_pout = {
221 { 221 .ops = &clk_pout_ops,
222 .name = "CLK_POUT", 222 .rate = 13000000,
223 .ops = &clk_pout_ops, 223 .delay = 70,
224 .rate = 13000000, 224};
225 .delay = 70,
226 },
227
228 /* Power I2C clock is always on */
229 {
230 .name = "I2CCLK",
231 .ops = &clk_dummy_ops,
232 .dev = &pxa3xx_device_i2c_power.dev,
233 },
234
235 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
236 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
237 PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL),
238
239 PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
240 PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
241 PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
242
243 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
244 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev),
245 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
246 PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
247 225
248 PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), 226static struct clk clk_dummy = {
249 PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), 227 .ops = &clk_dummy_ops,
250 PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), 228};
251 PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
252 PXA3xx_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev),
253 PXA3xx_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev),
254 229
255 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), 230static DEFINE_PXA3_CK(pxa3xx_lcd, LCD, &clk_pxa3xx_hsio_ops);
256 PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), 231static DEFINE_PXA3_CK(pxa3xx_camera, CAMERA, &clk_pxa3xx_hsio_ops);
232static DEFINE_PXA3_CK(pxa3xx_ac97, AC97, &clk_pxa3xx_ac97_ops);
233static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1);
234static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1);
235static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1);
236static DEFINE_PXA3_CKEN(pxa3xx_i2c, I2C, 32842000, 0);
237static DEFINE_PXA3_CKEN(pxa3xx_udc, UDC, 48000000, 5);
238static DEFINE_PXA3_CKEN(pxa3xx_usbh, USBH, 48000000, 0);
239static DEFINE_PXA3_CKEN(pxa3xx_keypad, KEYPAD, 32768, 0);
240static DEFINE_PXA3_CKEN(pxa3xx_ssp1, SSP1, 13000000, 0);
241static DEFINE_PXA3_CKEN(pxa3xx_ssp2, SSP2, 13000000, 0);
242static DEFINE_PXA3_CKEN(pxa3xx_ssp3, SSP3, 13000000, 0);
243static DEFINE_PXA3_CKEN(pxa3xx_ssp4, SSP4, 13000000, 0);
244static DEFINE_PXA3_CKEN(pxa3xx_pwm0, PWM0, 13000000, 0);
245static DEFINE_PXA3_CKEN(pxa3xx_pwm1, PWM1, 13000000, 0);
246static DEFINE_PXA3_CKEN(pxa3xx_mmc1, MMC1, 19500000, 0);
247static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0);
248
249static struct clk_lookup pxa3xx_clkregs[] = {
250 INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"),
251 /* Power I2C clock is always on */
252 INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL),
253 INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL),
254 INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"),
255 INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"),
256 INIT_CLKREG(&clk_pxa3xx_ffuart, "pxa2xx-uart.0", NULL),
257 INIT_CLKREG(&clk_pxa3xx_btuart, "pxa2xx-uart.1", NULL),
258 INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-uart.2", NULL),
259 INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-ir", "UARTCLK"),
260 INIT_CLKREG(&clk_pxa3xx_i2c, "pxa2xx-i2c.0", NULL),
261 INIT_CLKREG(&clk_pxa3xx_udc, "pxa27x-udc", NULL),
262 INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL),
263 INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL),
264 INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL),
265 INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL),
266 INIT_CLKREG(&clk_pxa3xx_ssp3, "pxa27x-ssp.2", NULL),
267 INIT_CLKREG(&clk_pxa3xx_ssp4, "pxa27x-ssp.3", NULL),
268 INIT_CLKREG(&clk_pxa3xx_pwm0, "pxa27x-pwm.0", NULL),
269 INIT_CLKREG(&clk_pxa3xx_pwm1, "pxa27x-pwm.1", NULL),
270 INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL),
271 INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL),
257}; 272};
258 273
259#ifdef CONFIG_PM 274#ifdef CONFIG_PM
@@ -577,7 +592,7 @@ static int __init pxa3xx_init(void)
577 */ 592 */
578 ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); 593 ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S);
579 594
580 clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks)); 595 clks_register(pxa3xx_clkregs, ARRAY_SIZE(pxa3xx_clkregs));
581 596
582 if ((ret = pxa_init_dma(32))) 597 if ((ret = pxa_init_dma(32)))
583 return ret; 598 return ret;