Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1846624imu; Tue, 6 Nov 2018 05:22:26 -0800 (PST) X-Google-Smtp-Source: AJdET5dkzU0jK6w7XCHVvnzDhmZvUrfuap5tah8bl2qz0Ux7CbHAdTDc3V3kYrWns4Wmvh179U/I X-Received: by 2002:a63:5f41:: with SMTP id t62mr23854263pgb.76.1541510546600; Tue, 06 Nov 2018 05:22:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541510546; cv=none; d=google.com; s=arc-20160816; b=nlDYT3Suk+ew08t/M4H2nPH/pgSNm9cj7fUGdxVsEISDAg39mtinSDUQBMT5FMh/I4 PQbfHEiyyzyTXFm5JntnPerdqqihxNoJh/O7jYqMQXsBHa19VYiXLyB4eeW9F7GYaRxO DP4M/mrsVa5qnTn3cMmWEJv05WKWaRSf6fu/0+YXHB0+OdqdM1euASsM7uRCMTgGMPsM WEgzV+qRPkmi2LDUtUX7NyFtWRHJRrgD3oQ+tkFSUChh8090PQFZQ1tOPOhvHkvW6oKy KgBUI6djvuSuNE1qXBdXGgfh1eDThJ5RF/WVtE1vQjHENUw+VlRuxMNJnDhbvxq/1yGV jbqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=mWry7gCZSzWVlS4ahhb1go/W/PQXURJtjoF7yBzmDFU=; b=mc4Ft/BOxuBor76aqozZCZwr9we1818CRe/rq7J8+Rt1Hb0GvHoguFO1To6YhppfIN phATpqoi3bRHihTGY/vw/vTRUi6nEThLC6VrP56TUBBpZBZYIx/E7oNo3sPicGO2sDIB 3Sm7oz//88l3ISCpLAIi5yHSpRANsxCLkdLVIyOaoAV2p3qPpaw3n5MAWNe7and8aDLN Qp6Uzy8yoIC4oKqF6JJ6wt+o4PS6FJy9d4DK40GPTA4fha41n8I1LScGDtmtp9L2r5F4 SZcS9gNboTsB9O7SPXWJwBXl8aOe+uhfpRZ/sE/SJSrJjHUtAhtT5kDqFO5D7dt3cZS5 GMrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=oc8yRIiq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9-v6si42572957pge.245.2018.11.06.05.22.11; Tue, 06 Nov 2018 05:22:26 -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=@nxp.com header.s=selector1 header.b=oc8yRIiq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388529AbeKFWqW (ORCPT + 99 others); Tue, 6 Nov 2018 17:46:22 -0500 Received: from mail-he1eur01on0079.outbound.protection.outlook.com ([104.47.0.79]:43456 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388225AbeKFWqV (ORCPT ); Tue, 6 Nov 2018 17:46:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mWry7gCZSzWVlS4ahhb1go/W/PQXURJtjoF7yBzmDFU=; b=oc8yRIiqdC0earhhWIvifUCR4blyPz1BEsi+7OwKG8kcYNc3ILjyuvPUWKWfzSemcGXWLcc7crd2DnSdJ3GZzP95wazO5Dj24ADPV+yF8o0m2ojO2I7eEl3/EKGIiitoeE43NZ8K0LOMq54GYlA38+c32MPr9VyVNwOU1lSBAbA= Received: from DB5PR04MB1221.eurprd04.prod.outlook.com (10.162.155.27) by DB5PR04MB1414.eurprd04.prod.outlook.com (10.162.221.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.27; Tue, 6 Nov 2018 13:21:06 +0000 Received: from DB5PR04MB1221.eurprd04.prod.outlook.com ([fe80::6c36:f4cb:26c2:e8cb]) by DB5PR04MB1221.eurprd04.prod.outlook.com ([fe80::6c36:f4cb:26c2:e8cb%2]) with mapi id 15.20.1273.035; Tue, 6 Nov 2018 13:21:06 +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" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCH 19/23] PCI: mobiveil: add Byte and Half-Word width register accessors Thread-Topic: [PATCH 19/23] PCI: mobiveil: add Byte and Half-Word width register accessors Thread-Index: AQHUddOSJtO93UKerUSO5oBANnJx3A== Date: Tue, 6 Nov 2018 13:21:06 +0000 Message-ID: <20181106131807.29951-20-Zhiqiang.Hou@nxp.com> References: <20181106131807.29951-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20181106131807.29951-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: HK0PR03CA0008.apcprd03.prod.outlook.com (2603:1096:203:2e::20) To DB5PR04MB1221.eurprd04.prod.outlook.com (2a01:111:e400:51c2::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB5PR04MB1414;6:0ih/73KH9iFglZu4Rr+DkvKGrZeSuWYR3CcOr+olJHbau0x8i67tNSwNTr1FtJWrdCm590A+/u+eMfDruIOlZqrhX/TQzvOOTkH3Xtlp0UFhvP+SLLg9Qbt+h7CN25LFJdaHaFdbjmJSmGW0WhPGdEJBX8SjyYjDTD/IKlPUVEbvZhP/8pUORyN5/HK9E1dvkhoKrRtw+yypRqn3kM0zGlcipYQJ9rSWEqvqOOWXxhHoskXULfUyv1LLv7uef0uDMefUkVx78koVXWOzXUggDkGu3Y7XB9Uck8jgh5fnahRglGWDpq0Tf9H7gtk3XgdGT6vQV/aRBP+3TjpxNOgkoDfUASnC857Z2twQrKTH1yEyV5+wxMm+CNUQLoeT03J8WtMIZsmfwdecw/5eFHEd/PcYAODfXQOFb46QOuXrkKyFQq0jf5HvVmxzRZpJfjZGWpKWqgqWejVckC0041sLsw==;5:B+coAuih0gaJdIB3cDxOCLlh+SIXZrUzHNRhbzzb7xbqIF0WKNu55YpuhS2wum3LrGahPXopsaFTOEJ4lHLvJHFDGWiPLW/v312kJCB0HPjAGlc0qZaThpPkg/SocNRMKv/CizRPk7+4NcU8FZSEC97ZOvF0WFJ8vk9BsMcHQVw=;7:Ju5KL9+K4Q+Hs2ltRAyJYHgu+0g32xA90I7Gb3koHTbb3qPvM97S12ISuMYn7jhTp3E9jAC5D+61jC/q21lPMWLyMRfwYYBl4BSvSVIc8ylCf3WMqeRgs9/6oMifBZC+KYdl8/YLDkJSQp3i1prDGA== x-ms-office365-filtering-correlation-id: beba9873-d6f7-4aea-6283-08d643eab502 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:DB5PR04MB1414; x-ms-traffictypediagnostic: DB5PR04MB1414: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:DB5PR04MB1414;BCL:0;PCL:0;RULEID:;SRVR:DB5PR04MB1414; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(396003)(376002)(346002)(136003)(189003)(199004)(97736004)(66066001)(8936002)(81156014)(81166006)(7416002)(8676002)(5660300001)(71200400001)(71190400001)(478600001)(6486002)(6116002)(2900100001)(1076002)(53936002)(6436002)(6512007)(305945005)(4326008)(25786009)(7736002)(105586002)(106356001)(68736007)(2906002)(3846002)(256004)(26005)(486006)(2501003)(14454004)(99286004)(52116002)(76176011)(36756003)(110136005)(386003)(6506007)(102836004)(54906003)(86362001)(186003)(446003)(11346002)(316002)(2616005)(476003)(2201001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR04MB1414;H:DB5PR04MB1221.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-microsoft-antispam-message-info: WDnPafxHbyx/3pdSt7BbkmXCy1cCAY2p8pO9f/ReVjNAqLFojuyKAqQcZ+yewrEeRGAWvuuwTdxn5MV5GsmRcZkgrrrT8K/hUgXqcgpwtJxgLo3HJPUz99hplevGcSx8oaTysLkhHFVX6z/mZD0Q5jZhq0y5F76rREnpKbEIKavAVOm0/XgjALJO11a3vPFuJ4GzXYtRlZoDf+OqEvh06WpeB65nDL1a58zqJykQMloJD3Gl4dvNzAbhjmZ/t0sm0QgkYRywL2WNvgDjVM6ccELb+44+RnRr4o5LZH+rp5f0+VtLnJSLSHlBYGSejDcPB8vXmwgonM96nenpv4Vxz7jaX6BFm6KfwEX/le7csvg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: beba9873-d6f7-4aea-6283-08d643eab502 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 13:21:06.4419 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1414 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- .../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); } =20 +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); } =20 +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 */ --=20 2.17.1