aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-30 20:36:49 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-30 20:36:49 -0500
commit14a3c4ab0e58d143c7928c9eb2f2610205e13bf2 (patch)
tree885992999d7a1a2fd3586efcf32ebcbcbc3a72aa /arch/arm/mach-pxa/pxa3xx.c
parent1af237a099a3b8ff56aa384f605c6a68af7bf288 (diff)
parent47992cbdaef2f18a47871b2ed01ad27f568c8b73 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits) [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices [ARM] pxafb: cleanup of the timing checking code [ARM] pxafb: cleanup of the color format manipulation code [ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3 [ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching [ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset [ARM] pxafb: allow video memory size to be configurable [ARM] pxa: add document on the MFP design and how to use it [ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant [ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant [ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad) [ARM] pxa: Update eseries defconfig [ARM] 5352/1: add w90p910-plat config file [ARM] s3c: S3C options should depend on PLAT_S3C [ARM] mv78xx0: implement GPIO and GPIO interrupt support [ARM] Kirkwood: implement GPIO and GPIO interrupt support [ARM] Orion: share GPIO IRQ handling code [ARM] Orion: share GPIO handling code [ARM] s3c: define __io using the typesafe version [ARM] S3C64XX: Ensure CPU_V6 is selected ...
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c111
1 files changed, 54 insertions, 57 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index b3cd5d0b0f35..490893824e78 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -29,6 +29,7 @@
29#include <mach/pm.h> 29#include <mach/pm.h>
30#include <mach/dma.h> 30#include <mach/dma.h>
31#include <mach/ssp.h> 31#include <mach/ssp.h>
32#include <mach/i2c.h>
32 33
33#include "generic.h" 34#include "generic.h"
34#include "devices.h" 35#include "devices.h"
@@ -216,43 +217,58 @@ static const struct clkops clk_dummy_ops = {
216 .disable = clk_dummy_disable, 217 .disable = clk_dummy_disable,
217}; 218};
218 219
219static struct clk pxa3xx_clks[] = { 220static struct clk clk_pxa3xx_pout = {
220 { 221 .ops = &clk_pout_ops,
221 .name = "CLK_POUT", 222 .rate = 13000000,
222 .ops = &clk_pout_ops, 223 .delay = 70,
223 .rate = 13000000, 224};
224 .delay = 70,
225 },
226
227 /* Power I2C clock is always on */
228 {
229 .name = "I2CCLK",
230 .ops = &clk_dummy_ops,
231 .dev = &pxa3xx_device_i2c_power.dev,
232 },
233
234 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
235 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
236 PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL),
237
238 PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
239 PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
240 PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
241
242 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
243 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev),
244 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
245 PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
246 225
247 PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), 226static struct clk clk_dummy = {
248 PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), 227 .ops = &clk_dummy_ops,
249 PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), 228};
250 PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
251 PXA3xx_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev),
252 PXA3xx_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev),
253 229
254 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), 230static DEFINE_PXA3_CK(pxa3xx_lcd, LCD, &clk_pxa3xx_hsio_ops);
255 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),
256}; 272};
257 273
258#ifdef CONFIG_PM 274#ifdef CONFIG_PM
@@ -529,28 +545,9 @@ void __init pxa3xx_init_irq(void)
529 * device registration specific to PXA3xx. 545 * device registration specific to PXA3xx.
530 */ 546 */
531 547
532static struct resource i2c_power_resources[] = {
533 {
534 .start = 0x40f500c0,
535 .end = 0x40f500d3,
536 .flags = IORESOURCE_MEM,
537 }, {
538 .start = IRQ_PWRI2C,
539 .end = IRQ_PWRI2C,
540 .flags = IORESOURCE_IRQ,
541 },
542};
543
544struct platform_device pxa3xx_device_i2c_power = {
545 .name = "pxa2xx-i2c",
546 .id = 1,
547 .resource = i2c_power_resources,
548 .num_resources = ARRAY_SIZE(i2c_power_resources),
549};
550
551void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) 548void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
552{ 549{
553 pxa3xx_device_i2c_power.dev.platform_data = info; 550 pxa_register_device(&pxa3xx_device_i2c_power, info);
554} 551}
555 552
556static struct platform_device *devices[] __initdata = { 553static struct platform_device *devices[] __initdata = {
@@ -559,6 +556,7 @@ static struct platform_device *devices[] __initdata = {
559 &pxa_device_btuart, 556 &pxa_device_btuart,
560 &pxa_device_stuart, 557 &pxa_device_stuart,
561 &pxa_device_i2s, 558 &pxa_device_i2s,
559 &sa1100_device_rtc,
562 &pxa_device_rtc, 560 &pxa_device_rtc,
563 &pxa27x_device_ssp1, 561 &pxa27x_device_ssp1,
564 &pxa27x_device_ssp2, 562 &pxa27x_device_ssp2,
@@ -566,7 +564,6 @@ static struct platform_device *devices[] __initdata = {
566 &pxa3xx_device_ssp4, 564 &pxa3xx_device_ssp4,
567 &pxa27x_device_pwm0, 565 &pxa27x_device_pwm0,
568 &pxa27x_device_pwm1, 566 &pxa27x_device_pwm1,
569 &pxa3xx_device_i2c_power,
570}; 567};
571 568
572static struct sys_device pxa3xx_sysdev[] = { 569static struct sys_device pxa3xx_sysdev[] = {
@@ -595,7 +592,7 @@ static int __init pxa3xx_init(void)
595 */ 592 */
596 ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); 593 ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S);
597 594
598 clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks)); 595 clks_register(pxa3xx_clkregs, ARRAY_SIZE(pxa3xx_clkregs));
599 596
600 if ((ret = pxa_init_dma(32))) 597 if ((ret = pxa_init_dma(32)))
601 return ret; 598 return ret;