Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28697739rwd; Wed, 5 Jul 2023 01:02:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtRAXq5bRsPpf9QuuLOgccTFl2Vu0xJU/rQ25D2sPB5X6XRAreKngUXAWE7ciClYtZPQym X-Received: by 2002:a05:6a20:488:b0:114:7637:344f with SMTP id 8-20020a056a20048800b001147637344fmr16118192pzc.49.1688544171989; Wed, 05 Jul 2023 01:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688544171; cv=none; d=google.com; s=arc-20160816; b=jH8L2I7lubxQpynvDJuCzC2HnjIKH2NX6ITH9rap/64OBriuPtHFSlF9PN0nHpc3v2 uS+XcSJU7/0UkfS1UkkpNBsWjuJ7mVzSpskxSkt+gE/q2yf8OJ/YtSGG+ifpmoDCq9Il 70Zlf2mFcwwAS5dQSN2BBz7Hp5DwA73/ZQpQq4yp9HBmsszxCpsSp6T4D+PCol6ecAul B4UBOVKCQHZtlDbftnF5oD1//UpTL/bcSBi6Z9oIJ3HonmS5FU67WF1gX1tvQ/ieul0e bEyHCEayhDMFbE0qJDmsW2ezMqTxYK4d6yXnHB39/lTdDuj1juUxz45mforoIsQzYUi3 7X4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ahSbXOmybzQu5fGP36ZyWtK+6Q05lUTzATZaRu+HzaE=; fh=KOp5p/lLaQ03PoFoU/rvOBYpMJ+BZpyiErzqWGTrqEs=; b=KK3++ArigpYWpCOw6pj5O144X6i3Rw1hgqGGDn1r3DYAelFi8I4jL3UHBdBWNpNaEC b7aTMQomEMs1UgmEo/leTTCxeTlNuTjAUF2XMvrXviWh9tK/27LJonQtuapo9+IY1/Zd 41wNde08fq/9OmJhsg7aObsmnDPMusSzO7IU4HBrs0xKS0Q1Lb4iSs3YyhwW2Pp1Q65w NQa8Ww/Vu8UdeEvp1GBJPzxkCwVer8a6rNohrRtLFl6ZTxiXxiJ9byi+ko/qRsyCWjIA RrFLmfCIrPp7EHRadank07wtQNq/nAmotA00rTfT/CLJ9id6wWSoneyS7ExiWwGZr2vR hmfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a056a0016c500b0065ee6c40f91si23805326pfc.159.2023.07.05.01.02.37; Wed, 05 Jul 2023 01:02:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbjGEHFT (ORCPT + 99 others); Wed, 5 Jul 2023 03:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbjGEHFP (ORCPT ); Wed, 5 Jul 2023 03:05:15 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACDC5170E; Wed, 5 Jul 2023 00:05:04 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 0E8CA7FFD; Wed, 5 Jul 2023 15:04:57 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 5 Jul 2023 15:04:57 +0800 Received: from [192.168.120.57] (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 5 Jul 2023 15:04:56 +0800 Message-ID: <90b55926-1d0c-b9c0-3020-5837e2028809@starfivetech.com> Date: Wed, 5 Jul 2023 15:04:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v4 2/3] spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPI Content-Language: en-US To: Krzysztof Kozlowski , , , , CC: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Ziv Xu References: <20230704090453.83980-1-william.qiu@starfivetech.com> <20230704090453.83980-3-william.qiu@starfivetech.com> <808dac44-a72c-4675-1e4a-0ed96190efb4@linaro.org> From: William Qiu In-Reply-To: <808dac44-a72c-4675-1e4a-0ed96190efb4@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/7/5 14:21, Krzysztof Kozlowski wrote: > On 04/07/2023 11:04, William Qiu wrote: >> Add QSPI clock operation in device probe. >> >> Signed-off-by: William Qiu >> Reviewed-by: Hal Feng >> Reported-by: kernel test robot >> Closes: https://lore.kernel.org/oe-kbuild-all/202306022017.UbwjjWRN-lkp@intel.com/ >> Reported-by: Julia Lawall >> Closes: https://lore.kernel.org/r/202306040644.6ZHs55x4-lkp@intel.com/ > > >> >> @@ -1840,6 +1858,8 @@ static int cqspi_resume(struct device *dev) >> struct spi_master *master = dev_get_drvdata(dev); >> >> clk_prepare_enable(cqspi->clk); >> + if (of_device_is_compatible(dev->of_node, "starfive,jh7110-qspi")) > > Don't add compatible checks inside the code. It does not scale. We > expect compatibles to be listed only in one place - of_device_id - and > customize driver with match data / quirks / flags. > > Comment applies to all your diff hunks. > I'll use "of_device_get_match_data" to replace it. But the way I added reset before is also by compatible checks. Should I change this place to "of_device_get_match_data" as well? >> + clk_bulk_prepare_enable(cqspi->num_clks, cqspi->clks); >> cqspi_wait_idle(cqspi); >> cqspi_controller_init(cqspi); >> > > Best regards, > Krzysztof >