Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbdHXUi5 (ORCPT ); Thu, 24 Aug 2017 16:38:57 -0400 Received: from mail-by2nam01on0083.outbound.protection.outlook.com ([104.47.34.83]:63993 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753362AbdHXUiK (ORCPT ); Thu, 24 Aug 2017 16:38:10 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Roy Pledge To: , , , CC: , , , , , , Claudiu Manoil , Roy Pledge Subject: [v4 09/11] soc/fsl/qbman: different register offsets on ARM Date: Thu, 24 Aug 2017 16:37:53 -0400 Message-ID: <1503607075-28970-10-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503607075-28970-1-git-send-email-roy.pledge@nxp.com> References: <1503607075-28970-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131480806876731903;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(33646002)(2201001)(106466001)(105606002)(76176999)(50986999)(86362001)(43066003)(2906002)(7416002)(8656003)(104016004)(5660300001)(626005)(498600001)(3450700001)(54906002)(53936002)(8676002)(356003)(50226002)(81166006)(81156014)(8936002)(4326008)(47776003)(5003940100001)(305945005)(36756003)(68736007)(48376002)(189998001)(50466002)(6666003)(2950100002)(77096006)(85426001)(97736004)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB3324;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD031;1:oJUvNFKtpoqQT+QPeBMgdmUsFR11rvfO1tLgLcBfc6a+dyX4TIeCPKS7WqVxqAAsY1S6S8fB4oaHVmFb0jY3S8zxoJs8k+Lzbkf3PTJQOhgDcWCT2KrnLzrG7qtDSyyW MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c852086-66d2-410c-f89e-08d4eb30071f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM5PR03MB3324; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3324;3:i5tcxSRQR1Q9vD09SBuzhWMrrWQERqfVaAeiuKoPIQ1oQWucnVw+Ce/j0wAPEiLmF0G3ugBlvSd6iTV5TE+NxWlTX8e7SnelmGetcw1S7JDByC4FgearaCIPwSniwD94c4Di94tHPE3Pz1XcaOmVOzPHXx2pJhjLLRVippo3QVSCLnIKBd3ubCwc0iyqPHOb/se2NQNAfABnmrxKzohteiQmIAJdVkhuoDTKac/KiVoxg/4bdLyGq0HUzKqLYwzW9i9g4hq29BpK9lg70MQkNu8htYHHsaLUmEAaFUw/bQeAaWJrk3dmAJ3vdpv7tjJF/wE8WDApGMvkVAp4SMDA8BPZeVwaajq3hg/8NXRi+zQ=;25:31pNp8wLf3hVY1KR9njPM4614+/LOaR0GdzalF0yJI9oEzdHKXChI4RdUBKsZRMiB+MCJrcNQ7sTwwXnXfGsoW4uTpYFiOp9eJtYX4r51ad3HlfQykE1X8/EFAor5JAidqXC4AH7bS+j/CMZeJrGYMDjKYgspvSXJ3VpQimB6cEaA2BI46D9HXTjqj0plm/3bPFhT3NwTL75jhJrmiuhNGaq0NUWewT7pF0DZSbE1Pd/8hePKnqI8GDrmF5K9ysBXLl5w0GboSQB/y1WW59+pQHp9ckbFg4RxnUCG89xBL6V8OZ8M4NZm1ZfBKd1BfoGB0YqXddvpQ7sWNCFQmHNow== X-MS-TrafficTypeDiagnostic: DM5PR03MB3324: X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3324;31:KhH2pQHIeff50kyvxSvtW70tMZC+ifPe3QLoM5GLQK1oaELBftofMb85r7pg7r1mTY6FMcIa74lym9xwPQ89bAT0/ONkgDegoVsA4Vh3WlVwQoAS0WZYvfI3n4ml62eE303na2JiiYes6YwDzW4kV+FYTA+HIeCh10JU5AkuAT3x35nmSUfGNQ3HX03Y4rsPapd6sHXgRna0srktfkEISX5mdsiMkzD0e7JVS/czfUE=;4:cPdr51PuLcuEP/3jA5CBojuAVK8DAdlTTunsuOoG/RZg1qGYjnOnEt83AtVQCimE2iMSI//KQn0MjC3eXQsu7AgZK6X4XhTg0GmAzHIsaOXDdMpAvFdZbhcFqwDEhLUrSaNTaRLyW8g+veie37TIWX4pQeVpVGE4UJgqNQzk3FLd0CdCL+IP/Wu4VFOuPuyeLjwuCilLUAj+3K0pig7VTCDORDK9R8uOA7Lzwgl8klI8Q0RYakPLRgnoMZey+Om+pMDwHZ/X/X/wwOaJIcEWfzrLc8U8ujJciuRHcC7Tx2zKzDYxvMqfGtQFCAyk6vNkiVJtF95JkUa+C5Q3OK7udw== X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123559100)(20161123556025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR03MB3324;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR03MB3324; X-Forefront-PRVS: 04097B7F7F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB3324;23:99PmgFR4yQ32Skx5PJqUfLlXf5XxzEyVetSc2WDg2?= =?us-ascii?Q?lHZ5L/8fsfZyDWohi5oZiKpfMrEU3MDcEqS3koU0WiOIZRy7MEOe2cs9sAqh?= =?us-ascii?Q?mUX2/xOZU28p8CnDlX4ERoPtTiTxKAIARJ6mf1z7WbVvdJ1Qxs0waMRceqyo?= =?us-ascii?Q?O7iZArV0qt/n7ohwKX0KO3hpft2bYxTpWa3fIkG397wBudrOQlBD0qZwPJcE?= =?us-ascii?Q?sNiQI1TeOBPULoFCDY8ZCO8WYElCD47+r5zUppB5IK2eBsJ5g6ksk5leUIbs?= =?us-ascii?Q?dswVuld/tZg2cCd4ZbodrBr0C5EE9ZOLCBpSUXaGVNhZTsfKNYC0u5KOFYFP?= =?us-ascii?Q?trDM0gLkPF0/QLXSOXUSN6nE8JM9q6dxR1etJJ38gom+wv+tfvEkWyDgblMn?= =?us-ascii?Q?8uGh7sgtm+/moUKKNTWcgcipZ14EIhPjCeiKpZxc35MHcO88OwYirnHUIxal?= =?us-ascii?Q?zNfVaQ6jNMqLSemij1mrALEgE/L9YJwSpbw1wXc7e7FmWJpJ5WsY2TrkmNzH?= =?us-ascii?Q?7Ua3PKhLg9POcDr8zGib5sex4a74LdEbytPZace0Pqzj1l5jj9VvAFiiuM5R?= =?us-ascii?Q?yYA03VtEfuKzeFf0uwgAogwIc5O/igdKkwWqWIPNRyqHWTZMC2VP/CuiPo1U?= =?us-ascii?Q?zSM6pLKEawAqKlx5D1bY9EnYwicpGjQZFgMuwrcLoEtJ3O3I9Qb2uzVx0h6J?= =?us-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9RXisY2E0S9hMfiTM6mK1O3CjRqOCx1LGwqPV2KXA1mMHuyvGU7qm9wfcKvEaJlw==;24:ne9nyHJTxD23VHRa/PpoyaFSBobVegKyn2V5jev1uH9UU6GGvVP6pkGai9wn+uklBn3sk5OEAy8yNbpiA6JBVc77STlI4bcrhKEQwMSkSbM=;7:SZLyOrGVZhDEylOzbcQ9g9KlLOXhlPnNODCZKfbgntxIVkDa6jVeMkyD+5K2/DUQK51i1fuonCJCQj72yOnG+j/5gPp4J+rrjxUsuvlm+sc2dHAl4Oz7DYi9AHQhxftARo0QNVlDYhCviU/F7pGGYyO3QRQ2NbSKW1TjcqWBuT2wglP7ewumKqb6ZAbDJpgLEEUFLhi8wXW+wVulMTNpoIbAct1sdX/9tMUDCBMVV98= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2017 20:38:07.4703 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB3324 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3117 Lines: 108 From: Madalin Bucur Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/bman.c | 22 ++++++++++++++++++++++ drivers/soc/fsl/qbman/qman.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c index e31c843..265048d 100644 --- a/drivers/soc/fsl/qbman/bman.c +++ b/drivers/soc/fsl/qbman/bman.c @@ -35,6 +35,27 @@ /* Portal register assists */ +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) +/* Cache-inhibited register offsets */ +#define BM_REG_RCR_PI_CINH 0x3000 +#define BM_REG_RCR_CI_CINH 0x3100 +#define BM_REG_RCR_ITR 0x3200 +#define BM_REG_CFG 0x3300 +#define BM_REG_SCN(n) (0x3400 + ((n) << 6)) +#define BM_REG_ISR 0x3e00 +#define BM_REG_IER 0x3e40 +#define BM_REG_ISDR 0x3e80 +#define BM_REG_IIR 0x3ec0 + +/* Cache-enabled register offsets */ +#define BM_CL_CR 0x0000 +#define BM_CL_RR0 0x0100 +#define BM_CL_RR1 0x0140 +#define BM_CL_RCR 0x1000 +#define BM_CL_RCR_PI_CENA 0x3000 +#define BM_CL_RCR_CI_CENA 0x3100 + +#else /* Cache-inhibited register offsets */ #define BM_REG_RCR_PI_CINH 0x0000 #define BM_REG_RCR_CI_CINH 0x0004 @@ -53,6 +74,7 @@ #define BM_CL_RCR 0x1000 #define BM_CL_RCR_PI_CENA 0x3000 #define BM_CL_RCR_CI_CENA 0x3100 +#endif /* * Portal modes. diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 668fab1..fdd4c65 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -41,6 +41,43 @@ /* Portal register assists */ +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) +/* Cache-inhibited register offsets */ +#define QM_REG_EQCR_PI_CINH 0x3000 +#define QM_REG_EQCR_CI_CINH 0x3040 +#define QM_REG_EQCR_ITR 0x3080 +#define QM_REG_DQRR_PI_CINH 0x3100 +#define QM_REG_DQRR_CI_CINH 0x3140 +#define QM_REG_DQRR_ITR 0x3180 +#define QM_REG_DQRR_DCAP 0x31C0 +#define QM_REG_DQRR_SDQCR 0x3200 +#define QM_REG_DQRR_VDQCR 0x3240 +#define QM_REG_DQRR_PDQCR 0x3280 +#define QM_REG_MR_PI_CINH 0x3300 +#define QM_REG_MR_CI_CINH 0x3340 +#define QM_REG_MR_ITR 0x3380 +#define QM_REG_CFG 0x3500 +#define QM_REG_ISR 0x3600 +#define QM_REG_IER 0x3640 +#define QM_REG_ISDR 0x3680 +#define QM_REG_IIR 0x36C0 +#define QM_REG_ITPR 0x3740 + +/* Cache-enabled register offsets */ +#define QM_CL_EQCR 0x0000 +#define QM_CL_DQRR 0x1000 +#define QM_CL_MR 0x2000 +#define QM_CL_EQCR_PI_CENA 0x3000 +#define QM_CL_EQCR_CI_CENA 0x3040 +#define QM_CL_DQRR_PI_CENA 0x3100 +#define QM_CL_DQRR_CI_CENA 0x3140 +#define QM_CL_MR_PI_CENA 0x3300 +#define QM_CL_MR_CI_CENA 0x3340 +#define QM_CL_CR 0x3800 +#define QM_CL_RR0 0x3900 +#define QM_CL_RR1 0x3940 + +#else /* Cache-inhibited register offsets */ #define QM_REG_EQCR_PI_CINH 0x0000 #define QM_REG_EQCR_CI_CINH 0x0004 @@ -75,6 +112,7 @@ #define QM_CL_CR 0x3800 #define QM_CL_RR0 0x3900 #define QM_CL_RR1 0x3940 +#endif /* * BTW, the drivers (and h/w programming model) already obtain the required -- 2.7.4