diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index d50a8dfb916d..b4eb21769db9 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -782,6 +782,67 @@ void __init at91_add_device_isi(void) {} | |||
782 | 782 | ||
783 | 783 | ||
784 | /* -------------------------------------------------------------------- | 784 | /* -------------------------------------------------------------------- |
785 | * RTT | ||
786 | * -------------------------------------------------------------------- */ | ||
787 | |||
788 | static struct resource rtt0_resources[] = { | ||
789 | { | ||
790 | .start = AT91_BASE_SYS + AT91_RTT0, | ||
791 | .end = AT91_BASE_SYS + AT91_RTT0 + SZ_16 - 1, | ||
792 | .flags = IORESOURCE_MEM, | ||
793 | } | ||
794 | }; | ||
795 | |||
796 | static struct platform_device at91sam9263_rtt0_device = { | ||
797 | .name = "at91_rtt", | ||
798 | .id = 0, | ||
799 | .resource = rtt0_resources, | ||
800 | .num_resources = ARRAY_SIZE(rtt0_resources), | ||
801 | }; | ||
802 | |||
803 | static struct resource rtt1_resources[] = { | ||
804 | { | ||
805 | .start = AT91_BASE_SYS + AT91_RTT1, | ||
806 | .end = AT91_BASE_SYS + AT91_RTT1 + SZ_16 - 1, | ||
807 | .flags = IORESOURCE_MEM, | ||
808 | } | ||
809 | }; | ||
810 | |||
811 | static struct platform_device at91sam9263_rtt1_device = { | ||
812 | .name = "at91_rtt", | ||
813 | .id = 1, | ||
814 | .resource = rtt1_resources, | ||
815 | .num_resources = ARRAY_SIZE(rtt1_resources), | ||
816 | }; | ||
817 | |||
818 | static void __init at91_add_device_rtt(void) | ||
819 | { | ||
820 | platform_device_register(&at91sam9263_rtt0_device); | ||
821 | platform_device_register(&at91sam9263_rtt1_device); | ||
822 | } | ||
823 | |||
824 | |||
825 | /* -------------------------------------------------------------------- | ||
826 | * Watchdog | ||
827 | * -------------------------------------------------------------------- */ | ||
828 | |||
829 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||
830 | static struct platform_device at91sam9263_wdt_device = { | ||
831 | .name = "at91_wdt", | ||
832 | .id = -1, | ||
833 | .num_resources = 0, | ||
834 | }; | ||
835 | |||
836 | static void __init at91_add_device_watchdog(void) | ||
837 | { | ||
838 | platform_device_register(&at91sam9263_wdt_device); | ||
839 | } | ||
840 | #else | ||
841 | static void __init at91_add_device_watchdog(void) {} | ||
842 | #endif | ||
843 | |||
844 | |||
845 | /* -------------------------------------------------------------------- | ||
785 | * LEDs | 846 | * LEDs |
786 | * -------------------------------------------------------------------- */ | 847 | * -------------------------------------------------------------------- */ |
787 | 848 | ||
@@ -1021,6 +1082,8 @@ void __init at91_add_device_serial(void) {} | |||
1021 | */ | 1082 | */ |
1022 | static int __init at91_add_standard_devices(void) | 1083 | static int __init at91_add_standard_devices(void) |
1023 | { | 1084 | { |
1085 | at91_add_device_rtt(); | ||
1086 | at91_add_device_watchdog(); | ||
1024 | return 0; | 1087 | return 0; |
1025 | } | 1088 | } |
1026 | 1089 | ||