From: Tomasz Figa <tomasz.figa@gmail.com>
To: Jonghwan Choi <jhbird.choi@samsung.com>,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
cpufreq@vger.kernel.org
Cc: 'Kukjin Kim' <kgene.kim@samsung.com>,
"'Rafael J. Wysocki'" <rjw@sisk.pl>,
Jonghwan Choi <jhbird.choi@gmail.com>,
'Viresh Kumar' <viresh.kumar@linaro.org>
Subject: Re: [PATCH v2] cpufreq: exynos: Fix the compile error
Date: Fri, 16 May 2014 10:50:24 +0200 [thread overview]
Message-ID: <5375D150.1020109@gmail.com> (raw)
In-Reply-To: <000001cf70dc$9ccfe4e0$d66faea0$@samsung.com>
Hi Jonghwan,
On 16.05.2014 09:58, Jonghwan Choi wrote:
> Commit 7da83a80 ("ARM: EXYNOS: Migrate Exynos specific macros from plat to mach")
> which lands in samsung tree causes build breakage for cpufreq-exynos like following:
> drivers/cpufreq/exynos-cpufreq.c: In function 'exynos_cpufreq_probe':
> drivers/cpufreq/exynos-cpufreq.c:166:2: error: implicit declaration of function 'soc_is_exynos4210'
> [-Werror=implicit-function-declaration]
> drivers/cpufreq/exynos-cpufreq.c:168:2: error: implicit declaration of function 'soc_is_exynos4212'
> [-Werror=implicit-function-declaration]
> drivers/cpufreq/exynos-cpufreq.c:168:2: error: implicit declaration of function 'soc_is_exynos4412'
> [-Werror=implicit-function-declaration]
> drivers/cpufreq/exynos-cpufreq.c:170:2: error: implicit declaration of function 'soc_is_exynos5250'
> [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/cpufreq/exynos-cpufreq.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> drivers/cpufreq/exynos4x12-cpufreq.c: In function 'exynos4x12_set_clkdiv':
> drivers/cpufreq/exynos4x12-cpufreq.c:118:2: error: implicit declaration of function 'soc_is_exynos4212'
> [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/cpufreq/exynos4x12-cpufreq.o] Error 1
> make[1]: *** [drivers/cpufreq] Error 2
> This fixes above error with getting SoC information via DT instead of soc_is_exynosXXXX().
>
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> ---
> .../devicetree/bindings/cpufreq/cpufreq-exynos.txt | 18 ++++++++
> drivers/cpufreq/Kconfig.arm | 4 +-
> drivers/cpufreq/exynos-cpufreq.c | 47 +++++++++++++++++---
> drivers/cpufreq/exynos-cpufreq.h | 8 ++++
> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++---
> 5 files changed, 72 insertions(+), 16 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-exynos.txt
>
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-exynos.txt
> b/Documentation/devicetree/bindings/cpufreq/cpufreq-exynos.txt
> new file mode 100644
> index 0000000..f5e8ac6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-exynos.txt
> @@ -0,0 +1,18 @@
> +
> +Exynos cpufreq driver
> +-------------------
> +
> +Exynos4210/4212/4412/5250 SoC cpufreq driver for CPU frequency scaling.
> +
> +Required properties:
> + - compatible: value should be either of the following.
> + (a) "samsung, exynos4210-cpufreq", for Exynos4210.
> + (b) "samsung, exynos4212-cpufreq", for Exynos4212.
> + (c) "samsung, exynos4412-cpufreq", for Exynos4412.
> + (d) "samsung, exynos5250-cpufreq", for Exynos5250.
> +
> +Example:
> +--------
> + cpufreq@10030000 {
> + compatible = "samsung,exynos4210-cpufreq";
> + };
Sorry, NAK. Cpufreq is not a real device on the SoC and this is not the
right way to represent it in DT.
We have been discussing Exynos cpufreq framework rework, including DT
support since quite a long time. so if you want to know details, please
look at respective discussion threads. I don't have time to find them
for you right now, but if you look for threads of cpufreq patches by
Thomas Abraham and ones about Exynos multiplatform support, then you
should have quite complete set of information.
In general, I can see three ways to "fix" this for 3.15:
1) revert moving soc_is_* macros to mach-exynos/common.h,
2) move soc_is_* macros to a header in mach-exynos/include/mach/,
3) use of_machine_is_compatible() or of_match_node() on root node in
this driver to match directly with SoC compatible strings.
Probably option 3) would be preferred, as it would remove some of the
dependencies of this driver on arch code and including plat/cpu.h (or
mach/cpu.h as would be introduced by 2)) would be no longer necessary.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-05-16 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 7:58 [PATCH v2] cpufreq: exynos: Fix the compile error Jonghwan Choi
2014-05-16 8:50 ` Tomasz Figa [this message]
2014-05-16 9:57 ` Jonghwan Choi
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=5375D150.1020109@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jhbird.choi@gmail.com \
--cc=jhbird.choi@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=viresh.kumar@linaro.org \
/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).