summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/devices.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2010-12-07 11:19:20 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:42:02 -0800
commit816ab05de4f2171e20171db01fa916634ed7bee6 (patch)
tree963ce2c1724c63598deb279d9f6ed54cfc93d1e3 /arch/arm/mach-tegra/devices.c
parent7d8324d8f3dfc27407d7514fcbd605649c9bd210 (diff)
[ARM/tegra] Add Tegra3 support
Bug 764354 Original-Change-Id: I8a390eb4dae87dceacb97461f23d13554868b046 Reviewed-on: http://git-master/r/12228 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Tested-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I8e6b8303898796419fb5a759cd16edff9aeac081 Rebase-Id: R2866240384c6c24f46bd7ef54bc3dc9140d9e96b
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r--arch/arm/mach-tegra/devices.c172
1 files changed, 145 insertions, 27 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 6597465a1fee..a89d21034f84 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -70,6 +70,7 @@ static struct resource i2c_resource3[] = {
},
};
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
static struct resource i2c_resource4[] = {
[0] = {
.start = INT_DVC,
@@ -83,6 +84,34 @@ static struct resource i2c_resource4[] = {
},
};
+#elif defined(CONFIG_ARCH_TEGRA_3x_SOC)
+static struct resource i2c_resource4[] = {
+ [0] = {
+ .start = INT_I2C4,
+ .end = INT_I2C4,
+ .flags = IORESOURCE_IRQ,
+ },
+ [1] = {
+ .start = TEGRA_I2C4_BASE,
+ .end = TEGRA_I2C4_BASE + TEGRA_I2C4_SIZE-1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct resource i2c_resource5[] = {
+ [0] = {
+ .start = INT_I2C5,
+ .end = INT_I2C5,
+ .flags = IORESOURCE_IRQ,
+ },
+ [1] = {
+ .start = TEGRA_I2C5_BASE,
+ .end = TEGRA_I2C5_BASE + TEGRA_I2C5_SIZE-1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+#endif
+
static struct tegra_i2c_platform_data tegra_i2c1_platform_data = {
.bus_clk_rate = { 400000 },
};
@@ -139,10 +168,22 @@ struct platform_device tegra_i2c_device4 = {
},
};
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+struct platform_device tegra_i2c_device5 = {
+ .name = "tegra-i2c",
+ .id = 4,
+ .resource = i2c_resource5,
+ .num_resources = ARRAY_SIZE(i2c_resource5),
+ .dev = {
+ .platform_data = 0,
+ },
+};
+#endif
+
static struct resource spi_resource1[] = {
[0] = {
- .start = INT_S_LINK1,
- .end = INT_S_LINK1,
+ .start = INT_SPI_1,
+ .end = INT_SPI_1,
.flags = IORESOURCE_IRQ,
},
[1] = {
@@ -425,6 +466,18 @@ static struct resource tegra_pmu_resources[] = {
.end = INT_CPU1_PMU_INTR,
.flags = IORESOURCE_IRQ,
},
+#if defined(CONFIG_ARCH_TEGRA_3x_SOC)
+ [2] = {
+ .start = INT_CPU2_PMU_INTR,
+ .end = INT_CPU2_PMU_INTR,
+ .flags = IORESOURCE_IRQ,
+ },
+ [3] = {
+ .start = INT_CPU3_PMU_INTR,
+ .end = INT_CPU3_PMU_INTR,
+ .flags = IORESOURCE_IRQ,
+ },
+#endif
};
struct platform_device tegra_pmu_device = {
@@ -549,6 +602,7 @@ struct platform_device tegra_uarte_device = {
},
};
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
static struct resource i2s_resource1[] = {
[0] = {
.start = INT_I2S1,
@@ -567,6 +621,13 @@ static struct resource i2s_resource1[] = {
}
};
+struct platform_device tegra_i2s_device1 = {
+ .name = "tegra-i2s",
+ .id = 0,
+ .resource = i2s_resource1,
+ .num_resources = ARRAY_SIZE(i2s_resource1),
+};
+
static struct resource i2s_resource2[] = {
[0] = {
.start = INT_I2S2,
@@ -585,13 +646,6 @@ static struct resource i2s_resource2[] = {
}
};
-struct platform_device tegra_i2s_device1 = {
- .name = "tegra-i2s",
- .id = 0,
- .resource = i2s_resource1,
- .num_resources = ARRAY_SIZE(i2s_resource1),
-};
-
struct platform_device tegra_i2s_device2 = {
.name = "tegra-i2s",
.id = 1,
@@ -619,6 +673,62 @@ struct platform_device tegra_pcm_device = {
.id = -1,
};
+
+static struct resource spdif_resource[] = {
+ [0] = {
+ .start = INT_SPDIF,
+ .end = INT_SPDIF,
+ .flags = IORESOURCE_IRQ
+ },
+ [1] = {
+ .start = TEGRA_DMA_REQ_SEL_SPD_I,
+ .end = TEGRA_DMA_REQ_SEL_SPD_I,
+ .flags = IORESOURCE_DMA
+ },
+ [2] = {
+ .start = TEGRA_SPDIF_BASE,
+ .end = TEGRA_SPDIF_BASE + TEGRA_SPDIF_SIZE - 1,
+ .flags = IORESOURCE_MEM
+ }
+};
+
+#elif defined(CONFIG_ARCH_TEGRA_3x_SOC)
+static struct resource audio_resource[] = {
+ [0] = {
+ .start = TEGRA_AUDIO_CLUSTER_BASE,
+ .end = TEGRA_AUDIO_CLUSTER_BASE + TEGRA_AUDIO_CLUSTER_SIZE - 1,
+ .flags = IORESOURCE_MEM
+ }
+};
+
+struct platform_device tegra_audio_device = {
+ .name = "audio",
+ .id = -1,
+ .resource = audio_resource,
+ .num_resources = ARRAY_SIZE(audio_resource),
+};
+
+static struct resource hda_resource[] = {
+ [0] = {
+ .start = INT_HDA,
+ .end = INT_HDA,
+ .flags = IORESOURCE_IRQ
+ },
+ [1] = {
+ .start = TEGRA_HDA_BASE,
+ .end = TEGRA_HDA_BASE + TEGRA_HDA_SIZE - 1,
+ .flags = IORESOURCE_MEM
+ }
+};
+
+struct platform_device tegra_hda_device = {
+ .name = "hda",
+ .id = -1,
+ .resource = hda_resource,
+ .num_resources = ARRAY_SIZE(hda_resource),
+};
+#endif
+
static struct resource w1_resources[] = {
[0] = {
.start = INT_OWR,
@@ -691,24 +801,6 @@ struct platform_device tegra_otg_device = {
.num_resources = ARRAY_SIZE(tegra_otg_resources),
};
-static struct resource spdif_resource[] = {
- [0] = {
- .start = INT_SPDIF,
- .end = INT_SPDIF,
- .flags = IORESOURCE_IRQ
- },
- [1] = {
- .start = TEGRA_DMA_REQ_SEL_SPD_I,
- .end = TEGRA_DMA_REQ_SEL_SPD_I,
- .flags = IORESOURCE_DMA
- },
- [2] = {
- .start = TEGRA_SPDIF_BASE,
- .end = TEGRA_SPDIF_BASE + TEGRA_SPDIF_SIZE - 1,
- .flags = IORESOURCE_MEM
- }
-};
-
struct platform_device tegra_spdif_device = {
.name = "spdif_out",
.id = -1,
@@ -716,6 +808,7 @@ struct platform_device tegra_spdif_device = {
.num_resources = ARRAY_SIZE(spdif_resource),
};
+#if defined(CONFIG_TEGRA_IOVMM_GART)
static struct resource tegra_gart_resources[] = {
[0] = {
.name = "mc",
@@ -737,6 +830,31 @@ struct platform_device tegra_gart_device = {
.num_resources = ARRAY_SIZE(tegra_gart_resources),
.resource = tegra_gart_resources
};
+#endif
+
+#if defined(CONFIG_TEGRA_IOVMM_SMMU)
+static struct resource tegra_smmu_resources[] = {
+ [0] = {
+ .name = "mc",
+ .flags = IORESOURCE_MEM,
+ .start = TEGRA_MC_BASE,
+ .end = TEGRA_MC_BASE + TEGRA_MC_SIZE - 1,
+ },
+ [1] = {
+ .name = "smmu",
+ .flags = IORESOURCE_MEM,
+ .start = TEGRA_SMMU_BASE,
+ .end = TEGRA_SMMU_BASE + TEGRA_SMMU_SIZE - 1,
+ }
+};
+
+struct platform_device tegra_smmu_device = {
+ .name = "tegra_smmu",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(tegra_smmu_resources),
+ .resource = tegra_smmu_resources
+};
+#endif
static struct resource tegra_wdt_resources[] = {
[0] = {