aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c1
-rw-r--r--arch/arm/mach-davinci/dm365.c26
-rw-r--r--arch/arm/mach-davinci/include/mach/dm365.h3
-rw-r--r--arch/arm/mach-davinci/include/mach/irqs.h1
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 19678dc91b09..289fe1b7d25a 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 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
838static 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
850static 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
837static struct map_desc dm365_io_desc[] = { 857static 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
1001void __init dm365_init_rtc(void)
1002{
1003 davinci_cfg_reg(DM365_INT_PRTCSS);
1004 platform_device_register(&dm365_rtc_device);
1005}
1006
981void __init dm365_init(void) 1007void __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 d8d988a0b58b..f1710a30e7ba 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
32void __init dm365_init(void); 34void __init dm365_init(void);
33void __init dm365_init_asp(struct snd_platform_data *pdata); 35void __init dm365_init_asp(struct snd_platform_data *pdata);
34void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); 36void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
37void __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 3c918a772619..354af71798dc 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