summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2010-07-20 17:55:54 -0700
committerGary King <gking@nvidia.com>2010-07-21 12:51:41 -0700
commitf2a7108a11cb874faf8fb3ff7eee44721a6b9e18 (patch)
tree44336d7a58b4e40298f0468d067877f81f458fd9 /arch
parentdd03be59ae18076839bd3c4d4470bc79a5cd2843 (diff)
[arm/tegra] let RTC internal and ODM drivers coexist
Change-Id: I353d5ff87243c3098100320b2cd184b47b471e84 Reviewed-on: http://git-master/r/4182 Reviewed-by: Gary King <gking@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Tested-by: Jonathan Mayo <jmayo@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-nvodm.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c
index dc1e1c8148fd..1f1931d0b5cf 100644
--- a/arch/arm/mach-tegra/board-nvodm.c
+++ b/arch/arm/mach-tegra/board-nvodm.c
@@ -111,7 +111,7 @@ static void __init tegra_setup_debug_uart(void)
NvOdmDebugConsole uart = NvOdmQueryDebugConsole();
const struct tegra_pingroup_config *pinmux = NULL;
const NvU32 *odm_table;
- struct clk *c;
+ struct clk *c = NULL;
NvU32 odm_nr;
int nr_pins;
@@ -847,13 +847,35 @@ static noinline void __init tegra_setup_gpio_key(void)
static void tegra_setup_gpio_key(void) { }
#endif
+#ifdef CONFIG_RTC_DRV_TEGRA
+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,
+ },
+};
-#ifdef CONFIG_RTC_DRV_TEGRA_ODM
static struct platform_device tegra_rtc_device = {
.name = "tegra_rtc",
.id = -1,
+ .resource = tegra_rtc_resources,
+ .num_resources = ARRAY_SIZE(tegra_rtc_resources),
};
#endif
+
+#ifdef CONFIG_RTC_DRV_TEGRA_ODM
+static struct platform_device tegra_rtc_odm_device = {
+ .name = "tegra_rtc_odm",
+ .id = -1,
+};
+#endif
+
#ifdef CONFIG_TEGRA_NVEC
static struct platform_device tegra_nvec_device = {
.name = "nvec",
@@ -1106,9 +1128,12 @@ static struct platform_device tegra_vibrator_device = {
#endif
static struct platform_device *nvodm_devices[] __initdata = {
-#ifdef CONFIG_RTC_DRV_TEGRA_ODM
+#ifdef CONFIG_RTC_DRV_TEGRA
&tegra_rtc_device,
#endif
+#ifdef CONFIG_RTC_DRV_TEGRA_ODM
+ &tegra_rtc_odm_device,
+#endif
#ifdef CONFIG_TEGRA_NVEC
&tegra_nvec_device,
#endif