diff options
author | Mike Rapoport <mike@compulab.co.il> | 2008-08-17 01:23:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-09 11:32:51 -0400 |
commit | 9ba63c4fa10cf446eff06a3200822d22b0c31c31 (patch) | |
tree | bc67d381e703aa150799f07ef85a7d7369376b72 /arch/arm/mach-pxa/pxa3xx.c | |
parent | 57a7a62eb65b35f51814382b0841ff99be242880 (diff) |
[ARM] 5201/1: PXA3xx: Add support for power i2c bus
Add power I2C support for PXA3xx processors
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 03cbc38103ed..b3cd5d0b0f35 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -203,6 +203,19 @@ static const struct clkops clk_pout_ops = { | |||
203 | .disable = clk_pout_disable, | 203 | .disable = clk_pout_disable, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static void clk_dummy_enable(struct clk *clk) | ||
207 | { | ||
208 | } | ||
209 | |||
210 | static void clk_dummy_disable(struct clk *clk) | ||
211 | { | ||
212 | } | ||
213 | |||
214 | static const struct clkops clk_dummy_ops = { | ||
215 | .enable = clk_dummy_enable, | ||
216 | .disable = clk_dummy_disable, | ||
217 | }; | ||
218 | |||
206 | static struct clk pxa3xx_clks[] = { | 219 | static struct clk pxa3xx_clks[] = { |
207 | { | 220 | { |
208 | .name = "CLK_POUT", | 221 | .name = "CLK_POUT", |
@@ -211,6 +224,13 @@ static struct clk pxa3xx_clks[] = { | |||
211 | .delay = 70, | 224 | .delay = 70, |
212 | }, | 225 | }, |
213 | 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 | |||
214 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), | 234 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), |
215 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), | 235 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), |
216 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), | 236 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), |
@@ -509,6 +529,30 @@ void __init pxa3xx_init_irq(void) | |||
509 | * device registration specific to PXA3xx. | 529 | * device registration specific to PXA3xx. |
510 | */ | 530 | */ |
511 | 531 | ||
532 | static 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 | |||
544 | struct 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 | |||
551 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | ||
552 | { | ||
553 | pxa3xx_device_i2c_power.dev.platform_data = info; | ||
554 | } | ||
555 | |||
512 | static struct platform_device *devices[] __initdata = { | 556 | static struct platform_device *devices[] __initdata = { |
513 | /* &pxa_device_udc, The UDC driver is PXA25x only */ | 557 | /* &pxa_device_udc, The UDC driver is PXA25x only */ |
514 | &pxa_device_ffuart, | 558 | &pxa_device_ffuart, |
@@ -522,6 +566,7 @@ static struct platform_device *devices[] __initdata = { | |||
522 | &pxa3xx_device_ssp4, | 566 | &pxa3xx_device_ssp4, |
523 | &pxa27x_device_pwm0, | 567 | &pxa27x_device_pwm0, |
524 | &pxa27x_device_pwm1, | 568 | &pxa27x_device_pwm1, |
569 | &pxa3xx_device_i2c_power, | ||
525 | }; | 570 | }; |
526 | 571 | ||
527 | static struct sys_device pxa3xx_sysdev[] = { | 572 | static struct sys_device pxa3xx_sysdev[] = { |