aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorHartley Sweeten <hartleys@visionengravers.com>2010-01-11 15:38:00 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-01-12 07:38:33 -0500
commit1fbd972ad0f97253ebfbb04881dc4ad95541153c (patch)
treeb39e0df4e7d90abf6c4fe0146aa74792f51d6934 /arch/arm/mach-ep93xx
parent64d6882d02b0e5f74dd5572039e88517e40edb50 (diff)
ARM: 5878/1: ep93xx: register the pwm devices on the edb93xx dev boards
Add the platform init code to register the pwm devices that exist on the various edb93xx development boards. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/edb93xx.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index a4a7be308000..d22d67ac8b99 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -118,12 +118,33 @@ static void __init edb93xx_register_i2c(void)
118 } 118 }
119} 119}
120 120
121
122/*************************************************************************
123 * EDB93xx pwm
124 *************************************************************************/
125static void __init edb93xx_register_pwm(void)
126{
127 if (machine_is_edb9301() ||
128 machine_is_edb9302() || machine_is_edb9302a()) {
129 /* EP9301 and EP9302 only have pwm.1 (EGPIO14) */
130 ep93xx_register_pwm(0, 1);
131 } else if (machine_is_edb9307() || machine_is_edb9307a()) {
132 /* EP9307 only has pwm.0 (PWMOUT) */
133 ep93xx_register_pwm(1, 0);
134 } else {
135 /* EP9312 and EP9315 have both */
136 ep93xx_register_pwm(1, 1);
137 }
138}
139
140
121static void __init edb93xx_init_machine(void) 141static void __init edb93xx_init_machine(void)
122{ 142{
123 ep93xx_init_devices(); 143 ep93xx_init_devices();
124 edb93xx_register_flash(); 144 edb93xx_register_flash();
125 ep93xx_register_eth(&edb93xx_eth_data, 1); 145 ep93xx_register_eth(&edb93xx_eth_data, 1);
126 edb93xx_register_i2c(); 146 edb93xx_register_i2c();
147 edb93xx_register_pwm();
127} 148}
128 149
129 150