summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenu byravarasu <vbyravarasu@nvidia.com>2011-09-26 17:40:42 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-09-29 11:20:31 -0700
commit0b665c7e58ed0c4814f74cdcfd6d2dec302c8f97 (patch)
treebd8f03e6e98bdeb0d9444708496cb2441d2a30ed
parent6149e1dadc86a6874d54ad6e9e30e81bf4db65a4 (diff)
arm: tegra: cardhu: Adding support for tegra RTC
With this change, ported board changes needed for supporting tegra internal RTC on cardhu from 2.6.36. Change-Id: Ic3f0dc152dfe7d3a51228f70ebafbc640b631172 Reviewed-on: http://git-master/r/54466 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-cardhu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c
index 177d65c30b9a..7fde9122f2b2 100644
--- a/arch/arm/mach-tegra/board-cardhu.c
+++ b/arch/arm/mach-tegra/board-cardhu.c
@@ -557,6 +557,26 @@ static void __init cardhu_spi_init(void)
}
}
+static struct resource tegra_rtc_resources[] = {
+ [0] = {
+ .start = TEGRA_RTC_BASE,
+ .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = INT_RTC,
+ .end = INT_RTC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device tegra_rtc_device = {
+ .name = "tegra_rtc",
+ .id = -1,
+ .resource = tegra_rtc_resources,
+ .num_resources = ARRAY_SIZE(tegra_rtc_resources),
+};
+
static struct tegra_wm8903_platform_data cardhu_audio_pdata = {
.gpio_spkr_en = TEGRA_GPIO_SPKR_EN,
.gpio_hp_det = TEGRA_GPIO_HP_DET,
@@ -588,6 +608,7 @@ static struct platform_device ram_console_device = {
static struct platform_device *cardhu_devices[] __initdata = {
&tegra_pmu_device,
+ &tegra_rtc_device,
&tegra_udc_device,
&androidusb_device,
&tegra_usb_fsg_device,