Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5934793ybi; Wed, 12 Jun 2019 10:59:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsnMkt/O6vgsr5GIesTJJPdVwMbmJz3blIwsGLpDZOGfyobbqa4g69a4tIjrsiTv+yiKS1 X-Received: by 2002:a17:902:f204:: with SMTP id gn4mr64734912plb.3.1560362369339; Wed, 12 Jun 2019 10:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362369; cv=none; d=google.com; s=arc-20160816; b=EokmoHpRG1+J41NkFG5pH2yHfJ2gTmWfFOrVViOMzi9JBvmHkIdCdmI0NVHUzT7Wb7 tKdcewkXKHlsfUTptO40qAk9ocWIlvE6JbkCR96CekDmTlZz+rnaM/GL4TREG6d7Tc6j jJCXLcEPyjdp4KLKdhVF/u7t0eTIKZYBnxobDTa08u8971fb+eAv5scx/bHfaxecITX9 sLQoBpSmuBQLtMRviCGi1EH0DiciwL78qenph4gJ7T8QTULfWg3DR0toEPH56S4s4Ayj rsn/TgCTTb1oBQ1aZW2ZTUj5mMxTEb+VgLY6ZwoBeZN1J8mY4RhVEvXobNxHiuBq6pyt GAzg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bCrxD6reC9eOgp5u4sCv9D6IFWKl+tCYCbAzw4kKU5c=; b=brcQOwg3KyG6+UBXVHiMeA0VMScuUPq0QYc9ukzE4eKS8QHV2PZs+kVBgVIVbF3wfB 2tPLuCtl65HgcdZtVWB8SoX5O8DbxOm3s1A98q2b24HrT5DCucX8omIXHT/pOLJaq3Yn Q7EZrnk2F4Q4gMWgZh+evWIpfA9VhySN8Q1No5NruyNHzVMx/Pb9XiIir1riP7oweHa7 exVf6XUapW1/1CiuPWFic7RE/6WWnqaANBSAOrvMlyAOSO606rHl2bHY9mOPNNy/6kHp 6nx9phR7SKWJOpd/llia1d5j6C+7C5pasSB+MT09bx79uzdDzC5GfWyGiBdFptkEBt1y YIPA== 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 z185si406862pfb.109.2019.06.12.10.59.14; Wed, 12 Jun 2019 10:59:29 -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 S2409165AbfFLNyH (ORCPT + 99 others); Wed, 12 Jun 2019 09:54:07 -0400 Received: from foss.arm.com ([217.140.110.172]:53604 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409112AbfFLNyF (ORCPT ); Wed, 12 Jun 2019 09:54:05 -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 9224228; Wed, 12 Jun 2019 06:54:04 -0700 (PDT) Received: from redmoon (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8EDE13F557; Wed, 12 Jun 2019 06:54:02 -0700 (PDT) Date: Wed, 12 Jun 2019 14:54:00 +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: <20190612135400.GB15747@redmoon> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-20-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412083635.33626-20-Zhiqiang.Hou@nxp.com> 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 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. Lorenzo > static bool mobiveil_pcie_link_up(struct mobiveil_pcie *pcie) > { > return (csr_readl(pcie, LTSSM_STATUS) & > -- > 2.17.1 >