aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2014-05-28 19:20:04 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-07-09 09:13:27 -0400
commite030427f5138351a1a969f8cbad37e542237fa67 (patch)
treec5db09a278ac9ef382bc71345598103093f9f832 /arch/arm
parent4c834452aad01531db949414f94f817a86348d59 (diff)
ARM: at91: at91sam9g45: 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')
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c1
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c11
2 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 9d3d544ac19c..7300523da6ea 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -251,6 +251,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
251 CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk), 251 CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
252 CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk), 252 CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
253 CLKDEV_CON_DEV_ID(NULL, "atmel_aes", &aestdessha_clk), 253 CLKDEV_CON_DEV_ID(NULL, "atmel_aes", &aestdessha_clk),
254 CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
254 /* more usart lookup table for DT entries */ 255 /* more usart lookup table for DT entries */
255 CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck), 256 CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
256 CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk), 257 CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 391ab6bb536a..21ab782cc8e9 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1334,9 +1334,7 @@ static void __init at91_add_device_watchdog(void) {}
1334 * PWM 1334 * PWM
1335 * --------------------------------------------------------------------*/ 1335 * --------------------------------------------------------------------*/
1336 1336
1337#if defined(CONFIG_ATMEL_PWM) || defined(CONFIG_ATMEL_PWM_MODULE) 1337#if IS_ENABLED(CONFIG_PWM_ATMEL)
1338static u32 pwm_mask;
1339
1340static struct resource pwm_resources[] = { 1338static struct resource pwm_resources[] = {
1341 [0] = { 1339 [0] = {
1342 .start = AT91SAM9G45_BASE_PWMC, 1340 .start = AT91SAM9G45_BASE_PWMC,
@@ -1351,11 +1349,8 @@ static struct resource pwm_resources[] = {
1351}; 1349};
1352 1350
1353static struct platform_device at91sam9g45_pwm0_device = { 1351static struct platform_device at91sam9g45_pwm0_device = {
1354 .name = "atmel_pwm", 1352 .name = "at91sam9rl-pwm",
1355 .id = -1, 1353 .id = -1,
1356 .dev = {
1357 .platform_data = &pwm_mask,
1358 },
1359 .resource = pwm_resources, 1354 .resource = pwm_resources,
1360 .num_resources = ARRAY_SIZE(pwm_resources), 1355 .num_resources = ARRAY_SIZE(pwm_resources),
1361}; 1356};
@@ -1374,8 +1369,6 @@ void __init at91_add_device_pwm(u32 mask)
1374 if (mask & (1 << AT91_PWM3)) 1369 if (mask & (1 << AT91_PWM3))
1375 at91_set_B_periph(AT91_PIN_PD0, 1); /* enable PWM3 */ 1370 at91_set_B_periph(AT91_PIN_PD0, 1); /* enable PWM3 */
1376 1371
1377 pwm_mask = mask;
1378
1379 platform_device_register(&at91sam9g45_pwm0_device); 1372 platform_device_register(&at91sam9g45_pwm0_device);
1380} 1373}
1381#else 1374#else