diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 71 |
1 files changed, 43 insertions, 28 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 25d17a1dab78..344b3282caf9 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -167,36 +167,51 @@ static const struct clkops clk_pxa25x_gpio11_ops = { | |||
167 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz | 167 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz |
168 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) | 168 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) |
169 | */ | 169 | */ |
170 | static struct clk pxa25x_hwuart_clk = | 170 | static DEFINE_CKEN(pxa25x_hwuart, HWUART, 14745600, 1); |
171 | INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev) | 171 | |
172 | ; | 172 | static struct clk_lookup pxa25x_hwuart_clkreg = |
173 | INIT_CLKREG(&clk_pxa25x_hwuart, "pxa2xx-uart.3", NULL); | ||
173 | 174 | ||
174 | /* | 175 | /* |
175 | * PXA 2xx clock declarations. | 176 | * PXA 2xx clock declarations. |
176 | */ | 177 | */ |
177 | static struct clk pxa25x_clks[] = { | 178 | static DEFINE_CK(pxa25x_lcd, LCD, &clk_pxa25x_lcd_ops); |
178 | INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev), | 179 | static DEFINE_CKEN(pxa25x_ffuart, FFUART, 14745600, 1); |
179 | INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), | 180 | static DEFINE_CKEN(pxa25x_btuart, BTUART, 14745600, 1); |
180 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | 181 | static DEFINE_CKEN(pxa25x_stuart, STUART, 14745600, 1); |
181 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), | 182 | static DEFINE_CKEN(pxa25x_usb, USB, 47923000, 5); |
182 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), | 183 | static DEFINE_CLK(pxa25x_gpio11, &clk_pxa25x_gpio11_ops, 3686400, 0); |
183 | INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL), | 184 | static DEFINE_CLK(pxa25x_gpio12, &clk_pxa25x_gpio12_ops, 32768, 0); |
184 | INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL), | 185 | static DEFINE_CKEN(pxa25x_mmc, MMC, 19169000, 0); |
185 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), | 186 | static DEFINE_CKEN(pxa25x_i2c, I2C, 31949000, 0); |
186 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), | 187 | static DEFINE_CKEN(pxa25x_ssp, SSP, 3686400, 0); |
187 | 188 | static DEFINE_CKEN(pxa25x_nssp, NSSP, 3686400, 0); | |
188 | INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev), | 189 | static DEFINE_CKEN(pxa25x_assp, ASSP, 3686400, 0); |
189 | INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev), | 190 | static DEFINE_CKEN(pxa25x_pwm0, PWM0, 3686400, 0); |
190 | INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev), | 191 | static DEFINE_CKEN(pxa25x_pwm1, PWM1, 3686400, 0); |
191 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, &pxa25x_device_pwm0.dev), | 192 | static DEFINE_CKEN(pxa25x_ac97, AC97, 24576000, 0); |
192 | INIT_CKEN("PWMCLK", PWM1, 3686400, 0, &pxa25x_device_pwm1.dev), | 193 | static DEFINE_CKEN(pxa25x_i2s, I2S, 14745600, 0); |
193 | 194 | static DEFINE_CKEN(pxa25x_ficp, FICP, 47923000, 0); | |
194 | INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL), | 195 | |
195 | 196 | static struct clk_lookup pxa25x_clkregs[] = { | |
196 | /* | 197 | INIT_CLKREG(&clk_pxa25x_lcd, "pxa2xx-fb", NULL), |
197 | INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL), | 198 | INIT_CLKREG(&clk_pxa25x_ffuart, "pxa2xx-uart.0", NULL), |
198 | */ | 199 | INIT_CLKREG(&clk_pxa25x_btuart, "pxa2xx-uart.1", NULL), |
199 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), | 200 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-uart.2", NULL), |
201 | INIT_CLKREG(&clk_pxa25x_usb, "pxa25x-udc", NULL), | ||
202 | INIT_CLKREG(&clk_pxa25x_mmc, "pxa2xx-mci.0", NULL), | ||
203 | INIT_CLKREG(&clk_pxa25x_i2c, "pxa2xx-i2c.0", NULL), | ||
204 | INIT_CLKREG(&clk_pxa25x_ssp, "pxa25x-ssp.0", NULL), | ||
205 | INIT_CLKREG(&clk_pxa25x_nssp, "pxa25x-nssp.1", NULL), | ||
206 | INIT_CLKREG(&clk_pxa25x_assp, "pxa25x-nssp.2", NULL), | ||
207 | INIT_CLKREG(&clk_pxa25x_pwm0, "pxa25x-pwm.0", NULL), | ||
208 | INIT_CLKREG(&clk_pxa25x_pwm1, "pxa25x-pwm.1", NULL), | ||
209 | INIT_CLKREG(&clk_pxa25x_i2s, "pxa2xx-i2s", NULL), | ||
210 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
211 | INIT_CLKREG(&clk_pxa25x_ficp, "pxa2xx-ir", "FICPCLK"), | ||
212 | INIT_CLKREG(&clk_pxa25x_ac97, NULL, "AC97CLK"), | ||
213 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), | ||
214 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | ||
200 | }; | 215 | }; |
201 | 216 | ||
202 | #ifdef CONFIG_PM | 217 | #ifdef CONFIG_PM |
@@ -336,7 +351,7 @@ static int __init pxa25x_init(void) | |||
336 | 351 | ||
337 | reset_status = RCSR; | 352 | reset_status = RCSR; |
338 | 353 | ||
339 | clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); | 354 | clks_register(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs)); |
340 | 355 | ||
341 | if ((ret = pxa_init_dma(16))) | 356 | if ((ret = pxa_init_dma(16))) |
342 | return ret; | 357 | return ret; |
@@ -357,7 +372,7 @@ static int __init pxa25x_init(void) | |||
357 | 372 | ||
358 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ | 373 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ |
359 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { | 374 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { |
360 | clks_register(&pxa25x_hwuart_clk, 1); | 375 | clks_register(&pxa25x_hwuart_clkreg, 1); |
361 | ret = platform_device_register(&pxa_device_hwuart); | 376 | ret = platform_device_register(&pxa_device_hwuart); |
362 | } | 377 | } |
363 | 378 | ||