Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4276003imb; Wed, 6 Mar 2019 09:22:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwikBLZmEeXPijG8EzKN0ENM7FiFXJwH9QqRlNLKS9X4GyZpD9XVbb98mr2hZr2NqBGz4Ij X-Received: by 2002:a63:fb0b:: with SMTP id o11mr7109291pgh.222.1551892940488; Wed, 06 Mar 2019 09:22:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551892940; cv=none; d=google.com; s=arc-20160816; b=Kw4Z1wDMoGjSnG0NH0DowMiZRsKGLyhFoMZ7eLOwOO9LZxIjkrwxEDkrgHeIbcGrr1 ZX+oMm893g/TEF6M5NwWk8z4UJMvmjdziHGDgfZH9K3wGwNcNfrYSUaWGM5D5iwTOIvH Ur8cab73ERPXOH7L48+P6PbuGKbdtbcah9rFDOGjevNFFdZPr2Xh3hGKW4lym6SixTwT FnC3DwObNDzTBEn33dTX7R737/4iZ9zfL6qM5OKDsQun/qxzI39BpL87FRhZBuhOwqkz 5oTdwx4NvKO5E784ui9fl9ySuDri8oOhJYMesag7njXHPJ11ECQMki6b2iuxZlfPEMA2 MyfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:user-agent :date:message-id:from:cc:to:subject:mime-version:dkim-signature :dkim-filter; bh=6duZa4a6laUJqISW9VdHFj6EKyGAejKTKO9V5iOBXqA=; b=jDr+zLDG/eo5rMOFVnjoBWnCD6W0eaYajsSyBCP0715SUC3/4BWQy6flM55dcFZGrC ThUwB9g6VM4C6sZUT44Q12ysTNSJExw1+A2Bp2uXlSHXgU3frZcVkQZEOUIA5/p9SDiZ Q12LW8uT2iJf3HyEEb6hatg4mu6oAKDK/xfm5ZViUMukQJPWLgM+jrsS2r29wZzgnwlx 25nO7UazOpp/OnGAZdaSlf6teOhMVlM15BvvzNskk+GxZuzS6O0sKvKYK8k2BDcaIXf4 oVHaNurnH9Lh4She8dXC1C4WYOZxiwSbrLONDGRWdUwh3PFhjU11oCNRcs8c5BfcMxjX syRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MQJLkc9T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si1924648plp.100.2019.03.06.09.21.50; Wed, 06 Mar 2019 09:22:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MQJLkc9T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbfCFNos (ORCPT + 99 others); Wed, 6 Mar 2019 08:44:48 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:43899 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfCFNos (ORCPT ); Wed, 6 Mar 2019 08:44:48 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190306134445epoutp013ac6c7c97cd6854b7f5e117df4225cff~JYoiEygeg1082310823epoutp01T; Wed, 6 Mar 2019 13:44:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190306134445epoutp013ac6c7c97cd6854b7f5e117df4225cff~JYoiEygeg1082310823epoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1551879885; bh=6duZa4a6laUJqISW9VdHFj6EKyGAejKTKO9V5iOBXqA=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=MQJLkc9TUzj5J+kFNcgvtlydf+pbEKUFVDlzb42Xoh6ppVMkWpPKMS1de36ZPShXV qoPwy8tiLXk8ISa53tcWAo4/FMKFOjYNOtByUNetOQFHCG5IuasnLpTZn6aiikrRn5 zflcixEfBGpt64ZLpK5hTZjuAOGwC5AUazoDK908= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190306134444epcas1p4de505f8c84114b7fe63aba95433e12af~JYohUJD2g2683826838epcas1p4Z; Wed, 6 Mar 2019 13:44:44 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id E5.9F.04206.CCECF7C5; Wed, 6 Mar 2019 22:44:44 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190306134443epcas1p3369ab4d36dfdf57bab174a23a65ae21b~JYohBoOg01336913369epcas1p39; Wed, 6 Mar 2019 13:44:43 +0000 (GMT) X-AuditID: b6c32a39-d7dff7000000106e-8a-5c7fcecc8cfd Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B6.87.04015.BCECF7C5; Wed, 6 Mar 2019 22:44:43 +0900 (KST) MIME-version: 1.0 Content-type: text/plain; charset="utf-8" Received: from [106.116.147.40] by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PNY006UL6656Y20@mmp1.samsung.com>; Wed, 06 Mar 2019 22:44:43 +0900 (KST) Subject: Re: [PATCH v4 4/8] drivers: devfreq: add DMC driver for Exynos5422 To: cwchoi00@gmail.com, Lukasz Luba Cc: devicetree , linux-kernel , Linux PM list , linux-samsung-soc , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kukjin Kim , Chanwoo Choi , Kyungmin Park , Marek Szyprowski , MyungJoo Ham , linux-arm-kernel From: Sylwester Nawrocki Message-id: <94e169cf-4dc2-82ec-1385-852bc7853931@samsung.com> Date: Wed, 06 Mar 2019 14:44:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 In-reply-to: Content-language: en-GB Content-transfer-encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPKsWRmVeSWpSXmKPExsWy7bCmvu6Zc/UxBssXcVpsnLGe1eL6l+es Fs+OalvMP3KO1aL/8Wtmi/PnN7BbnG16w25xq0HGYtPja6wWl3fNYbP43HuE0WLG+X1MFmuP 3GW3uN24gs2Bz2PnrLvsHptWdbJ5bF5S73Hw3R4mj74tqxg9Pm+SC2CL4rJJSc3JLEst0rdL 4MponfWXqaBNqGLa4assDYx/eLsYOTkkBEwkWrecZO1i5OIQEtjBKPG85wgzhPOdUeLr60YW mKrzs/9AJXYzSkz98oodJMErICjxY/I9sCJmAU2JF18msUAU3WeUeLn0BTNIQljAW2Jtx3Iw W0TAQaK34QAbSBGzwFIWiflLt7KBJNgEDCV6j/YxdjFyAE21kzi1gxUkzCKgKjHj4QJGEFtU IELi/dPdYMs4BYIlJv7qZYJYLC5x7P5NRghbXuLgledQV/ezSyxcagBhuwB9cxtsvISAtMSl o7YQ4WqJXdu7wR6TEOhglGi5sJ0ZImEtcfj4RVaImXwS7772sEL08kp0tAlBmB4Sp/amQLy7 jEni89bvbBMYZWYhBcsspGCZheTSWUguXcDIsopRLLWgODc9tdiwwFSvODG3uDQvXS85P3cT IzjZaFnuYDx2zucQowAHoxIP74TWuhgh1sSy4srcQ4wSHMxKIrzua+pjhHhTEiurUovy44tK c1KLD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uV5bP/TYz/J7hOiWW4oxEQy3mouJEAOROfCejAgAA X-CMS-MailID: 20190306134443epcas1p3369ab4d36dfdf57bab174a23a65ae21b CMS-TYPE: 101P X-CMS-RootMailID: 20190201164720eucas1p13aac6550399d240b261a2cbe489d3dfc References: <1549039612-28905-1-git-send-email-l.luba@partner.samsung.com> <1549039612-28905-5-git-send-email-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2/3/19 13:23, Chanwoo Choi wrote: > 2019년 2월 2일 (토) 오전 2:42, Lukasz Luba 님이 작성: >> +/** >> + * exynos5_dmc_pause_on_switching() - Controls a pause feature in DMC >> + * @dmc: device which is used for changing this feature >> + * @set: a boolean state passing enable/disable request >> + * >> + * There is a need of pausing DREX DMC when divider or MUX in clock tree >> + * changes its configuration. In such situation access to the memory is blocked >> + * in DMC automatically. This feature is used when clock frequency change >> + * request appears and touches clock tree. >> + */ >> +static int exynos5_dmc_pause_on_switching(struct exynos5_dmc *dmc, bool set) > > Don't need to make it as the separate function. It is only used on > probe() function. It seems fine to me to have this functionality in a separate function, it's self-contained and it's now pretty well documented. >> +{ >> + unsigned int val; >> + >> + val = readl(dmc->base_clk + DMC_PAUSE_CTRL); >> + if (set) >> + val |= DMC_PAUSE_ENABLE; >> + else >> + val &= ~DMC_PAUSE_ENABLE; >> + writel(val, dmc->base_clk + DMC_PAUSE_CTRL); > > The dt-binding file doesn't explain the 'reg' property for 'base_clk'. > You are missing. > When I tried to find what are the base address, it is the register map > of clock-controller. > This driver accesed the register of clock controller without any > functions of CCF > (common clock framework). It is wrong. > > If you need to get the some information of clock, must have to use the CCF. We talked a little about this issue with Lukasz in person and it looks like there are some DMC related registers in the clock controller register region, I'd say those registers are better handled by the DMC driver rather than the clocks controller driver. Moreover, we should avoid abusing clk API for not strictly clocks related functionality as it appears to be above. It might be more appropriate to add in the dmc DT node a phandle to a regmap exposed by the clock-controller node. It seems there will be even no single register that would be shared between the DMC and the clock controller. -- Regards, Sylwester