aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9rl_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 0b1d71a7d9bf..37d1c9ed4562 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -799,9 +799,7 @@ static void __init at91_add_device_watchdog(void) {}
799 * PWM 799 * PWM
800 * --------------------------------------------------------------------*/ 800 * --------------------------------------------------------------------*/
801 801
802#if defined(CONFIG_ATMEL_PWM) 802#if IS_ENABLED(CONFIG_PWM_ATMEL)
803static u32 pwm_mask;
804
805static struct resource pwm_resources[] = { 803static struct resource pwm_resources[] = {
806 [0] = { 804 [0] = {
807 .start = AT91SAM9RL_BASE_PWMC, 805 .start = AT91SAM9RL_BASE_PWMC,
@@ -816,11 +814,8 @@ static struct resource pwm_resources[] = {
816}; 814};
817 815
818static struct platform_device at91sam9rl_pwm0_device = { 816static struct platform_device at91sam9rl_pwm0_device = {
819 .name = "atmel_pwm", 817 .name = "at91sam9rl-pwm",
820 .id = -1, 818 .id = -1,
821 .dev = {
822 .platform_data = &pwm_mask,
823 },
824 .resource = pwm_resources, 819 .resource = pwm_resources,
825 .num_resources = ARRAY_SIZE(pwm_resources), 820 .num_resources = ARRAY_SIZE(pwm_resources),
826}; 821};
@@ -839,8 +834,6 @@ void __init at91_add_device_pwm(u32 mask)
839 if (mask & (1 << AT91_PWM3)) 834 if (mask & (1 << AT91_PWM3))
840 at91_set_B_periph(AT91_PIN_PD8, 1); /* enable PWM3 */ 835 at91_set_B_periph(AT91_PIN_PD8, 1); /* enable PWM3 */
841 836
842 pwm_mask = mask;
843
844 platform_device_register(&at91sam9rl_pwm0_device); 837 platform_device_register(&at91sam9rl_pwm0_device);
845} 838}
846#else 839#else