Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp447121rdb; Thu, 30 Nov 2023 08:47:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9HPKNTdanJjs8qS02gPp36gl/cKEkd3JZeNbq/ozckKHfw6CLVrV011WAjMEXu5gGBo8N X-Received: by 2002:a05:6a00:23c8:b0:6cb:d24b:792a with SMTP id g8-20020a056a0023c800b006cbd24b792amr24551161pfc.26.1701362835673; Thu, 30 Nov 2023 08:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701362835; cv=none; d=google.com; s=arc-20160816; b=joALFAdIiO0v2J1A6j7oKflZmMP+x7XSmwEf/2OdssReitMFAMlI9MnrElfW9FBp+1 DtIMFD0AoIC6bKJ96XjVimZ529ZG1tBiG9gQAhRYErZ5mJcYvm4mxicO+UK7ijJr38xo OLf9UHWByNoYEGHLZYPSNR1eQVVq6I/+5h01X9WcJ7EzC2iwYekvrBkeZrT5zAb1l05P 5Daev3+o4doo+HapZEKTpgA92vwzl9R7ssgXYqyJpIlzufaa3Gywr8OErhTkW5cg6RdQ tH+7mp7KLFwU4g8XqfsKG9/H/5HHwccfUkcJYplYQFTQtBqecXKHrD0yLPO/LgfdzsnP H3uA== 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=kjHz7y8FdABfzePSYWvG3C7LR0AsyMP0bJ41uTORMXU=; fh=m5kJ7K68eeTVidLlN9bOmoHTd7rLVwAhIyCccK14kOA=; b=YnRQM4ZbBj8cl07RqPXeXrGLFt+AqXHb8nCieI1YJ5DkJpo8ZWgJ45FjXfr5bGFR9h AHlOSvNSvNk2uYhqZu4LPIer+Lq2tMIdC4YfqHe3vgmMAG0YbIDtlmmDw3XYuXfvH8XC R49Uf7Jmsd0x/hcyuyllfG0UqycpItkgwACtSb1D7HkiOI33T1nOfRfmcYOMu8fw755H PefnxtmXkSuABPcYH9vby3ydXJ695e0FZolKOKvhKsrjkAbdaReabp5dR+n+Y0YusIyQ 8Ht5hhxKCWBzubeIz7HxONmTc5il4AZ5Mik+4Zcm0DIuaiGAa04yYGdPa+h2RqeaaOwy GUMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q4CuJY2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s12-20020a056a00178c00b006cb8a0c292esi1625266pfg.95.2023.11.30.08.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:47:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q4CuJY2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 4BA2C80D6A0C; Thu, 30 Nov 2023 08:46:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232327AbjK3QqW (ORCPT + 99 others); Thu, 30 Nov 2023 11:46:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235186AbjK3QqS (ORCPT ); Thu, 30 Nov 2023 11:46:18 -0500 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 393F910E4 for ; Thu, 30 Nov 2023 08:46:24 -0800 (PST) Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-67a3f1374bdso6531466d6.2 for ; Thu, 30 Nov 2023 08:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701362783; x=1701967583; 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=kjHz7y8FdABfzePSYWvG3C7LR0AsyMP0bJ41uTORMXU=; b=q4CuJY2cIM/u1JfDIjIKi03c4r3KcjRzIjZ8Zgnkf6wPkHSciSG4iludWQAjzmB7Lc ggeZaVPPNJ0Lse0yjBMqv/oMn59kUc7wcS3kZ80kS0+aclPP6lA7ivkY21KAtub87HzZ wTrUhaJPx+XI1Ip0+9SWjMsiITUmMCfCAVKRmizHq6ANLyafDFl/SYUDMK7KasdHXhuw wybWDc8W22CQ7PFqeaoKMDRNetF7W46uFTX8hyBjQoxtfXlb0hA2oieiknW9OVwH62mk Ts2LfQZPk/IYH0fplV23MTXxRx3hTTLMRbG3NGIE+FA0KbVWyQsQs1al0jm4zPNkih8G 2p2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701362783; x=1701967583; 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=kjHz7y8FdABfzePSYWvG3C7LR0AsyMP0bJ41uTORMXU=; b=aV4Xs8SoOa05QBrANMtKSbsEN4QXf8lTm1O3NH4qifmZx+vQEyXVyjWdIsF/R5E58y Ylv9GNGbIgCkfiRDz8pQhY+xu4Fgli/ND8FrC0lp4I8runhivZmqPMYImJrdAmWcJ1Qp TkAcY5pjh10NIYS4ycQFhIPa3DAQKXS2mswn56tY1667baVRBRo417WQDPpgJj2Q9xQt wNzwnTAh3wybmAkZIWL7SVciPZh0IigVVomosSx/Tn7ylVpXbmhiSi/ZPyHREC6qDXuA AKBIU6Sss0hdA6ZN9Gs+DKrQGJ5KXe2qMqmMVWM4H37pQloYadRMooxnC4UW0NgL+xkU /pGw== X-Gm-Message-State: AOJu0YyZCrda3FbUdcaRUopBzZBSuWOjn/3MRMfy4e59UW6b4tAYVoiC Q1yTbaqrjfF4Ee6VJ+LqHwyx X-Received: by 2002:a05:6214:cce:b0:67a:1580:d7c3 with SMTP id 14-20020a0562140cce00b0067a1580d7c3mr35231818qvx.58.1701362783244; Thu, 30 Nov 2023 08:46:23 -0800 (PST) Received: from thinkpad ([117.213.102.92]) by smtp.gmail.com with ESMTPSA id h29-20020a0cab1d000000b0067a2a0b44ddsm650581qvb.44.2023.11.30.08.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:46:22 -0800 (PST) Date: Thu, 30 Nov 2023 22:16:12 +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 v4 3/4] PCI: layerscape: Rename pf_* as pf_lut_* Message-ID: <20231130164612.GU3043@thinkpad> References: <20231129214412.327633-1-Frank.Li@nxp.com> <20231129214412.327633-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: <20231129214412.327633-4-Frank.Li@nxp.com> X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 08:46:54 -0800 (PST) X-Spam-Level: * On Wed, Nov 29, 2023 at 04:44:11PM -0500, 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. > > Signed-off-by: Frank Li Reviewed-by: Manivannan Sadhasivam Can you fix the name in pci-layerscape-ep.c also? - Mani > --- > > Notes: > pf_lut is better than pf_* or lut* because some chip use 'pf', some chip > use 'lut'. > > change from v1 to v4 > - 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 42bca2c3b5c3e..590e07bb27002 100644 > --- a/drivers/pci/controller/dwc/pci-layerscape.c > +++ b/drivers/pci/controller/dwc/pci-layerscape.c > @@ -44,7 +44,7 @@ > #define PCIE_IATU_NUM 6 > > 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); > bool scfg_support; > @@ -54,13 +54,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) > @@ -101,20 +101,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) > @@ -124,11 +124,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); > @@ -147,15 +147,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); > @@ -243,7 +243,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, > }; > @@ -293,7 +293,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->scfg_support) { > pcie->scfg = syscon_regmap_lookup_by_phandle(dev->of_node, "fsl,pcie-scfg"); > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்