Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751353AbdIRUku (ORCPT ); Mon, 18 Sep 2017 16:40:50 -0400 Received: from mail-bn3nam01on0089.outbound.protection.outlook.com ([104.47.33.89]:17106 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751529AbdIRUkC (ORCPT ); Mon, 18 Sep 2017 16:40:02 -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: [v5 10/12] soc/fsl/qbman: different register offsets on ARM Date: Mon, 18 Sep 2017 16:39:45 -0400 Message-ID: <1505767187-4596-11-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> References: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131502408006517762;(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)(39860400002)(39380400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(105606002)(97736004)(106466001)(36756003)(189998001)(50466002)(5660300001)(6666003)(7416002)(77096006)(86362001)(50226002)(2201001)(316002)(4326008)(5003940100001)(16586007)(3450700001)(33646002)(85426001)(48376002)(54906002)(356003)(43066003)(8936002)(498600001)(68736007)(81156014)(81166006)(8676002)(8656003)(2950100002)(53936002)(2906002)(50986999)(104016004)(305945005)(76176999)(47776003)(110136005)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR03MB2703;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC003;1:npokkwdsQvw/jyTHzUBbnF6vIfa3lXS0XQSNbbpIfCPp5NpaXfYUzd5w7mpwNr9GiWnzVIR3csHVZuEJRAIoBo45MBNhwIwrYKp8tCyXj1W/WLQNUCaE1TkkNcXEAYct MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b47d7d99-77d7-40e5-4402-08d4fed56ecd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR03MB2703; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2703;3:4u7c3POpMW42PVcDCWrKKqVQAH9kGcFTs2vl57ZWRQtr5vDzDQ1jf5i4cLCvyJPkSSTmdlJU5bddNwlXL3neGuhxK28RS51Vc/O0NR6ra8OO8EchhF8RwwbFTKaOPEEs7N8z0UImtQItYpDmzjiP4YhckxYpctWrp/NyuisWJUSAUXW276MXxG8Tajs+tQPSXBqtIJv6ThtB/NUq5AiP/ipxwTcU6W2GXGl+ojoo89zrav561+Q05kPuCzQhalOz4gfjECOesI/crW0aCwd0Ir8cu6PG9BJ27pm+oEF8Bm2MjMzyw57BGo+PTdf+taRWxeivV/VbDp9ABwBcKd93Wd+UQphwAGwf1dE+gk0g714=;25:mPa7PYGh1TBGBNnE8OGfdaR9W8s2NImBm79JK146MjCUwFLhUA+nJzCvCJLCUNqEo70f/Xatz2b8DL+CeiH3SBSBvaRaEb3Cori87AV05c1zbZOCe0yjLSyzj5bjkV3pnPmjeC0xn2KmbQPrHsVDNFjRyuxoTnPhYLF/dVw1d2KtqrHa2Vyij5fOpAS4jrDfGPDohssSw3l/WkmSH+MCuklDKVNycIPT3U4kU3QdSKmRiyu3Cn+KXJMkcz7qz2lN4ujqUE6V1namdE4OJZCrgSktt2dLmk8nJoq421zrjj0KLuIzIvteFcs+2J9MM/uvWeH/r+joNYL/MoRwHWRzgQ== X-MS-TrafficTypeDiagnostic: MWHPR03MB2703: X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2703;31:7g7/C1m1x77qRPjJL5WENzt8D2WgRehvQZe0WKajq8wjRKD2CdMDxfd7cV0JOKqXnJbxSSj/z2UAFmDoUHhliC/mfemthQrMz/hE/yRM/BrdBKicpfNljY38rqCKnr6PDJOBNaVO8rZ4Qci93rCewpEZcCNYUKn3WGZNoR4Ll0OcC5wfkIetRBKFITYo70VEpDCdQuI1FltBpUDuU4slJCWhCahn/m7Nvdi8pZ0Uabk=;4:FmlL+7ODHku7ywmMGZeysgW9jdMKp7t5NxiVOSmrjqaW1NfkybU5s1B2V5QCEDUCuy/GmCzVCqpO8M1vp1pjVfeDNobl0l28ubHgqt8LmO+dAoMTTBcVcDjlGcn4g+ZmEG3KNpEy0MAMbsWKQfuQDVXory13rnNEMs0K6Mtq3Tji7h8uxNf+Wr8aZ3HXccnvBOffw93byi6j0MLUol3lb03PT03+KsPxW6uoY8EESjLAjACugr+Fhenwxx9tcaVyh5ZWLf31PADja32dYmQXcR6kNSJBd+wD0WlZWfw8dtqcH5p5xuRUTdmf5XKBDm4zyxnxF6WYcqZm2MWIo8B4VQ== 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)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123561025)(20161123556025)(20161123559100)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR03MB2703;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR03MB2703; X-Forefront-PRVS: 04347F8039 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR03MB2703;23:NDJFe1OZauqCKfT8LywnhYB5KMmxN+dFXY0WhI5q3?= =?us-ascii?Q?Ui+T9Pel4oMZafrGaklCc0UqqfccE2zC6SUktIGYPzArz6luYSVDyr8o+OWN?= =?us-ascii?Q?5BRv+YC7r2oiDcMsVEabmkc9l5P2VODqRwpde2a+j4vsTB34YTYTj3xv0eAQ?= =?us-ascii?Q?Hk6Xj12r4oV2NwDQU/9bYJdV0EOXkBR/AdCxlkrJc5hP6WiDHbEsSiGxEE0K?= =?us-ascii?Q?vXP7MRDf0Nc1NrplnEsphhDWNFip42aGenG48BZgtdCyqV7hCtKryzjAFiju?= =?us-ascii?Q?sawtLlY8lA2TCNq9/XzbASfUnolieaOzekSWlgY/1tdwGLcLbQJoOrk6/6bM?= =?us-ascii?Q?R9Ny6vGGHdsutp8k7jV4jJ592qodeB4lrsLduyudUJadpssObfMGxKXu/dP1?= =?us-ascii?Q?KW8YszsR+mj47NovVJ8R7sZ057XrHBvVp06pmod99obM1d1CR9CZcFIqcutH?= =?us-ascii?Q?kzhn5Z52cBSf+M8UdBLXZvAVz2QZnkIHiqJDGa6loBAn1EFDBwk2QmnJzmzd?= =?us-ascii?Q?StHlD8ZYBvjT4lq6hCRCB+/uqxnRnZ7f1QkjRo+HdIH2tlAmpRPGpa4ucDhf?= =?us-ascii?Q?pM6FQF/q4cku5nVvbKnHx5rhLLI+VDsi5rFbZ5j+QdqdQ8y9vTWZNaIqeWsR?= =?us-ascii?Q?emNKxLD0RgYbb5nY2oRYrSn8Ia6wjCGNxl3HZxCsjUNayFqOrN+4Ys70R9u3?= =?us-ascii?Q?V1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9PXPMlM79thxvXIDDi1cKR57HoufKC8fG+OR8jBnHTx2IY8h3y32yTnNCsFmaU8nsyhKHaMwqYxbYj01S52QJlhlzt/DC7dfiwAxlMP1J9NcONRVkTQf8m/Gc58i8kXd62uHossQ3HlJnEuQ==;24:fK/FmW7C2UYsO/I75Gg3BDcj0SAjYoRrQF2KjgXZhZSkO/NX1+VGSj0tm+bNaoVgG3d53x8z/3G645LPAiv0NSi+RDUpH6jAnIncXNtRVao=;7:NoOKHklhCLK7L8gpSxSSd+Vo3azdRPct7hO+NQEvRe/wVfzjzpHYrWryfDlszxFZoCBkLJ4/qcx//RMjbrw0v4ijFhf+/Z/lZhpSI0KWacGwlmofmEKPTayCTGO70316yXCVt1WuhTNiyIqjH7DFPkjthSpIKFWPHPsV+W2IX7MdMEm0QpsJ/aTLThrAmMv64fb4dHP5D/IMmbqCWcYVqNW+FMOl/iQnd+4+690JEU8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 20:40:00.4489 (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: MWHPR03MB2703 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 5dbb5cc..2e6e682 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 8934c27..7cb7bad 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