aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
commit952414505f55afe5cd6dc004765076aa22b3ed7e (patch)
treeeba11ed702ae02fea7f1a0d422346454fc98296f /arch/arm/mach-tegra
parent68e24ba70465b82ad24e0774ceab5360180d4627 (diff)
parent3e965b176341b78620f7404fd8b7f9a0d061f8a2 (diff)
Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc: (125 commits) ARM: mach-mxs: fix machines' initializers order mmc: mxcmmc: explicitly includes mach/hardware.h arm/imx: explicitly includes mach/hardware.h in pm-imx27.c arm/imx: remove mx27_setup_weimcs() from mx27.h arm/imx: explicitly includes mach/hardware.h in mach-kzm_arm11_01.c arm/imx: remove mx31_setup_weimcs() from mx31.h ARM: tegra: devices.c should include devices.h ARM: tegra: cpu-tegra: unexport two functions ARM: tegra: cpu-tegra: sparse type fix ARM: tegra: dma: staticify some tables and functions ARM: tegra: tegra2_clocks: don't export some tables ARM: tegra: tegra_powergate_is_powered should be static ARM: tegra: tegra_rtc_read_ms should be static ARM: tegra: tegra_init_cache should be static ARM: tegra: pcie: 0 -> NULL changes ARM: tegra: pcie: include board.h ARM: tegra: pcie: don't cast __iomem pointers ARM: tegra: tegra2_clocks: 0 -> NULL changes ARM: tegra: tegra2_clocks: don't cast __iomem pointers ARM: tegra: timer: don't cast __iomem pointers ... Fix up trivial conflicts in arch/arm/mach-omap2/Makefile, arch/arm/mach-u300/{Makefile.boot,core.c} arch/arm/plat-{mxc,omap}/devices.c
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/common.c2
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c6
-rw-r--r--arch/arm/mach-tegra/devices.c2
-rw-r--r--arch/arm/mach-tegra/dma.c14
-rw-r--r--arch/arm/mach-tegra/include/mach/io.h18
-rw-r--r--arch/arm/mach-tegra/include/mach/powergate.h1
-rw-r--r--arch/arm/mach-tegra/io.c8
-rw-r--r--arch/arm/mach-tegra/pcie.c8
-rw-r--r--arch/arm/mach-tegra/powergate.c5
-rw-r--r--arch/arm/mach-tegra/tegra2_clocks.c50
-rw-r--r--arch/arm/mach-tegra/timer.c6
11 files changed, 66 insertions, 54 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index d5e3f89b05af..690b888be506 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -61,7 +61,7 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
61 { NULL, NULL, 0, 0}, 61 { NULL, NULL, 0, 0},
62}; 62};
63 63
64void __init tegra_init_cache(void) 64static void __init tegra_init_cache(void)
65{ 65{
66#ifdef CONFIG_CACHE_L2X0 66#ifdef CONFIG_CACHE_L2X0
67 void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; 67 void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index 0e0fd4d889bd..bb5ce39b733b 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -56,12 +56,12 @@ static unsigned long target_cpu_speed[NUM_CPUS];
56static DEFINE_MUTEX(tegra_cpu_lock); 56static DEFINE_MUTEX(tegra_cpu_lock);
57static bool is_suspended; 57static bool is_suspended;
58 58
59int tegra_verify_speed(struct cpufreq_policy *policy) 59static int tegra_verify_speed(struct cpufreq_policy *policy)
60{ 60{
61 return cpufreq_frequency_table_verify(policy, freq_table); 61 return cpufreq_frequency_table_verify(policy, freq_table);
62} 62}
63 63
64unsigned int tegra_getspeed(unsigned int cpu) 64static unsigned int tegra_getspeed(unsigned int cpu)
65{ 65{
66 unsigned long rate; 66 unsigned long rate;
67 67
@@ -129,7 +129,7 @@ static int tegra_target(struct cpufreq_policy *policy,
129 unsigned int target_freq, 129 unsigned int target_freq,
130 unsigned int relation) 130 unsigned int relation)
131{ 131{
132 int idx; 132 unsigned int idx;
133 unsigned int freq; 133 unsigned int freq;
134 int ret = 0; 134 int ret = 0;
135 135
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 57e35d20c24c..489e82b5282a 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -29,7 +29,9 @@
29#include <mach/iomap.h> 29#include <mach/iomap.h>
30#include <mach/dma.h> 30#include <mach/dma.h>
31#include <mach/usb_phy.h> 31#include <mach/usb_phy.h>
32
32#include "gpio-names.h" 33#include "gpio-names.h"
34#include "devices.h"
33 35
34static struct resource i2c_resource1[] = { 36static struct resource i2c_resource1[] = {
35 [0] = { 37 [0] = {
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index f4ef5eb317bd..c0cf967e47d3 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -105,13 +105,17 @@
105 105
106#define NV_DMA_MAX_TRASFER_SIZE 0x10000 106#define NV_DMA_MAX_TRASFER_SIZE 0x10000
107 107
108const unsigned int ahb_addr_wrap_table[8] = { 108static const unsigned int ahb_addr_wrap_table[8] = {
109 0, 32, 64, 128, 256, 512, 1024, 2048 109 0, 32, 64, 128, 256, 512, 1024, 2048
110}; 110};
111 111
112const unsigned int apb_addr_wrap_table[8] = {0, 1, 2, 4, 8, 16, 32, 64}; 112static const unsigned int apb_addr_wrap_table[8] = {
113 0, 1, 2, 4, 8, 16, 32, 64
114};
113 115
114const unsigned int bus_width_table[5] = {8, 16, 32, 64, 128}; 116static const unsigned int bus_width_table[5] = {
117 8, 16, 32, 64, 128
118};
115 119
116#define TEGRA_DMA_NAME_SIZE 16 120#define TEGRA_DMA_NAME_SIZE 16
117struct tegra_dma_channel { 121struct tegra_dma_channel {
@@ -157,7 +161,7 @@ void tegra_dma_dequeue(struct tegra_dma_channel *ch)
157 return; 161 return;
158} 162}
159 163
160void tegra_dma_stop(struct tegra_dma_channel *ch) 164static void tegra_dma_stop(struct tegra_dma_channel *ch)
161{ 165{
162 u32 csr; 166 u32 csr;
163 u32 status; 167 u32 status;
@@ -174,7 +178,7 @@ void tegra_dma_stop(struct tegra_dma_channel *ch)
174 writel(status, ch->addr + APB_DMA_CHAN_STA); 178 writel(status, ch->addr + APB_DMA_CHAN_STA);
175} 179}
176 180
177int tegra_dma_cancel(struct tegra_dma_channel *ch) 181static int tegra_dma_cancel(struct tegra_dma_channel *ch)
178{ 182{
179 u32 csr; 183 u32 csr;
180 unsigned long irq_flags; 184 unsigned long irq_flags;
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
index 4cea2230c8dc..35a011fbc42d 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -33,20 +33,26 @@
33 * 33 *
34 */ 34 */
35 35
36#ifdef __ASSEMBLY__
37#define IOMEM(x) (x)
38#else
39#define IOMEM(x) ((void __force __iomem *)(x))
40#endif
41
36#define IO_IRAM_PHYS 0x40000000 42#define IO_IRAM_PHYS 0x40000000
37#define IO_IRAM_VIRT 0xFE400000 43#define IO_IRAM_VIRT IOMEM(0xFE400000)
38#define IO_IRAM_SIZE SZ_256K 44#define IO_IRAM_SIZE SZ_256K
39 45
40#define IO_CPU_PHYS 0x50040000 46#define IO_CPU_PHYS 0x50040000
41#define IO_CPU_VIRT 0xFE000000 47#define IO_CPU_VIRT IOMEM(0xFE000000)
42#define IO_CPU_SIZE SZ_16K 48#define IO_CPU_SIZE SZ_16K
43 49
44#define IO_PPSB_PHYS 0x60000000 50#define IO_PPSB_PHYS 0x60000000
45#define IO_PPSB_VIRT 0xFE200000 51#define IO_PPSB_VIRT IOMEM(0xFE200000)
46#define IO_PPSB_SIZE SZ_1M 52#define IO_PPSB_SIZE SZ_1M
47 53
48#define IO_APB_PHYS 0x70000000 54#define IO_APB_PHYS 0x70000000
49#define IO_APB_VIRT 0xFE300000 55#define IO_APB_VIRT IOMEM(0xFE300000)
50#define IO_APB_SIZE SZ_1M 56#define IO_APB_SIZE SZ_1M
51 57
52#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) 58#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
@@ -61,7 +67,7 @@
61 IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \ 67 IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
62 IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \ 68 IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
63 IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \ 69 IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
64 0) 70 NULL)
65 71
66#ifndef __ASSEMBLER__ 72#ifndef __ASSEMBLER__
67 73
@@ -71,7 +77,7 @@
71void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type); 77void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type);
72void tegra_iounmap(volatile void __iomem *addr); 78void tegra_iounmap(volatile void __iomem *addr);
73 79
74#define IO_ADDRESS(n) ((void __iomem *) IO_TO_VIRT(n)) 80#define IO_ADDRESS(n) (IO_TO_VIRT(n))
75 81
76#ifdef CONFIG_TEGRA_PCI 82#ifdef CONFIG_TEGRA_PCI
77extern void __iomem *tegra_pcie_io_base; 83extern void __iomem *tegra_pcie_io_base;
diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h
index 401d1b725291..39c396d2ddb0 100644
--- a/arch/arm/mach-tegra/include/mach/powergate.h
+++ b/arch/arm/mach-tegra/include/mach/powergate.h
@@ -31,7 +31,6 @@
31 31
32int tegra_powergate_power_on(int id); 32int tegra_powergate_power_on(int id);
33int tegra_powergate_power_off(int id); 33int tegra_powergate_power_off(int id);
34bool tegra_powergate_is_powered(int id);
35int tegra_powergate_remove_clamping(int id); 34int tegra_powergate_remove_clamping(int id);
36 35
37/* Must be called with clk disabled, and returns with clk enabled */ 36/* Must be called with clk disabled, and returns with clk enabled */
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index ea50fe28cf6a..5489f8b5d6ad 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -31,25 +31,25 @@
31 31
32static struct map_desc tegra_io_desc[] __initdata = { 32static struct map_desc tegra_io_desc[] __initdata = {
33 { 33 {
34 .virtual = IO_PPSB_VIRT, 34 .virtual = (unsigned long)IO_PPSB_VIRT,
35 .pfn = __phys_to_pfn(IO_PPSB_PHYS), 35 .pfn = __phys_to_pfn(IO_PPSB_PHYS),
36 .length = IO_PPSB_SIZE, 36 .length = IO_PPSB_SIZE,
37 .type = MT_DEVICE, 37 .type = MT_DEVICE,
38 }, 38 },
39 { 39 {
40 .virtual = IO_APB_VIRT, 40 .virtual = (unsigned long)IO_APB_VIRT,
41 .pfn = __phys_to_pfn(IO_APB_PHYS), 41 .pfn = __phys_to_pfn(IO_APB_PHYS),
42 .length = IO_APB_SIZE, 42 .length = IO_APB_SIZE,
43 .type = MT_DEVICE, 43 .type = MT_DEVICE,
44 }, 44 },
45 { 45 {
46 .virtual = IO_CPU_VIRT, 46 .virtual = (unsigned long)IO_CPU_VIRT,
47 .pfn = __phys_to_pfn(IO_CPU_PHYS), 47 .pfn = __phys_to_pfn(IO_CPU_PHYS),
48 .length = IO_CPU_SIZE, 48 .length = IO_CPU_SIZE,
49 .type = MT_DEVICE, 49 .type = MT_DEVICE,
50 }, 50 },
51 { 51 {
52 .virtual = IO_IRAM_VIRT, 52 .virtual = (unsigned long)IO_IRAM_VIRT,
53 .pfn = __phys_to_pfn(IO_IRAM_PHYS), 53 .pfn = __phys_to_pfn(IO_IRAM_PHYS),
54 .length = IO_IRAM_SIZE, 54 .length = IO_IRAM_SIZE,
55 .type = MT_DEVICE, 55 .type = MT_DEVICE,
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index f1f699d86c32..f5aa173c26b3 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -41,6 +41,8 @@
41#include <mach/clk.h> 41#include <mach/clk.h>
42#include <mach/powergate.h> 42#include <mach/powergate.h>
43 43
44#include "board.h"
45
44/* register definitions */ 46/* register definitions */
45#define AFI_OFFSET 0x3800 47#define AFI_OFFSET 0x3800
46#define PADS_OFFSET 0x3000 48#define PADS_OFFSET 0x3000
@@ -150,9 +152,9 @@
150static void __iomem *reg_pmc_base = IO_ADDRESS(TEGRA_PMC_BASE); 152static void __iomem *reg_pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
151 153
152#define pmc_writel(value, reg) \ 154#define pmc_writel(value, reg) \
153 __raw_writel(value, (u32)reg_pmc_base + (reg)) 155 __raw_writel(value, reg_pmc_base + (reg))
154#define pmc_readl(reg) \ 156#define pmc_readl(reg) \
155 __raw_readl((u32)reg_pmc_base + (reg)) 157 __raw_readl(reg_pmc_base + (reg))
156 158
157/* 159/*
158 * Tegra2 defines 1GB in the AXI address map for PCIe. 160 * Tegra2 defines 1GB in the AXI address map for PCIe.
@@ -460,7 +462,7 @@ static struct pci_bus __init *tegra_pcie_scan_bus(int nr,
460 struct tegra_pcie_port *pp; 462 struct tegra_pcie_port *pp;
461 463
462 if (nr >= tegra_pcie.num_ports) 464 if (nr >= tegra_pcie.num_ports)
463 return 0; 465 return NULL;
464 466
465 pp = tegra_pcie.port + nr; 467 pp = tegra_pcie.port + nr;
466 pp->root_bus_nr = sys->busnr; 468 pp->root_bus_nr = sys->busnr;
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index 3cee9aa1f2c8..948306491a59 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -89,12 +89,11 @@ int tegra_powergate_power_off(int id)
89 return tegra_powergate_set(id, false); 89 return tegra_powergate_set(id, false);
90} 90}
91 91
92bool tegra_powergate_is_powered(int id) 92static bool tegra_powergate_is_powered(int id)
93{ 93{
94 u32 status; 94 u32 status;
95 95
96 if (id < 0 || id >= TEGRA_NUM_POWERGATE) 96 WARN_ON(id < 0 || id >= TEGRA_NUM_POWERGATE);
97 return -EINVAL;
98 97
99 status = pmc_read(PWRGATE_STATUS) & (1 << id); 98 status = pmc_read(PWRGATE_STATUS) & (1 << id);
100 return !!status; 99 return !!status;
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,
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index 90350420c4e9..e2272d263a83 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -62,9 +62,9 @@ static struct timespec persistent_ts;
62static u64 persistent_ms, last_persistent_ms; 62static u64 persistent_ms, last_persistent_ms;
63 63
64#define timer_writel(value, reg) \ 64#define timer_writel(value, reg) \
65 __raw_writel(value, (u32)timer_reg_base + (reg)) 65 __raw_writel(value, timer_reg_base + (reg))
66#define timer_readl(reg) \ 66#define timer_readl(reg) \
67 __raw_readl((u32)timer_reg_base + (reg)) 67 __raw_readl(timer_reg_base + (reg))
68 68
69static int tegra_timer_set_next_event(unsigned long cycles, 69static int tegra_timer_set_next_event(unsigned long cycles,
70 struct clock_event_device *evt) 70 struct clock_event_device *evt)
@@ -133,7 +133,7 @@ static void notrace tegra_update_sched_clock(void)
133 * tegra_rtc driver could be executing to avoid race conditions 133 * tegra_rtc driver could be executing to avoid race conditions
134 * on the RTC shadow register 134 * on the RTC shadow register
135 */ 135 */
136u64 tegra_rtc_read_ms(void) 136static u64 tegra_rtc_read_ms(void)
137{ 137{
138 u32 ms = readl(rtc_base + RTC_MILLISECONDS); 138 u32 ms = readl(rtc_base + RTC_MILLISECONDS);
139 u32 s = readl(rtc_base + RTC_SHADOW_SECONDS); 139 u32 s = readl(rtc_base + RTC_SHADOW_SECONDS);