From patchwork Thu Jul 25 14:42:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 11059011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 728381398 for ; Thu, 25 Jul 2019 14:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 644A9289EF for ; Thu, 25 Jul 2019 14:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 573A2288FD; Thu, 25 Jul 2019 14:43:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7FAD28A11 for ; Thu, 25 Jul 2019 14:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387419AbfGYOn3 (ORCPT ); Thu, 25 Jul 2019 10:43:29 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50387 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729161AbfGYOn2 (ORCPT ); Thu, 25 Jul 2019 10:43:28 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190725144327euoutp01bc13ecad6897bfb0c60165fbfcd0b0d9~0rZCSCmq_2892628926euoutp019 for ; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190725144327euoutp01bc13ecad6897bfb0c60165fbfcd0b0d9~0rZCSCmq_2892628926euoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564065807; bh=AawwEP56U+vYoQivP5dWZ0mbAArK+m1U0+xIgjdYc/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FrnjrNqKMT0MVsu6iwx2gYx1UG8l/sEaWxnIviAjIF7UM2nROd7VMugUcNjRtecNw Nuy1gcQDyPVMM8/7a3i20YqQGConC4vlE/+h3VDfUCQT3/vo8cL0Pcf+GmhYaG3+6J rGTWzJwhr0Jj/C8QBieDXc/1x6tysLI1L3qYTrmU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190725144326eucas1p201dfa63ff1d2649b8728aa007337f8ad~0rZBbr-nD1638016380eucas1p2Z; Thu, 25 Jul 2019 14:43:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 40.51.04325.D00C93D5; Thu, 25 Jul 2019 15:43:25 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff~0rZAewaCl0145701457eucas1p1D; Thu, 25 Jul 2019 14:43:25 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725144324eusmtrp109079162b86d53b8d95e222c3caf0023~0rZAQewzX0724307243eusmtrp1_; Thu, 25 Jul 2019 14:43:24 +0000 (GMT) X-AuditID: cbfec7f5-b75ff700000010e5-66-5d39c00d8d86 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 6A.56.04140.C00C93D5; Thu, 25 Jul 2019 15:43:24 +0100 (BST) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190725144324eusmtip1c1767b422b17e551cd7850ba8e98f062~0rY-gYVCH0174901749eusmtip1g; Thu, 25 Jul 2019 14:43:24 +0000 (GMT) From: k.konieczny@partner.samsung.com To: k.konieczny@partner.samsung.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 1/5] devfreq: exynos-bus: correct clock enable sequence Date: Thu, 25 Jul 2019 16:42:56 +0200 Message-Id: <20190725144300.25014-2-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190725144300.25014-1-k.konieczny@partner.samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHKsWRmVeSWpSXmKPExsWy7djPc7q8ByxjDU4vMrXYOGM9q8X1L89Z LeYfOcdq0bfvP6NF/+PXzBbnz29gtzjb9IbdYtPja6wWl3fNYbP43HuE0WLG+X1MFmuP3GW3 WHr9IpPF7cYVbBZvfpxlsmjde4Td4t+1jSwWmx8cY3MQ8lgzbw2jx6ZVnWwem5fUexx8t4fJ o2/LKkaP4ze2M3l83iQXwB7FZZOSmpNZllqkb5fAlbHxxXa2ggmiFXsPLWJsYJwg2MXIySEh YCKxfMlTli5GLg4hgRWMEq/6T7NDOF8YJebuvAaV+cwo8XD2ayaYltetp5hBbCGB5YwSd17k wXUs3XeOHSTBJqAqsWXGSzBbREBZYvK96cwgRcwCP1kkNlzeCJYQFvCSaDy+A2gFBw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9PBJjELdLJK rHhyBGySsICXROPxHSxdjBwcLEANG+a4goR5BVwkdi55ygyxQF6ic8duFhCbU8BV4m/jWrD5 QkA1jf3HGCHqBSVOznwCVsMMVN+8dTbzBEaBWUhSs5CkFjAyrWIUSS0tzk3PLTbSK07MLS7N S9dLzs/dxAiMym3Hfm7Zwdj1LvgQowAHoxIP74XllrFCrIllxZW5hxglOJiVRHi37gAK8aYk VlalFuXHF5XmpBYfYjQF+mEis5Rocj4wYeSVxBuaGppbWBqaG5sbm1koifN2CByMERJITyxJ zU5NLUgtgulj4uCUamC8PiHy4Od7+d/TC6dXaDfUcM85uenf/9iPXn9Z10zaFzWtpzhE+Ef3 7FqVnVeKT/6cs/Cg3sZfa4KKeTUWpp6uYW/WqP9w9OFdGZttJhtXyCiX/dDQOR5nxSEXvCiy o3JG15srilOaVrfdmO1hlnRwy9n9unPSGz8wligenzAlWdEgtVfexniDEktxRqKhFnNRcSIA McT9bOACAAA= X-CMS-MailID: 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff X-Msg-Generator: CA X-RootMTR: 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Regulators should be enabled before clocks to avoid h/w hang. This require change in exynos_bus_probe() to move exynos_bus_parse_of() after exynos_bus_parent_parse_of() and change in error handling. Similar change is needed in exynos_bus_exit() where clock should be disabled before regulators. Signed-off-by: Kamil Konieczny --- Changes: v4: - move regulator disable after clock disable - remove unrelated changes - add disabling regulators in error path in exynos_bus_probe() --- drivers/devfreq/exynos-bus.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 486cc5b422f1..f34fa26f00d0 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -194,11 +194,10 @@ static void exynos_bus_exit(struct device *dev) if (ret < 0) dev_warn(dev, "failed to disable the devfreq-event devices\n"); - if (bus->regulator) - regulator_disable(bus->regulator); - dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); + if (bus->regulator) + regulator_disable(bus->regulator); } /* @@ -386,6 +385,7 @@ static int exynos_bus_probe(struct platform_device *pdev) struct exynos_bus *bus; int ret, max_state; unsigned long min_freq, max_freq; + bool passive = false; if (!np) { dev_err(dev, "failed to find devicetree node\n"); @@ -399,27 +399,27 @@ static int exynos_bus_probe(struct platform_device *pdev) bus->dev = &pdev->dev; platform_set_drvdata(pdev, bus); - /* Parse the device-tree to get the resource information */ - ret = exynos_bus_parse_of(np, bus); - if (ret < 0) - return ret; - profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL); - if (!profile) { - ret = -ENOMEM; - goto err; - } + if (!profile) + return -ENOMEM; node = of_parse_phandle(dev->of_node, "devfreq", 0); if (node) { of_node_put(node); - goto passive; + passive = true; } else { ret = exynos_bus_parent_parse_of(np, bus); + if (ret < 0) + return ret; } + /* Parse the device-tree to get the resource information */ + ret = exynos_bus_parse_of(np, bus); if (ret < 0) - goto err; + goto err_reg; + + if (passive) + goto passive; /* Initialize the struct profile and governor data for parent device */ profile->polling_ms = 50; @@ -510,6 +510,9 @@ static int exynos_bus_probe(struct platform_device *pdev) err: dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); +err_reg: + if (!passive) + regulator_disable(bus->regulator); return ret; } From patchwork Thu Jul 25 14:42:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 11059015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47DB913A4 for ; Thu, 25 Jul 2019 14:44:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 396A128895 for ; Thu, 25 Jul 2019 14:44:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AA4328A33; Thu, 25 Jul 2019 14:44:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39EBD288FD for ; Thu, 25 Jul 2019 14:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729173AbfGYOn6 (ORCPT ); Thu, 25 Jul 2019 10:43:58 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:41887 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729164AbfGYOn3 (ORCPT ); Thu, 25 Jul 2019 10:43:29 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190725144327euoutp02f48fe3222714e195a4e62b588837787f~0rZCwLg7c1162511625euoutp02f for ; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190725144327euoutp02f48fe3222714e195a4e62b588837787f~0rZCwLg7c1162511625euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564065807; bh=UyI1wQ20jgXxJKqp5TkkQjurNLXPwK0/yJfHRL2NaWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c6+O3NQBC4Ns3Zzy/47I6P2MW2aTdQS+pNiWQitTU42czt/ljOhTnybL+iMahx3Lw vEuKMsZxj/15H0fOX74Euk8xo7HU+4gnvyOLMuXkDbRVcGB5hcMOVVl7uBXVABoeOs NM3x23fj6CdbocUu9/KUxU78DHb07Zm220D3eXdQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190725144326eucas1p14f80b2ad8cd63ad739d5171090ac0896~0rZCCDwNT1363913639eucas1p1j; Thu, 25 Jul 2019 14:43:26 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CF.38.04298.E00C93D5; Thu, 25 Jul 2019 15:43:26 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190725144325eucas1p204f9ffe8988a3604fdf21f77d242c7b8~0rZBLUxw71530115301eucas1p2o; Thu, 25 Jul 2019 14:43:25 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725144325eusmtrp11e79d58e292db99dbf0c8c1eed063582~0rZA9ETcK0724307243eusmtrp1A; Thu, 25 Jul 2019 14:43:25 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-d6-5d39c00efc85 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2E.2E.04146.D00C93D5; Thu, 25 Jul 2019 15:43:25 +0100 (BST) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190725144324eusmtip12c99b1a847eb7d9406e4cc76ba4d2538~0rZAOPIad3128231282eusmtip1j; Thu, 25 Jul 2019 14:43:24 +0000 (GMT) From: k.konieczny@partner.samsung.com To: k.konieczny@partner.samsung.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 2/5] devfreq: exynos-bus: convert to use dev_pm_opp_set_rate() Date: Thu, 25 Jul 2019 16:42:57 +0200 Message-Id: <20190725144300.25014-3-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190725144300.25014-1-k.konieczny@partner.samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0hTYRjHe3fOzjmKk9M0fHBStCgy8BYGrxSWdFtFIBVFWdTSg5Y6ZVNr RaVl2axm5QcvybqaIt62pqmpNRtJmS4vaRHlQEuraTUXFaW27djl2+/8L/zfBw5DiAeF/swB RRqnVMiTpJQnWf/ohyXI+0HEntCxagnWF9YI8YBjRIivmruEWNs6jXDe0EcCWyy1NO48aaOx YahfiHubSig8ccGMcKGlVYCrzK9pXDrQLcCvssopbPveKcCnW8w0nurXk/iO9RG1Siyr1FUi maFCQ8nu3DohM403C2RaYwWStb+4K5BNGOZG07s8V8RxSQcyOGVI5D7PhC7DfSq1Y+nh531n iEzkWJyLPBhgw+GGXSdwsZgtR3C1LTAXeTrZgeCiRUfxHxMIPo1kk38aXd9PkrxRhsAypBf8 rTSNNhGuFMUuBGPhe9rFvuwCyH9TQLhCBPuDhNpevdvwYbfCkPYncjHpLJjybrtZxK4Be0cm xc/NA03DPfe0B7sWJrOqZjKz4XHRsFsnnJlTdVfcA8CO0dD4qRHx5TVQlPeS4NkHPrQbaZ4D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xiBUbnt2M/NOxgvbQw+xCjAwajEw3thuWWsEGtiWXFl7iFGCQ5mJRHerTuAQrwpiZVV qUX58UWlOanFhxhNgZ6YyCwlmpwPTBh5JfGGpobmFpaG5sbmxmYWSuK8HQIHY4QE0hNLUrNT UwtSi2D6mDg4pRoYJ7Yzhzy050y26b/ZHv3IUqq2WOJ14Ja1fVM2bOowCJ6mys19Yu/7ypuz /zWqTK/I3mi6R2XtBd53X6PEw+zEmsS2zFyy2n1XTNXP01+vaM6JDEsqLIm4+Pr1xj6lRSmz svyZuGXW5Fad72jUD1xbnfi0ZrLcukKtex/VGHgaGzc7LuX8Eh2nxFKckWioxVxUnAgA3LTP +uACAAA= X-CMS-MailID: 20190725144325eucas1p204f9ffe8988a3604fdf21f77d242c7b8 X-Msg-Generator: CA X-RootMTR: 20190725144325eucas1p204f9ffe8988a3604fdf21f77d242c7b8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144325eucas1p204f9ffe8988a3604fdf21f77d242c7b8 References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reuse opp core code for setting bus clock and voltage. As a side effect this allow usage of coupled regulators feature (required for boards using Exynos5422/5800 SoCs) because dev_pm_opp_set_rate() uses regulator_set_voltage_triplet() for setting regulator voltage while the old code used regulator_set_voltage_tol() with fixed tolerance. This patch also removes no longer needed parsing of DT property "exynos,voltage-tolerance" (no Exynos devfreq DT node uses it). Signed-off-by: Kamil Konieczny --- Changes: v4: - remove unrelated changes, add newline before comment --- drivers/devfreq/exynos-bus.c | 108 +++++++++-------------------------- 1 file changed, 28 insertions(+), 80 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index f34fa26f00d0..ebb8f46312b6 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -25,7 +25,6 @@ #include #define DEFAULT_SATURATION_RATIO 40 -#define DEFAULT_VOLTAGE_TOLERANCE 2 struct exynos_bus { struct device *dev; @@ -37,9 +36,8 @@ struct exynos_bus { unsigned long curr_freq; - struct regulator *regulator; + struct opp_table *opp_table; struct clk *clk; - unsigned int voltage_tolerance; unsigned int ratio; }; @@ -99,56 +97,23 @@ static int exynos_bus_target(struct device *dev, unsigned long *freq, u32 flags) { struct exynos_bus *bus = dev_get_drvdata(dev); struct dev_pm_opp *new_opp; - unsigned long old_freq, new_freq, new_volt, tol; int ret = 0; - /* Get new opp-bus instance according to new bus clock */ + /* Get correct frequency for bus. */ new_opp = devfreq_recommended_opp(dev, freq, flags); if (IS_ERR(new_opp)) { dev_err(dev, "failed to get recommended opp instance\n"); return PTR_ERR(new_opp); } - new_freq = dev_pm_opp_get_freq(new_opp); - new_volt = dev_pm_opp_get_voltage(new_opp); dev_pm_opp_put(new_opp); - old_freq = bus->curr_freq; - - if (old_freq == new_freq) - return 0; - tol = new_volt * bus->voltage_tolerance / 100; - /* Change voltage and frequency according to new OPP level */ mutex_lock(&bus->lock); + ret = dev_pm_opp_set_rate(dev, *freq); + if (!ret) + bus->curr_freq = *freq; - if (old_freq < new_freq) { - ret = regulator_set_voltage_tol(bus->regulator, new_volt, tol); - if (ret < 0) { - dev_err(bus->dev, "failed to set voltage\n"); - goto out; - } - } - - ret = clk_set_rate(bus->clk, new_freq); - if (ret < 0) { - dev_err(dev, "failed to change clock of bus\n"); - clk_set_rate(bus->clk, old_freq); - goto out; - } - - if (old_freq > new_freq) { - ret = regulator_set_voltage_tol(bus->regulator, new_volt, tol); - if (ret < 0) { - dev_err(bus->dev, "failed to set voltage\n"); - goto out; - } - } - bus->curr_freq = new_freq; - - dev_dbg(dev, "Set the frequency of bus (%luHz -> %luHz, %luHz)\n", - old_freq, new_freq, clk_get_rate(bus->clk)); -out: mutex_unlock(&bus->lock); return ret; @@ -196,8 +161,10 @@ static void exynos_bus_exit(struct device *dev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); - if (bus->regulator) - regulator_disable(bus->regulator); + if (bus->opp_table) { + dev_pm_opp_put_regulators(bus->opp_table); + bus->opp_table = NULL; + } } /* @@ -208,39 +175,23 @@ static int exynos_bus_passive_target(struct device *dev, unsigned long *freq, { struct exynos_bus *bus = dev_get_drvdata(dev); struct dev_pm_opp *new_opp; - unsigned long old_freq, new_freq; - int ret = 0; + int ret; - /* Get new opp-bus instance according to new bus clock */ + /* Get correct frequency for bus. */ new_opp = devfreq_recommended_opp(dev, freq, flags); if (IS_ERR(new_opp)) { dev_err(dev, "failed to get recommended opp instance\n"); return PTR_ERR(new_opp); } - new_freq = dev_pm_opp_get_freq(new_opp); dev_pm_opp_put(new_opp); - old_freq = bus->curr_freq; - - if (old_freq == new_freq) - return 0; - /* Change the frequency according to new OPP level */ mutex_lock(&bus->lock); + ret = dev_pm_opp_set_rate(dev, *freq); + if (!ret) + bus->curr_freq = *freq; - ret = clk_set_rate(bus->clk, new_freq); - if (ret < 0) { - dev_err(dev, "failed to set the clock of bus\n"); - goto out; - } - - *freq = new_freq; - bus->curr_freq = new_freq; - - dev_dbg(dev, "Set the frequency of bus (%luHz -> %luHz, %luHz)\n", - old_freq, new_freq, clk_get_rate(bus->clk)); -out: mutex_unlock(&bus->lock); return ret; @@ -258,21 +209,19 @@ static int exynos_bus_parent_parse_of(struct device_node *np, struct exynos_bus *bus) { struct device *dev = bus->dev; + struct opp_table *opp_table; + const char *vdd = "vdd"; int i, ret, count, size; - /* Get the regulator to provide each bus with the power */ - bus->regulator = devm_regulator_get(dev, "vdd"); - if (IS_ERR(bus->regulator)) { - dev_err(dev, "failed to get VDD regulator\n"); - return PTR_ERR(bus->regulator); - } - - ret = regulator_enable(bus->regulator); - if (ret < 0) { - dev_err(dev, "failed to enable VDD regulator\n"); + opp_table = dev_pm_opp_set_regulators(dev, &vdd, 1); + if (IS_ERR(opp_table)) { + ret = PTR_ERR(opp_table); + dev_err(dev, "failed to set regulators %d\n", ret); return ret; } + bus->opp_table = opp_table; + /* * Get the devfreq-event devices to get the current utilization of * buses. This raw data will be used in devfreq ondemand governor. @@ -313,14 +262,11 @@ static int exynos_bus_parent_parse_of(struct device_node *np, if (of_property_read_u32(np, "exynos,saturation-ratio", &bus->ratio)) bus->ratio = DEFAULT_SATURATION_RATIO; - if (of_property_read_u32(np, "exynos,voltage-tolerance", - &bus->voltage_tolerance)) - bus->voltage_tolerance = DEFAULT_VOLTAGE_TOLERANCE; - return 0; err_regulator: - regulator_disable(bus->regulator); + dev_pm_opp_put_regulators(bus->opp_table); + bus->opp_table = NULL; return ret; } @@ -511,8 +457,10 @@ static int exynos_bus_probe(struct platform_device *pdev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); err_reg: - if (!passive) - regulator_disable(bus->regulator); + if (!passive) { + dev_pm_opp_put_regulators(bus->opp_table); + bus->opp_table = NULL; + } return ret; } From patchwork Thu Jul 25 14:42:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 11058993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86678138D for ; Thu, 25 Jul 2019 14:43:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76811288FD for ; Thu, 25 Jul 2019 14:43:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A2B4289CE; Thu, 25 Jul 2019 14:43:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B021C28A09 for ; Thu, 25 Jul 2019 14:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388302AbfGYOnb (ORCPT ); Thu, 25 Jul 2019 10:43:31 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50406 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729173AbfGYOna (ORCPT ); Thu, 25 Jul 2019 10:43:30 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190725144328euoutp010074ddb21a50c9c28135e8935257c6ab~0rZDc6oqs2885228852euoutp01E for ; Thu, 25 Jul 2019 14:43:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190725144328euoutp010074ddb21a50c9c28135e8935257c6ab~0rZDc6oqs2885228852euoutp01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564065808; bh=MPIjTyHieD2gGpsaXd2KwE9jDzTxd4a6XuBnBOBEIew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ooBgOqOnzO7EXVg1IC3xJvaP1B3fCvzS7dDu63DAXZoS52Beukh1ScubKI1A2Q+Rg G0ijxxAeHizFm8u/Xmj1Fp6/9yJZr0P4kay+L/7MuSnnaLiwS4JQzu17TSkOpnI2tU cChS4Z9XhCmU/tNTBVaNccx/0XL2vYYyoGdBPG1Y= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190725144327eucas1p1d776dde6d9dc22f91efe2178e1c7b333~0rZCp0O-71363913639eucas1p1l; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DC.CA.04377.F00C93D5; Thu, 25 Jul 2019 15:43:27 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190725144326eucas1p29087ad57d52c5978525bcfb050d1a0e6~0rZB68VJ41681816818eucas1p2R; Thu, 25 Jul 2019 14:43:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725144326eusmtrp1536e6e2424dba4f504625bd025c44389~0rZBs13CY0724307243eusmtrp1D; Thu, 25 Jul 2019 14:43:26 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-96-5d39c00f8ecf Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 8F.2E.04146.E00C93D5; Thu, 25 Jul 2019 15:43:26 +0100 (BST) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190725144325eusmtip1e67b1c878f367b113fca353930459434~0rZA8xHa30248702487eusmtip1E; Thu, 25 Jul 2019 14:43:25 +0000 (GMT) From: k.konieczny@partner.samsung.com To: k.konieczny@partner.samsung.com Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 3/5] ARM: dts: exynos: add initial data for coupled regulators for Exynos5422/5800 Date: Thu, 25 Jul 2019 16:42:58 +0200 Message-Id: <20190725144300.25014-4-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190725144300.25014-1-k.konieczny@partner.samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01Se0gTcRzvd7fbnavZOYX90tCahBaoGVm/SKTIYEVBQYFUUkvPKeqUnY+y P/KxnFmppOEjsYdJY/jIV8pMSV1uYW6KotIoDLWHzSx8oFiubafUf5/7fl6/DxyFiyyEJxWn SGGUClmChC/gvexbMQVsfX0ocm9hOR81ljUQaGzhC4Ee6U0EKuiyAVQ4+R1HZvMLEg1kW0nU NDlKoGFdJR/N39MDVGbuwlCd/gOJasaGMGTJ0vCRdXkAQ7c69SRaG23koeaJPv4RkbS2qhZI m7S3+dLmZzel3T9eYdKCFi2QGsbbMOl8k/cZ8oIgNJpJiEtjlEFhVwSxxrnTycbQa5WPrWQm GA/MBy4UpPdDjfEJcGARrQFw2XqJwwsAFmk25wOBHc8D+MaSS24YjMslPE70HMBKM8uJ7Ab1 ohpzEHx6F2wp++Y0eNC+sPhjKe4Q4fQKD/brcggH4U7L4XuLyVnNsxss6hmnQUiHw+aSRYxr 84G32zucbS70cfgnqw5wGjf4tnzKecftmpzWh84CSM+ScDLbaA+i7B/hcKTUk8txhzOGlvUF 22F/8V0eh9Ph9JMCkvOqAJxQ/1onDsNewxDhyMHp3bBBF8Sdj8IVXSHg4l3h+Kwb9wRXeP+l Y6PjLIR5uSJOHQCrbO8IDnvBfFv9OpbCtvkasgjsrPhvTMV/Yyr+9T4GuBaImVQ2Uc6w+xRM eiArS2RTFfLAqKTEJmD/5frXDAvtQPf7ag+gKSDZIvTXHooUEbI09npiD4AULvEQtrbbT8Jo 2fUMRpl0WZmawLA9wIviScTCG5smLopouSyFiWeYZEa5wWKUi2cmiPksiw/3p2u1rsW7DGJc 4fcAGxE3o59zPtXV2yhlUWwYvhThPWWtS11KqbfNrQb3nt6WhWLFORk1W6jzwydOVu+YSfA7 FvI05kOl6o7Cfcx8avWc3K87IqTzq++EZnp2VJU3GX/wU0eXyd33wMjdqL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: 20190725144326eucas1p29087ad57d52c5978525bcfb050d1a0e6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144326eucas1p29087ad57d52c5978525bcfb050d1a0e6 References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marek Szyprowski Declare Exynos5422/5800 voltage ranges for opp points for big cpu core and bus wcore and couple their voltage supllies as vdd_arm and vdd_int should be in 300mV range. Signed-off-by: Marek Szyprowski [k.konieczny: add missing patch description] Signed-off-by: Kamil Konieczny Reviewed-by: Chanwoo Choi --- arch/arm/boot/dts/exynos5420.dtsi | 34 +++++++++---------- arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 4 +++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 +++ arch/arm/boot/dts/exynos5800.dtsi | 32 ++++++++--------- 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 5fb2326875dc..0cbf74750553 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -48,62 +48,62 @@ opp-shared; opp-1800000000 { opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <1250000>; + opp-microvolt = <1250000 1250000 1500000>; clock-latency-ns = <140000>; }; opp-1700000000 { opp-hz = /bits/ 64 <1700000000>; - opp-microvolt = <1212500>; + opp-microvolt = <1212500 1212500 1500000>; clock-latency-ns = <140000>; }; opp-1600000000 { opp-hz = /bits/ 64 <1600000000>; - opp-microvolt = <1175000>; + opp-microvolt = <1175000 1175000 1500000>; clock-latency-ns = <140000>; }; opp-1500000000 { opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <1137500>; + opp-microvolt = <1137500 1137500 1500000>; clock-latency-ns = <140000>; }; opp-1400000000 { opp-hz = /bits/ 64 <1400000000>; - opp-microvolt = <1112500>; + opp-microvolt = <1112500 1112500 1500000>; clock-latency-ns = <140000>; }; opp-1300000000 { opp-hz = /bits/ 64 <1300000000>; - opp-microvolt = <1062500>; + opp-microvolt = <1062500 1062500 1500000>; clock-latency-ns = <140000>; }; opp-1200000000 { opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <1037500>; + opp-microvolt = <1037500 1037500 1500000>; clock-latency-ns = <140000>; }; opp-1100000000 { opp-hz = /bits/ 64 <1100000000>; - opp-microvolt = <1012500>; + opp-microvolt = <1012500 1012500 1500000>; clock-latency-ns = <140000>; }; opp-1000000000 { opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = < 987500>; + opp-microvolt = < 987500 987500 1500000>; clock-latency-ns = <140000>; }; opp-900000000 { opp-hz = /bits/ 64 <900000000>; - opp-microvolt = < 962500>; + opp-microvolt = < 962500 962500 1500000>; clock-latency-ns = <140000>; }; opp-800000000 { opp-hz = /bits/ 64 <800000000>; - opp-microvolt = < 937500>; + opp-microvolt = < 937500 937500 1500000>; clock-latency-ns = <140000>; }; opp-700000000 { opp-hz = /bits/ 64 <700000000>; - opp-microvolt = < 912500>; + opp-microvolt = < 912500 912500 1500000>; clock-latency-ns = <140000>; }; }; @@ -1100,23 +1100,23 @@ opp00 { opp-hz = /bits/ 64 <84000000>; - opp-microvolt = <925000>; + opp-microvolt = <925000 925000 1400000>; }; opp01 { opp-hz = /bits/ 64 <111000000>; - opp-microvolt = <950000>; + opp-microvolt = <950000 950000 1400000>; }; opp02 { opp-hz = /bits/ 64 <222000000>; - opp-microvolt = <950000>; + opp-microvolt = <950000 950000 1400000>; }; opp03 { opp-hz = /bits/ 64 <333000000>; - opp-microvolt = <950000>; + opp-microvolt = <950000 950000 1400000>; }; opp04 { opp-hz = /bits/ 64 <400000000>; - opp-microvolt = <987500>; + opp-microvolt = <987500 987500 1400000>; }; }; diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi index 25d95de15c9b..65d094256b54 100644 --- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi @@ -428,6 +428,8 @@ regulator-max-microvolt = <1500000>; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&buck3_reg>; + regulator-coupled-max-spread = <300000>; }; buck3_reg: BUCK3 { @@ -436,6 +438,8 @@ regulator-max-microvolt = <1400000>; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&buck2_reg>; + regulator-coupled-max-spread = <300000>; }; buck4_reg: BUCK4 { diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index e0f470fe54c8..5c1e965ed7e9 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -257,6 +257,8 @@ regulator-always-on; regulator-boot-on; regulator-ramp-delay = <12500>; + regulator-coupled-with = <&buck3_reg>; + regulator-coupled-max-spread = <300000>; regulator-state-mem { regulator-off-in-suspend; }; @@ -269,6 +271,8 @@ regulator-always-on; regulator-boot-on; regulator-ramp-delay = <12500>; + regulator-coupled-with = <&buck2_reg>; + regulator-coupled-max-spread = <300000>; regulator-state-mem { regulator-off-in-suspend; }; diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi index 57d3b319fd65..2a74735d161c 100644 --- a/arch/arm/boot/dts/exynos5800.dtsi +++ b/arch/arm/boot/dts/exynos5800.dtsi @@ -22,61 +22,61 @@ &cluster_a15_opp_table { opp-1700000000 { - opp-microvolt = <1250000>; + opp-microvolt = <1250000 1250000 1500000>; }; opp-1600000000 { - opp-microvolt = <1250000>; + opp-microvolt = <1250000 1250000 1500000>; }; opp-1500000000 { - opp-microvolt = <1100000>; + opp-microvolt = <1100000 1100000 1500000>; }; opp-1400000000 { - opp-microvolt = <1100000>; + opp-microvolt = <1100000 1100000 1500000>; }; opp-1300000000 { - opp-microvolt = <1100000>; + opp-microvolt = <1100000 1100000 1500000>; }; opp-1200000000 { - opp-microvolt = <1000000>; + opp-microvolt = <1000000 1000000 1500000>; }; opp-1100000000 { - opp-microvolt = <1000000>; + opp-microvolt = <1000000 1000000 1500000>; }; opp-1000000000 { - opp-microvolt = <1000000>; + opp-microvolt = <1000000 1000000 1500000>; }; opp-900000000 { - opp-microvolt = <1000000>; + opp-microvolt = <1000000 1000000 1500000>; }; opp-800000000 { - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; }; opp-700000000 { - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; }; opp-600000000 { opp-hz = /bits/ 64 <600000000>; - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; clock-latency-ns = <140000>; }; opp-500000000 { opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; clock-latency-ns = <140000>; }; opp-400000000 { opp-hz = /bits/ 64 <400000000>; - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; clock-latency-ns = <140000>; }; opp-300000000 { opp-hz = /bits/ 64 <300000000>; - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; clock-latency-ns = <140000>; }; opp-200000000 { opp-hz = /bits/ 64 <200000000>; - opp-microvolt = <900000>; + opp-microvolt = <900000 900000 1500000>; clock-latency-ns = <140000>; }; }; From patchwork Thu Jul 25 14:42:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 11059009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 574CB138D for ; Thu, 25 Jul 2019 14:43:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4846E289EF for ; Thu, 25 Jul 2019 14:43:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C516288C3; Thu, 25 Jul 2019 14:43:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFA7328A11 for ; Thu, 25 Jul 2019 14:43:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729216AbfGYOn5 (ORCPT ); Thu, 25 Jul 2019 10:43:57 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:41885 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729178AbfGYOn3 (ORCPT ); Thu, 25 Jul 2019 10:43:29 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190725144329euoutp029be3fe3d4257428b54a1b58c611ce54b~0rZEMC5cQ1162511625euoutp02i for ; Thu, 25 Jul 2019 14:43:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190725144329euoutp029be3fe3d4257428b54a1b58c611ce54b~0rZEMC5cQ1162511625euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564065809; bh=uK2H2CY5YVkbPXh3EKmhTQmAPpi5mTFt1H3u7NFbf9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l3CmL7z5bfrmJYcEou3jU5iLykE3lf99gkqAe+zrhRbXmuVgqy9DVVhJYWp6K0kSZ xOooHnS/10uAaNbvqCE8vhYUh1NU0KLc5ph1u4A7dPn5B412w6So2OjI9SgrqAWV0r CUGHIzGC1xKBfFjW8/Kt5HhfM2MeTDSvDr8Rw1Lc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190725144328eucas1p1a52860f55a3f5f69ef6fb86d25e20561~0rZDZoq2F0145701457eucas1p1I; Thu, 25 Jul 2019 14:43:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 8E.CA.04377.F00C93D5; Thu, 25 Jul 2019 15:43:27 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190725144327eucas1p1c799f61c7ff5c926002c4da846c048a6~0rZCqt6pJ2619726197eucas1p1f; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725144327eusmtrp11adc7a58e2e33ee9de97d84a1c7527cd~0rZCcnnlg0724307243eusmtrp1F; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-98-5d39c00f84a9 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B0.3E.04146.F00C93D5; Thu, 25 Jul 2019 15:43:27 +0100 (BST) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190725144326eusmtip1e790de2bfdd22725206e38e615e047fd~0rZBqWG_I0248702487eusmtip1F; Thu, 25 Jul 2019 14:43:26 +0000 (GMT) From: k.konieczny@partner.samsung.com To: k.konieczny@partner.samsung.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 4/5] dt-bindings: devfreq: exynos-bus: remove unused property Date: Thu, 25 Jul 2019 16:42:59 +0200 Message-Id: <20190725144300.25014-5-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190725144300.25014-1-k.konieczny@partner.samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTURzHd3bv3b1Kq7tpeNCynBQmmSVBZyTRky5RYEH/FKErbypuU3db ZgX56Klp9nROUwstW1PnfGSmZms4a+l8kBk+EMokUyGUKClt27XHf5/z/X1/Tw6FSQcJXypO fYLVqBVKmcgTr2/74QhZ0io/sv7BWzmq1lUR6N3MGIGKrZ0EymmZB+jahy8YcjhMJOpInyCR +UMfgXobC0VoOtsKkM7RIkQV1iESlb3rFqKBtHIRmvjeIUQXmq0kmuurxlHNSJtoq5QxFhkB YzZcETE1peeYF1NNQian1gAYW/8TITNt9o8gD3mGR7PKuJOsJnRLlGds5dO9iUPUqTvNxUQq eElmAg8K0hth5+ViPBN4UlK6HMD+yTuAf8wAmGsaJVwuKT0N4Pin438yunofi3jTQwCzqr4J /2Y8mnrtriuiV8Fa3Wc3e9OB8OZwHuYyYfQPHJp6q90BL/oAdNzvAC7GnQlmY6uzLEWJ6Z3w fc1SvtsKeKXhGe5iD3oX/JVW4baLaQl8lf/RrWNOT0ZdAcb7J0nYXC7heSdML7WLePaC47ba hZ2XQfvNqzjPyXD0Xg7pmg3S5wEcufR1IbAZvrR1E655MHoNrGoM5eVtsG+sHnPJkF7sPJeE H2ExvFGftyCL4eWLUt4dAovm3xA8+8HM+coFZmDGt24yFwTo/1tG/98y+n99SwBmAD6sllPF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Ss1NT C1KLYPqYODilGhgntx/pFYt/tCqhcZ37tjan2T+F+Z8LzI8O2Pfi9pmYTRXBMQnBngn7nP9G tvJzaPW+5LVNWbhP9f/fedsYHbgMLy/QeHWfJTzkHGfzCbumVYs+ymzWc11/tc9jlu2yn08C RTfUbjVlFLgyoWnP7ktPPp5q+qV3cWX9O/4pl1Yopn86bLtDeNN+JZbijERDLeai4kQAZmtr vt4CAAA= X-CMS-MailID: 20190725144327eucas1p1c799f61c7ff5c926002c4da846c048a6 X-Msg-Generator: CA X-RootMTR: 20190725144327eucas1p1c799f61c7ff5c926002c4da846c048a6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144327eucas1p1c799f61c7ff5c926002c4da846c048a6 References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unused DT property "exynos,voltage-tolerance". Signed-off-by: Kamil Konieczny Acked-by: Chanwoo Choi --- Documentation/devicetree/bindings/devfreq/exynos-bus.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/devfreq/exynos-bus.txt b/Documentation/devicetree/bindings/devfreq/exynos-bus.txt index f8e946471a58..e71f752cc18f 100644 --- a/Documentation/devicetree/bindings/devfreq/exynos-bus.txt +++ b/Documentation/devicetree/bindings/devfreq/exynos-bus.txt @@ -50,8 +50,6 @@ Required properties only for passive bus device: Optional properties only for parent bus device: - exynos,saturation-ratio: the percentage value which is used to calibrate the performance count against total cycle count. -- exynos,voltage-tolerance: the percentage value for bus voltage tolerance - which is used to calculate the max voltage. Detailed correlation between sub-blocks and power line according to Exynos SoC: - In case of Exynos3250, there are two power line as following: From patchwork Thu Jul 25 14:43:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 11058999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7786E138D for ; Thu, 25 Jul 2019 14:43:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6945728895 for ; Thu, 25 Jul 2019 14:43:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C634289BD; Thu, 25 Jul 2019 14:43:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2652288FD for ; Thu, 25 Jul 2019 14:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388371AbfGYOnk (ORCPT ); Thu, 25 Jul 2019 10:43:40 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50432 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388192AbfGYOnb (ORCPT ); Thu, 25 Jul 2019 10:43:31 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190725144329euoutp011c008cdd4ec8368e4bec8d15319e8616~0rZE7jEEL2892628926euoutp01A for ; Thu, 25 Jul 2019 14:43:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190725144329euoutp011c008cdd4ec8368e4bec8d15319e8616~0rZE7jEEL2892628926euoutp01A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564065809; bh=Ez/2lzRMCN6NYZ3shai8lT9fBiOe6bECqNjf1prjnCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTEG5QgvwTIn1g0GOSty/TacUPIcbv3PObP1o+vt6wn93gOiZbY+5MuHIOry8CtSm DDaMQ2eOfg+45eA2wISzUo3sPVWIN4pVThtuNOCkjZXoQERvb7KKAB7e0gM/yLpvQy 96Aco2O1r3epLY5i14uy4EB0jXpBtLiLWEaKCqHg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190725144329eucas1p163aba4ebd10cc83e128eed6d203b7179~0rZEJYqdz1363913639eucas1p1n; Thu, 25 Jul 2019 14:43:29 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DF.CA.04377.010C93D5; Thu, 25 Jul 2019 15:43:28 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190725144328eucas1p1e16c826c18c79af8f9c7283a896266a6~0rZDanIGf0147401474eucas1p1F; Thu, 25 Jul 2019 14:43:28 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725144328eusmtrp1a5fc98181a4d56eaceea38f4e1307752~0rZDMah3m0724307243eusmtrp1I; Thu, 25 Jul 2019 14:43:28 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-9c-5d39c010631d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 32.3E.04146.F00C93D5; Thu, 25 Jul 2019 15:43:27 +0100 (BST) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190725144327eusmtip121f6b8fce50ae8e3f4098bf36862baac~0rZCZ9l5S0146301463eusmtip1n; Thu, 25 Jul 2019 14:43:27 +0000 (GMT) From: k.konieczny@partner.samsung.com To: k.konieczny@partner.samsung.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 5/5] devfreq: exynos-bus: remove exynos_bus_passive_target() Date: Thu, 25 Jul 2019 16:43:00 +0200 Message-Id: <20190725144300.25014-6-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190725144300.25014-1-k.konieczny@partner.samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDKsWRmVeSWpSXmKPExsWy7djPc7oCByxjDR591LHYOGM9q8X1L89Z LeYfOcdq0bfvP6NF/+PXzBbnz29gtzjb9IbdYtPja6wWl3fNYbP43HuE0WLG+X1MFmuP3GW3 WHr9IpPF7cYVbBZvfpxlsmjde4Td4t+1jSwWmx8cY3MQ8lgzbw2jx6ZVnWwem5fUexx8t4fJ o2/LKkaP4ze2M3l83iQXwB7FZZOSmpNZllqkb5fAlTF9nn/Bd8GKq2fKGhg/8HUxcnJICJhI fJo3l7GLkYtDSGAFo8Su11PYIZwvjBIdD46yQjifGSV+XlvECNPy9N1NqJbljBL3js5FaJm3 9iwLSBWbgKrElhkv2UFsEQFlicn3pjODFDEL/GSR2HB5I1hCWCBQ4u2292ANLEANxy/+ZgKx eQVcJD583Qi1Tl6ic8dusBpOAVeJv41rGSFqBCVOznwCFmcGqmneOpsZov4tu8SyKWkQtotE 29o2VghbWOLV8S3sELaMxOnJPSwQdrnE04V9YB9ICLQwSjxo/wiV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1kvNz NzECI3LbsZ+bdzBe2hh8iFGAg1GJh/fCcstYIdbEsuLK3EOMEhzMSiK8W3cAhXhTEiurUovy 44tKc1KLDzGaAj0xkVlKNDkfmCzySuINTQ3NLSwNzY3Njc0slMR5OwQOxggJpCeWpGanphak FsH0MXFwSjUwhhV98FsWeuBalaGP+JXD5jenLe04GPzQ+OP95j+3UzWt/6RPfsT/Pm/6x6R1 yyMeOs289/7Hm8i9VU3W6wQyV50+lPe9/tbmXVfPc19+FrOWc9/+5b8if/23nv6YOe5tkHSH eFLVZQc9ThGtL7wHzsm9qnW4YR75Y8ODtyxPGS/dCkjunTH30yUlluKMREMt5qLiRABvQ0sS 3gIAAA== X-CMS-MailID: 20190725144328eucas1p1e16c826c18c79af8f9c7283a896266a6 X-Msg-Generator: CA X-RootMTR: 20190725144328eucas1p1e16c826c18c79af8f9c7283a896266a6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144328eucas1p1e16c826c18c79af8f9c7283a896266a6 References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both functions exynos_bus_passive_target() and exynos_bus_target() have the same code, so remove exynos_bus_passive_target(). In exynos_bus_probe() replace it with exynos_bus_target. Suggested-by: Chanwoo Choi Signed-off-by: Kamil Konieczny --- This patch is new to this series. --- drivers/devfreq/exynos-bus.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index ebb8f46312b6..2aeb6cc07960 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -91,7 +91,7 @@ static int exynos_bus_get_event(struct exynos_bus *bus, } /* - * Must necessary function for devfreq simple-ondemand governor + * devfreq function for both simple-ondemand and passive governor */ static int exynos_bus_target(struct device *dev, unsigned long *freq, u32 flags) { @@ -167,36 +167,6 @@ static void exynos_bus_exit(struct device *dev) } } -/* - * Must necessary function for devfreq passive governor - */ -static int exynos_bus_passive_target(struct device *dev, unsigned long *freq, - u32 flags) -{ - struct exynos_bus *bus = dev_get_drvdata(dev); - struct dev_pm_opp *new_opp; - int ret; - - /* Get correct frequency for bus. */ - new_opp = devfreq_recommended_opp(dev, freq, flags); - if (IS_ERR(new_opp)) { - dev_err(dev, "failed to get recommended opp instance\n"); - return PTR_ERR(new_opp); - } - - dev_pm_opp_put(new_opp); - - /* Change the frequency according to new OPP level */ - mutex_lock(&bus->lock); - ret = dev_pm_opp_set_rate(dev, *freq); - if (!ret) - bus->curr_freq = *freq; - - mutex_unlock(&bus->lock); - - return ret; -} - static void exynos_bus_passive_exit(struct device *dev) { struct exynos_bus *bus = dev_get_drvdata(dev); @@ -417,7 +387,7 @@ static int exynos_bus_probe(struct platform_device *pdev) goto out; passive: /* Initialize the struct profile and governor data for passive device */ - profile->target = exynos_bus_passive_target; + profile->target = exynos_bus_target; profile->exit = exynos_bus_passive_exit; /* Get the instance of parent devfreq device */