aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/tegra2_clocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/tegra2_clocks.c')
-rw-r--r--arch/arm/mach-tegra/tegra2_clocks.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c
index 0fe9b3ee2947..371869d8ea01 100644
--- a/arch/arm/mach-tegra/tegra2_clocks.c
+++ b/arch/arm/mach-tegra/tegra2_clocks.c
@@ -166,13 +166,13 @@ static DEFINE_SPINLOCK(clock_register_lock);
166static int tegra_periph_clk_enable_refcount[3 * 32]; 166static int tegra_periph_clk_enable_refcount[3 * 32];
167 167
168#define clk_writel(value, reg) \ 168#define clk_writel(value, reg) \
169 __raw_writel(value, (u32)reg_clk_base + (reg)) 169 __raw_writel(value, reg_clk_base + (reg))
170#define clk_readl(reg) \ 170#define clk_readl(reg) \
171 __raw_readl((u32)reg_clk_base + (reg)) 171 __raw_readl(reg_clk_base + (reg))
172#define pmc_writel(value, reg) \ 172#define pmc_writel(value, reg) \
173 __raw_writel(value, (u32)reg_pmc_base + (reg)) 173 __raw_writel(value, reg_pmc_base + (reg))
174#define pmc_readl(reg) \ 174#define pmc_readl(reg) \
175 __raw_readl((u32)reg_pmc_base + (reg)) 175 __raw_readl(reg_pmc_base + (reg))
176 176
177unsigned long clk_measure_input_freq(void) 177unsigned long clk_measure_input_freq(void)
178{ 178{
@@ -918,7 +918,7 @@ static struct clk_ops tegra_pll_div_ops = {
918static void tegra2_periph_clk_init(struct clk *c) 918static void tegra2_periph_clk_init(struct clk *c)
919{ 919{
920 u32 val = clk_readl(c->reg); 920 u32 val = clk_readl(c->reg);
921 const struct clk_mux_sel *mux = 0; 921 const struct clk_mux_sel *mux = NULL;
922 const struct clk_mux_sel *sel; 922 const struct clk_mux_sel *sel;
923 if (c->flags & MUX) { 923 if (c->flags & MUX) {
924 for (sel = c->inputs; sel->input != NULL; sel++) { 924 for (sel = c->inputs; sel->input != NULL; sel++) {
@@ -1459,7 +1459,7 @@ static struct clk tegra_pll_s = {
1459static struct clk_mux_sel tegra_clk_m_sel[] = { 1459static struct clk_mux_sel tegra_clk_m_sel[] = {
1460 { .input = &tegra_clk_32k, .value = 0}, 1460 { .input = &tegra_clk_32k, .value = 0},
1461 { .input = &tegra_pll_s, .value = 1}, 1461 { .input = &tegra_pll_s, .value = 1},
1462 { 0, 0}, 1462 { NULL , 0},
1463}; 1463};
1464 1464
1465static struct clk tegra_clk_m = { 1465static struct clk tegra_clk_m = {
@@ -1861,7 +1861,7 @@ static const struct audio_sources {
1861 { .name = "ext_audio_clk1", .value = 6 }, 1861 { .name = "ext_audio_clk1", .value = 6 },
1862 { .name = "ext_vimclk", .value = 7 }, 1862 { .name = "ext_vimclk", .value = 7 },
1863#endif 1863#endif
1864 { 0, 0 } 1864 { NULL, 0 }
1865}; 1865};
1866 1866
1867static struct clk tegra_clk_audio = { 1867static struct clk tegra_clk_audio = {
@@ -1885,7 +1885,7 @@ static struct clk tegra_clk_audio_2x = {
1885 }, 1885 },
1886}; 1886};
1887 1887
1888struct clk_lookup tegra_audio_clk_lookups[] = { 1888static struct clk_lookup tegra_audio_clk_lookups[] = {
1889 { .con_id = "audio", .clk = &tegra_clk_audio }, 1889 { .con_id = "audio", .clk = &tegra_clk_audio },
1890 { .con_id = "audio_2x", .clk = &tegra_clk_audio_2x } 1890 { .con_id = "audio_2x", .clk = &tegra_clk_audio_2x }
1891}; 1891};
@@ -1926,7 +1926,7 @@ static struct clk_mux_sel mux_cclk[] = {
1926 { .input = &tegra_pll_p_out3, .value = 6}, 1926 { .input = &tegra_pll_p_out3, .value = 6},
1927 { .input = &tegra_clk_d, .value = 7}, 1927 { .input = &tegra_clk_d, .value = 7},
1928 { .input = &tegra_pll_x, .value = 8}, 1928 { .input = &tegra_pll_x, .value = 8},
1929 { 0, 0}, 1929 { NULL, 0},
1930}; 1930};
1931 1931
1932static struct clk_mux_sel mux_sclk[] = { 1932static struct clk_mux_sel mux_sclk[] = {
@@ -1938,7 +1938,7 @@ static struct clk_mux_sel mux_sclk[] = {
1938 { .input = &tegra_clk_d, .value = 5}, 1938 { .input = &tegra_clk_d, .value = 5},
1939 { .input = &tegra_clk_32k, .value = 6}, 1939 { .input = &tegra_clk_32k, .value = 6},
1940 { .input = &tegra_pll_m_out1, .value = 7}, 1940 { .input = &tegra_pll_m_out1, .value = 7},
1941 { 0, 0}, 1941 { NULL, 0},
1942}; 1942};
1943 1943
1944static struct clk tegra_clk_cclk = { 1944static struct clk tegra_clk_cclk = {
@@ -2009,7 +2009,7 @@ static struct clk_mux_sel mux_pllm_pllc_pllp_plla[] = {
2009 { .input = &tegra_pll_c, .value = 1}, 2009 { .input = &tegra_pll_c, .value = 1},
2010 { .input = &tegra_pll_p, .value = 2}, 2010 { .input = &tegra_pll_p, .value = 2},
2011 { .input = &tegra_pll_a_out0, .value = 3}, 2011 { .input = &tegra_pll_a_out0, .value = 3},
2012 { 0, 0}, 2012 { NULL, 0},
2013}; 2013};
2014 2014
2015static struct clk_mux_sel mux_pllm_pllc_pllp_clkm[] = { 2015static struct clk_mux_sel mux_pllm_pllc_pllp_clkm[] = {
@@ -2017,7 +2017,7 @@ static struct clk_mux_sel mux_pllm_pllc_pllp_clkm[] = {
2017 { .input = &tegra_pll_c, .value = 1}, 2017 { .input = &tegra_pll_c, .value = 1},
2018 { .input = &tegra_pll_p, .value = 2}, 2018 { .input = &tegra_pll_p, .value = 2},
2019 { .input = &tegra_clk_m, .value = 3}, 2019 { .input = &tegra_clk_m, .value = 3},
2020 { 0, 0}, 2020 { NULL, 0},
2021}; 2021};
2022 2022
2023static struct clk_mux_sel mux_pllp_pllc_pllm_clkm[] = { 2023static struct clk_mux_sel mux_pllp_pllc_pllm_clkm[] = {
@@ -2025,7 +2025,7 @@ static struct clk_mux_sel mux_pllp_pllc_pllm_clkm[] = {
2025 { .input = &tegra_pll_c, .value = 1}, 2025 { .input = &tegra_pll_c, .value = 1},
2026 { .input = &tegra_pll_m, .value = 2}, 2026 { .input = &tegra_pll_m, .value = 2},
2027 { .input = &tegra_clk_m, .value = 3}, 2027 { .input = &tegra_clk_m, .value = 3},
2028 { 0, 0}, 2028 { NULL, 0},
2029}; 2029};
2030 2030
2031static struct clk_mux_sel mux_pllaout0_audio2x_pllp_clkm[] = { 2031static struct clk_mux_sel mux_pllaout0_audio2x_pllp_clkm[] = {
@@ -2033,7 +2033,7 @@ static struct clk_mux_sel mux_pllaout0_audio2x_pllp_clkm[] = {
2033 {.input = &tegra_clk_audio_2x, .value = 1}, 2033 {.input = &tegra_clk_audio_2x, .value = 1},
2034 {.input = &tegra_pll_p, .value = 2}, 2034 {.input = &tegra_pll_p, .value = 2},
2035 {.input = &tegra_clk_m, .value = 3}, 2035 {.input = &tegra_clk_m, .value = 3},
2036 { 0, 0}, 2036 { NULL, 0},
2037}; 2037};
2038 2038
2039static struct clk_mux_sel mux_pllp_plld_pllc_clkm[] = { 2039static struct clk_mux_sel mux_pllp_plld_pllc_clkm[] = {
@@ -2041,7 +2041,7 @@ static struct clk_mux_sel mux_pllp_plld_pllc_clkm[] = {
2041 {.input = &tegra_pll_d_out0, .value = 1}, 2041 {.input = &tegra_pll_d_out0, .value = 1},
2042 {.input = &tegra_pll_c, .value = 2}, 2042 {.input = &tegra_pll_c, .value = 2},
2043 {.input = &tegra_clk_m, .value = 3}, 2043 {.input = &tegra_clk_m, .value = 3},
2044 { 0, 0}, 2044 { NULL, 0},
2045}; 2045};
2046 2046
2047static struct clk_mux_sel mux_pllp_pllc_audio_clkm_clk32[] = { 2047static struct clk_mux_sel mux_pllp_pllc_audio_clkm_clk32[] = {
@@ -2050,39 +2050,39 @@ static struct clk_mux_sel mux_pllp_pllc_audio_clkm_clk32[] = {
2050 {.input = &tegra_clk_audio, .value = 2}, 2050 {.input = &tegra_clk_audio, .value = 2},
2051 {.input = &tegra_clk_m, .value = 3}, 2051 {.input = &tegra_clk_m, .value = 3},
2052 {.input = &tegra_clk_32k, .value = 4}, 2052 {.input = &tegra_clk_32k, .value = 4},
2053 { 0, 0}, 2053 { NULL, 0},
2054}; 2054};
2055 2055
2056static struct clk_mux_sel mux_pllp_pllc_pllm[] = { 2056static struct clk_mux_sel mux_pllp_pllc_pllm[] = {
2057 {.input = &tegra_pll_p, .value = 0}, 2057 {.input = &tegra_pll_p, .value = 0},
2058 {.input = &tegra_pll_c, .value = 1}, 2058 {.input = &tegra_pll_c, .value = 1},
2059 {.input = &tegra_pll_m, .value = 2}, 2059 {.input = &tegra_pll_m, .value = 2},
2060 { 0, 0}, 2060 { NULL, 0},
2061}; 2061};
2062 2062
2063static struct clk_mux_sel mux_clk_m[] = { 2063static struct clk_mux_sel mux_clk_m[] = {
2064 { .input = &tegra_clk_m, .value = 0}, 2064 { .input = &tegra_clk_m, .value = 0},
2065 { 0, 0}, 2065 { NULL, 0},
2066}; 2066};
2067 2067
2068static struct clk_mux_sel mux_pllp_out3[] = { 2068static struct clk_mux_sel mux_pllp_out3[] = {
2069 { .input = &tegra_pll_p_out3, .value = 0}, 2069 { .input = &tegra_pll_p_out3, .value = 0},
2070 { 0, 0}, 2070 { NULL, 0},
2071}; 2071};
2072 2072
2073static struct clk_mux_sel mux_plld[] = { 2073static struct clk_mux_sel mux_plld[] = {
2074 { .input = &tegra_pll_d, .value = 0}, 2074 { .input = &tegra_pll_d, .value = 0},
2075 { 0, 0}, 2075 { NULL, 0},
2076}; 2076};
2077 2077
2078static struct clk_mux_sel mux_clk_32k[] = { 2078static struct clk_mux_sel mux_clk_32k[] = {
2079 { .input = &tegra_clk_32k, .value = 0}, 2079 { .input = &tegra_clk_32k, .value = 0},
2080 { 0, 0}, 2080 { NULL, 0},
2081}; 2081};
2082 2082
2083static struct clk_mux_sel mux_pclk[] = { 2083static struct clk_mux_sel mux_pclk[] = {
2084 { .input = &tegra_clk_pclk, .value = 0}, 2084 { .input = &tegra_clk_pclk, .value = 0},
2085 { 0, 0}, 2085 { NULL, 0},
2086}; 2086};
2087 2087
2088static struct clk tegra_clk_emc = { 2088static struct clk tegra_clk_emc = {
@@ -2125,7 +2125,7 @@ static struct clk tegra_clk_emc = {
2125 .parent = _parent, \ 2125 .parent = _parent, \
2126 } 2126 }
2127 2127
2128struct clk tegra_list_clks[] = { 2128static struct clk tegra_list_clks[] = {
2129 PERIPH_CLK("apbdma", "tegra-dma", NULL, 34, 0, 108000000, mux_pclk, 0), 2129 PERIPH_CLK("apbdma", "tegra-dma", NULL, 34, 0, 108000000, mux_pclk, 0),
2130 PERIPH_CLK("rtc", "rtc-tegra", NULL, 4, 0, 32768, mux_clk_32k, PERIPH_NO_RESET), 2130 PERIPH_CLK("rtc", "rtc-tegra", NULL, 4, 0, 32768, mux_clk_32k, PERIPH_NO_RESET),
2131 PERIPH_CLK("timer", "timer", NULL, 5, 0, 26000000, mux_clk_m, 0), 2131 PERIPH_CLK("timer", "timer", NULL, 5, 0, 26000000, mux_clk_m, 0),
@@ -2221,7 +2221,7 @@ struct clk tegra_list_clks[] = {
2221 * configuration. List those here to register them twice in the clock lookup 2221 * configuration. List those here to register them twice in the clock lookup
2222 * table under two names. 2222 * table under two names.
2223 */ 2223 */
2224struct clk_duplicate tegra_clk_duplicates[] = { 2224static struct clk_duplicate tegra_clk_duplicates[] = {
2225 CLK_DUPLICATE("uarta", "tegra_uart.0", NULL), 2225 CLK_DUPLICATE("uarta", "tegra_uart.0", NULL),
2226 CLK_DUPLICATE("uartb", "tegra_uart.1", NULL), 2226 CLK_DUPLICATE("uartb", "tegra_uart.1", NULL),
2227 CLK_DUPLICATE("uartc", "tegra_uart.2", NULL), 2227 CLK_DUPLICATE("uartc", "tegra_uart.2", NULL),
@@ -2252,7 +2252,7 @@ struct clk_duplicate tegra_clk_duplicates[] = {
2252 .clk = ck, \ 2252 .clk = ck, \
2253 } 2253 }
2254 2254
2255struct clk *tegra_ptr_clks[] = { 2255static struct clk *tegra_ptr_clks[] = {
2256 &tegra_clk_32k, 2256 &tegra_clk_32k,
2257 &tegra_pll_s, 2257 &tegra_pll_s,
2258 &tegra_clk_m, 2258 &tegra_clk_m,