* [PATCH v3] cpufreq: exynos: Fix the compile error
@ 2014-05-16 10:18 Jonghwan Choi
2014-05-16 10:54 ` Kukjin Kim
2014-05-16 11:07 ` Viresh Kumar
0 siblings, 2 replies; 11+ messages in thread
From: Jonghwan Choi @ 2014-05-16 10:18 UTC (permalink / raw)
To: linux-samsung-soc, linux-arm-kernel, devicetree, cpufreq
Cc: 'Kukjin Kim', 'Rafael J. Wysocki', Jonghwan Choi,
'Viresh Kumar'
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 of_machine_is_compatible() instead of soc_is_exynosXXXX().
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
---
drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
3 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index f99cfe2..9aecffef 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -17,6 +17,7 @@
#include <linux/regulator/consumer.h>
#include <linux/cpufreq.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <plat/cpu.h>
@@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
if (!exynos_info)
return -ENOMEM;
- if (soc_is_exynos4210())
+ if (of_machine_is_compatible("samsung,exynos4210")) {
+ exynos_info->type = EXYNOS_SOC_4210;
+ } else if (of_machine_is_compatible("samsung,exynos4212")) {
+ exynos_info->type = EXYNOS_SOC_4212;
+ } else if (of_machine_is_compatible("samsung,exynos4412")) {
+ exynos_info->type = EXYNOS_SOC_4212;
+ } else if (of_machine_is_compatible("samsung,exynos5250")) {
+ exynos_info->type = EXYNOS_SOC_5250;
+ } else {
+ pr_err("%s: Unknown SoC type\n", __func__);
+ return -ENODEV;
+ }
+
+ if (exynos_info->type == EXYNOS_SOC_4210)
ret = exynos4210_cpufreq_init(exynos_info);
- else if (soc_is_exynos4212() || soc_is_exynos4412())
+ else if (exynos_info->type == EXYNOS_SOC_4212 || exynos_info->type == EXYNOS_SOC_4412)
ret = exynos4x12_cpufreq_init(exynos_info);
- else if (soc_is_exynos5250())
+ else if (exynos_info->type == EXYNOS_SOC_5250)
ret = exynos5250_cpufreq_init(exynos_info);
else
return 0;
diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-cpufreq.h
index 3ddade8..f189547 100644
--- a/drivers/cpufreq/exynos-cpufreq.h
+++ b/drivers/cpufreq/exynos-cpufreq.h
@@ -17,6 +17,13 @@ enum cpufreq_level_index {
L20,
};
+enum exynos_soc_type {
+ EXYNOS_SOC_4210,
+ EXYNOS_SOC_4212,
+ EXYNOS_SOC_4412,
+ EXYNOS_SOC_5250,
+};
+
#define APLL_FREQ(f, a0, a1, a2, a3, a4, a5, a6, a7, b0, b1, b2, m, p, s) \
{ \
.freq = (f) * 1000, \
@@ -34,6 +41,7 @@ struct apll_freq {
};
struct exynos_dvfs_info {
+ enum exynos_soc_type type;
unsigned long mpll_freq_khz;
unsigned int pll_safe_idx;
struct clk *cpu_clk;
diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c b/drivers/cpufreq/exynos4x12-cpufreq.c
index 466c76a..63a3907 100644
--- a/drivers/cpufreq/exynos4x12-cpufreq.c
+++ b/drivers/cpufreq/exynos4x12-cpufreq.c
@@ -100,7 +100,6 @@ static struct apll_freq apll_freq_4412[] = {
static void exynos4x12_set_clkdiv(unsigned int div_index)
{
unsigned int tmp;
- unsigned int stat_cpu1;
/* Change Divider - CPU0 */
@@ -115,13 +114,11 @@ static void exynos4x12_set_clkdiv(unsigned int div_index)
tmp = apll_freq_4x12[div_index].clk_div_cpu1;
__raw_writel(tmp, EXYNOS4_CLKDIV_CPU1);
- if (soc_is_exynos4212())
- stat_cpu1 = 0x11;
- else
- stat_cpu1 = 0x111;
- while (__raw_readl(EXYNOS4_CLKDIV_STATCPU1) & stat_cpu1)
+ do {
cpu_relax();
+ tmp = __raw_readl(EXYNOS4_CLKDIV_STATCPU1);
+ } while (tmp != 0x0);
}
static void exynos4x12_set_apll(unsigned int index)
@@ -184,7 +181,7 @@ int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info)
if (IS_ERR(mout_apll))
goto err_mout_apll;
- if (soc_is_exynos4212())
+ if (info->type == EXYNOS_SOC_4212)
apll_freq_4x12 = apll_freq_4212;
else
apll_freq_4x12 = apll_freq_4412;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* RE: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 10:18 [PATCH v3] cpufreq: exynos: Fix the compile error Jonghwan Choi
@ 2014-05-16 10:54 ` Kukjin Kim
2014-05-16 23:04 ` Rafael J. Wysocki
2014-05-16 11:07 ` Viresh Kumar
1 sibling, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2014-05-16 10:54 UTC (permalink / raw)
To: 'Jonghwan Choi', linux-samsung-soc, linux-arm-kernel,
devicetree, cpufreq
Cc: 'Rafael J. Wysocki', 'Jonghwan Choi',
'Viresh Kumar', 'Tomasz Figa'
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
> of_machine_is_compatible() instead of soc_is_exynosXXXX().
>
Probably,
Suggested-by: Tomasz Figa ?
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Looks better.
Rafael, if you have no objection on this, shall I pick this into samsung
tree for 3.16 because of the current build breakage with enabling exynos
cpufreq?
Thanks,
Kukjin
> ---
> drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
> drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
> 3 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-
> cpufreq.c
> index f99cfe2..9aecffef 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -17,6 +17,7 @@
> #include <linux/regulator/consumer.h>
> #include <linux/cpufreq.h>
> #include <linux/platform_device.h>
> +#include <linux/of.h>
>
> #include <plat/cpu.h>
>
> @@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct
> platform_device *pdev)
> if (!exynos_info)
> return -ENOMEM;
>
> - if (soc_is_exynos4210())
> + if (of_machine_is_compatible("samsung,exynos4210")) {
> + exynos_info->type = EXYNOS_SOC_4210;
> + } else if (of_machine_is_compatible("samsung,exynos4212")) {
> + exynos_info->type = EXYNOS_SOC_4212;
> + } else if (of_machine_is_compatible("samsung,exynos4412")) {
> + exynos_info->type = EXYNOS_SOC_4212;
> + } else if (of_machine_is_compatible("samsung,exynos5250")) {
> + exynos_info->type = EXYNOS_SOC_5250;
> + } else {
> + pr_err("%s: Unknown SoC type\n", __func__);
> + return -ENODEV;
> + }
> +
> + if (exynos_info->type == EXYNOS_SOC_4210)
> ret = exynos4210_cpufreq_init(exynos_info);
> - else if (soc_is_exynos4212() || soc_is_exynos4412())
> + else if (exynos_info->type == EXYNOS_SOC_4212 || exynos_info->type
> == EXYNOS_SOC_4412)
> ret = exynos4x12_cpufreq_init(exynos_info);
> - else if (soc_is_exynos5250())
> + else if (exynos_info->type == EXYNOS_SOC_5250)
> ret = exynos5250_cpufreq_init(exynos_info);
> else
> return 0;
> diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-
> cpufreq.h
> index 3ddade8..f189547 100644
> --- a/drivers/cpufreq/exynos-cpufreq.h
> +++ b/drivers/cpufreq/exynos-cpufreq.h
> @@ -17,6 +17,13 @@ enum cpufreq_level_index {
> L20,
> };
>
> +enum exynos_soc_type {
> + EXYNOS_SOC_4210,
> + EXYNOS_SOC_4212,
> + EXYNOS_SOC_4412,
> + EXYNOS_SOC_5250,
> +};
> +
> #define APLL_FREQ(f, a0, a1, a2, a3, a4, a5, a6, a7, b0, b1, b2, m, p, s)
> \
> { \
> .freq = (f) * 1000, \
> @@ -34,6 +41,7 @@ struct apll_freq {
> };
>
> struct exynos_dvfs_info {
> + enum exynos_soc_type type;
> unsigned long mpll_freq_khz;
> unsigned int pll_safe_idx;
> struct clk *cpu_clk;
> diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c
> b/drivers/cpufreq/exynos4x12-cpufreq.c
> index 466c76a..63a3907 100644
> --- a/drivers/cpufreq/exynos4x12-cpufreq.c
> +++ b/drivers/cpufreq/exynos4x12-cpufreq.c
> @@ -100,7 +100,6 @@ static struct apll_freq apll_freq_4412[] = {
> static void exynos4x12_set_clkdiv(unsigned int div_index)
> {
> unsigned int tmp;
> - unsigned int stat_cpu1;
>
> /* Change Divider - CPU0 */
>
> @@ -115,13 +114,11 @@ static void exynos4x12_set_clkdiv(unsigned int
> div_index)
> tmp = apll_freq_4x12[div_index].clk_div_cpu1;
>
> __raw_writel(tmp, EXYNOS4_CLKDIV_CPU1);
> - if (soc_is_exynos4212())
> - stat_cpu1 = 0x11;
> - else
> - stat_cpu1 = 0x111;
>
> - while (__raw_readl(EXYNOS4_CLKDIV_STATCPU1) & stat_cpu1)
> + do {
> cpu_relax();
> + tmp = __raw_readl(EXYNOS4_CLKDIV_STATCPU1);
> + } while (tmp != 0x0);
> }
>
> static void exynos4x12_set_apll(unsigned int index)
> @@ -184,7 +181,7 @@ int exynos4x12_cpufreq_init(struct exynos_dvfs_info
> *info)
> if (IS_ERR(mout_apll))
> goto err_mout_apll;
>
> - if (soc_is_exynos4212())
> + if (info->type == EXYNOS_SOC_4212)
> apll_freq_4x12 = apll_freq_4212;
> else
> apll_freq_4x12 = apll_freq_4412;
> --
> 1.7.10.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 10:54 ` Kukjin Kim
@ 2014-05-16 23:04 ` Rafael J. Wysocki
2014-05-16 23:24 ` Kukjin Kim
2014-05-19 23:33 ` Rafael J. Wysocki
0 siblings, 2 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2014-05-16 23:04 UTC (permalink / raw)
To: Kukjin Kim
Cc: 'Jonghwan Choi', linux-samsung-soc, linux-arm-kernel,
devicetree, cpufreq, 'Jonghwan Choi',
'Viresh Kumar', 'Tomasz Figa'
On Friday, May 16, 2014 07:54:01 PM Kukjin Kim wrote:
> 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
> > of_machine_is_compatible() instead of soc_is_exynosXXXX().
> >
>
> Probably,
> Suggested-by: Tomasz Figa ?
>
> > Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
>
> Looks better.
>
> Rafael, if you have no objection on this, shall I pick this into samsung
> tree for 3.16 because of the current build breakage with enabling exynos
> cpufreq?
Please go ahead.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 23:04 ` Rafael J. Wysocki
@ 2014-05-16 23:24 ` Kukjin Kim
2014-05-16 23:28 ` Tomasz Figa
2014-05-19 23:33 ` Rafael J. Wysocki
1 sibling, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2014-05-16 23:24 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Kukjin Kim, devicetree, linux-samsung-soc, 'Viresh Kumar',
'Tomasz Figa', cpufreq, 'Jonghwan Choi',
'Jonghwan Choi', linux-arm-kernel
On 05/17/14 08:04, Rafael J. Wysocki wrote:
> On Friday, May 16, 2014 07:54:01 PM Kukjin Kim wrote:
>> 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
>>> of_machine_is_compatible() instead of soc_is_exynosXXXX().
>>>
>>
>> Probably,
>> Suggested-by: Tomasz Figa ?
>>
>>> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
>>
>> Looks better.
>>
>> Rafael, if you have no objection on this, shall I pick this into samsung
>> tree for 3.16 because of the current build breakage with enabling exynos
>> cpufreq?
>
> Please go ahead.
>
Done.
Thanks,
Kukjin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 23:24 ` Kukjin Kim
@ 2014-05-16 23:28 ` Tomasz Figa
0 siblings, 0 replies; 11+ messages in thread
From: Tomasz Figa @ 2014-05-16 23:28 UTC (permalink / raw)
To: Kukjin Kim, Rafael J. Wysocki
Cc: devicetree, linux-samsung-soc, 'Viresh Kumar',
'Tomasz Figa', cpufreq, 'Jonghwan Choi',
'Jonghwan Choi', linux-arm-kernel
Hi Kukjin,
On 17.05.2014 01:24, Kukjin Kim wrote:
> On 05/17/14 08:04, Rafael J. Wysocki wrote:
>> On Friday, May 16, 2014 07:54:01 PM Kukjin Kim wrote:
>>> 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
>>>> of_machine_is_compatible() instead of soc_is_exynosXXXX().
>>>>
>>>
>>> Probably,
>>> Suggested-by: Tomasz Figa ?
>>>
>>>> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
>>>
>>> Looks better.
>>>
>>> Rafael, if you have no objection on this, shall I pick this into samsung
>>> tree for 3.16 because of the current build breakage with enabling exynos
>>> cpufreq?
>>
>> Please go ahead.
>>
> Done.
What about Viresh's comments?
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 23:04 ` Rafael J. Wysocki
2014-05-16 23:24 ` Kukjin Kim
@ 2014-05-19 23:33 ` Rafael J. Wysocki
2014-05-20 0:29 ` Kukjin Kim
1 sibling, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2014-05-19 23:33 UTC (permalink / raw)
To: Kukjin Kim
Cc: 'Jonghwan Choi', linux-samsung-soc, linux-arm-kernel,
devicetree, cpufreq, 'Jonghwan Choi',
'Viresh Kumar', 'Tomasz Figa'
On Saturday, May 17, 2014 01:04:29 AM Rafael J. Wysocki wrote:
> On Friday, May 16, 2014 07:54:01 PM Kukjin Kim wrote:
> > 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
> > > of_machine_is_compatible() instead of soc_is_exynosXXXX().
> > >
> >
> > Probably,
> > Suggested-by: Tomasz Figa ?
> >
> > > Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> >
> > Looks better.
> >
> > Rafael, if you have no objection on this, shall I pick this into samsung
> > tree for 3.16 because of the current build breakage with enabling exynos
> > cpufreq?
>
> Please go ahead.
Actually, this conflicts with one patch already in my tree. The resoultion
is quite obvious, but it would be better to avoid this conflict altogether.
Rafael
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-19 23:33 ` Rafael J. Wysocki
@ 2014-05-20 0:29 ` Kukjin Kim
0 siblings, 0 replies; 11+ messages in thread
From: Kukjin Kim @ 2014-05-20 0:29 UTC (permalink / raw)
To: 'Rafael J. Wysocki'
Cc: 'Jonghwan Choi', linux-samsung-soc, linux-arm-kernel,
devicetree, cpufreq, 'Jonghwan Choi',
'Viresh Kumar', 'Tomasz Figa'
Rafael J. Wysocki wrote:
>
> On Saturday, May 17, 2014 01:04:29 AM Rafael J. Wysocki wrote:
> > On Friday, May 16, 2014 07:54:01 PM Kukjin Kim wrote:
> > > 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
> > > > of_machine_is_compatible() instead of soc_is_exynosXXXX().
> > > >
> > >
> > > Probably,
> > > Suggested-by: Tomasz Figa ?
> > >
> > > > Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> > >
> > > Looks better.
> > >
> > > Rafael, if you have no objection on this, shall I pick this into
> samsung
> > > tree for 3.16 because of the current build breakage with enabling
> exynos
> > > cpufreq?
> >
> > Please go ahead.
>
> Actually, this conflicts with one patch already in my tree. The
> resoultion
> is quite obvious, but it would be better to avoid this conflict altogether.
>
Yeah. If you don't mind, shall I pick the patch (commit e5eaa445b0dc)into samsung tree with your ack?
Thanks,
Kukjin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 10:18 [PATCH v3] cpufreq: exynos: Fix the compile error Jonghwan Choi
2014-05-16 10:54 ` Kukjin Kim
@ 2014-05-16 11:07 ` Viresh Kumar
2014-05-16 23:26 ` Kukjin Kim
1 sibling, 1 reply; 11+ messages in thread
From: Viresh Kumar @ 2014-05-16 11:07 UTC (permalink / raw)
To: Jonghwan Choi
Cc: linux-samsung-soc, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, cpufreq@vger.kernel.org, Kukjin Kim,
Rafael J. Wysocki, Jonghwan Choi
On 16 May 2014 15:48, Jonghwan Choi <jhbird.choi@samsung.com> 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
Blank line here..
> This fixes above error with getting SoC information via of_machine_is_compatible() instead of soc_is_exynosXXXX().
>
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> ---
> drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
> drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
> 3 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
> index f99cfe2..9aecffef 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -17,6 +17,7 @@
> #include <linux/regulator/consumer.h>
> #include <linux/cpufreq.h>
> #include <linux/platform_device.h>
> +#include <linux/of.h>
>
> #include <plat/cpu.h>
>
> @@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
> if (!exynos_info)
> return -ENOMEM;
>
> - if (soc_is_exynos4210())
> + if (of_machine_is_compatible("samsung,exynos4210")) {
> + exynos_info->type = EXYNOS_SOC_4210;
> + } else if (of_machine_is_compatible("samsung,exynos4212")) {
> + exynos_info->type = EXYNOS_SOC_4212;
> + } else if (of_machine_is_compatible("samsung,exynos4412")) {
> + exynos_info->type = EXYNOS_SOC_4212;
4412 ?
> + } else if (of_machine_is_compatible("samsung,exynos5250")) {
> + exynos_info->type = EXYNOS_SOC_5250;
> + } else {
> + pr_err("%s: Unknown SoC type\n", __func__);
> + return -ENODEV;
> + }
> +
> + if (exynos_info->type == EXYNOS_SOC_4210)
> ret = exynos4210_cpufreq_init(exynos_info);
> - else if (soc_is_exynos4212() || soc_is_exynos4412())
> + else if (exynos_info->type == EXYNOS_SOC_4212 || exynos_info->type == EXYNOS_SOC_4412)
> ret = exynos4x12_cpufreq_init(exynos_info);
> - else if (soc_is_exynos5250())
> + else if (exynos_info->type == EXYNOS_SOC_5250)
> ret = exynos5250_cpufreq_init(exynos_info);
> else
> return 0;
Do this in the first if/else only..
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 11:07 ` Viresh Kumar
@ 2014-05-16 23:26 ` Kukjin Kim
2014-05-16 23:37 ` Tomasz Figa
0 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2014-05-16 23:26 UTC (permalink / raw)
To: Viresh Kumar
Cc: Jonghwan Choi, linux-samsung-soc,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
cpufreq@vger.kernel.org, Kukjin Kim, Rafael J. Wysocki,
Jonghwan Choi
On 05/16/14 20:07, Viresh Kumar wrote:
> On 16 May 2014 15:48, Jonghwan Choi<jhbird.choi@samsung.com> 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
>
> Blank line here..
>
>> This fixes above error with getting SoC information via of_machine_is_compatible() instead of soc_is_exynosXXXX().
>>
>> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
>> ---
>> drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
>> drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
>> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
>> 3 files changed, 29 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
>> index f99cfe2..9aecffef 100644
>> --- a/drivers/cpufreq/exynos-cpufreq.c
>> +++ b/drivers/cpufreq/exynos-cpufreq.c
>> @@ -17,6 +17,7 @@
>> #include<linux/regulator/consumer.h>
>> #include<linux/cpufreq.h>
>> #include<linux/platform_device.h>
>> +#include<linux/of.h>
>>
>> #include<plat/cpu.h>
>>
>> @@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
>> if (!exynos_info)
>> return -ENOMEM;
>>
>> - if (soc_is_exynos4210())
>> + if (of_machine_is_compatible("samsung,exynos4210")) {
>> + exynos_info->type = EXYNOS_SOC_4210;
>> + } else if (of_machine_is_compatible("samsung,exynos4212")) {
>> + exynos_info->type = EXYNOS_SOC_4212;
>> + } else if (of_machine_is_compatible("samsung,exynos4412")) {
>> + exynos_info->type = EXYNOS_SOC_4212;
>
> 4412 ?
>
Yes, I will fix when I apply.
>> + } else if (of_machine_is_compatible("samsung,exynos5250")) {
>> + exynos_info->type = EXYNOS_SOC_5250;
>> + } else {
>> + pr_err("%s: Unknown SoC type\n", __func__);
>> + return -ENODEV;
>> + }
>> +
>> + if (exynos_info->type == EXYNOS_SOC_4210)
>> ret = exynos4210_cpufreq_init(exynos_info);
>> - else if (soc_is_exynos4212() || soc_is_exynos4412())
>> + else if (exynos_info->type == EXYNOS_SOC_4212 || exynos_info->type == EXYNOS_SOC_4412)
>> ret = exynos4x12_cpufreq_init(exynos_info);
>> - else if (soc_is_exynos5250())
>> + else if (exynos_info->type == EXYNOS_SOC_5250)
>> ret = exynos5250_cpufreq_init(exynos_info);
>> else
>> return 0;
>
> Do this in the first if/else only..
Probably, you mean following in above?
>> - if (soc_is_exynos4210())
I've applied this with fixing typo you mentioned just now, if any
concerns, please kindly let me know.
Thanks,
Kukjin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 23:26 ` Kukjin Kim
@ 2014-05-16 23:37 ` Tomasz Figa
2014-05-16 23:44 ` Kukjin Kim
0 siblings, 1 reply; 11+ messages in thread
From: Tomasz Figa @ 2014-05-16 23:37 UTC (permalink / raw)
To: Kukjin Kim, Viresh Kumar
Cc: Jonghwan Choi, linux-samsung-soc,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
cpufreq@vger.kernel.org, Rafael J. Wysocki, Jonghwan Choi
On 17.05.2014 01:26, Kukjin Kim wrote:
> On 05/16/14 20:07, Viresh Kumar wrote:
>> On 16 May 2014 15:48, Jonghwan Choi<jhbird.choi@samsung.com> 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
>>
>> Blank line here..
>>
>>> This fixes above error with getting SoC information via
>>> of_machine_is_compatible() instead of soc_is_exynosXXXX().
>>>
>>> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
>>> ---
>>> drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
>>> drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
>>> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
>>> 3 files changed, 29 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/cpufreq/exynos-cpufreq.c
>>> b/drivers/cpufreq/exynos-cpufreq.c
>>> index f99cfe2..9aecffef 100644
>>> --- a/drivers/cpufreq/exynos-cpufreq.c
>>> +++ b/drivers/cpufreq/exynos-cpufreq.c
>>> @@ -17,6 +17,7 @@
>>> #include<linux/regulator/consumer.h>
>>> #include<linux/cpufreq.h>
>>> #include<linux/platform_device.h>
>>> +#include<linux/of.h>
>>>
>>> #include<plat/cpu.h>
>>>
>>> @@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct
>>> platform_device *pdev)
>>> if (!exynos_info)
>>> return -ENOMEM;
>>>
>>> - if (soc_is_exynos4210())
>>> + if (of_machine_is_compatible("samsung,exynos4210")) {
>>> + exynos_info->type = EXYNOS_SOC_4210;
>>> + } else if (of_machine_is_compatible("samsung,exynos4212")) {
>>> + exynos_info->type = EXYNOS_SOC_4212;
>>> + } else if (of_machine_is_compatible("samsung,exynos4412")) {
>>> + exynos_info->type = EXYNOS_SOC_4212;
>>
>> 4412 ?
>>
> Yes, I will fix when I apply.
>
>>> + } else if (of_machine_is_compatible("samsung,exynos5250")) {
>>> + exynos_info->type = EXYNOS_SOC_5250;
>>> + } else {
>>> + pr_err("%s: Unknown SoC type\n", __func__);
>>> + return -ENODEV;
>>> + }
>>> +
>>> + if (exynos_info->type == EXYNOS_SOC_4210)
>>> ret = exynos4210_cpufreq_init(exynos_info);
>>> - else if (soc_is_exynos4212() || soc_is_exynos4412())
>>> + else if (exynos_info->type == EXYNOS_SOC_4212 ||
>>> exynos_info->type == EXYNOS_SOC_4412)
>>> ret = exynos4x12_cpufreq_init(exynos_info);
>>> - else if (soc_is_exynos5250())
>>> + else if (exynos_info->type == EXYNOS_SOC_5250)
>>> ret = exynos5250_cpufreq_init(exynos_info);
>>> else
>>> return 0;
>>
>> Do this in the first if/else only..
>
> Probably, you mean following in above?
>
>>> - if (soc_is_exynos4210())
>
> I've applied this with fixing typo you mentioned just now, if any
> concerns, please kindly let me know.
I think Viresh meant merging the two if/else blocks together, as follows:
if (of_machine_is_compatible("samsung,exynos4210")) {
exynos_info->type = EXYNOS_SOC_4210;
ret = exynos4210_cpufreq_init(exynos_info);
} else if (of_machine_is_compatible("samsung,exynos4212")) {
exynos_info->type = EXYNOS_SOC_4212;
ret = exynos4x12_cpufreq_init(exynos_info);
} else if (of_machine_is_compatible("samsung,exynos4412")) {
exynos_info->type = EXYNOS_SOC_4412;
ret = exynos4x12_cpufreq_init(exynos_info);
} else if (of_machine_is_compatible("samsung,exynos5250")) {
exynos_info->type = EXYNOS_SOC_5250;
ret = exynos5250_cpufreq_init(exynos_info);
} else {
pr_err("%s: Unknown SoC type\n", __func__);
return -ENODEV;
}
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] cpufreq: exynos: Fix the compile error
2014-05-16 23:37 ` Tomasz Figa
@ 2014-05-16 23:44 ` Kukjin Kim
0 siblings, 0 replies; 11+ messages in thread
From: Kukjin Kim @ 2014-05-16 23:44 UTC (permalink / raw)
To: Tomasz Figa
Cc: Kukjin Kim, Viresh Kumar, Jonghwan Choi, linux-samsung-soc,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
cpufreq@vger.kernel.org, Rafael J. Wysocki, Jonghwan Choi
On 05/17/14 08:37, Tomasz Figa wrote:
> On 17.05.2014 01:26, Kukjin Kim wrote:
>> On 05/16/14 20:07, Viresh Kumar wrote:
>>> On 16 May 2014 15:48, Jonghwan Choi<jhbird.choi@samsung.com> 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
>>>
>>> Blank line here..
>>>
>>>> This fixes above error with getting SoC information via
>>>> of_machine_is_compatible() instead of soc_is_exynosXXXX().
>>>>
>>>> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
>>>> ---
>>>> drivers/cpufreq/exynos-cpufreq.c | 20 +++++++++++++++++---
>>>> drivers/cpufreq/exynos-cpufreq.h | 8 ++++++++
>>>> drivers/cpufreq/exynos4x12-cpufreq.c | 11 ++++-------
>>>> 3 files changed, 29 insertions(+), 10 deletions(-)
>>>>
>>>> diff --git a/drivers/cpufreq/exynos-cpufreq.c
>>>> b/drivers/cpufreq/exynos-cpufreq.c
>>>> index f99cfe2..9aecffef 100644
>>>> --- a/drivers/cpufreq/exynos-cpufreq.c
>>>> +++ b/drivers/cpufreq/exynos-cpufreq.c
>>>> @@ -17,6 +17,7 @@
>>>> #include<linux/regulator/consumer.h>
>>>> #include<linux/cpufreq.h>
>>>> #include<linux/platform_device.h>
>>>> +#include<linux/of.h>
>>>>
>>>> #include<plat/cpu.h>
>>>>
>>>> @@ -163,11 +164,24 @@ static int exynos_cpufreq_probe(struct
>>>> platform_device *pdev)
>>>> if (!exynos_info)
>>>> return -ENOMEM;
>>>>
>>>> - if (soc_is_exynos4210())
>>>> + if (of_machine_is_compatible("samsung,exynos4210")) {
>>>> + exynos_info->type = EXYNOS_SOC_4210;
>>>> + } else if (of_machine_is_compatible("samsung,exynos4212")) {
>>>> + exynos_info->type = EXYNOS_SOC_4212;
>>>> + } else if (of_machine_is_compatible("samsung,exynos4412")) {
>>>> + exynos_info->type = EXYNOS_SOC_4212;
>>>
>>> 4412 ?
>>>
>> Yes, I will fix when I apply.
>>
>>>> + } else if (of_machine_is_compatible("samsung,exynos5250")) {
>>>> + exynos_info->type = EXYNOS_SOC_5250;
>>>> + } else {
>>>> + pr_err("%s: Unknown SoC type\n", __func__);
>>>> + return -ENODEV;
>>>> + }
>>>> +
>>>> + if (exynos_info->type == EXYNOS_SOC_4210)
>>>> ret = exynos4210_cpufreq_init(exynos_info);
>>>> - else if (soc_is_exynos4212() || soc_is_exynos4412())
>>>> + else if (exynos_info->type == EXYNOS_SOC_4212 ||
>>>> exynos_info->type == EXYNOS_SOC_4412)
>>>> ret = exynos4x12_cpufreq_init(exynos_info);
>>>> - else if (soc_is_exynos5250())
>>>> + else if (exynos_info->type == EXYNOS_SOC_5250)
>>>> ret = exynos5250_cpufreq_init(exynos_info);
>>>> else
>>>> return 0;
>>>
>>> Do this in the first if/else only..
>>
>> Probably, you mean following in above?
>>
>>>> - if (soc_is_exynos4210())
>>
>> I've applied this with fixing typo you mentioned just now, if any
>> concerns, please kindly let me know.
>
> I think Viresh meant merging the two if/else blocks together, as follows:
>
> if (of_machine_is_compatible("samsung,exynos4210")) {
> exynos_info->type = EXYNOS_SOC_4210;
> ret = exynos4210_cpufreq_init(exynos_info);
> } else if (of_machine_is_compatible("samsung,exynos4212")) {
> exynos_info->type = EXYNOS_SOC_4212;
> ret = exynos4x12_cpufreq_init(exynos_info);
> } else if (of_machine_is_compatible("samsung,exynos4412")) {
> exynos_info->type = EXYNOS_SOC_4412;
> ret = exynos4x12_cpufreq_init(exynos_info);
> } else if (of_machine_is_compatible("samsung,exynos5250")) {
> exynos_info->type = EXYNOS_SOC_5250;
> ret = exynos5250_cpufreq_init(exynos_info);
> } else {
> pr_err("%s: Unknown SoC type\n", __func__);
> return -ENODEV;
> }
>
Yeah, I just now realized same thing :(
looks better, the SoC type is only used for 4212/4412 in other place
though...I will modify as per Viresh's suggestion.
Thanks,
Kukjin
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-05-20 0:29 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 10:18 [PATCH v3] cpufreq: exynos: Fix the compile error Jonghwan Choi
2014-05-16 10:54 ` Kukjin Kim
2014-05-16 23:04 ` Rafael J. Wysocki
2014-05-16 23:24 ` Kukjin Kim
2014-05-16 23:28 ` Tomasz Figa
2014-05-19 23:33 ` Rafael J. Wysocki
2014-05-20 0:29 ` Kukjin Kim
2014-05-16 11:07 ` Viresh Kumar
2014-05-16 23:26 ` Kukjin Kim
2014-05-16 23:37 ` Tomasz Figa
2014-05-16 23:44 ` Kukjin Kim
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).