aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r--arch/arm/mach-tegra/common.c47
1 files changed, 5 insertions, 42 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 3599959517b3..46c071861c4e 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -22,13 +22,13 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/irqchip.h> 24#include <linux/irqchip.h>
25#include <linux/clk/tegra.h>
25 26
26#include <asm/hardware/cache-l2x0.h> 27#include <asm/hardware/cache-l2x0.h>
27 28
28#include <mach/powergate.h> 29#include <mach/powergate.h>
29 30
30#include "board.h" 31#include "board.h"
31#include "clock.h"
32#include "common.h" 32#include "common.h"
33#include "fuse.h" 33#include "fuse.h"
34#include "iomap.h" 34#include "iomap.h"
@@ -36,6 +36,7 @@
36#include "apbio.h" 36#include "apbio.h"
37#include "sleep.h" 37#include "sleep.h"
38#include "pm.h" 38#include "pm.h"
39#include "reset.h"
39 40
40/* 41/*
41 * Storage for debug-macro.S's state. 42 * Storage for debug-macro.S's state.
@@ -58,6 +59,7 @@ u32 tegra_uart_config[4] = {
58#ifdef CONFIG_OF 59#ifdef CONFIG_OF
59void __init tegra_dt_init_irq(void) 60void __init tegra_dt_init_irq(void)
60{ 61{
62 tegra_clocks_init();
61 tegra_init_irq(); 63 tegra_init_irq();
62 irqchip_init(); 64 irqchip_init();
63} 65}
@@ -73,43 +75,6 @@ void tegra_assert_system_reset(char mode, const char *cmd)
73 writel_relaxed(reg, reset); 75 writel_relaxed(reg, reset);
74} 76}
75 77
76#ifdef CONFIG_ARCH_TEGRA_2x_SOC
77static __initdata struct tegra_clk_init_table tegra20_clk_init_table[] = {
78 /* name parent rate enabled */
79 { "clk_m", NULL, 0, true },
80 { "pll_p", "clk_m", 216000000, true },
81 { "pll_p_out1", "pll_p", 28800000, true },
82 { "pll_p_out2", "pll_p", 48000000, true },
83 { "pll_p_out3", "pll_p", 72000000, true },
84 { "pll_p_out4", "pll_p", 24000000, true },
85 { "pll_c", "clk_m", 600000000, true },
86 { "pll_c_out1", "pll_c", 120000000, true },
87 { "sclk", "pll_c_out1", 120000000, true },
88 { "hclk", "sclk", 120000000, true },
89 { "pclk", "hclk", 60000000, true },
90 { "csite", NULL, 0, true },
91 { "emc", NULL, 0, true },
92 { "cpu", NULL, 0, true },
93 { NULL, NULL, 0, 0},
94};
95#endif
96
97#ifdef CONFIG_ARCH_TEGRA_3x_SOC
98static __initdata struct tegra_clk_init_table tegra30_clk_init_table[] = {
99 /* name parent rate enabled */
100 { "clk_m", NULL, 0, true },
101 { "pll_p", "pll_ref", 408000000, true },
102 { "pll_p_out1", "pll_p", 9600000, true },
103 { "pll_p_out4", "pll_p", 102000000, true },
104 { "sclk", "pll_p_out4", 102000000, true },
105 { "hclk", "sclk", 102000000, true },
106 { "pclk", "hclk", 51000000, true },
107 { "csite", NULL, 0, true },
108 { NULL, NULL, 0, 0},
109};
110#endif
111
112
113static void __init tegra_init_cache(void) 78static void __init tegra_init_cache(void)
114{ 79{
115#ifdef CONFIG_CACHE_L2X0 80#ifdef CONFIG_CACHE_L2X0
@@ -131,10 +96,9 @@ static void __init tegra_init_cache(void)
131#ifdef CONFIG_ARCH_TEGRA_2x_SOC 96#ifdef CONFIG_ARCH_TEGRA_2x_SOC
132void __init tegra20_init_early(void) 97void __init tegra20_init_early(void)
133{ 98{
99 tegra_cpu_reset_handler_init();
134 tegra_apb_io_init(); 100 tegra_apb_io_init();
135 tegra_init_fuse(); 101 tegra_init_fuse();
136 tegra2_init_clocks();
137 tegra_clk_init_from_table(tegra20_clk_init_table);
138 tegra_init_cache(); 102 tegra_init_cache();
139 tegra_pmc_init(); 103 tegra_pmc_init();
140 tegra_powergate_init(); 104 tegra_powergate_init();
@@ -144,10 +108,9 @@ void __init tegra20_init_early(void)
144#ifdef CONFIG_ARCH_TEGRA_3x_SOC 108#ifdef CONFIG_ARCH_TEGRA_3x_SOC
145void __init tegra30_init_early(void) 109void __init tegra30_init_early(void)
146{ 110{
111 tegra_cpu_reset_handler_init();
147 tegra_apb_io_init(); 112 tegra_apb_io_init();
148 tegra_init_fuse(); 113 tegra_init_fuse();
149 tegra30_init_clocks();
150 tegra_clk_init_from_table(tegra30_clk_init_table);
151 tegra_init_cache(); 114 tegra_init_cache();
152 tegra_pmc_init(); 115 tegra_pmc_init();
153 tegra_powergate_init(); 116 tegra_powergate_init();