diff options
author | Miguel Aguilar <miguel.aguilar@ridgerun.com> | 2009-11-05 09:52:05 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-25 13:21:38 -0500 |
commit | 99381b4f114d00ccfe2495aa79755b6094bdd0c9 (patch) | |
tree | de87956331bebf066d9710be767b4e0d23598bf5 | |
parent | 0046d0bf68853a4d8af1fb6a2bf701f31fb1563e (diff) |
DaVinci: DM365: Enable DaVinci RTC support for DM365 EVM
The general structures are defined at DM365 SoC file and the specific
platform data structure for the EVM is defined at board file.
Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-rw-r--r-- | arch/arm/mach-davinci/board-dm365-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm365.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/irqs.h | 1 |
4 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 19678dc91b0..289fe1b7d25 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -510,6 +510,7 @@ static __init void dm365_evm_init(void) | |||
510 | evm_init_cpld(); | 510 | evm_init_cpld(); |
511 | 511 | ||
512 | dm365_init_asp(&dm365_evm_snd_data); | 512 | dm365_init_asp(&dm365_evm_snd_data); |
513 | dm365_init_rtc(); | ||
513 | 514 | ||
514 | #ifdef CONFIG_KEYBOARD_DAVINCI | 515 | #ifdef CONFIG_KEYBOARD_DAVINCI |
515 | dm365_init_ks(&dm365evm_ks_data); | 516 | dm365_init_ks(&dm365evm_ks_data); |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index c12bb005b90..2ec619ec165 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -699,6 +699,7 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = { | |||
699 | [IRQ_I2C] = 3, | 699 | [IRQ_I2C] = 3, |
700 | [IRQ_UARTINT0] = 3, | 700 | [IRQ_UARTINT0] = 3, |
701 | [IRQ_UARTINT1] = 3, | 701 | [IRQ_UARTINT1] = 3, |
702 | [IRQ_DM365_RTCINT] = 3, | ||
702 | [IRQ_DM365_SPIINT0_0] = 3, | 703 | [IRQ_DM365_SPIINT0_0] = 3, |
703 | [IRQ_DM365_SPIINT3_0] = 3, | 704 | [IRQ_DM365_SPIINT3_0] = 3, |
704 | [IRQ_DM365_GPIO0] = 3, | 705 | [IRQ_DM365_GPIO0] = 3, |
@@ -834,6 +835,25 @@ static struct platform_device dm365_asp_device = { | |||
834 | .resource = dm365_asp_resources, | 835 | .resource = dm365_asp_resources, |
835 | }; | 836 | }; |
836 | 837 | ||
838 | static struct resource dm365_rtc_resources[] = { | ||
839 | { | ||
840 | .start = DM365_RTC_BASE, | ||
841 | .end = DM365_RTC_BASE + SZ_1K - 1, | ||
842 | .flags = IORESOURCE_MEM, | ||
843 | }, | ||
844 | { | ||
845 | .start = IRQ_DM365_RTCINT, | ||
846 | .flags = IORESOURCE_IRQ, | ||
847 | }, | ||
848 | }; | ||
849 | |||
850 | static struct platform_device dm365_rtc_device = { | ||
851 | .name = "rtc_davinci", | ||
852 | .id = 0, | ||
853 | .num_resources = ARRAY_SIZE(dm365_rtc_resources), | ||
854 | .resource = dm365_rtc_resources, | ||
855 | }; | ||
856 | |||
837 | static struct map_desc dm365_io_desc[] = { | 857 | static struct map_desc dm365_io_desc[] = { |
838 | { | 858 | { |
839 | .virtual = IO_VIRT, | 859 | .virtual = IO_VIRT, |
@@ -978,6 +998,12 @@ void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) | |||
978 | platform_device_register(&dm365_ks_device); | 998 | platform_device_register(&dm365_ks_device); |
979 | } | 999 | } |
980 | 1000 | ||
1001 | void __init dm365_init_rtc(void) | ||
1002 | { | ||
1003 | davinci_cfg_reg(DM365_INT_PRTCSS); | ||
1004 | platform_device_register(&dm365_rtc_device); | ||
1005 | } | ||
1006 | |||
981 | void __init dm365_init(void) | 1007 | void __init dm365_init(void) |
982 | { | 1008 | { |
983 | davinci_common_init(&davinci_soc_info_dm365); | 1009 | davinci_common_init(&davinci_soc_info_dm365); |
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h index d8d988a0b58..f1710a30e7b 100644 --- a/arch/arm/mach-davinci/include/mach/dm365.h +++ b/arch/arm/mach-davinci/include/mach/dm365.h | |||
@@ -29,8 +29,11 @@ | |||
29 | /* Base of key scan register bank */ | 29 | /* Base of key scan register bank */ |
30 | #define DM365_KEYSCAN_BASE (0x01C69400) | 30 | #define DM365_KEYSCAN_BASE (0x01C69400) |
31 | 31 | ||
32 | #define DM365_RTC_BASE (0x01C69000) | ||
33 | |||
32 | void __init dm365_init(void); | 34 | void __init dm365_init(void); |
33 | void __init dm365_init_asp(struct snd_platform_data *pdata); | 35 | void __init dm365_init_asp(struct snd_platform_data *pdata); |
34 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); | 36 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); |
37 | void __init dm365_init_rtc(void); | ||
35 | 38 | ||
36 | #endif /* __ASM_ARCH_DM365_H */ | 39 | #endif /* __ASM_ARCH_DM365_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h index 3c918a77261..354af71798d 100644 --- a/arch/arm/mach-davinci/include/mach/irqs.h +++ b/arch/arm/mach-davinci/include/mach/irqs.h | |||
@@ -217,6 +217,7 @@ | |||
217 | #define IRQ_DM365_SDIOINT0 23 | 217 | #define IRQ_DM365_SDIOINT0 23 |
218 | #define IRQ_DM365_MMCINT1 27 | 218 | #define IRQ_DM365_MMCINT1 27 |
219 | #define IRQ_DM365_PWMINT3 28 | 219 | #define IRQ_DM365_PWMINT3 28 |
220 | #define IRQ_DM365_RTCINT 29 | ||
220 | #define IRQ_DM365_SDIOINT1 31 | 221 | #define IRQ_DM365_SDIOINT1 31 |
221 | #define IRQ_DM365_SPIINT0_0 42 | 222 | #define IRQ_DM365_SPIINT0_0 42 |
222 | #define IRQ_DM365_SPIINT3_0 43 | 223 | #define IRQ_DM365_SPIINT3_0 43 |