diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-13 04:52:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-13 04:52:30 -0400 |
commit | c493756e2a8a78bcaae30668317890dcfe86e7c3 (patch) | |
tree | 8fb40782e79472ed882ff2098d4dd295557278ee /arch/arm/mach-at91/at91sam9rl_devices.c | |
parent | 0d15504f16f68725e4635aa85411015d1c573b0a (diff) | |
parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) |
Merge branch 'linus' into oprofile
Conflicts:
arch/x86/kernel/apic_32.c
include/linux/pci_ids.h
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 620886341fb5..87deb1e1b529 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -527,6 +527,51 @@ static void __init at91_add_device_tc(void) { } | |||
527 | 527 | ||
528 | 528 | ||
529 | /* -------------------------------------------------------------------- | 529 | /* -------------------------------------------------------------------- |
530 | * Touchscreen | ||
531 | * -------------------------------------------------------------------- */ | ||
532 | |||
533 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) | ||
534 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | ||
535 | |||
536 | static struct resource tsadcc_resources[] = { | ||
537 | [0] = { | ||
538 | .start = AT91SAM9RL_BASE_TSC, | ||
539 | .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1, | ||
540 | .flags = IORESOURCE_MEM, | ||
541 | }, | ||
542 | [1] = { | ||
543 | .start = AT91SAM9RL_ID_TSC, | ||
544 | .end = AT91SAM9RL_ID_TSC, | ||
545 | .flags = IORESOURCE_IRQ, | ||
546 | } | ||
547 | }; | ||
548 | |||
549 | static struct platform_device at91sam9rl_tsadcc_device = { | ||
550 | .name = "atmel_tsadcc", | ||
551 | .id = -1, | ||
552 | .dev = { | ||
553 | .dma_mask = &tsadcc_dmamask, | ||
554 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
555 | }, | ||
556 | .resource = tsadcc_resources, | ||
557 | .num_resources = ARRAY_SIZE(tsadcc_resources), | ||
558 | }; | ||
559 | |||
560 | void __init at91_add_device_tsadcc(void) | ||
561 | { | ||
562 | at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ | ||
563 | at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ | ||
564 | at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ | ||
565 | at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ | ||
566 | |||
567 | platform_device_register(&at91sam9rl_tsadcc_device); | ||
568 | } | ||
569 | #else | ||
570 | void __init at91_add_device_tsadcc(void) {} | ||
571 | #endif | ||
572 | |||
573 | |||
574 | /* -------------------------------------------------------------------- | ||
530 | * RTC | 575 | * RTC |
531 | * -------------------------------------------------------------------- */ | 576 | * -------------------------------------------------------------------- */ |
532 | 577 | ||
@@ -592,6 +637,59 @@ static void __init at91_add_device_watchdog(void) {} | |||
592 | 637 | ||
593 | 638 | ||
594 | /* -------------------------------------------------------------------- | 639 | /* -------------------------------------------------------------------- |
640 | * PWM | ||
641 | * --------------------------------------------------------------------*/ | ||
642 | |||
643 | #if defined(CONFIG_ATMEL_PWM) | ||
644 | static u32 pwm_mask; | ||
645 | |||
646 | static struct resource pwm_resources[] = { | ||
647 | [0] = { | ||
648 | .start = AT91SAM9RL_BASE_PWMC, | ||
649 | .end = AT91SAM9RL_BASE_PWMC + SZ_16K - 1, | ||
650 | .flags = IORESOURCE_MEM, | ||
651 | }, | ||
652 | [1] = { | ||
653 | .start = AT91SAM9RL_ID_PWMC, | ||
654 | .end = AT91SAM9RL_ID_PWMC, | ||
655 | .flags = IORESOURCE_IRQ, | ||
656 | }, | ||
657 | }; | ||
658 | |||
659 | static struct platform_device at91sam9rl_pwm0_device = { | ||
660 | .name = "atmel_pwm", | ||
661 | .id = -1, | ||
662 | .dev = { | ||
663 | .platform_data = &pwm_mask, | ||
664 | }, | ||
665 | .resource = pwm_resources, | ||
666 | .num_resources = ARRAY_SIZE(pwm_resources), | ||
667 | }; | ||
668 | |||
669 | void __init at91_add_device_pwm(u32 mask) | ||
670 | { | ||
671 | if (mask & (1 << AT91_PWM0)) | ||
672 | at91_set_B_periph(AT91_PIN_PB8, 1); /* enable PWM0 */ | ||
673 | |||
674 | if (mask & (1 << AT91_PWM1)) | ||
675 | at91_set_B_periph(AT91_PIN_PB9, 1); /* enable PWM1 */ | ||
676 | |||
677 | if (mask & (1 << AT91_PWM2)) | ||
678 | at91_set_B_periph(AT91_PIN_PD5, 1); /* enable PWM2 */ | ||
679 | |||
680 | if (mask & (1 << AT91_PWM3)) | ||
681 | at91_set_B_periph(AT91_PIN_PD8, 1); /* enable PWM3 */ | ||
682 | |||
683 | pwm_mask = mask; | ||
684 | |||
685 | platform_device_register(&at91sam9rl_pwm0_device); | ||
686 | } | ||
687 | #else | ||
688 | void __init at91_add_device_pwm(u32 mask) {} | ||
689 | #endif | ||
690 | |||
691 | |||
692 | /* -------------------------------------------------------------------- | ||
595 | * SSC -- Synchronous Serial Controller | 693 | * SSC -- Synchronous Serial Controller |
596 | * -------------------------------------------------------------------- */ | 694 | * -------------------------------------------------------------------- */ |
597 | 695 | ||