arm: tegra: cardhu: Adding support for tegra RTC
venu byravarasu [Mon, 26 Sep 2011 12:10:42 +0000 (17:10 +0530)]
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>

Rebase-Id: R95e169ae8c7a4f2a73cc0f202c72469a614a657a

arch/arm/mach-tegra/board-cardhu.c

index cd4c59f..e7a89aa 100644 (file)
@@ -432,6 +432,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,
@@ -450,6 +470,7 @@ static struct platform_device cardhu_audio_device = {
 
 static struct platform_device *cardhu_devices[] __initdata = {
        &tegra_pmu_device,
+       &tegra_rtc_device,
        &tegra_udc_device,
 #if defined(CONFIG_SND_HDA_TEGRA)
        &tegra_hda_device,