Commit 99381b4f authored by Miguel Aguilar's avatar Miguel Aguilar Committed by Kevin Hilman

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: default avatarMiguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 0046d0bf
...@@ -510,6 +510,7 @@ static __init void dm365_evm_init(void) ...@@ -510,6 +510,7 @@ static __init void dm365_evm_init(void)
evm_init_cpld(); evm_init_cpld();
dm365_init_asp(&dm365_evm_snd_data); dm365_init_asp(&dm365_evm_snd_data);
dm365_init_rtc();
#ifdef CONFIG_KEYBOARD_DAVINCI #ifdef CONFIG_KEYBOARD_DAVINCI
dm365_init_ks(&dm365evm_ks_data); dm365_init_ks(&dm365evm_ks_data);
......
...@@ -699,6 +699,7 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = { ...@@ -699,6 +699,7 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
[IRQ_I2C] = 3, [IRQ_I2C] = 3,
[IRQ_UARTINT0] = 3, [IRQ_UARTINT0] = 3,
[IRQ_UARTINT1] = 3, [IRQ_UARTINT1] = 3,
[IRQ_DM365_RTCINT] = 3,
[IRQ_DM365_SPIINT0_0] = 3, [IRQ_DM365_SPIINT0_0] = 3,
[IRQ_DM365_SPIINT3_0] = 3, [IRQ_DM365_SPIINT3_0] = 3,
[IRQ_DM365_GPIO0] = 3, [IRQ_DM365_GPIO0] = 3,
...@@ -834,6 +835,25 @@ static struct platform_device dm365_asp_device = { ...@@ -834,6 +835,25 @@ static struct platform_device dm365_asp_device = {
.resource = dm365_asp_resources, .resource = dm365_asp_resources,
}; };
static struct resource dm365_rtc_resources[] = {
{
.start = DM365_RTC_BASE,
.end = DM365_RTC_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_DM365_RTCINT,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device dm365_rtc_device = {
.name = "rtc_davinci",
.id = 0,
.num_resources = ARRAY_SIZE(dm365_rtc_resources),
.resource = dm365_rtc_resources,
};
static struct map_desc dm365_io_desc[] = { static struct map_desc dm365_io_desc[] = {
{ {
.virtual = IO_VIRT, .virtual = IO_VIRT,
...@@ -978,6 +998,12 @@ void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) ...@@ -978,6 +998,12 @@ void __init dm365_init_ks(struct davinci_ks_platform_data *pdata)
platform_device_register(&dm365_ks_device); platform_device_register(&dm365_ks_device);
} }
void __init dm365_init_rtc(void)
{
davinci_cfg_reg(DM365_INT_PRTCSS);
platform_device_register(&dm365_rtc_device);
}
void __init dm365_init(void) void __init dm365_init(void)
{ {
davinci_common_init(&davinci_soc_info_dm365); davinci_common_init(&davinci_soc_info_dm365);
......
...@@ -29,8 +29,11 @@ ...@@ -29,8 +29,11 @@
/* Base of key scan register bank */ /* Base of key scan register bank */
#define DM365_KEYSCAN_BASE (0x01C69400) #define DM365_KEYSCAN_BASE (0x01C69400)
#define DM365_RTC_BASE (0x01C69000)
void __init dm365_init(void); void __init dm365_init(void);
void __init dm365_init_asp(struct snd_platform_data *pdata); void __init dm365_init_asp(struct snd_platform_data *pdata);
void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
void __init dm365_init_rtc(void);
#endif /* __ASM_ARCH_DM365_H */ #endif /* __ASM_ARCH_DM365_H */
...@@ -217,6 +217,7 @@ ...@@ -217,6 +217,7 @@
#define IRQ_DM365_SDIOINT0 23 #define IRQ_DM365_SDIOINT0 23
#define IRQ_DM365_MMCINT1 27 #define IRQ_DM365_MMCINT1 27
#define IRQ_DM365_PWMINT3 28 #define IRQ_DM365_PWMINT3 28
#define IRQ_DM365_RTCINT 29
#define IRQ_DM365_SDIOINT1 31 #define IRQ_DM365_SDIOINT1 31
#define IRQ_DM365_SPIINT0_0 42 #define IRQ_DM365_SPIINT0_0 42
#define IRQ_DM365_SPIINT3_0 43 #define IRQ_DM365_SPIINT3_0 43
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment