Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1621614imj; Fri, 8 Feb 2019 04:42:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IYwNQIdYbIQhcuoUbJUCod+9vQJTBlGPbKkdoIhxBXF5JUanfRF98hZ8E3iCp8cxv4HhQfo X-Received: by 2002:a63:d34a:: with SMTP id u10mr10098182pgi.301.1549629772693; Fri, 08 Feb 2019 04:42:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549629772; cv=none; d=google.com; s=arc-20160816; b=y+5N/Vr+ZDmL2rxVLCgAkvSx2miBNY6+hMyh+lPk5zD8QuYliJAB+94GwmA2Ahi2gl Z3su6pxyI4Nh5OyoeFgqgS4Sj4UA0wsa7a0g0i1BElvrm8861kpxUyayaIfCTdxWCi7u nQrihC546s4b6TWlRwK2G+faol/2X0tJlhScsdlfVJEquFJh1ofI5dWzpqtRY14cq1AW pHMb9TcG9aHg1rzxX43CFjwVmMWui7ytH+m47KKwWfStqlmI+4pTDtHkBPin6WZNupZQ Yfngh4ziujhqmaAo/qt29tT49IzNiXB+dRXr99iC2BMICer4ibLDwAYa1o6LlC4o45qY Wg4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FcNSWtz/94EAq7Zt0ztZtaogVS62SwmBQ8CLMNUPaIE=; b=ZUSP67YGgTQQq9XSBu/xTSvafXt6p0cHeu+ouvd9i7Edc/SmavnvQ/j6kmcXLyqdtM PhaZZ/gkbnvVgYvPzNRJqPdbPTYuaRGgpaF4WyORBd7VbMJCCqVJ9o4i7F2EG1ghb/QA qtsqTMFZi+dv46G6hP6qaMgZCkaWeCeaPChVG/kc5wJMhdPQrMu7dh9AMGOKytaoanJJ 2Ob2lMzheGe/JoFEUZr0vvi+ch8N899nRiFVn6EPDS2G6Mta/fNFLL50uHr0UShoHOx7 qWSXAqYrJndPoMp7PbLtvJ0wdmdFQ943ZlDMnZBDUj2+equ6UNDPkWyVpelNB5IdHuvA hDSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mobiveil.co.in header.s=google header.b=LTW9Gy9V; 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 9si1988107pgn.524.2019.02.08.04.42.36; Fri, 08 Feb 2019 04:42:52 -0800 (PST) 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; dkim=pass header.i=@mobiveil.co.in header.s=google header.b=LTW9Gy9V; 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 S1726813AbfBHMmT (ORCPT + 99 others); Fri, 8 Feb 2019 07:42:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41896 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726522AbfBHMmT (ORCPT ); Fri, 8 Feb 2019 07:42:19 -0500 Received: by mail-wr1-f68.google.com with SMTP id x10so3401295wrs.8 for ; Fri, 08 Feb 2019 04:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mobiveil.co.in; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FcNSWtz/94EAq7Zt0ztZtaogVS62SwmBQ8CLMNUPaIE=; b=LTW9Gy9VdLkzCaQ8/6LR1RN5CMBX4DNv4zx8Vt+n9WPe5s5U2j2SkWi9d6uJPlV/zx q2zfeEvtPuL0+gE773N8fRvWzd+7hhAGOqytTlwdAVErVEIm+4ioBVY8sc175wb7NQiV F8Ywgr5UzWMCXiEm92JA1qgPgSj1rA8WtsmdE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FcNSWtz/94EAq7Zt0ztZtaogVS62SwmBQ8CLMNUPaIE=; b=UBHVaioXlHrRwgOKH6FZ0fOdI1f4uTLOrKS69710JnTB+UQ+EpCGsQjhD0FivOHrZk 2bcVmqxRwqTp7eAhUtJoXJQOxhp51bpfF+CpIBcLw5/qin9iW+FGSJlg3bz/renFsgTn QNHPQbJHZFiayobOIQgX02rGpvphsTWChAitDWktEocYnrpYG87xRXNmHyNChPXMmGbT NbgH07S7ttx5WGQGE2DNMWBypXaqvV4NFqlxVZ5+LmVt3Ss98CAP8Ace5cdz6XdguphT j2kN/VzewvKFgApTG9G3oebdPn8i9PNqVe016v9ERQuL8R/zxojqCPrdNJ6sg/zxa8DG 05AA== X-Gm-Message-State: AHQUAuYVn/u5lBLrh2o8PXxwFFPFaC71xcfgRh3amBckvDYUtmpvtCxf lNX6PvxHVTtzDhf+U0ITlNJbe0Sd5rB1b1uKMRlIww== X-Received: by 2002:adf:fd81:: with SMTP id d1mr16532537wrr.105.1549629737745; Fri, 08 Feb 2019 04:42:17 -0800 (PST) MIME-Version: 1.0 References: <20190129080926.36773-1-Zhiqiang.Hou@nxp.com> <20190129080926.36773-21-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190129080926.36773-21-Zhiqiang.Hou@nxp.com> From: Subrahmanya Lingappa Date: Fri, 8 Feb 2019 18:14:57 +0530 Message-ID: Subject: Re: [PATCHv3 20/27] PCI: mobiveil: add Byte and Half-Word width register accessors 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" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 1:40 PM Z.q. Hou wrote: > > From: Hou Zhiqiang > > As there are some Byte and Half-Work width registers in PCIe > configuration space, add Byte and Half-Word width register > accessors. > > Signed-off-by: Hou Zhiqiang > Reviewed-by: Minghuan Lian > --- > V3: > - No change > > .../pci/controller/mobiveil/pcie-mobiveil.h | 20 +++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.h b/drivers/pci/controller/mobiveil/pcie-mobiveil.h > index 81685840b378..933c2f34bc52 100644 > --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.h > +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.h > @@ -181,9 +181,29 @@ static inline u32 csr_readl(struct mobiveil_pcie *pcie, u32 off) > return csr_read(pcie, off, 0x4); > } > > +static inline u32 csr_readw(struct mobiveil_pcie *pcie, u32 off) > +{ > + return csr_read(pcie, off, 0x2); > +} > + > +static inline u32 csr_readb(struct mobiveil_pcie *pcie, u32 off) > +{ > + return csr_read(pcie, off, 0x1); > +} > + > static inline void csr_writel(struct mobiveil_pcie *pcie, u32 val, u32 off) > { > csr_write(pcie, val, off, 0x4); > } > > +static inline void csr_writew(struct mobiveil_pcie *pcie, u32 val, u32 off) > +{ > + csr_write(pcie, val, off, 0x2); > +} > + > +static inline void csr_writeb(struct mobiveil_pcie *pcie, u32 val, u32 off) > +{ > + csr_write(pcie, val, off, 0x1); > +} > + > #endif /* _PCIE_MOBIVEIL_H */ > -- > 2.17.1 > Reviewed-by: Subrahmanya Lingappa