Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932576AbbHDAn4 (ORCPT ); Mon, 3 Aug 2015 20:43:56 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39298 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932553AbbHDAny (ORCPT ); Mon, 3 Aug 2015 20:43:54 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-99-55c00ac6b3c0 Message-id: <55C00ABD.3050805@samsung.com> Date: Tue, 04 Aug 2015 09:43:41 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-version: 1.0 To: Bartlomiej Zolnierkiewicz Cc: Viresh Kumar , Thomas Abraham , Sylwester Nawrocki , Michael Turquette , Kukjin Kim , Kukjin Kim , Tomasz Figa , Lukasz Majewski , Heiko Stuebner , Chanwoo Choi , Kevin Hilman , Javier Martinez Canillas , Tobias Jakobi , Anand Moon , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Javier Martinez Canillas , Zhang Rui , Eduardo Valentin Subject: Re: [PATCH v3 3/5] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 References: <1438368557-2352-1-git-send-email-b.zolnierkie@samsung.com> <4532306.AVvo5hem3c@amdc1976> <55BF4D41.1060903@samsung.com> <2347616.SxxJmTVssu@amdc1976> In-reply-to: <2347616.SxxJmTVssu@amdc1976> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHIsWRmVeSWpSXmKPExsVy+t/xa7rHuA6EGqzt4bbYOGM9q8X1L89Z LeZfucZq8f/Ra1aLa79nsFm8ebuGyeL1C0OL3gVX2Sz6H79mtvh6eAWjxZuHmxktNj0Gqv3Y c4/V4vKuOWwWn3uPMFrMOL+PyWLdxlvsFhdPuVo8edjHZnH4TTurRccyRou21R9YLVbt+sNo sfGrh4OEx/sbrewef2e3MnvsnHWX3WPxnpdMHptWdbJ53Lm2h81j85J6j3/H2D229APl+ras YvTYfm0es8fnTXIBPFFcNimpOZllqUX6dglcGSs3rmcseKBdsexJG1MDY4NKFyMnh4SAicTn SzsYIWwxiQv31rN1MXJxCAksZZRon97IBOF8YZRY/vkXC0gVr4CWxM6TW5hBbBYBVYmpO7rB bDYBY4nNy5ewgdiiAhESy1efZISoF5T4MfkeWK+IgIXE2hVvWUCGMgs8YJNovjIdrEFYIEHi 8uHd7BDbljFKvPk2CyzBCbTtztIJQJM4gDr0JO5f1AIJMwvIS2xe85Z5AqPALCQ7ZiFUzUJS tYCReRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSCx/2cG4+JjVIUYBDkYlHl6Bl/tDhVgT y4orcw8xSnAwK4nwLrwBFOJNSaysSi3Kjy8qzUktPsQozcGiJM47d9f7ECGB9MSS1OzU1ILU IpgsEwenVAPjXKlE1lXe3A6xeYe3KNw2zjCwcOBTfzNHo5fvTNeU+MbEnhbmw9MfijmIfTor 0fK4J1k2dZW5277utZfzk69Pm3S3KC7Q8EzvLqv2M+pJM6f8CnrwJJah9n7er8vFPy6t31Xd nvXJP1JZb+Oec42VCiVm9+bdvnUyoeTJrVOK31PEuYT2vWhWYinOSDTUYi4qTgQAxFjP7uEC AAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5712 Lines: 138 On 03.08.2015 22:55, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Monday, August 03, 2015 08:15:13 PM Krzysztof Kozlowski wrote: >> W dniu 03.08.2015 o 19:36, Bartlomiej Zolnierkiewicz pisze: >>> On Monday, August 03, 2015 03:59:26 PM Viresh Kumar wrote: >>>> On 03-08-15, 12:17, Bartlomiej Zolnierkiewicz wrote: >>>>> >>>>> Hi, >>>>> >>>>> On Saturday, August 01, 2015 04:47:21 PM Viresh Kumar wrote: >>>>>> On 31-07-15, 20:49, Bartlomiej Zolnierkiewicz wrote: >>>>>>> diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig >>>>>>> index 659879a..bf6d596 100644 >>>>>>> --- a/drivers/cpufreq/Kconfig >>>>>>> +++ b/drivers/cpufreq/Kconfig >>>>>>> @@ -191,6 +191,7 @@ config CPUFREQ_DT >>>>>>> # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y: >>>>>>> depends on !CPU_THERMAL || THERMAL >>>>>>> select PM_OPP >>>>>>> + select EXYNOS_THERMAL if ARCH_EXYNOS >>>>>>> help >>>>>>> This adds a generic DT based cpufreq driver for frequency management. >>>>>>> It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) >>>>>> >>>>>> No, we shouldn't pollute generic Kconfig options with platform specific stuff. >>>>> >>>>> The old code depended on this. You couldn't enable boost support >>>>> without enabling thermal support (ARM_EXYNOS_CPU_FREQ_BOOST_SW >>>>> config option selected EXYNOS_THERMAL). >>>>> >>>>>> Why don't you enable thermal in your .config? >>>>> >>>>> It is enabled in exynos_defconfig but without the above change it >>>>> can disabled manually which is something that we don't want. >>>> >>>> You are not getting it. I am not asking you to not select thermal, but >>>> to select it from within your architecture Kconfig option if you want. >>> >>> OK. Krzysztof/Kukjin do you agree with selecting EXYNOS_THERMAL >>> from ARCH_EXYNOS in the platform code? >> >> I agree, with your explanation it seems good. Can you just add this >> justification to the commit message? > > Updated patch below (I'm not resending the whole series as all other > patches remain unchanged). > >>> >>>> Over that, thermal is really an option, not a dependency. So, if >>>> someone manually disables it, its his problem not yours :) >>> >>> I would really like it to be dependency not an option (+ I think >>> that ideally it should be checked at runtime, IOW we should be >>> checking from cpufreq-dt driver if the thermal support is enabled >>> before enabling boost support). >> >> That would be the best. It is fine with me if you want to do this in >> consecutive patches (after applying patch selecting/depending on it in >> mach-exynos code). > > ---------------------8<------------------- > >>From 2595b5e6164a2d1b76626e14302b148b7af5e050 Mon Sep 17 00:00:00 2001 > From: Bartlomiej Zolnierkiewicz > Date: Mon, 3 Aug 2015 15:49:06 +0200 > Subject: [PATCH] ARM: Exynos: switch to using generic cpufreq driver for > Exynos4x12 > > The new CPU clock type allows the use of generic CPUfreq driver. > Switch Exynos4x12 to using generic cpufreq driver. > > Previously (when exynos-cpufreq driver was used with boost > functionality) ARM_EXYNOS_CPU_FREQ_BOOST_SW config option > (which enabled boost functionality) selected EXYNOS_THERMAL > one. After switching Exynos4x12 platforms to use cpufreq-dt > driver boost support is enabled in the cpufreq-dt driver > itself (because there are turbo OPPs defined in the board's > DTS file). However we still would like to allow enabling > boost support only if thermal support is also enabled for > Exynos platforms. To achieve this make ARCH_EXYNOS config > option select THERMAL and EXYNOS_THERMAL ones. > > Please also note that the switch to use the generic cpufreq-dt > driver fixes the minor issue present with the old code (support > for 'boost' mode in the exynos-cpufreq driver was enabled for > all supported SoCs even though 'boost' frequency was provided > only for Exynos4x12 ones). > > Cc: Tomasz Figa > Cc: Kukjin Kim > Cc: Thomas Abraham > Cc: Javier Martinez Canillas > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > arch/arm/mach-exynos/Kconfig | 2 ++ > arch/arm/mach-exynos/exynos.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 81064cd..491914c 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -25,6 +25,8 @@ menuconfig ARCH_EXYNOS > select S5P_DEV_MFC > select SRAM > select MFD_SYSCON > + select THERMAL > + select EXYNOS_THERMAL > help > Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5) > > diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c > index 77ac021..1c47aee 100644 > --- a/arch/arm/mach-exynos/exynos.c > +++ b/arch/arm/mach-exynos/exynos.c > @@ -227,6 +227,8 @@ static void __init exynos_init_irq(void) > static const struct of_device_id exynos_cpufreq_matches[] = { > { .compatible = "samsung,exynos3250", .data = "cpufreq-dt" }, > { .compatible = "samsung,exynos4210", .data = "cpufreq-dt" }, > + { .compatible = "samsung,exynos4212", .data = "cpufreq-dt" }, > + { .compatible = "samsung,exynos4412", .data = "cpufreq-dt" }, > { .compatible = "samsung,exynos5250", .data = "cpufreq-dt" }, > { /* sentinel */ } > }; > Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/