All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhuyinbo <zhuyinbo@loongson.cn>
To: Stephen Boyd <sboyd@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, kernel test robot <lkp@intel.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Jianmin Lv <lvjianmin@loongson.cn>,
	Liu Peibao <liupeibao@loongson.cn>,
	wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn,
	zhuyinbo@loongson.cn
Subject: Re: [PATCH v13 2/2] clk: clk-loongson2: add clock controller driver support
Date: Tue, 14 Mar 2023 09:07:16 +0800	[thread overview]
Message-ID: <958bfe5b-c7c5-3373-a904-d9a32b428e02@loongson.cn> (raw)
In-Reply-To: <61eee19400e9a45ce9543bfd92a27eaa.sboyd@kernel.org>


在 2023/3/14 上午2:20, Stephen Boyd 写道:
> Quoting Krzysztof Kozlowski (2023-03-10 00:42:47)
>> On 10/03/2023 00:47, Stephen Boyd wrote:
>>> Quoting zhuyinbo (2023-03-08 18:58:02)
>>>> 在 2023/3/8 下午8:16, kernel test robot 写道:
>>>>> Hi Yinbo,
>>>>>
>>> [...]
>>>>>      drivers/clk/clk-loongson2.c: In function 'loongson2_calc_pll_rate':
>>>>>>> drivers/clk/clk-loongson2.c:79:15: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
>>>>>         79 |         val = readq(loongson2_pll_base + offset);
>>>>>            |               ^~~~~
>>>>>            |               readl
>>>>>      cc1: some warnings being treated as errors
>>>> The CONFIG_64BIT not enabled in your config file, I will add a depend on
>>>> "CONFIG_64BIT" in my clock driver to fix this compile error.
>>> Do you need to use readq() here? Can you read two 32-bit registers with
>>> readl() and put them together for a 64-bit number?
>> If the platform supports 64-bit reads and these are actually one
>> register, then readq makes sense - code is more readable, smaller, more
>> efficient.
>>
> Please read the section in Documentation/driver-api/device-io.rst about
> hi_lo_readq() and <linux/io-64-nonatomic-lo-hi.h>. We shouldn't need to
> restrict the driver to CONFIG_64BIT. Instead, include one of these
> header files to get the IO access primitives.

okay, I got it.

Thanks your advice!


  reply	other threads:[~2023-03-14  1:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 11:50 [PATCH v13 1/2] dt-bindings: clock: add loongson-2 boot clock index Yinbo Zhu
2023-03-07 11:50 ` [PATCH v13 2/2] clk: clk-loongson2: add clock controller driver support Yinbo Zhu
2023-03-08 12:16   ` kernel test robot
2023-03-09  2:58     ` zhuyinbo
2023-03-09  3:18       ` zhuyinbo
2023-03-09  6:09         ` Krzysztof Kozlowski
2023-03-09  6:27           ` zhuyinbo
2023-03-09  6:37             ` Krzysztof Kozlowski
2023-03-09  6:09       ` Krzysztof Kozlowski
2023-03-09 23:47       ` Stephen Boyd
2023-03-10  8:42         ` Krzysztof Kozlowski
2023-03-13 18:20           ` Stephen Boyd
2023-03-14  1:07             ` zhuyinbo [this message]
2023-03-14  6:49             ` Krzysztof Kozlowski
2023-03-15  0:26               ` Stephen Boyd
2023-03-07 12:47 ` [PATCH v13 1/2] dt-bindings: clock: add loongson-2 boot clock index Krzysztof Kozlowski
2023-03-08  1:35   ` zhuyinbo
2023-03-08  8:37     ` Krzysztof Kozlowski
2023-03-08  9:24       ` zhuyinbo
2023-03-08 10:38         ` Krzysztof Kozlowski
2023-03-09  1:43           ` zhuyinbo
2023-03-09  6:25             ` Krzysztof Kozlowski
2023-03-09 12:44               ` zhuyinbo
2023-03-09 16:12                 ` Krzysztof Kozlowski
2023-03-10  2:07                   ` zhuyinbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=958bfe5b-c7c5-3373-a904-d9a32b428e02@loongson.cn \
    --to=zhuyinbo@loongson.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=lkp@intel.com \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=mturquette@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wanghongliang@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.