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 /arch/arm/mach-davinci/dm365.c | |
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>
Diffstat (limited to 'arch/arm/mach-davinci/dm365.c')
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index c12bb005b90d..2ec619ec1657 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); |