From patchwork Mon Aug 3 13:55:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6929801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E4939F358 for ; Mon, 3 Aug 2015 13:59:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6A4E205D1 for ; Mon, 3 Aug 2015 13:59:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27DD4205C4 for ; Mon, 3 Aug 2015 13:59:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMGEK-00006b-6Z; Mon, 03 Aug 2015 13:56:40 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMGEH-0008W1-RY for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2015 13:56:39 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSI02URDEPM7Q80@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2015 22:56:14 +0900 (KST) X-AuditID: cbfee61a-f79a06d000005c6f-17-55bf72fde053 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 3B.C8.23663.DF27FB55; Mon, 3 Aug 2015 22:56:13 +0900 (KST) Received: from amdc1976.localnet ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSI005V7EPJD360@mmp2.samsung.com>; Mon, 03 Aug 2015 22:56:13 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Krzysztof Kozlowski Subject: Re: [PATCH v3 3/5] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 Date: Mon, 03 Aug 2015 15:55:17 +0200 Message-id: <2347616.SxxJmTVssu@amdc1976> User-Agent: KMail/4.13.3 (Linux/3.13.0-57-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <55BF4D41.1060903@samsung.com> References: <1438368557-2352-1-git-send-email-b.zolnierkie@samsung.com> <4532306.AVvo5hem3c@amdc1976> <55BF4D41.1060903@samsung.com> MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsVy+t9jQd2/RftDDZa32Vhc//Kc1WL+lWus Fv8fvWa1uPZ7BpvFm7drmCxevzC06F1wlc2i//FrZouvh1cwWrx5uJnRYtNjoNqPPfdYLS7v msNm8bn3CKPFjPP7mCzWbbzFbnHxlKvFk4d9bBaH37SzWnQsY7RoW/2B1WLVrj+MFhu/ejiI e7y/0cru8Xd2K7PHzll32T0W73nJ5LFpVSebx51re9g8Ni+p9/h3jN1jSz9Qrm/LKkaP7dfm MXt83iQXwBPFZZOSmpNZllqkb5fAlbHqTi97wRHNip0PPrM1MPYodTFycEgImEjMbeftYuQE MsUkLtxbz9bFyMUhJDCLUWLm5itMIAkhga+MEq87BUFsNgEriYntqxhBbBEBQ4mDu7czgTQw Czxgk2i+Mp0NJCEskCBx+fBudhCbRUBVYs/Zu2ANvAKaEg/PrgcbKirgJfH9VwMziM0poC2x feIvdojNbUCbn8+HahCU+DH5HguIzSwgL7Fv/1RWCFtLYv3O40wTGIHuRCibhaRsFpKyBYzM qxglUguSC4qT0nMN81LL9YoTc4tL89L1kvNzNzGC4/iZ1A7Gg7vcDzEKcDAq8fB+WLAvVIg1 say4MvcQowQHs5II74/fQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8shs2hwoJpCeWpGanphak FsFkmTg4pRoYKwIKTuqEPyz6PXviN07Wr1FlMTFJKr6HV/QnRh4MPu0x/U1R1epTAkfZDjja qKRekzE3lmG7di153sONtpp68vGunAE7f53smfH+xQ0vO+OJr7vWq684GGRpdLKFKcLn03Le 8vf9bREWSw49XL7jVsuip3Faebqyss+F53BzfBV+sXTagbrnSizFGYmGWsxFxYkAgTLT898C AAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150803_065638_086861_961381D7 X-CRM114-Status: GOOD ( 31.88 ) X-Spam-Score: -7.1 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Viresh Kumar , Michael Turquette , Tomasz Figa , Sylwester Nawrocki , linux-clk@vger.kernel.org, Kukjin Kim , Chanwoo Choi , Javier Martinez Canillas , Kukjin Kim , Thomas Abraham , Zhang Rui , Lukasz Majewski , Kevin Hilman , linux-pm@vger.kernel.org, Eduardo Valentin , linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org, Anand Moon , linux-kernel@vger.kernel.org, Tobias Jakobi Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Viresh Kumar Reviewed-by: Krzysztof Kozlowski --- 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 */ } };