Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2305984ybi; Mon, 17 Jun 2019 02:30:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3J/FdDFxmNBYpn2hnm5HQEV+95zwcfp8o/X0NB+vpTLXmIJxDJgHQmpv6KTbdWacwH4T9 X-Received: by 2002:a17:902:44a4:: with SMTP id l33mr27285089pld.174.1560763844196; Mon, 17 Jun 2019 02:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560763844; cv=none; d=google.com; s=arc-20160816; b=YyHBp+uXqXfKZIgBuEKk0Vv5VjZAX1z0jRnevj0HPLedVJxo5SNmHSjcx4ys194dM+ Xa/tVhP7KgiDpCc1aen2tV7+988CCtxub0xhi2NmcQoxZENTOWUNibsNORT9VgakkrmQ 4/2K+FUulEn1RXOWCBhoeug2FOl239piUXExJXdxfRMdcqR0hpjnFFVL9O9LUzZpIv5T qTjCzcrmBUycmbAv5IX6GFfFkzV6FlbA4gv+wgHXOQjwhmY1tk2rvXY30JE09O0w/+mf OIUV+/C2HlZ1JBfTyC780pjiKRiU7E1kTtTMGVJ6PZxMmQv/bOUKhE3SP6Mn9hYyep+y TeGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=KSnHSG1XG8lSpXSJSd/647JtgpZdGLF/fbRFNRQMEng=; b=onScyrbNS8j9OkPI6WtrgfwRB1Ovp8wM5xBqE+eIrr9KkJzRsfnHrvEXUJxJMgyrnF VtjnbVsQNnecSfV+xqkEtiQTLcnL2ZgubPhRxkTGDcYJnJ2em9JQano7UA4mlxGuAL9H /R0osZ7AAoZ8xttwjUrKRUJIzt069/k5GufMjP26WYQ4tPDdHXZWMgnuwtXFZjQ2iGZh KuC2RW2/oXXPfUdDgqYdXWVdGXLFQIrtzwqO58/1LKD7M84mt2U8Qnj5f7Ef/SZy83oq +OZALchIaIwn5IIkZVuemt3HpOR3MarRr3nv3uKAWio7V7hic2p0/csJWR/P/tFvl+14 ISOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f193si10803232pgc.144.2019.06.17.02.30.29; Mon, 17 Jun 2019 02:30:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728177AbfFQJ3H (ORCPT + 99 others); Mon, 17 Jun 2019 05:29:07 -0400 Received: from foss.arm.com ([217.140.110.172]:42972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbfFQJ3G (ORCPT ); Mon, 17 Jun 2019 05:29:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EA6A1344; Mon, 17 Jun 2019 02:29:05 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E76ED3F246; Mon, 17 Jun 2019 02:29:03 -0700 (PDT) Date: Mon, 17 Jun 2019 10:29:01 +0100 From: Lorenzo Pieralisi To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Subject: Re: [PATCHv5 19/20] PCI: mobiveil: Add 8-bit and 16-bit register accessors Message-ID: <20190617092901.GB18020@e121166-lin.cambridge.arm.com> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-20-Zhiqiang.Hou@nxp.com> <20190612135400.GB15747@redmoon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 15, 2019 at 01:13:48AM +0000, Z.q. Hou wrote: > Hi Lorenzo, > > > -----Original Message----- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com] > > Sent: 2019年6月12日 21:54 > > To: Z.q. Hou > > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > bhelgaas@google.com; robh+dt@kernel.org; mark.rutland@arm.com; > > l.subrahmanya@mobiveil.co.in; shawnguo@kernel.org; Leo Li > > ; catalin.marinas@arm.com; will.deacon@arm.com; > > Mingkai Hu ; M.h. Lian ; > > Xiaowei Bao > > Subject: Re: [PATCHv5 19/20] PCI: mobiveil: Add 8-bit and 16-bit register > > accessors > > > > On Fri, Apr 12, 2019 at 08:37:05AM +0000, Z.q. Hou wrote: > > > From: Hou Zhiqiang > > > > > > There are some 8-bit and 16-bit registers in PCIe configuration space, > > > so add accessors for them. > > > > > > Signed-off-by: Hou Zhiqiang > > > Reviewed-by: Minghuan Lian > > > Reviewed-by: Subrahmanya Lingappa > > > --- > > > V5: > > > - Corrected and retouched the subject and changelog. > > > - No functionality change. > > > > > > drivers/pci/controller/pcie-mobiveil.c | 20 ++++++++++++++++++++ > > > 1 file changed, 20 insertions(+) > > > > > > diff --git a/drivers/pci/controller/pcie-mobiveil.c > > > b/drivers/pci/controller/pcie-mobiveil.c > > > index 411e9779da12..456adfee393c 100644 > > > --- a/drivers/pci/controller/pcie-mobiveil.c > > > +++ b/drivers/pci/controller/pcie-mobiveil.c > > > @@ -268,11 +268,31 @@ static u32 csr_readl(struct mobiveil_pcie *pcie, > > u32 off) > > > return csr_read(pcie, off, 0x4); > > > } > > > > > > +static u32 csr_readw(struct mobiveil_pcie *pcie, u32 off) { > > > + return csr_read(pcie, off, 0x2); > > > +} > > > + > > > +static u32 csr_readb(struct mobiveil_pcie *pcie, u32 off) { > > > + return csr_read(pcie, off, 0x1); > > > +} > > > + > > > static void csr_writel(struct mobiveil_pcie *pcie, u32 val, u32 off) > > > { > > > csr_write(pcie, val, off, 0x4); > > > } > > > > > > +static void csr_writew(struct mobiveil_pcie *pcie, u32 val, u32 off) > > > +{ > > > + csr_write(pcie, val, off, 0x2); > > > +} > > > + > > > +static void csr_writeb(struct mobiveil_pcie *pcie, u32 val, u32 off) > > > +{ > > > + csr_write(pcie, val, off, 0x1); > > > +} > > > + > > > > They are not used so you should drop this patch. > > NXP Layerscape PCIe Gen4 controller driver will use them, so don't > drop it. You add functions when they are needed, so drop this patch and squash it to the patch that use these functions. Lorenzo > Thanks, > Zhiqiang > > > > > Lorenzo > > > > > static bool mobiveil_pcie_link_up(struct mobiveil_pcie *pcie) { > > > return (csr_readl(pcie, LTSSM_STATUS) & > > > -- > > > 2.17.1 > > >