diff options
Diffstat (limited to 'arch/arm/mach-tegra/tegra.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 6191603379e1..15ac9fcc96b1 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
@@ -70,40 +70,12 @@ u32 tegra_uart_config[3] = { | |||
70 | 0, | 70 | 0, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static void __init tegra_init_cache(void) | ||
74 | { | ||
75 | #ifdef CONFIG_CACHE_L2X0 | ||
76 | static const struct of_device_id pl310_ids[] __initconst = { | ||
77 | { .compatible = "arm,pl310-cache", }, | ||
78 | {} | ||
79 | }; | ||
80 | |||
81 | struct device_node *np; | ||
82 | int ret; | ||
83 | void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; | ||
84 | u32 aux_ctrl, cache_type; | ||
85 | |||
86 | np = of_find_matching_node(NULL, pl310_ids); | ||
87 | if (!np) | ||
88 | return; | ||
89 | |||
90 | cache_type = readl(p + L2X0_CACHE_TYPE); | ||
91 | aux_ctrl = (cache_type & 0x700) << (17-8); | ||
92 | aux_ctrl |= 0x7C400001; | ||
93 | |||
94 | ret = l2x0_of_init(aux_ctrl, 0x8200c3fe); | ||
95 | if (!ret) | ||
96 | l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs); | ||
97 | #endif | ||
98 | } | ||
99 | |||
100 | static void __init tegra_init_early(void) | 73 | static void __init tegra_init_early(void) |
101 | { | 74 | { |
102 | of_register_trusted_foundations(); | 75 | of_register_trusted_foundations(); |
103 | tegra_apb_io_init(); | 76 | tegra_apb_io_init(); |
104 | tegra_init_fuse(); | 77 | tegra_init_fuse(); |
105 | tegra_cpu_reset_handler_init(); | 78 | tegra_cpu_reset_handler_init(); |
106 | tegra_init_cache(); | ||
107 | tegra_powergate_init(); | 79 | tegra_powergate_init(); |
108 | tegra_hotplug_init(); | 80 | tegra_hotplug_init(); |
109 | } | 81 | } |
@@ -191,8 +163,10 @@ static const char * const tegra_dt_board_compat[] = { | |||
191 | }; | 163 | }; |
192 | 164 | ||
193 | DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") | 165 | DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") |
194 | .map_io = tegra_map_common_io, | 166 | .l2c_aux_val = 0x3c400001, |
167 | .l2c_aux_mask = 0xc20fc3fe, | ||
195 | .smp = smp_ops(tegra_smp_ops), | 168 | .smp = smp_ops(tegra_smp_ops), |
169 | .map_io = tegra_map_common_io, | ||
196 | .init_early = tegra_init_early, | 170 | .init_early = tegra_init_early, |
197 | .init_irq = tegra_dt_init_irq, | 171 | .init_irq = tegra_dt_init_irq, |
198 | .init_machine = tegra_dt_init, | 172 | .init_machine = tegra_dt_init, |