Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 344B6C7618B for ; Tue, 14 Mar 2023 01:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbjCNBH6 (ORCPT ); Mon, 13 Mar 2023 21:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjCNBHZ (ORCPT ); Mon, 13 Mar 2023 21:07:25 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3BB24867F4; Mon, 13 Mar 2023 18:07:22 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8AxJ_DJyA9k1QkMAA--.16763S3; Tue, 14 Mar 2023 09:07:22 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxY+XEyA9kgNZWAA--.49244S3; Tue, 14 Mar 2023 09:07:21 +0800 (CST) Subject: Re: [PATCH v13 2/2] clk: clk-loongson2: add clock controller driver support To: Stephen Boyd , Krzysztof Kozlowski , Michael Turquette , Rob Herring , devicetree@vger.kernel.org, kernel test robot , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, Jianmin Lv , Liu Peibao , wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230307115022.12846-2-zhuyinbo@loongson.cn> <202303082037.QPfBP64A-lkp@intel.com> <61eee19400e9a45ce9543bfd92a27eaa.sboyd@kernel.org> From: zhuyinbo Message-ID: <958bfe5b-c7c5-3373-a904-d9a32b428e02@loongson.cn> Date: Tue, 14 Mar 2023 09:07:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <61eee19400e9a45ce9543bfd92a27eaa.sboyd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8AxY+XEyA9kgNZWAA--.49244S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFWrGr13tFyrGr15Jry8Grg_yoW8GFyDpa y7Aa4qkw4vqr1Uury0vr1fuFWay3yxJ3W3Xr1DG3s7ur9Y93s5Kas5K3WxW3y5Jr45Cr43 X3W8K3y3WF4Yyw7anT9S1TB71UUUUjUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bD8Fc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUGVWUXwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq 07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7 xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Y z7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCY1x0262kKe7AKxV WUAVWUtwCF04k20xvY0x0EwIxGrwCF04k20xvE74AGY7Cv6cx26rWl4I8I3I0E4IkC6x0Y z7v_Jr0_Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x 8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE 2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42 xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF 7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j09a9UUUUU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 . 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!