diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2014-12-16 15:38:27 -0500 |
---|---|---|
committer | Peter De Schrijver <pdeschrijver@nvidia.com> | 2015-02-02 08:47:28 -0500 |
commit | d0a57bd5b53d6b7fe7a6c626023737436b5df630 (patch) | |
tree | af77572a0d181eb3931b1f68c95a7ab5270709d1 | |
parent | ca036b261c866e4771068d48df627cafac52d353 (diff) |
clk: tegra: make tegra_clocks_apply_init_table() arch_initcall
tegra_clocks_apply_init_table() needs to be called after the udelay
loop has been calibrated (see commit
441f199a37cfd66c5dd8dd45490bd3ea6971117d ("clk: tegra: defer
application of init table") for why that is). On existing Tegra SoCs
this was done by calling tegra_clocks_apply_init_table() from
tegra_dt_init(). To make this also work on ARM64, we need to change
this into an initcall. tegra_dt_init() is called from
customize_machine which is an arch_initcall. Therefore this should
also work on existing 32bit Tegra SoCs.
Tested on Tegra20 (ventana), Tegra30 (beaverboard), Tegra124 (jetson TK1) and
Tegra132.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
[paul@pwsan.com: tweaked the commit message]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
-rw-r--r-- | arch/arm/mach-tegra/tegra.c | 2 | ||||
-rw-r--r-- | drivers/clk/tegra/clk.c | 7 | ||||
-rw-r--r-- | include/linux/clk/tegra.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index ef016af1c9e7..914341bcef25 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
@@ -91,8 +91,6 @@ static void __init tegra_dt_init(void) | |||
91 | struct soc_device *soc_dev; | 91 | struct soc_device *soc_dev; |
92 | struct device *parent = NULL; | 92 | struct device *parent = NULL; |
93 | 93 | ||
94 | tegra_clocks_apply_init_table(); | ||
95 | |||
96 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | 94 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); |
97 | if (!soc_dev_attr) | 95 | if (!soc_dev_attr) |
98 | goto out; | 96 | goto out; |
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c index 97dc8595c3cd..9ddb7547cb43 100644 --- a/drivers/clk/tegra/clk.c +++ b/drivers/clk/tegra/clk.c | |||
@@ -302,10 +302,13 @@ struct clk ** __init tegra_lookup_dt_id(int clk_id, | |||
302 | 302 | ||
303 | tegra_clk_apply_init_table_func tegra_clk_apply_init_table; | 303 | tegra_clk_apply_init_table_func tegra_clk_apply_init_table; |
304 | 304 | ||
305 | void __init tegra_clocks_apply_init_table(void) | 305 | static int __init tegra_clocks_apply_init_table(void) |
306 | { | 306 | { |
307 | if (!tegra_clk_apply_init_table) | 307 | if (!tegra_clk_apply_init_table) |
308 | return; | 308 | return 0; |
309 | 309 | ||
310 | tegra_clk_apply_init_table(); | 310 | tegra_clk_apply_init_table(); |
311 | |||
312 | return 0; | ||
311 | } | 313 | } |
314 | arch_initcall(tegra_clocks_apply_init_table); | ||
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h index 3ca9fca827a2..19c4208f4752 100644 --- a/include/linux/clk/tegra.h +++ b/include/linux/clk/tegra.h | |||
@@ -120,6 +120,4 @@ static inline void tegra_cpu_clock_resume(void) | |||
120 | } | 120 | } |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | void tegra_clocks_apply_init_table(void); | ||
124 | |||
125 | #endif /* __LINUX_CLK_TEGRA_H_ */ | 123 | #endif /* __LINUX_CLK_TEGRA_H_ */ |