diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-09-19 00:18:34 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-09-27 11:37:58 -0700 |
commit | 8eb4f328cf343ac63feb745f8c50932d6f35c603 (patch) | |
tree | 652a3c58b594b1490ce84ccfd843a8efe233f5fe | |
parent | d93552b32d7f03da72bbd02ddbbdce5a903cc9a0 (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>
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-whistler.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra2_clocks.c | 4 |
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 8d7e6dbc6573..c34a388912d7 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -201,6 +201,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}, }; @@ -540,7 +541,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 3116067b0bc9..cb32152897ea 100644 --- a/arch/arm/mach-tegra/board-whistler.c +++ b/arch/arm/mach-tegra/board-whistler.c @@ -232,6 +232,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}, }; @@ -436,7 +437,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 223b9e11658c..7a91ff00c0e1 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -945,6 +945,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 */ @@ -960,7 +967,6 @@ static struct resource spdif_resource[] = { .flags = IORESOURCE_MEM } }; -#endif struct platform_device tegra_spdif_device = { .name = "spdif_out", @@ -968,6 +974,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[] = { @@ -991,6 +998,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 819197fef57e..48c6f75a553b 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), |