From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22651C432C0 for ; Wed, 20 Nov 2019 03:47:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4ED522461 for ; Wed, 20 Nov 2019 03:47:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PDS2lG8b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727852AbfKTDrA (ORCPT ); Tue, 19 Nov 2019 22:47:00 -0500 Received: from mail-eopbgr70072.outbound.protection.outlook.com ([40.107.7.72]:17604 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727518AbfKTDq6 (ORCPT ); Tue, 19 Nov 2019 22:46:58 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IIwfrMgMEQgRpGK0VeIFiSMzAQDvJ4mv7WVwmoB3iRb3877OrYdUjdN99rv9gI2PPKdJPgA/UGB2WtKQRxGV6Y3OleQWBd7dqoerriMGGoUSCfnu45oyqKFWBv8CekFlmRWtibbQjGP760lpqXkATtAwymOtd9TWaaabf9DmPru+5JbUB5ybZthLTg+vnipkuPb4PAFx6wzkeAesjiX/Q5YsiyzNJffu7stSyOxtn1cH43d0/rtgSyJGS8R1/YodTdrrz2QNSPvLQv1Zm6HQOs6kcCQ7+Y/aEm6v+AvUTJ16e8DLX/A6ZMVMdJAHPU2+qXAfq2amMAHSc1bRO5SbiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zphJDwe9+zv4TeGT11iRMz4oU4/XEu7IF8op8dkKql4=; b=mDHR1QrU6INuG+9++D7DieT+JH3bsSNjEj75VPpZq/nFow7wmToo26/ZwIlWTi9rZMaCt6PnNpOFvFugD32mcZc6cG6WJ8MndBd2dOVqAJLH2qRgQ7mC8Ah1l08y50VfUyVYq1lhjeqsXKIwd9rvJketpY8HW/xE64KJqazNL5vAL11ZkL2/ajn9aUTqH6eVfvephDIkz5Z4lFnPYrOUADoGptTGqbqIzvd8lOWVeGPnJFq9cDWeOgJU7d/qpbpYLzMxUSgeEkqAAj+GGegdzOp8Fr12PtcA2Umz2V5kfCL5D6NgCcyFrlTeeRo6vNEspcD4nmrgieaKmyvpk2efhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none 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=zphJDwe9+zv4TeGT11iRMz4oU4/XEu7IF8op8dkKql4=; b=PDS2lG8bhi+SX/2khTaxRUOmJKhS2eg+rHfXsvrhNDNqmBmBdbZS4Bv8fOmLswVvcdOd9vhxY5L8OIB95lYHFIcXQGe0OeXImJNi+gj0RKlLfDdgJOXt5uUaay3YOwU/HL+7ub0Je912HwVKtTUQyvNWCMVNej2XYIay4zYGW0E= Received: from DB8PR04MB6747.eurprd04.prod.outlook.com (20.179.250.159) by DB8PR04MB5657.eurprd04.prod.outlook.com (20.179.9.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Wed, 20 Nov 2019 03:46:10 +0000 Received: from DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::898f:3cd6:c225:7219]) by DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::898f:3cd6:c225:7219%7]) with mapi id 15.20.2451.029; Wed, 20 Nov 2019 03:46:10 +0000 From: "Z.q. Hou" To: "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" , "arnd@arndb.de" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , "m.karthikeyan@mobiveil.co.in" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "andrew.murray@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv9 08/12] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Topic: [PATCHv9 08/12] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Index: AQHVn1UM/CwMe5ZZnEiSNfgmt9Cx/g== Date: Wed, 20 Nov 2019 03:46:10 +0000 Message-ID: <20191120034451.30102-9-Zhiqiang.Hou@nxp.com> References: <20191120034451.30102-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20191120034451.30102-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: HK2PR02CA0199.apcprd02.prod.outlook.com (2603:1096:201:20::11) 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-ht: Tenant x-ms-office365-filtering-correlation-id: 1614a5f6-fe1e-4004-ec94-08d76d6c2e87 x-ms-traffictypediagnostic: DB8PR04MB5657:|DB8PR04MB5657: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:586; x-forefront-prvs: 02272225C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(1496009)(4636009)(366004)(346002)(396003)(39860400002)(136003)(376002)(199004)(189003)(2201001)(54906003)(86362001)(36756003)(256004)(7736002)(305945005)(6116002)(66066001)(3846002)(110136005)(316002)(71190400001)(7416002)(1076003)(71200400001)(52116002)(2501003)(4326008)(5660300002)(66476007)(476003)(64756008)(66556008)(11346002)(446003)(76176011)(2616005)(66946007)(6512007)(66446008)(8676002)(386003)(6506007)(2906002)(99286004)(102836004)(6486002)(81166006)(81156014)(8936002)(50226002)(186003)(26005)(478600001)(14454004)(486006)(6436002)(25786009)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR04MB5657;H:DB8PR04MB6747.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iSeXNm9s2KhTOWf7hIg/nxTjHF/fwje3E8i4wCAFqDASQLq/nYeNiWWBqEfDVOxF6GZZDerXTyxCQO9O+8Hv0Mrrt79Pf+8gBuKMhp3p1ZKXoXTTeSTNjuI9XbCl60x3grDizqgwQLFHnfHa73WPRF2PD80qcFSQnVWVljijsu6DyZU2xw/OUKtNXBafuFCI7i3Q5RGl/TKbl3d4TXuFx2ZnLox4AlreDYFk6yPPS6u5LuPZflXhYVPMyEu3lfjVkPhiL1lOMCGCEJEdFDKItuuXZ1/P5LQipX2ONPjLrLSfKhZ57WvKP1SIksrEbD/nHtzHVqchCMiWlnCFO1HMmTsCduUG044YZaohIgWbV0xtyj2PDjYb/CAPJT+jUhDjWAZzK0srRYCvj6EwaBvuaT4kx66veozUF5gCD4DCtR+l0Qf82QyOkrdtMXT+mFoj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1614a5f6-fe1e-4004-ec94-08d76d6c2e87 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2019 03:46:10.4677 (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: UomE1xHoP1bhmFwYLtAYl/KiPnvWGuYeiTqCui13vrS4nTegP0H9PzCN+oyQEWYaFUk+3GIlewUwmndRSQM9/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5657 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang There are some 8-bit and 16-bit registers in PCIe configuration space, so add these accessors accordingly. Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V9: - No change .../pci/controller/mobiveil/pcie-mobiveil.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.h b/drivers/pci/= controller/mobiveil/pcie-mobiveil.h index 37116c2a19fe..750a7fd95bc1 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.h +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.h @@ -182,10 +182,33 @@ static inline u32 mobiveil_csr_readl(struct mobiveil_= pcie *pcie, u32 off) return mobiveil_csr_read(pcie, off, 0x4); } =20 +static inline u32 mobiveil_csr_readw(struct mobiveil_pcie *pcie, u32 off) +{ + return mobiveil_csr_read(pcie, off, 0x2); +} + +static inline u32 mobiveil_csr_readb(struct mobiveil_pcie *pcie, u32 off) +{ + return mobiveil_csr_read(pcie, off, 0x1); +} + + static inline void mobiveil_csr_writel(struct mobiveil_pcie *pcie, u32 val= , u32 off) { mobiveil_csr_write(pcie, val, off, 0x4); } =20 +static inline void mobiveil_csr_writew(struct mobiveil_pcie *pcie, u32 val= , + u32 off) +{ + mobiveil_csr_write(pcie, val, off, 0x2); +} + +static inline void mobiveil_csr_writeb(struct mobiveil_pcie *pcie, u32 val= , + u32 off) +{ + mobiveil_csr_write(pcie, val, off, 0x1); +} + #endif /* _PCIE_MOBIVEIL_H */ --=20 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1062C432C0 for ; Wed, 20 Nov 2019 03:47:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1B352244A for ; Wed, 20 Nov 2019 03:47:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="luY/Sksj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PDS2lG8b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1B352244A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=CUeo+1N7xW0Q0hucAcDYm6/pFn1QJzt1Twb3lGUUh+8=; b=luY/SksjvPQkYH Kc2bm+p4z8RPj5A4hp2SWsqPkQf52UhJEh86V27zAIEdWg6O7HMg44gq8+VVRjXQXwpTROCpKs40I p+9sV9TlmNKhbjmbBvgvOKSBaS57wILtj62HJlcOhA9UXzsj7OZ5Ml9S8ANg1a1MZyDv6NSS7AaAQ I3teQuyfI+SWu1sLWLLki/O1sjsvdi//6SajZMkUPWeJGAd3biLLen7bKI17+3spsfeLSID0DJUFU zW5U9HRIDN8qY0/HuqknMkq7aeLolkZPoO+Qn+zVk4S2DNrw0oF3IOazm92xuUqvqQPI/Y3AseLjZ xWXhuAKYZAdWKZkb7A6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXGxq-0000mb-0z; Wed, 20 Nov 2019 03:47:34 +0000 Received: from mail-he1eur04on0617.outbound.protection.outlook.com ([2a01:111:f400:fe0d::617] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXGwX-0007zX-Fh for linux-arm-kernel@lists.infradead.org; Wed, 20 Nov 2019 03:46:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IIwfrMgMEQgRpGK0VeIFiSMzAQDvJ4mv7WVwmoB3iRb3877OrYdUjdN99rv9gI2PPKdJPgA/UGB2WtKQRxGV6Y3OleQWBd7dqoerriMGGoUSCfnu45oyqKFWBv8CekFlmRWtibbQjGP760lpqXkATtAwymOtd9TWaaabf9DmPru+5JbUB5ybZthLTg+vnipkuPb4PAFx6wzkeAesjiX/Q5YsiyzNJffu7stSyOxtn1cH43d0/rtgSyJGS8R1/YodTdrrz2QNSPvLQv1Zm6HQOs6kcCQ7+Y/aEm6v+AvUTJ16e8DLX/A6ZMVMdJAHPU2+qXAfq2amMAHSc1bRO5SbiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zphJDwe9+zv4TeGT11iRMz4oU4/XEu7IF8op8dkKql4=; b=mDHR1QrU6INuG+9++D7DieT+JH3bsSNjEj75VPpZq/nFow7wmToo26/ZwIlWTi9rZMaCt6PnNpOFvFugD32mcZc6cG6WJ8MndBd2dOVqAJLH2qRgQ7mC8Ah1l08y50VfUyVYq1lhjeqsXKIwd9rvJketpY8HW/xE64KJqazNL5vAL11ZkL2/ajn9aUTqH6eVfvephDIkz5Z4lFnPYrOUADoGptTGqbqIzvd8lOWVeGPnJFq9cDWeOgJU7d/qpbpYLzMxUSgeEkqAAj+GGegdzOp8Fr12PtcA2Umz2V5kfCL5D6NgCcyFrlTeeRo6vNEspcD4nmrgieaKmyvpk2efhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none 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=zphJDwe9+zv4TeGT11iRMz4oU4/XEu7IF8op8dkKql4=; b=PDS2lG8bhi+SX/2khTaxRUOmJKhS2eg+rHfXsvrhNDNqmBmBdbZS4Bv8fOmLswVvcdOd9vhxY5L8OIB95lYHFIcXQGe0OeXImJNi+gj0RKlLfDdgJOXt5uUaay3YOwU/HL+7ub0Je912HwVKtTUQyvNWCMVNej2XYIay4zYGW0E= Received: from DB8PR04MB6747.eurprd04.prod.outlook.com (20.179.250.159) by DB8PR04MB5657.eurprd04.prod.outlook.com (20.179.9.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Wed, 20 Nov 2019 03:46:10 +0000 Received: from DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::898f:3cd6:c225:7219]) by DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::898f:3cd6:c225:7219%7]) with mapi id 15.20.2451.029; Wed, 20 Nov 2019 03:46:10 +0000 From: "Z.q. Hou" To: "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" , "arnd@arndb.de" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , "m.karthikeyan@mobiveil.co.in" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "andrew.murray@arm.com" Subject: [PATCHv9 08/12] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Topic: [PATCHv9 08/12] PCI: mobiveil: Add 8-bit and 16-bit CSR register accessors Thread-Index: AQHVn1UM/CwMe5ZZnEiSNfgmt9Cx/g== Date: Wed, 20 Nov 2019 03:46:10 +0000 Message-ID: <20191120034451.30102-9-Zhiqiang.Hou@nxp.com> References: <20191120034451.30102-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20191120034451.30102-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: HK2PR02CA0199.apcprd02.prod.outlook.com (2603:1096:201:20::11) 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-ht: Tenant x-ms-office365-filtering-correlation-id: 1614a5f6-fe1e-4004-ec94-08d76d6c2e87 x-ms-traffictypediagnostic: DB8PR04MB5657:|DB8PR04MB5657: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:586; x-forefront-prvs: 02272225C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(1496009)(4636009)(366004)(346002)(396003)(39860400002)(136003)(376002)(199004)(189003)(2201001)(54906003)(86362001)(36756003)(256004)(7736002)(305945005)(6116002)(66066001)(3846002)(110136005)(316002)(71190400001)(7416002)(1076003)(71200400001)(52116002)(2501003)(4326008)(5660300002)(66476007)(476003)(64756008)(66556008)(11346002)(446003)(76176011)(2616005)(66946007)(6512007)(66446008)(8676002)(386003)(6506007)(2906002)(99286004)(102836004)(6486002)(81166006)(81156014)(8936002)(50226002)(186003)(26005)(478600001)(14454004)(486006)(6436002)(25786009)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR04MB5657; H:DB8PR04MB6747.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iSeXNm9s2KhTOWf7hIg/nxTjHF/fwje3E8i4wCAFqDASQLq/nYeNiWWBqEfDVOxF6GZZDerXTyxCQO9O+8Hv0Mrrt79Pf+8gBuKMhp3p1ZKXoXTTeSTNjuI9XbCl60x3grDizqgwQLFHnfHa73WPRF2PD80qcFSQnVWVljijsu6DyZU2xw/OUKtNXBafuFCI7i3Q5RGl/TKbl3d4TXuFx2ZnLox4AlreDYFk6yPPS6u5LuPZflXhYVPMyEu3lfjVkPhiL1lOMCGCEJEdFDKItuuXZ1/P5LQipX2ONPjLrLSfKhZ57WvKP1SIksrEbD/nHtzHVqchCMiWlnCFO1HMmTsCduUG044YZaohIgWbV0xtyj2PDjYb/CAPJT+jUhDjWAZzK0srRYCvj6EwaBvuaT4kx66veozUF5gCD4DCtR+l0Qf82QyOkrdtMXT+mFoj MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1614a5f6-fe1e-4004-ec94-08d76d6c2e87 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2019 03:46:10.4677 (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: UomE1xHoP1bhmFwYLtAYl/KiPnvWGuYeiTqCui13vrS4nTegP0H9PzCN+oyQEWYaFUk+3GIlewUwmndRSQM9/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5657 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191119_194613_569477_D4ECDFB5 X-CRM114-Status: UNSURE ( 7.15 ) 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "M.h. Lian" , "Z.q. Hou" , Xiaowei Bao , Mingkai Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Hou Zhiqiang There are some 8-bit and 16-bit registers in PCIe configuration space, so add these accessors accordingly. Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V9: - No change .../pci/controller/mobiveil/pcie-mobiveil.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.h b/drivers/pci/controller/mobiveil/pcie-mobiveil.h index 37116c2a19fe..750a7fd95bc1 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.h +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.h @@ -182,10 +182,33 @@ static inline u32 mobiveil_csr_readl(struct mobiveil_pcie *pcie, u32 off) return mobiveil_csr_read(pcie, off, 0x4); } +static inline u32 mobiveil_csr_readw(struct mobiveil_pcie *pcie, u32 off) +{ + return mobiveil_csr_read(pcie, off, 0x2); +} + +static inline u32 mobiveil_csr_readb(struct mobiveil_pcie *pcie, u32 off) +{ + return mobiveil_csr_read(pcie, off, 0x1); +} + + static inline void mobiveil_csr_writel(struct mobiveil_pcie *pcie, u32 val, u32 off) { mobiveil_csr_write(pcie, val, off, 0x4); } +static inline void mobiveil_csr_writew(struct mobiveil_pcie *pcie, u32 val, + u32 off) +{ + mobiveil_csr_write(pcie, val, off, 0x2); +} + +static inline void mobiveil_csr_writeb(struct mobiveil_pcie *pcie, u32 val, + u32 off) +{ + mobiveil_csr_write(pcie, val, off, 0x1); +} + #endif /* _PCIE_MOBIVEIL_H */ -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel