From: Paul Walmsley <paul@pwsan.com>
To: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Alexandre Courbot <gnurou@gmail.com>,
Paul Walmsley <paul@pwsan.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Mike Turquette <mturquette@linaro.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Thierry Reding <thierry.reding@gmail.com>,
Paul Walmsley <pwalmsley@nvidia.com>,
Thierry Reding <treding@nvidia.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clk: tegra: make tegra_clocks_apply_init_table() arch_initcall
Date: Tue, 16 Dec 2014 12:38:27 -0800 [thread overview]
Message-ID: <20141216203824.22980.48872.stgit@chromeos-P9X79> (raw)
In-Reply-To: <20141216203813.22980.2301.stgit@chromeos-P9X79>
From: Peter De Schrijver <pdeschrijver@nvidia.com>
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>
---
arch/arm/mach-tegra/tegra.c | 2 --
drivers/clk/tegra/clk.c | 7 +++++--
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 ef016af..914341b 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)
struct soc_device *soc_dev;
struct device *parent = NULL;
- tegra_clocks_apply_init_table();
-
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
if (!soc_dev_attr)
goto out;
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
index 97dc859..9ddb754 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,
tegra_clk_apply_init_table_func tegra_clk_apply_init_table;
-void __init tegra_clocks_apply_init_table(void)
+static int __init tegra_clocks_apply_init_table(void)
{
if (!tegra_clk_apply_init_table)
- return;
+ return 0;
tegra_clk_apply_init_table();
+
+ return 0;
}
+arch_initcall(tegra_clocks_apply_init_table);
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index 3ca9fca..19c4208 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)
}
#endif
-void tegra_clocks_apply_init_table(void);
-
#endif /* __LINUX_CLK_TEGRA_H_ */
next prev parent reply other threads:[~2014-12-16 20:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 20:38 [PATCH 0/4] clk: tegra: add support for the Tegra132 CAR IP block Paul Walmsley
2014-12-16 20:38 ` Paul Walmsley [this message]
2015-01-14 6:03 ` [PATCH 1/4] clk: tegra: make tegra_clocks_apply_init_table() arch_initcall Alexandre Courbot
2014-12-16 20:38 ` [PATCH 2/4] clk: tegra: split Tegra124 clock header file Paul Walmsley
2014-12-16 20:38 ` [PATCH 3/4] clk: tegra: Update binding doc for Tegra132 Paul Walmsley
2014-12-16 20:38 ` [PATCH 4/4] clk: tegra: Add support for the Tegra132 CAR IP block Paul Walmsley
2015-01-09 11:19 ` Thierry Reding
2015-01-09 20:52 ` Paul Walmsley
2015-01-09 21:00 ` Stephen Warren
[not found] ` <54B0417B.6030409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-01-09 21:08 ` Paul Walmsley
2015-01-09 11:22 ` [PATCH 0/4] clk: tegra: add " Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141216203824.22980.48872.stgit@chromeos-P9X79 \
--to=paul@pwsan.com \
--cc=gnurou@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=pwalmsley@nvidia.com \
--cc=sboyd@codeaurora.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).