diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-05-28 19:20:06 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-07-09 09:13:28 -0400 |
commit | 3791f7832578dee4729aee818f204074d5ea8f39 (patch) | |
tree | 95d9eb462d8dc49ed3a26960861ec3d2231e138f /arch/arm/mach-at91/at91sam9263_devices.c | |
parent | c545dcd3a2b9b13c62d040e8e4fd9b490fa522ab (diff) |
ARM: at91: at91sam9263: switch to generic PWM framework
Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 309390d8e2f8..cef0e2f57068 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1131,9 +1131,7 @@ static void __init at91_add_device_watchdog(void) {} | |||
1131 | * PWM | 1131 | * PWM |
1132 | * --------------------------------------------------------------------*/ | 1132 | * --------------------------------------------------------------------*/ |
1133 | 1133 | ||
1134 | #if defined(CONFIG_ATMEL_PWM) | 1134 | #if IS_ENABLED(CONFIG_PWM_ATMEL) |
1135 | static u32 pwm_mask; | ||
1136 | |||
1137 | static struct resource pwm_resources[] = { | 1135 | static struct resource pwm_resources[] = { |
1138 | [0] = { | 1136 | [0] = { |
1139 | .start = AT91SAM9263_BASE_PWMC, | 1137 | .start = AT91SAM9263_BASE_PWMC, |
@@ -1148,11 +1146,8 @@ static struct resource pwm_resources[] = { | |||
1148 | }; | 1146 | }; |
1149 | 1147 | ||
1150 | static struct platform_device at91sam9263_pwm0_device = { | 1148 | static struct platform_device at91sam9263_pwm0_device = { |
1151 | .name = "atmel_pwm", | 1149 | .name = "at91sam9rl-pwm", |
1152 | .id = -1, | 1150 | .id = -1, |
1153 | .dev = { | ||
1154 | .platform_data = &pwm_mask, | ||
1155 | }, | ||
1156 | .resource = pwm_resources, | 1151 | .resource = pwm_resources, |
1157 | .num_resources = ARRAY_SIZE(pwm_resources), | 1152 | .num_resources = ARRAY_SIZE(pwm_resources), |
1158 | }; | 1153 | }; |
@@ -1171,8 +1166,6 @@ void __init at91_add_device_pwm(u32 mask) | |||
1171 | if (mask & (1 << AT91_PWM3)) | 1166 | if (mask & (1 << AT91_PWM3)) |
1172 | at91_set_B_periph(AT91_PIN_PB29, 1); /* enable PWM3 */ | 1167 | at91_set_B_periph(AT91_PIN_PB29, 1); /* enable PWM3 */ |
1173 | 1168 | ||
1174 | pwm_mask = mask; | ||
1175 | |||
1176 | platform_device_register(&at91sam9263_pwm0_device); | 1169 | platform_device_register(&at91sam9263_pwm0_device); |
1177 | } | 1170 | } |
1178 | #else | 1171 | #else |