Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp540110rdb; Thu, 2 Nov 2023 10:33:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnJIbut2/lfIu+cVGnwfBg2VepakX3gjzakjGs84z+jRHMOzHb+1+p52RkZ3r1ww1Q104i X-Received: by 2002:a17:903:3003:b0:1cc:2376:5508 with SMTP id o3-20020a170903300300b001cc23765508mr13371895pla.34.1698946418697; Thu, 02 Nov 2023 10:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698946418; cv=none; d=google.com; s=arc-20160816; b=OBa6xriOwVwYoOtBkYxf8kzv8epV11mIqzVEV9XcVUS5iRMe/UM070LcHH6SBFVM22 dQ/SVOb/KCypLPBdYbk9WTfkblLp+9PL8tsFCODiAfHN7cG5SQ1LOf+Xpn+WJMbTKG4a P/v4tHA8w16GLHkgG3hkpc7reU2uuqsbMh2qyrUNIVNkKCMv4bIa92j3VMAL2KzA/WRn HrgMOhGrYCiSoCZI+LZlAu3PnUAa1+j/HlaWtkxME8Z+OMrzgHozT+AtNv9eAtpTPMez wIF5JK10j6fmyMJfN/bPdd+yO6GaVV17FNOSTaTdxF/hU2IWHCU93VQwUBqZb76pdSl+ kOsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QMUtaNcyMJONDb+NRTDB5A2cdiVh8ep8ZeoczkWG0cY=; fh=m5kJ7K68eeTVidLlN9bOmoHTd7rLVwAhIyCccK14kOA=; b=GIn5kStG+eHSeQ1/DYSdnsXvgLQPOayyXbaw61LXEd4dmnQ6WbaS4rHq3IpSrLkM15 UO/1SOWSwVYDOdUWpY+jbBKgmB7fTTsBVDC9Isd9TpXaTIqag5NlzqyUMIwmZiIX5BQz 1DTtwBRkkXj3lNw+jMXhqBahM9YdVRlFugGhAPMo/+Y9QV9/IiBMJxgcradi6aMave3q uT+rdvOjvg198WNFTHf4YkhWDzL7Q9mOi4kLmOJAWjWa5W8+Bwsuht6BgPGKBGUGiDNw GpWPbpAfBDClvcIagH5hXYtL9+5WsRXErPCIC0LzWz4bcsx0tYUUk77Jo+9qZ51mJyE6 LvqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NPeQcBgN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m1-20020a170902e40100b001bc162f3318si12851ple.640.2023.11.02.10.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 10:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NPeQcBgN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 75FF682A38C9; Thu, 2 Nov 2023 10:33:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbjKBRdc (ORCPT + 99 others); Thu, 2 Nov 2023 13:33:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjKBRda (ORCPT ); Thu, 2 Nov 2023 13:33:30 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D518182 for ; Thu, 2 Nov 2023 10:33:25 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-67131800219so7277066d6.3 for ; Thu, 02 Nov 2023 10:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698946404; x=1699551204; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=QMUtaNcyMJONDb+NRTDB5A2cdiVh8ep8ZeoczkWG0cY=; b=NPeQcBgNQ2/rHTtvy71BICr0d0g5wXpUc7NKdVZRGHXTpAB6hmZhVmHHu11MbIZFBv QCaFn0l6kax2M/T7/DS6ccYjHP2vCYgU5ig5JDV73fEsiE1sOJ3yLOCe1/SEfmLBL2Vy 5cp5699V/T6uvQSTiHK85AUpR7luadxdhzgssniNMlBw7ZET40rluiwzFgIsyZUS2rle /WroydCE838FaIQgv3sORwUijXmefl8S17dCrHefUA5cxIb88chvexZHv/FK2YMuM1pl cLPY+Oyq8K33ZIOpIN5vy8vcF2G+ZpJLGekBssoGEfqH3Uho5egVxo7E8/ZNwHih/t2t TJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698946404; x=1699551204; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QMUtaNcyMJONDb+NRTDB5A2cdiVh8ep8ZeoczkWG0cY=; b=VHWYQiC/cEbXTp/F6yz42KnNcIYlVUz3QLCcI5mBRH1+IlpHhmihfTcZvpo+v5ikP3 02CazKfcUhDW34mkA7y2RmuYhKOS36XltPfHIb/PFFLw2RZG4Zu296V8lDd1AP2LwC+E EuPV1wBut0RRg/qAhCGCuPZ2BPAyMqN8qR0//QfwF6+0AGyJf67b7ZoFSk/gaEbAZzWT koHRI9XAAaeEFLqH3My1vU9vYGEQar3gc/Yewy7PuE82gpAaEGVJTJiePBNi5pVJFst0 pMwD4aOYq8mWe05Mnm9z4P52dpD5D+oYWW5sVUBHE+XCjiX4hNEE52goTJIVV2gHfR8i 9kEQ== X-Gm-Message-State: AOJu0Ywi++Lr31lFF449d4YJhh/6+TjBOgWGv3QK54pC95XlXkC2AyBI QBJj2Mv5t9Zu/plf6we+XUj1 X-Received: by 2002:a05:6214:529c:b0:66d:2af4:c423 with SMTP id kj28-20020a056214529c00b0066d2af4c423mr21097024qvb.2.1698946404249; Thu, 02 Nov 2023 10:33:24 -0700 (PDT) Received: from thinkpad ([117.217.189.228]) by smtp.gmail.com with ESMTPSA id p15-20020a0cc3cf000000b00670e7ae4964sm125621qvi.91.2023.11.02.10.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 10:33:23 -0700 (PDT) Date: Thu, 2 Nov 2023 23:03:14 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: bhelgaas@google.com, imx@lists.linux.dev, kw@linux.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, lpieralisi@kernel.org, minghuan.Lian@nxp.com, mingkai.hu@nxp.com, robh@kernel.org, roy.zang@nxp.com Subject: Re: [PATCH v3 3/4] PCI: layerscape: Rename pf_* as pf_lut_* Message-ID: <20231102173314.GE20943@thinkpad> References: <20231017193145.3198380-1-Frank.Li@nxp.com> <20231017193145.3198380-4-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231017193145.3198380-4-Frank.Li@nxp.com> X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 10:33:37 -0700 (PDT) On Tue, Oct 17, 2023 at 03:31:44PM -0400, Frank Li wrote: > 'pf' and 'lut' is just difference name in difference chips, but basic it is > a MMIO base address plus an offset. > > Rename it to avoid duplicate pf_* and lut_* in driver. > "pci-layerscape-ep.c" uses "ls_lut_" prefix and now you are using "pf_lut_". May I know the difference between these two? Can we just use a common name? - Mani > Signed-off-by: Frank Li > --- > > Notes: > change from v1 to v3 > - new patch at v3 > > drivers/pci/controller/dwc/pci-layerscape.c | 34 ++++++++++----------- > 1 file changed, 17 insertions(+), 17 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c > index 6f47cfe146c44..4b663b20d8612 100644 > --- a/drivers/pci/controller/dwc/pci-layerscape.c > +++ b/drivers/pci/controller/dwc/pci-layerscape.c > @@ -46,7 +46,7 @@ > #define LS_PCIE_DRV_SCFG BIT(0) > > struct ls_pcie_drvdata { > - const u32 pf_off; > + const u32 pf_lut_off; > const struct dw_pcie_host_ops *ops; > int (*exit_from_l2)(struct dw_pcie_rp *pp); > int flags; > @@ -56,13 +56,13 @@ struct ls_pcie_drvdata { > struct ls_pcie { > struct dw_pcie *pci; > const struct ls_pcie_drvdata *drvdata; > - void __iomem *pf_base; > + void __iomem *pf_lut_base; > struct regmap *scfg; > int index; > bool big_endian; > }; > > -#define ls_pcie_pf_readl_addr(addr) ls_pcie_pf_readl(pcie, addr) > +#define ls_pcie_pf_lut_readl_addr(addr) ls_pcie_pf_lut_readl(pcie, addr) > #define to_ls_pcie(x) dev_get_drvdata((x)->dev) > > static bool ls_pcie_is_bridge(struct ls_pcie *pcie) > @@ -103,20 +103,20 @@ static void ls_pcie_fix_error_response(struct ls_pcie *pcie) > iowrite32(PCIE_ABSERR_SETTING, pci->dbi_base + PCIE_ABSERR); > } > > -static u32 ls_pcie_pf_readl(struct ls_pcie *pcie, u32 off) > +static u32 ls_pcie_pf_lut_readl(struct ls_pcie *pcie, u32 off) > { > if (pcie->big_endian) > - return ioread32be(pcie->pf_base + off); > + return ioread32be(pcie->pf_lut_base + off); > > - return ioread32(pcie->pf_base + off); > + return ioread32(pcie->pf_lut_base + off); > } > > -static void ls_pcie_pf_writel(struct ls_pcie *pcie, u32 off, u32 val) > +static void ls_pcie_pf_lut_writel(struct ls_pcie *pcie, u32 off, u32 val) > { > if (pcie->big_endian) > - iowrite32be(val, pcie->pf_base + off); > + iowrite32be(val, pcie->pf_lut_base + off); > else > - iowrite32(val, pcie->pf_base + off); > + iowrite32(val, pcie->pf_lut_base + off); > } > > static void ls_pcie_send_turnoff_msg(struct dw_pcie_rp *pp) > @@ -126,11 +126,11 @@ static void ls_pcie_send_turnoff_msg(struct dw_pcie_rp *pp) > u32 val; > int ret; > > - val = ls_pcie_pf_readl(pcie, LS_PCIE_PF_MCR); > + val = ls_pcie_pf_lut_readl(pcie, LS_PCIE_PF_MCR); > val |= PF_MCR_PTOMR; > - ls_pcie_pf_writel(pcie, LS_PCIE_PF_MCR, val); > + ls_pcie_pf_lut_writel(pcie, LS_PCIE_PF_MCR, val); > > - ret = readx_poll_timeout(ls_pcie_pf_readl_addr, LS_PCIE_PF_MCR, > + ret = readx_poll_timeout(ls_pcie_pf_lut_readl_addr, LS_PCIE_PF_MCR, > val, !(val & PF_MCR_PTOMR), > PCIE_PME_TO_L2_TIMEOUT_US/10, > PCIE_PME_TO_L2_TIMEOUT_US); > @@ -149,15 +149,15 @@ static int ls_pcie_exit_from_l2(struct dw_pcie_rp *pp) > * Set PF_MCR_EXL2S bit in LS_PCIE_PF_MCR register for the link > * to exit L2 state. > */ > - val = ls_pcie_pf_readl(pcie, LS_PCIE_PF_MCR); > + val = ls_pcie_pf_lut_readl(pcie, LS_PCIE_PF_MCR); > val |= PF_MCR_EXL2S; > - ls_pcie_pf_writel(pcie, LS_PCIE_PF_MCR, val); > + ls_pcie_pf_lut_writel(pcie, LS_PCIE_PF_MCR, val); > > /* > * L2 exit timeout of 10ms is not defined in the specifications, > * it was chosen based on empirical observations. > */ > - ret = readx_poll_timeout(ls_pcie_pf_readl_addr, LS_PCIE_PF_MCR, > + ret = readx_poll_timeout(ls_pcie_pf_lut_readl_addr, LS_PCIE_PF_MCR, > val, !(val & PF_MCR_EXL2S), > 1000, > 10000); > @@ -245,7 +245,7 @@ static const struct ls_pcie_drvdata ls1021a_drvdata = { > }; > > static const struct ls_pcie_drvdata layerscape_drvdata = { > - .pf_off = 0xc0000, > + .pf_lut_off = 0xc0000, > .pm_support = true, > .exit_from_l2 = ls_pcie_exit_from_l2, > }; > @@ -295,7 +295,7 @@ static int ls_pcie_probe(struct platform_device *pdev) > > pcie->big_endian = of_property_read_bool(dev->of_node, "big-endian"); > > - pcie->pf_base = pci->dbi_base + pcie->drvdata->pf_off; > + pcie->pf_lut_base = pci->dbi_base + pcie->drvdata->pf_lut_off; > > if (pcie->drvdata->flags & LS_PCIE_DRV_SCFG) { > > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்