Message ID | 20190625091039.18933-5-Zhiqiang.Hou@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7CB11580 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 25 Jun 2019 09:11:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A782228B3B for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 25 Jun 2019 09:11:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B75728B5B; Tue, 25 Jun 2019 09:11:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38D5528B3B for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 25 Jun 2019 09:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HpivO/bjlzvyhluN3MNqsWPYsLkUHLiI0VY0CEgL9L8=; b=LvYQdRvO9m+ZcF 8X6pAz/QmkMlPHQReQRsK34Y/pInB2DU4mLj1xYTmVhMnU1hnq3Wy/Zj2f4BAp5/8634xITTmQOm6 K/9/sVUY+kCc9I+agj+pP/1nCXBZAMaytgE5NX+tAWPyyHas9LH05jrflTbz7b+Drnko7JqoON5Bv 8H7zDLe5acN374DrME2ADdqVs3wijVkNJ2LBrTBBVmtRuaCOjrm+AesvRPLUlsLPVfRt7pjxBBByX N+9S6m5lZrz4k2TDrxaIOWNkdlCOrubYx9NR33Whx41Kknm5mU0wLF5Zf080aN5vKV61KEFhtxHDk mImCckK2yIY86L5Wz1Fw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfhUP-0000ed-IZ; Tue, 25 Jun 2019 09:11:45 +0000 Received: from mail-db5eur01on0609.outbound.protection.outlook.com ([2a01:111:f400:fe02::609] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfhSD-0006Ou-BS for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2019 09:09:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KNzkn/a0IqunK1Yi9Xo6xRbN57iI7q+LcT+L41q2PKE=; b=KzABVjnxVn6ypctwJSGEPMqX+qUN1ultl40IRdfT2qbWUIRmk9eS0JY8ZXQA56J0EVvOLz8ezxwD7be2D18fnWvJ9ZOFrXjUShIprysUnM0x2aVwdtgrzMsBQroMFTA4zhGTpDE0aDTuKvP9p0p9tLimyoW4Id0NG9JwWM8F9dk= Received: from DB8PR04MB6747.eurprd04.prod.outlook.com (20.179.250.159) by DB8PR04MB6746.eurprd04.prod.outlook.com (20.179.251.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Tue, 25 Jun 2019 09:09:28 +0000 Received: from DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::93a:4344:1120:4ca0]) by DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::93a:4344:1120:4ca0%6]) with mapi id 15.20.2008.017; Tue, 25 Jun 2019 09:09:28 +0000 From: "Z.q. Hou" <zhiqiang.hou@nxp.com> To: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "bhelgaas@google.com" <bhelgaas@google.com>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "arnd@arndb.de" <arnd@arndb.de>, "mark.rutland@arm.com" <mark.rutland@arm.com>, "l.subrahmanya@mobiveil.co.in" <l.subrahmanya@mobiveil.co.in>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "m.karthikeyan@mobiveil.co.in" <m.karthikeyan@mobiveil.co.in>, Leo Li <leoyang.li@nxp.com>, "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will.deacon@arm.com" <will.deacon@arm.com> Subject: [PATCHv7 4/7] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Topic: [PATCHv7 4/7] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Index: AQHVKzWxDgZokwi9zUOCFYG14230nQ== Date: Tue, 25 Jun 2019 09:09:28 +0000 Message-ID: <20190625091039.18933-5-Zhiqiang.Hou@nxp.com> References: <20190625091039.18933-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190625091039.18933-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) To DB8PR04MB6747.eurprd04.prod.outlook.com (2603:10a6:10:10b::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eefafff2-85f6-4280-4ac3-08d6f94cd374 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB8PR04MB6746; x-ms-traffictypediagnostic: DB8PR04MB6746: x-microsoft-antispam-prvs: <DB8PR04MB6746D132B4579F63EF4BBDF584E30@DB8PR04MB6746.eurprd04.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:2043; x-forefront-prvs: 0079056367 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(39860400002)(396003)(366004)(346002)(189003)(199004)(4326008)(386003)(446003)(26005)(102836004)(3846002)(478600001)(71190400001)(186003)(11346002)(71200400001)(7416002)(6116002)(25786009)(66946007)(50226002)(110136005)(8936002)(54906003)(81166006)(8676002)(305945005)(81156014)(316002)(2201001)(5660300002)(66556008)(7736002)(66476007)(66446008)(64756008)(1076003)(66066001)(486006)(2616005)(2501003)(73956011)(68736007)(6436002)(6486002)(256004)(6512007)(86362001)(6506007)(53936002)(36756003)(14454004)(99286004)(2906002)(52116002)(476003)(76176011)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR04MB6746; H:DB8PR04MB6747.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Gt2Am9JVtGIsu0SPXF0hdh22vv5J+/2Er/5zoVrRzAP4AwLCf+EbHbu8Vc3aQ6VmVBtwaWba5aU4iBz0WoQVKx6dxfd42xAKOPSW/QnNhHVE7vdxYDWP3WL6D0Hx2VPaSw85jhETqGaMLsXoIisoYfoL7JGu1G0uVZ3uO3Ta/hdZaD2TPy0bNcTSmil6i+HNQnX9ReiGFh74lRAi16iDz8n7fXB9o/Ahlv1WJ3OXxnEFurinHEGuueDW0eICrWSVDYiIK6+bQvc3REpOKOp1Akj8P5iVg48vyaA6CXIGc3jo4e2pEJiZwteJVpvhMPgegOFzKcAAPL4tVBuhDpm4joRVnTTvNhn0iuJBY+zhbk38cIzYhqR1pG73Kqh3Sks1CWhxK3AGtDjl22Q/6XRYX4N5VWQnWBPrT2iUO5mQg6w= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eefafff2-85f6-4280-4ac3-08d6f94cd374 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2019 09:09:28.3646 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zhiqiang.hou@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6746 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190625_020929_534059_824BBF65 X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: "M.h. Lian" <minghuan.lian@nxp.com>, "Z.q. Hou" <zhiqiang.hou@nxp.com>, Xiaowei Bao <xiaowei.bao@nxp.com>, Mingkai Hu <mingkai.hu@nxp.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
PCI: refactor Mobiveil driver and add PCIe Gen4 driver for NXP Layerscape SoCs
|
expand
|
diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.h b/drivers/pci/controller/mobiveil/pcie-mobiveil.h index 159b0142a2bc..a729a4f879fe 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.h +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.h @@ -185,9 +185,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 */