aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2013-10-29 11:51:12 -0400
committerPeter De Schrijver <pdeschrijver@nvidia.com>2013-11-26 11:46:57 -0500
commitc04bf559264de4f986463c639fabef2028542924 (patch)
tree30bfdeed6283bfb603cad43a5519a09c75570dc4 /drivers/clk/tegra
parent43e36a9646ec7d0180d638c095cca36484cc6f82 (diff)
clk: tegra: Properly setup PWM clock on Tegra30
The clock for the PWM controller is slightly different from other peripheral clocks on Tegra30. The clock source mux field start at bit position 28 rather than 30. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/clk/tegra')
-rw-r--r--drivers/clk/tegra/clk-tegra30.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index 153ae1acd2fa..3afa09761bb3 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -102,6 +102,7 @@
102#define AUDIO_SYNC_CLK_SPDIF 0x4b4 102#define AUDIO_SYNC_CLK_SPDIF 0x4b4
103 103
104#define CLK_SOURCE_SPDIF_OUT 0x108 104#define CLK_SOURCE_SPDIF_OUT 0x108
105#define CLK_SOURCE_PWM 0x110
105#define CLK_SOURCE_D_AUDIO 0x3d0 106#define CLK_SOURCE_D_AUDIO 0x3d0
106#define CLK_SOURCE_DAM0 0x3d8 107#define CLK_SOURCE_DAM0 0x3d8
107#define CLK_SOURCE_DAM1 0x3dc 108#define CLK_SOURCE_DAM1 0x3dc
@@ -827,7 +828,6 @@ static struct tegra_clk tegra30_clks[tegra_clk_max] __initdata = {
827 [tegra_clk_extern1] = { .dt_id = TEGRA30_CLK_EXTERN1, .present = true }, 828 [tegra_clk_extern1] = { .dt_id = TEGRA30_CLK_EXTERN1, .present = true },
828 [tegra_clk_extern2] = { .dt_id = TEGRA30_CLK_EXTERN2, .present = true }, 829 [tegra_clk_extern2] = { .dt_id = TEGRA30_CLK_EXTERN2, .present = true },
829 [tegra_clk_extern3] = { .dt_id = TEGRA30_CLK_EXTERN3, .present = true }, 830 [tegra_clk_extern3] = { .dt_id = TEGRA30_CLK_EXTERN3, .present = true },
830 [tegra_clk_pwm] = { .dt_id = TEGRA30_CLK_PWM, .present = true },
831 [tegra_clk_disp1] = { .dt_id = TEGRA30_CLK_DISP1, .present = true }, 831 [tegra_clk_disp1] = { .dt_id = TEGRA30_CLK_DISP1, .present = true },
832 [tegra_clk_disp2] = { .dt_id = TEGRA30_CLK_DISP2, .present = true }, 832 [tegra_clk_disp2] = { .dt_id = TEGRA30_CLK_DISP2, .present = true },
833 [tegra_clk_apbdma] = { .dt_id = TEGRA30_CLK_APBDMA, .present = true }, 833 [tegra_clk_apbdma] = { .dt_id = TEGRA30_CLK_APBDMA, .present = true },
@@ -1111,6 +1111,7 @@ static const char *mux_pllpmdacd2_clkm[] = { "pll_p", "pll_m", "pll_d_out0",
1111 "pll_d2_out0", "clk_m" }; 1111 "pll_d2_out0", "clk_m" };
1112static const char *mux_plld_out0_plld2_out0[] = { "pll_d_out0", 1112static const char *mux_plld_out0_plld2_out0[] = { "pll_d_out0",
1113 "pll_d2_out0" }; 1113 "pll_d2_out0" };
1114static const char *pwm_parents[] = { "pll_p", "pll_c", "clk_32k", "clk_m" };
1114 1115
1115static struct tegra_periph_init_data tegra_periph_clk_list[] = { 1116static struct tegra_periph_init_data tegra_periph_clk_list[] = {
1116 TEGRA_INIT_DATA_MUX("spdif_out", spdif_out_parents, CLK_SOURCE_SPDIF_OUT, 10, TEGRA_PERIPH_ON_APB, TEGRA30_CLK_SPDIF_OUT), 1117 TEGRA_INIT_DATA_MUX("spdif_out", spdif_out_parents, CLK_SOURCE_SPDIF_OUT, 10, TEGRA_PERIPH_ON_APB, TEGRA30_CLK_SPDIF_OUT),
@@ -1121,6 +1122,7 @@ static struct tegra_periph_init_data tegra_periph_clk_list[] = {
1121 TEGRA_INIT_DATA_INT("3d2", mux_pllmcpa, CLK_SOURCE_3D2, 98, TEGRA_PERIPH_MANUAL_RESET, TEGRA30_CLK_GR3D2), 1122 TEGRA_INIT_DATA_INT("3d2", mux_pllmcpa, CLK_SOURCE_3D2, 98, TEGRA_PERIPH_MANUAL_RESET, TEGRA30_CLK_GR3D2),
1122 TEGRA_INIT_DATA_INT("se", mux_pllpcm_clkm, CLK_SOURCE_SE, 127, 0, TEGRA30_CLK_SE), 1123 TEGRA_INIT_DATA_INT("se", mux_pllpcm_clkm, CLK_SOURCE_SE, 127, 0, TEGRA30_CLK_SE),
1123 TEGRA_INIT_DATA_MUX8("hdmi", mux_pllpmdacd2_clkm, CLK_SOURCE_HDMI, 51, 0, TEGRA30_CLK_HDMI), 1124 TEGRA_INIT_DATA_MUX8("hdmi", mux_pllpmdacd2_clkm, CLK_SOURCE_HDMI, 51, 0, TEGRA30_CLK_HDMI),
1125 TEGRA_INIT_DATA("pwm", NULL, NULL, pwm_parents, CLK_SOURCE_PWM, 28, 2, 0, 0, 8, 1, 0, 17, TEGRA_PERIPH_ON_APB, TEGRA30_CLK_PWM),
1124}; 1126};
1125 1127
1126static struct tegra_periph_init_data tegra_periph_nodiv_clk_list[] = { 1128static struct tegra_periph_init_data tegra_periph_nodiv_clk_list[] = {