From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbcHAKbr (ORCPT ); Mon, 1 Aug 2016 06:31:47 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:59545 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbcHAKbi (ORCPT ); Mon, 1 Aug 2016 06:31:38 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68e-f79cb6d000006cfe-43-579f24f84e12 Content-transfer-encoding: 8BIT Message-id: <579F24F8.8060002@samsung.com> Date: Mon, 01 Aug 2016 19:31:20 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: hl , heiko@sntech.de Cc: tixy@linaro.org, typ@rock-chips.com, airlied@linux.ie, mturquette@baylibre.com, dbasehore@chromium.org, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, dianders@chromium.org, linux-rockchip@lists.infradead.org, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com Subject: Re: [PATCH v4 5/7] PM / devfreq: event: support rockchip dfi controller References: <1469779021-10426-1-git-send-email-hl@rock-chips.com> <1469779021-10426-6-git-send-email-hl@rock-chips.com> <579EFD28.5070404@samsung.com> <579F0387.5070303@samsung.com> <579F07D9.1050106@rock-chips.com> In-reply-to: <579F07D9.1050106@rock-chips.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsWyRsSkUPeHyvxwg9cTzS16z51ksni1eQ+b xdllB9ksrnx9z2bx/9FrVosfG04xW5xtesNusenxNVaLy7vmsFl8evCf2WLHlANMFhdPuVrc blzBZvHjTDeLxcL599ktZq+ucxDweH+jld1jdsNFFo/Lfb1MHneu7WHz2P7tAavH/e7jTB6b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9KCmWJOaVAoYDE4mIlfTtME0JD3HQtYBojdH1DguB6 jAzQQMIaxowtc5azFjRoVPTcm8vUwHhBoYuRk0NCwETizpwn7BC2mMSFe+vZuhi5OIQEZjFK fFm5nxkkwSsgKPFj8j2WLkYODmYBeYkjl7IhTHWJKVNyIcofMEqsX9fDClGuJbHlzitGEJtF QFVi6eFbLCA2G1B8/4sbbCC9ogIREt0nKkHCIgLaEqeenmcCmcMs8INJYl7fLrBeYYEAidZT M1ghFmxkkng1bRbYPZwCehIrWhtZJjACXYlw3iyE82YhnLeAkXkVo0RqQXJBcVJ6rmFearle cWJucWleul5yfu4mRnCaeSa1g/HgLvdDjAIcjEo8vAn+88KFWBPLiitzDzFKcDArifA6KMwP F+JNSaysSi3Kjy8qzUktPsRoCvTfRGYp0eR8YArMK4k3NDYxM7I0Mje0MDI2VxLnffx/XZiQ QHpiSWp2ampBahFMHxMHp1QDo8kmdnlVfpnt8l8ir5RMTdh85UTEqUeH3d8EpGtMVVyndsdl VduP41PvRDyYUHdyyo0wrhqVBTo2sX7mAjP13FmEb5n/1/prt2VKxhE2hicX13OVdvgs9Fhd bzy/1D911gOzky992xLmfA55fmTCgfKCLbq9/P6e5cJrRVctZrqocObYd2tWfSWW4oxEQy3m ouJEAIkVwCNJAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lin, On 2016년 08월 01일 17:27, hl wrote: > Hi Chanwoo Choi, > > On 2016年08月01日 16:08, Chanwoo Choi wrote: >> Hi Lin, >> >> I add the one minor comment for full name of 'DRI'. >> >> On 2016년 08월 01일 16:41, Chanwoo Choi wrote: >>> Hi Lin, >>> >>> Because you remove the 'RFC' prefix on patch title, >>> I think that you better to make the documentation as following: >>> - Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt >>> >>> Regards, >>> Chanwoo Choi >>> >>> On 2016년 07월 29일 16:56, Lin Huang wrote: >>>> on rk3399 platform, there is dfi conroller can monitor >>>> ddr load, base on this result, we can do ddr freqency >>>> scaling. >>>> >>>> Signed-off-by: Lin Huang >>>> Acked-by: Chanwoo Choi >>>> --- >>>> Changes in v4: >>>> - None >>>> >>>> Changes in v3: >>>> - None >>>> >>>> Changes in v2: >>>> - use clk_disable_unprepare and clk_enable_prepare >>>> - remove clk_enable_prepare in probe >>>> - remove rockchip_dfi_remove function >>>> >>>> Changes in v1: >>>> - None >>>> >>>> drivers/devfreq/event/Kconfig | 7 + >>>> drivers/devfreq/event/Makefile | 1 + >>>> drivers/devfreq/event/rockchip-dfi.c | 253 +++++++++++++++++++++++++++++++++++ >>>> 3 files changed, 261 insertions(+) >>>> create mode 100644 drivers/devfreq/event/rockchip-dfi.c >>>> >>>> diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig >>>> index a11720a..ff9279f 100644 >>>> --- a/drivers/devfreq/event/Kconfig >>>> +++ b/drivers/devfreq/event/Kconfig >>>> @@ -22,4 +22,11 @@ config DEVFREQ_EVENT_EXYNOS_PPMU >>>> (Platform Performance Monitoring Unit) counters to estimate the >>>> utilization of each module. >>>> +config DEVFREQ_EVENT_ROCKCHIP_DFI >>>> + tristate "ROCKCHIP DFI DEVFREQ event Driver" >>>> + depends on ARCH_ROCKCHIP >>>> + help >>>> + This add the devfreq-event driver for Rockchip SoC. It provides DFI >>>> + (DDR Monitor Module) driver to count ddr load. >> The DFI is "DDR Monitor Module" full name? I need the correct abbreviation >> and full name. > We just call this module DFI in datasheet, and this module function is ddr monitor module, > yes, it is do not fit the full name, but i think it is better follow the datasheet name. Are there any full name of DFI? If the people who don't know the detailed history about this workd (DFI), it causes the confusion and they don't understand it. I think that if you want to use the DFI work, you need to add the more detailed description why DFI word is used. >> >>>> + >>>> endif # PM_DEVFREQ_EVENT >>>> diff --git a/drivers/devfreq/event/Makefile b/drivers/devfreq/event/Makefile >>>> index be146ea..e3f88fc 100644 >>>> --- a/drivers/devfreq/event/Makefile >>>> +++ b/drivers/devfreq/event/Makefile >>>> @@ -1,2 +1,3 @@ >>>> # Exynos DEVFREQ Event Drivers >>>> obj-$(CONFIG_DEVFREQ_EVENT_EXYNOS_PPMU) += exynos-ppmu.o >>>> +obj-$(CONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI) += rockchip-dfi.o >>>> diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c >>>> new file mode 100644 >>>> index 0000000..96a0307 >>>> --- /dev/null >>>> +++ b/drivers/devfreq/event/rockchip-dfi.c >>>> @@ -0,0 +1,253 @@ >>>> +/* >>>> + * Copyright (c) 2016, Fuzhou Rockchip Electronics Co., Ltd >>>> + * Author: Lin Huang >>>> + * >>>> + * This program is free software; you can redistribute it and/or modify it >>>> + * under the terms and conditions of the GNU General Public License, >>>> + * version 2, as published by the Free Software Foundation. >>>> + * >>>> + * This program is distributed in the hope it will be useful, but WITHOUT >>>> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or >>>> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for >>>> + * more details. >>>> + */ >>>> + >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +#define RK3399_DMC_NUM_CH 2 >>>> + >>>> +/* DDRMON_CTRL */ >>>> +#define DDRMON_CTRL 0x04 >>>> +#define CLR_DDRMON_CTRL (0x1f0000 << 0) >>>> +#define LPDDR4_EN (0x10001 << 4) >>>> +#define HARDWARE_EN (0x10001 << 3) >>>> +#define LPDDR3_EN (0x10001 << 2) >>>> +#define SOFTWARE_EN (0x10001 << 1) >>>> +#define TIME_CNT_EN (0x10001 << 0) [snip] >>>> +}; >>>> +module_platform_driver(rockchip_dfi_driver); >>>> + >>>> +MODULE_LICENSE("GPL v2"); >>>> +MODULE_AUTHOR("Lin Huang "); >>>> +MODULE_DESCRIPTION("Rockchip dfi driver"); >> s/dfi -> DFI You should use the capital letter. Regards, Chanwoo Choi