diff mbox

[v9,4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4210/5250/5420

Message ID 1406707663-16656-5-git-send-email-thomas.ab@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Abraham July 30, 2014, 8:07 a.m. UTC
The new CPU clock type allows the use of generic CPUfreq drivers. So for
Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
which did not have CPUfreq driver support, enable the use of generic
CPUfreq driver.

Suggested-by: Tomasz Figa <t.figa@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
 arch/arm/mach-exynos/exynos.c |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

Comments

Kim Kukjin July 31, 2014, 6:32 p.m. UTC | #1
On 07/30/14 17:07, Thomas Abraham wrote:
> The new CPU clock type allows the use of generic CPUfreq drivers. So for
> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
> which did not have CPUfreq driver support, enable the use of generic
> CPUfreq driver.
>
> Suggested-by: Tomasz Figa<t.figa@samsung.com>
> Cc: Kukjin Kim<kgene.kim@samsung.com>

Looks good to me,

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

BTW, who will handle this series? I hope see this series in 3.17.

- Kukjin

> Signed-off-by: Thomas Abraham<thomas.ab@samsung.com>
> Reviewed-by: Tomasz Figa<t.figa@samsung.com>
> ---
>   arch/arm/mach-exynos/exynos.c |   24 +++++++++++++++++++++++-
>   1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 493dbc2..e61bb36 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -281,6 +281,28 @@ static void __init exynos_init_irq(void)
>   	exynos_map_pmu();
>   }
>
> +static const struct of_device_id exynos_cpufreq_matches[] = {
> +	{ .compatible = "samsung,exynos5420", .data = "arm-bL-cpufreq-dt" },
> +	{ .compatible = "samsung,exynos5250", .data = "cpufreq-cpu0" },
> +	{ .compatible = "samsung,exynos4210", .data = "cpufreq-cpu0" },
> +	{ .compatible = "samsung,exynos5440", .data = "exynos5440-cpufreq" },
> +	{ /* sentinel */ }
> +};
> +
> +static void __init exynos_cpufreq_init(void)
> +{
> +	struct device_node *root = of_find_node_by_path("/");
> +	const struct of_device_id *match;
> +
> +	match = of_match_node(exynos_cpufreq_matches, root);
> +	if (!match) {
> +		platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
> +		return;
> +	}
> +
> +	platform_device_register_simple(match->data, -1, NULL, 0);
> +}
> +
>   static void __init exynos_dt_machine_init(void)
>   {
>   	struct device_node *i2c_np;
> @@ -320,7 +342,7 @@ static void __init exynos_dt_machine_init(void)
>   			of_machine_is_compatible("samsung,exynos5250"))
>   		platform_device_register(&exynos_cpuidle);
>
> -	platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
> +	exynos_cpufreq_init();
>
>   	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>   }
Tomasz Figa July 31, 2014, 6:40 p.m. UTC | #2
Kukjin,

On 31.07.2014 20:32, Kukjin Kim wrote:
> On 07/30/14 17:07, Thomas Abraham wrote:
>> The new CPU clock type allows the use of generic CPUfreq drivers. So for
>> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
>> which did not have CPUfreq driver support, enable the use of generic
>> CPUfreq driver.
>>
>> Suggested-by: Tomasz Figa<t.figa@samsung.com>
>> Cc: Kukjin Kim<kgene.kim@samsung.com>
> 
> Looks good to me,
> 
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
> 
> BTW, who will handle this series? I hope see this series in 3.17.

This series consists mostly of clock changes and it likely depends on
patches already in my for-next, so I would be inclined toward taking it
through samsung-clk tree. However, for this I would need Acks for patch
5/6 from Viresh and for patches [1] and [2] (which are dependencies of
this series) from you. I also need to make sure that the two mentioned
patches don't have any dependencies already in your tree.

[1] ARM: dts: add CPU nodes for Exynos4 SoCs
   - https://lkml.org/lkml/2014/7/21/315
[2] ARM: dts: smdk5250: Specify MAX77686 pmic interrupt
   - http://www.spinics.net/lists/arm-kernel/msg351134.html

Best regards,
Tomasz
Tomasz Figa July 31, 2014, 6:54 p.m. UTC | #3
On 31.07.2014 20:40, Tomasz Figa wrote:
> Kukjin,
> 
> On 31.07.2014 20:32, Kukjin Kim wrote:
>> On 07/30/14 17:07, Thomas Abraham wrote:
>>> The new CPU clock type allows the use of generic CPUfreq drivers. So for
>>> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
>>> which did not have CPUfreq driver support, enable the use of generic
>>> CPUfreq driver.
>>>
>>> Suggested-by: Tomasz Figa<t.figa@samsung.com>
>>> Cc: Kukjin Kim<kgene.kim@samsung.com>
>>
>> Looks good to me,
>>
>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>
>> BTW, who will handle this series? I hope see this series in 3.17.
> 
> This series consists mostly of clock changes and it likely depends on
> patches already in my for-next, so I would be inclined toward taking it
> through samsung-clk tree. However, for this I would need Acks for patch
> 5/6 from Viresh and for patches [1] and [2] (which are dependencies of
> this series) from you. I also need to make sure that the two mentioned
> patches don't have any dependencies already in your tree.
> 
> [1] ARM: dts: add CPU nodes for Exynos4 SoCs
>    - https://lkml.org/lkml/2014/7/21/315
> [2] ARM: dts: smdk5250: Specify MAX77686 pmic interrupt
>    - http://www.spinics.net/lists/arm-kernel/msg351134.html

Aha, I'm not quite sure we really want to hurry with this series for
3.17. I'd prefer it to be picked up early after 3.17-rc1 shows up to sit
in linux-next for a while an be thoroughly tested on a number of boards.

This would also have the advantage of having the two patches mentioned
above already merged.

Best regards,
Tomasz
Thomas Abraham July 31, 2014, 7:25 p.m. UTC | #4
On Fri, Aug 1, 2014 at 12:24 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>
>
> On 31.07.2014 20:40, Tomasz Figa wrote:
>> Kukjin,
>>
>> On 31.07.2014 20:32, Kukjin Kim wrote:
>>> On 07/30/14 17:07, Thomas Abraham wrote:
>>>> The new CPU clock type allows the use of generic CPUfreq drivers. So for
>>>> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
>>>> which did not have CPUfreq driver support, enable the use of generic
>>>> CPUfreq driver.
>>>>
>>>> Suggested-by: Tomasz Figa<t.figa@samsung.com>
>>>> Cc: Kukjin Kim<kgene.kim@samsung.com>
>>>
>>> Looks good to me,
>>>
>>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>>
>>> BTW, who will handle this series? I hope see this series in 3.17.
>>
>> This series consists mostly of clock changes and it likely depends on
>> patches already in my for-next, so I would be inclined toward taking it
>> through samsung-clk tree. However, for this I would need Acks for patch
>> 5/6 from Viresh and for patches [1] and [2] (which are dependencies of
>> this series) from you. I also need to make sure that the two mentioned
>> patches don't have any dependencies already in your tree.
>>
>> [1] ARM: dts: add CPU nodes for Exynos4 SoCs
>>    - https://lkml.org/lkml/2014/7/21/315
>> [2] ARM: dts: smdk5250: Specify MAX77686 pmic interrupt
>>    - http://www.spinics.net/lists/arm-kernel/msg351134.html
>
> Aha, I'm not quite sure we really want to hurry with this series for
> 3.17. I'd prefer it to be picked up early after 3.17-rc1 shows up to sit
> in linux-next for a while an be thoroughly tested on a number of boards.

The v9 revision of this series has completed about 2 days of testing
now on 4210/5250/5420 boards. I will let it run for few more days. For
v8 and previous versions, the tests had completed 3 or more days. So I
really don't think there is anything fundamentally wrong with this
series. It would be nice to have this series merged and we start
migrating other Exynos based boards to use generic cpufreq drivers.

Thanks,
Thomas.

>
> This would also have the advantage of having the two patches mentioned
> above already merged.
>
> Best regards,
> Tomasz
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Tomasz Figa July 31, 2014, 7:30 p.m. UTC | #5
On 31.07.2014 21:25, Thomas Abraham wrote:
> On Fri, Aug 1, 2014 at 12:24 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>
>>
>> On 31.07.2014 20:40, Tomasz Figa wrote:
>>> Kukjin,
>>>
>>> On 31.07.2014 20:32, Kukjin Kim wrote:
>>>> On 07/30/14 17:07, Thomas Abraham wrote:
>>>>> The new CPU clock type allows the use of generic CPUfreq drivers. So for
>>>>> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
>>>>> which did not have CPUfreq driver support, enable the use of generic
>>>>> CPUfreq driver.
>>>>>
>>>>> Suggested-by: Tomasz Figa<t.figa@samsung.com>
>>>>> Cc: Kukjin Kim<kgene.kim@samsung.com>
>>>>
>>>> Looks good to me,
>>>>
>>>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>>>
>>>> BTW, who will handle this series? I hope see this series in 3.17.
>>>
>>> This series consists mostly of clock changes and it likely depends on
>>> patches already in my for-next, so I would be inclined toward taking it
>>> through samsung-clk tree. However, for this I would need Acks for patch
>>> 5/6 from Viresh and for patches [1] and [2] (which are dependencies of
>>> this series) from you. I also need to make sure that the two mentioned
>>> patches don't have any dependencies already in your tree.
>>>
>>> [1] ARM: dts: add CPU nodes for Exynos4 SoCs
>>>    - https://lkml.org/lkml/2014/7/21/315
>>> [2] ARM: dts: smdk5250: Specify MAX77686 pmic interrupt
>>>    - http://www.spinics.net/lists/arm-kernel/msg351134.html
>>
>> Aha, I'm not quite sure we really want to hurry with this series for
>> 3.17. I'd prefer it to be picked up early after 3.17-rc1 shows up to sit
>> in linux-next for a while an be thoroughly tested on a number of boards.
> 
> The v9 revision of this series has completed about 2 days of testing
> now on 4210/5250/5420 boards. I will let it run for few more days. For
> v8 and previous versions, the tests had completed 3 or more days. So I
> really don't think there is anything fundamentally wrong with this
> series. It would be nice to have this series merged and we start
> migrating other Exynos based boards to use generic cpufreq drivers.

We have 22 Exynos-based boards currently supported in mainline. Is the
testing running on all of them? This is the purpose of linux-next and
for series that completely replace one driver with another I'd consider
this as the only reasonable choice, if not keeping the old driver for a
release.

Of course we have never had good testing traditions on Samsung SoC (see
OMAP and Tegra baseline tests), but does it mean that we shouldn't start
doing the right thing?

Best regards,
Tomasz
Thomas Abraham Aug. 4, 2014, 3:24 a.m. UTC | #6
Hi Tomasz,

On Fri, Aug 1, 2014 at 1:00 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> On 31.07.2014 21:25, Thomas Abraham wrote:
>> On Fri, Aug 1, 2014 at 12:24 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>>
>>>
>>> On 31.07.2014 20:40, Tomasz Figa wrote:
>>>> Kukjin,
>>>>
>>>> On 31.07.2014 20:32, Kukjin Kim wrote:
>>>>> On 07/30/14 17:07, Thomas Abraham wrote:
>>>>>> The new CPU clock type allows the use of generic CPUfreq drivers. So for
>>>>>> Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420,
>>>>>> which did not have CPUfreq driver support, enable the use of generic
>>>>>> CPUfreq driver.
>>>>>>
>>>>>> Suggested-by: Tomasz Figa<t.figa@samsung.com>
>>>>>> Cc: Kukjin Kim<kgene.kim@samsung.com>
>>>>>
>>>>> Looks good to me,
>>>>>
>>>>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>>>>
>>>>> BTW, who will handle this series? I hope see this series in 3.17.
>>>>
>>>> This series consists mostly of clock changes and it likely depends on
>>>> patches already in my for-next, so I would be inclined toward taking it
>>>> through samsung-clk tree. However, for this I would need Acks for patch
>>>> 5/6 from Viresh and for patches [1] and [2] (which are dependencies of
>>>> this series) from you. I also need to make sure that the two mentioned
>>>> patches don't have any dependencies already in your tree.
>>>>
>>>> [1] ARM: dts: add CPU nodes for Exynos4 SoCs
>>>>    - https://lkml.org/lkml/2014/7/21/315
>>>> [2] ARM: dts: smdk5250: Specify MAX77686 pmic interrupt
>>>>    - http://www.spinics.net/lists/arm-kernel/msg351134.html
>>>
>>> Aha, I'm not quite sure we really want to hurry with this series for
>>> 3.17. I'd prefer it to be picked up early after 3.17-rc1 shows up to sit
>>> in linux-next for a while an be thoroughly tested on a number of boards.
>>
>> The v9 revision of this series has completed about 2 days of testing
>> now on 4210/5250/5420 boards. I will let it run for few more days. For
>> v8 and previous versions, the tests had completed 3 or more days. So I
>> really don't think there is anything fundamentally wrong with this
>> series. It would be nice to have this series merged and we start
>> migrating other Exynos based boards to use generic cpufreq drivers.
>
> We have 22 Exynos-based boards currently supported in mainline. Is the
> testing running on all of them? This is the purpose of linux-next and

This series replaces existing cpufreq driver for Exynos4210 and
Exynos5250 which impact 7 Exynos boards - Exynos4210 (smdk, origen,
trats, universal), Exynos5250 (smdk, arndale, snow). Out of these, it
is trats and universal that have not been tested. Which other 15
Exynos boards did you feel this series needs to be tested on? Sanity
testing for Exynos4x12 cpufreq support was done on Exynos4412 Origen
board.

> for series that completely replace one driver with another I'd consider
> this as the only reasonable choice, if not keeping the old driver for a
> release.
>
> Of course we have never good testing traditions on Samsung SoC (see
> OMAP and Tegra baseline tests), but does it mean that we shouldn't start
> doing the right thing?

Aren't Tegra/OMAP baseline tests for upstream kernel versions only,
not for linux-next?

Thanks,
Thomas.

>
> Best regards,
> Tomasz
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 493dbc2..e61bb36 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -281,6 +281,28 @@  static void __init exynos_init_irq(void)
 	exynos_map_pmu();
 }
 
+static const struct of_device_id exynos_cpufreq_matches[] = {
+	{ .compatible = "samsung,exynos5420", .data = "arm-bL-cpufreq-dt" },
+	{ .compatible = "samsung,exynos5250", .data = "cpufreq-cpu0" },
+	{ .compatible = "samsung,exynos4210", .data = "cpufreq-cpu0" },
+	{ .compatible = "samsung,exynos5440", .data = "exynos5440-cpufreq" },
+	{ /* sentinel */ }
+};
+
+static void __init exynos_cpufreq_init(void)
+{
+	struct device_node *root = of_find_node_by_path("/");
+	const struct of_device_id *match;
+
+	match = of_match_node(exynos_cpufreq_matches, root);
+	if (!match) {
+		platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
+		return;
+	}
+
+	platform_device_register_simple(match->data, -1, NULL, 0);
+}
+
 static void __init exynos_dt_machine_init(void)
 {
 	struct device_node *i2c_np;
@@ -320,7 +342,7 @@  static void __init exynos_dt_machine_init(void)
 			of_machine_is_compatible("samsung,exynos5250"))
 		platform_device_register(&exynos_cpuidle);
 
-	platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
+	exynos_cpufreq_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }