summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSumit Bhattacharya <sumitb@nvidia.com>2011-09-19 00:18:34 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:00 -0800
commitc29ddbe247d3a0b3ab46f15e24a83de0e64683e4 (patch)
treea705db16fddfb44bbf2c25cfcc600eddaf2dae8d /arch
parent5a843ce9b9090bb7ce012143fd997c53a87f5117 (diff)
arch: arm: tegra: Add SPDIF driver support
Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I7b948b820434721511c008f644b69d93c23865e1 Reviewed-on: http://git-master/r/53094 Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R3fb55fe060065d76fb18010ad249e6ee0f96a944
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-ventana.c3
-rw-r--r--arch/arm/mach-tegra/board-whistler.c3
-rw-r--r--arch/arm/mach-tegra/devices.c14
-rw-r--r--arch/arm/mach-tegra/devices.h4
-rw-r--r--arch/arm/mach-tegra/tegra2_clocks.c4
5 files changed, 23 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c
index 47fa94b9c265..55a354284b01 100644
--- a/arch/arm/mach-tegra/board-ventana.c
+++ b/arch/arm/mach-tegra/board-ventana.c
@@ -127,6 +127,7 @@ static __initdata struct tegra_clk_init_table ventana_clk_init_table[] = {
{ "pwm", "clk_32k", 32768, false},
{ "kbc", "clk_32k", 32768, true},
{ "i2s1", "pll_a_out0", 0, false},
+ { "spdif_out", "pll_a_out0", 0, false},
{ NULL, NULL, 0, 0},
};
@@ -380,7 +381,9 @@ static struct platform_device *ventana_devices[] __initdata = {
&tegra_avp_device,
&tegra_camera,
&tegra_i2s_device1,
+ &tegra_spdif_device,
&tegra_das_device,
+ &spdif_dit_device,
&tegra_pcm_device,
&ventana_audio_device,
};
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c
index 2dbb2394d036..64e7dc29fca2 100644
--- a/arch/arm/mach-tegra/board-whistler.c
+++ b/arch/arm/mach-tegra/board-whistler.c
@@ -217,6 +217,7 @@ static __initdata struct tegra_clk_init_table whistler_clk_init_table[] = {
{ "kbc", "clk_32k", 32768, true},
{ "sdmmc2", "pll_p", 25000000, false},
{ "i2s1", "pll_a_out0", 0, false},
+ { "spdif_out", "pll_a_out0", 0, false},
{ NULL, NULL, 0, 0},
};
@@ -335,7 +336,9 @@ static struct platform_device *whistler_devices[] __initdata = {
&whistler_scroll_device,
&tegra_camera,
&tegra_i2s_device1,
+ &tegra_spdif_device,
&tegra_das_device,
+ &spdif_dit_device,
&tegra_pcm_device,
&whistler_audio_device,
};
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index d8e004116821..6f5da486aeec 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -990,6 +990,13 @@ static struct resource spdif_resource[] = {
.flags = IORESOURCE_MEM
}
};
+
+struct platform_device tegra_spdif_device = {
+ .name = "tegra20-spdif",
+ .id = -1,
+ .resource = spdif_resource,
+ .num_resources = ARRAY_SIZE(spdif_resource),
+};
#else
/* FIXME : Temporarly adding - find the right solution */
@@ -1005,7 +1012,6 @@ static struct resource spdif_resource[] = {
.flags = IORESOURCE_MEM
}
};
-#endif
struct platform_device tegra_spdif_device = {
.name = "spdif_out",
@@ -1013,6 +1019,7 @@ struct platform_device tegra_spdif_device = {
.resource = spdif_resource,
.num_resources = ARRAY_SIZE(spdif_resource),
};
+#endif
#ifndef CONFIG_ARCH_TEGRA_2x_SOC
static struct resource ahub_resource[] = {
@@ -1036,6 +1043,11 @@ struct platform_device tegra_ahub_device = {
};
#endif
+struct platform_device spdif_dit_device = {
+ .name = "spdif-dit",
+ .id = -1,
+};
+
struct platform_device tegra_pcm_device = {
.name = "tegra-pcm-audio",
.id = -1,
diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h
index 76d4eb916cf7..c6c9ce92c422 100644
--- a/arch/arm/mach-tegra/devices.h
+++ b/arch/arm/mach-tegra/devices.h
@@ -60,7 +60,9 @@ extern struct platform_device tegra_uarte_device;
extern struct platform_device tegra_pmu_device;
extern struct platform_device tegra_i2s_device1;
extern struct platform_device tegra_i2s_device2;
+extern struct platform_device tegra_spdif_device;
extern struct platform_device tegra_das_device;
+extern struct platform_device spdif_dit_device;
extern struct platform_device tegra_pcm_device;
extern struct platform_device tegra_w1_device;
extern struct platform_device tegra_udc_device;
@@ -97,9 +99,7 @@ extern struct platform_device tegra_uartb_device;
extern struct platform_device tegra_uartc_device;
extern struct platform_device tegra_uartd_device;
extern struct platform_device tegra_uarte_device;
-extern struct platform_device tegra_spdif_device;
extern struct platform_device tegra_grhost_device;
-extern struct platform_device tegra_spdif_device;
extern struct platform_device tegra_avp_device;
extern struct platform_device tegra_aes_device;
#if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c
index 62965ab76069..918c4de6b46f 100644
--- a/arch/arm/mach-tegra/tegra2_clocks.c
+++ b/arch/arm/mach-tegra/tegra2_clocks.c
@@ -2337,8 +2337,8 @@ struct clk tegra_list_periph_clks[] = {
PERIPH_CLK("i2s1", "tegra20-i2s.0", NULL, 11, 0x100, 0x31E, 26000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
PERIPH_CLK("i2s2", "tegra20-i2s.1", NULL, 18, 0x104, 0x31E, 26000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
PERIPH_CLK("kfuse", "kfuse-tegra", NULL, 40, 0, 0x31E, 26000000, mux_clk_m, 0),
- PERIPH_CLK("spdif_out", "spdif_out", NULL, 10, 0x108, 0x31E, 100000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
- PERIPH_CLK("spdif_in", "spdif_in", NULL, 10, 0x10c, 0x31E, 100000000, mux_pllp_pllc_pllm, MUX | DIV_U71 | PERIPH_ON_APB),
+ PERIPH_CLK("spdif_out", "tegra20-spdif", "spdif_out", 10, 0x108, 0x31E, 100000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
+ PERIPH_CLK("spdif_in", "tegra20-spdif", "spdif_in", 10, 0x10c, 0x31E, 100000000, mux_pllp_pllc_pllm, MUX | DIV_U71 | PERIPH_ON_APB),
PERIPH_CLK("pwm", "pwm", NULL, 17, 0x110, 0x71C, 432000000, mux_pllp_pllc_audio_clkm_clk32, MUX | DIV_U71 | PERIPH_ON_APB),
PERIPH_CLK("spi", "spi", NULL, 43, 0x114, 0x31E, 40000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
PERIPH_CLK("xio", "xio", NULL, 45, 0x120, 0x31E, 150000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71),