From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0069.outbound.protection.outlook.com [104.47.36.69]) by dpdk.org (Postfix) with ESMTP id 5AE4A1C969 for ; Thu, 5 Apr 2018 08:40:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WO3sLB3+999qOp09egu7aHYwCFXNNBSpnkgoUKRdi9g=; b=GR2VacpZwHDPWswL9bagl2GzqcVe8dp55nJ6/tmpnTFPSSUdQfy0iCJW+G7FeDPqPwMDWkjwKaLPkR3F8+Ky41A+DCA2+7Yb64zFT2SDHNEuWQz3GeVlZWoEXVOxTT1UBEcB4VZIQgB5VA76WOsl2sFpgoNAFuqvQ8E5pR0rq0E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Thu, 5 Apr 2018 06:40:33 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 5 Apr 2018 02:39:48 -0400 Message-Id: <1522910389-35530-16-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> References: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::26) To BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1628c4dc-9e32-462e-bc52-08d59ac0224b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR12MB1505; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 3:KalR89N6cao0A63it7X7G913f+dzWLxQDTvZbsk7RZm8vfe/sPs7DViFKF5QTYlgx8C3gm1S64jZ6RSjUZVJhjzK2Xp579MsCM7HJWF70urH/y14Gjplzyvlnj1LG5pXz5PWeRw+BGSmbAm96P9Sm1udgnyTURpZoNINnupOshQoWSZutJlo2aDaDXswghtVbHTsDrgswgdxEqsy4z0VrCCWH19sF9mw95Jt+a0zcKrFBNa1Dfgz2bzwQZ4o9gD3; 25:77ASYLBskYHdu8rpSJupiVXJ7QOmMPW1x0sNVEdQWs2ReTTgXIGANyr0EllaAMmPTW21jQ5uvJXGrMbTAuospCQpFzEhI6ECGus7uBJxHpViH6mNp+qGFiLTwIo2XGTbYiuc7and6OdqFX0kzhEC0sCc9sXv43UzNIdhFUYrFJ3KA6BdFPCnot9p4RUMG30M6iWnZekHL6OroUaTdU1v7qGPxrKZcZ4qVKwqtj/ZXV4LNZzAE9v5yo3htCtVKs7vrg4t22y9sg0CbIcLEG/w6ccSxOjtuUvlCyZ6euQcFdaylaCsJgdS0NEZIpFVgnY8fnwfeYlZqvEIfqCahXzTuA==; 31:sM+PUeeUMUsi8hK2HaJkXTsT9Wrrt+wFttEUWXUJlIE0G0ApC8X+9AMkHbrpcmaBCtE7wz3i4HLVvx0L38eONW39qXj+jwYpXfe3Z7lBI1iXITDQuY7IRLdso10MNmhwRGmpd1Ut0Y6J4r+glSt4fxZ0RFXrDs2w2Pggw6ARJZmnwcx4gDP2Ccy0sHaLzf69zHeqzMAvu82ruiSsZwAsun6z2tztL9VViB5yLKbCeag= X-MS-TrafficTypeDiagnostic: BN6PR12MB1505: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 20:khTnPCdcYOJGwrpqHAil6/MWlrghjl4lMZfswzl1zl2aWrcCDG/9sensfIWgCkS/NOqogozf+GokngW2NecvtcUIk4YRwFBQhNYoon1kgl5gmhsMEibYsP1MdRtLCwuDZF/cf6mreLpRj+ubUiUaovSvahxHtB+37uT26cv316we0Cp4ZUG+TSGGFU7NQIUoH8YM2intFAQA6VJw2V11yxGzLsMBhOcf+6gImBWRAU38BIX7+mrM+YnH38g7OFelV0AaI4u5ETSFcXAueYw9O14GcbgyTox47l1808K5LQRFM/7W6SuQHCxLj88OWCW5PNiBl2SfgZfUO5LUqUQ5PtgYbCrXJEMz4QkS5J1ag2hqUN9e1E4ZqkxumvC9JjmGy3J7r1Q1yW0R9x8pLaZlIILkvj+WmhvjmECUgRAR0PXjyqkVvAzbEypxxSousugoa5tuXcHSkQOA6MnJj0u9N073OXPoUNNmdqV1fBOlsay8UUrSqGLbxuBxpYcBZeBt; 4:sWfWMyZaTI31Sh+ukL14HNnl/7pXnJ3CtF5Hp5F1nTCMFgoHLNQkS6Dhx+NsrRSxaluZ5v9k77wy4adj1s11Pac9X7KzZO8KHOsih27c7+BFTNiZVApDvPZydiBijMbe4hiy+ysk0ky6LL+1Q0cEujLxjNEI7ZGeJcceMvce9QEOAUGivWu7RTm9LCMkYI4ploDSD2xWbQLW7caMeEl4ir2DqFMXZSzOmZ8d8iwmo6dIdRcEytweN8BSg1R4OCNsENXef4Ci71AhHrKtj+z0OirXXAlHIOjKNMcMpwsAruf08TDZx7wxb3kZjSuwzdg6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BN6PR12MB1505; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1505; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(396003)(39860400002)(39380400002)(199004)(189003)(3846002)(476003)(2616005)(316002)(446003)(956004)(305945005)(7736002)(478600001)(16586007)(16526019)(6486002)(186003)(76176011)(5660300001)(59450400001)(97736004)(2906002)(6116002)(486006)(386003)(26005)(50466002)(11346002)(25786009)(575784001)(8936002)(86362001)(50226002)(66066001)(47776003)(48376002)(2351001)(6666003)(2361001)(6916009)(4326008)(81166006)(36756003)(53416004)(51416003)(68736007)(7696005)(8676002)(106356001)(105586002)(52116002)(81156014)(53936002)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1505; H:wallaby-smavila.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1505; 23:glHXIntkjSVfRGl5ELByTxvtjEv4+17wnMwq5Rjgh?= =?us-ascii?Q?yic48xAri+oaQ7Nfbt4nZfePyjKYP0hovcl72K85Z7Yv8XxsqGqye9O2U9ej?= =?us-ascii?Q?aVu/EZOsAbw5jgLeAMvxwUfm10iUUqGiyjfpBt5MkWQSG1v1vM7C+E7zqUfe?= =?us-ascii?Q?EDANajYB6thedSABfW2sZrjBhTFFn+xlJ+jn5KbV02yvL+gkjOxV7z42lH8D?= =?us-ascii?Q?3k7lMKF9ZBZQ8ljgY0PevB20YI0q0zvqHMZCWuTJhSR6cjSG1HsxNCjBM882?= =?us-ascii?Q?rr1UfsSaT/qy3DToBh0S1otJnbaVYl7E036tXVwPIUzBS+YKad0CdUWa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RfQHZUBgV5w+L6SIXsA90KGTNE1499Ad3A7+2yzwC+jsmPREgDO9aI6kg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 7:1RXLLnPTM83fV7ypmKWrp7xrySFidQQ03EzND2uWh7Ld09aPdOTVoio9Lklqrc2em7pR5daKPWPfdrxsiGHY421ohg/7p7uvfjdwquLA63Z3mcJysBTKxZ05DzenMEwJsrBqONk3XmWJE0wXcJryiC+A+ZbZ5NaTLwoSpsapzTI8HWigdLYiGuvZDP7+dWIMaB9iugSa5oLdEr/j/G1HyzMP9NhcC+FM7DcaJzLxtTT92ldb7SLEGEScajpTwtGE; 20:mu3cY8og0zOjS7y8sAUi8vwndERl7FWkzuYU77GPPjfpq1ya2YSlTzr1HqhqVF5/RFMdSaoB0nttYh1xdHaS8zxoA4dk59Bj/NkwrGVGpISBQlU0U0BxWbZjcFHwofesHjaYOmJ5SAi6qD1BtHjg4hALIarbc9m6RkBEEKXPUvy7bBm+l4BoEezoXPTFZa4bS5Hrd9dBTQC6z0zO+CpD4b8vU/hwIEa+/35wQd4Ml1i2OJFfVw0xRtX1OU60cpX0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 06:40:33.3472 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1628c4dc-9e32-462e-bc52-08d59ac0224b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1505 Subject: [dpdk-dev] [PATCH v4 16/17] net/axgbe: add support for build 32-bit mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 06:40:36 -0000 Signed-off-by: Ravi Kumar --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_common.h | 53 ++++++++++++++++++++++---------------- drivers/net/axgbe/axgbe_ethdev.c | 10 ++++--- drivers/net/axgbe/axgbe_ethdev.h | 8 +++--- drivers/net/axgbe/axgbe_rxtx.c | 12 ++++----- drivers/net/axgbe/axgbe_rxtx.h | 4 +-- 6 files changed, 50 insertions(+), 38 deletions(-) diff --git a/doc/guides/nics/features/axgbe.ini b/doc/guides/nics/features/axgbe.ini index 042ff1e..ab4da55 100644 --- a/doc/guides/nics/features/axgbe.ini +++ b/doc/guides/nics/features/axgbe.ini @@ -15,4 +15,5 @@ L3 checksum offload = Y L4 checksum offload = Y Basic stats = Y Linux UIO = Y +x86-32 = Y x86-64 = Y diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 298e794..64c7a7f 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -1385,7 +1385,7 @@ do { \ * register definitions formed using the input names */ #define AXGMAC_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xgmac_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xgmac_regs) + (_reg)) #define AXGMAC_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(AXGMAC_IOREAD((_pdata), _reg), \ @@ -1393,7 +1393,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xgmac_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xgmac_regs) + (_reg)) #define AXGMAC_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1409,8 +1410,8 @@ do { \ * base register value is calculated by the queue or traffic class number */ #define AXGMAC_MTL_IOREAD(_pdata, _n, _reg) \ - rte_read32((void *)((_pdata)->xgmac_regs + \ - MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) + rte_read32((uint8_t *)((_pdata)->xgmac_regs) + \ + MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg)) #define AXGMAC_MTL_IOREAD_BITS(_pdata, _n, _reg, _field) \ GET_BITS(AXGMAC_MTL_IOREAD((_pdata), (_n), (_reg)), \ @@ -1418,8 +1419,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_MTL_IOWRITE(_pdata, _n, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xgmac_regs + \ - MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) + rte_write32((_val), (uint8_t *)((_pdata)->xgmac_regs) +\ + MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg)) #define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val) \ do { \ @@ -1435,7 +1436,7 @@ do { \ * base register value is obtained from the ring */ #define AXGMAC_DMA_IOREAD(_channel, _reg) \ - rte_read32((void *)((_channel)->dma_regs + (_reg))) + rte_read32((uint8_t *)((_channel)->dma_regs) + (_reg)) #define AXGMAC_DMA_IOREAD_BITS(_channel, _reg, _field) \ GET_BITS(AXGMAC_DMA_IOREAD((_channel), _reg), \ @@ -1443,7 +1444,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_DMA_IOWRITE(_channel, _reg, _val) \ - rte_write32((_val), (void *)((_channel)->dma_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_channel)->dma_regs) + (_reg)) #define AXGMAC_DMA_IOWRITE_BITS(_channel, _reg, _field, _val) \ do { \ @@ -1468,16 +1470,18 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XPCS32_IOWRITE(_pdata, _off, _val) \ - rte_write32(_val, (void *)((_pdata)->xpcs_regs + (_off))) + rte_write32(_val, \ + (uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS32_IOREAD(_pdata, _off) \ - rte_read32((void *)((_pdata)->xpcs_regs + (_off))) + rte_read32((uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS16_IOWRITE(_pdata, _off, _val) \ - rte_write16(_val, (void *)((_pdata)->xpcs_regs + (_off))) + rte_write16(_val, \ + (uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS16_IOREAD(_pdata, _off) \ - rte_read16((void *)((_pdata)->xpcs_regs + (_off))) + rte_read16((uint8_t *)((_pdata)->xpcs_regs) + (_off)) /* Macros for building, reading or writing register values or bits * within the register values of SerDes integration registers. @@ -1493,7 +1497,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XSIR0_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->sir0_regs + (_reg))) + rte_read16((uint8_t *)((_pdata)->sir0_regs) + (_reg)) #define XSIR0_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XSIR0_IOREAD((_pdata), _reg), \ @@ -1501,7 +1505,8 @@ do { \ _reg##_##_field##_WIDTH) #define XSIR0_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->sir0_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->sir0_regs) + (_reg)) #define XSIR0_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1513,7 +1518,7 @@ do { \ } while (0) #define XSIR1_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->sir1_regs + _reg)) + rte_read16((uint8_t *)((_pdata)->sir1_regs) + _reg) #define XSIR1_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XSIR1_IOREAD((_pdata), _reg), \ @@ -1521,7 +1526,8 @@ do { \ _reg##_##_field##_WIDTH) #define XSIR1_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->sir1_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->sir1_regs) + (_reg)) #define XSIR1_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1536,7 +1542,7 @@ do { \ * within the register values of SerDes RxTx registers. */ #define XRXTX_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->rxtx_regs + (_reg))) + rte_read16((uint8_t *)((_pdata)->rxtx_regs) + (_reg)) #define XRXTX_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XRXTX_IOREAD((_pdata), _reg), \ @@ -1544,7 +1550,8 @@ do { \ _reg##_##_field##_WIDTH) #define XRXTX_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->rxtx_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->rxtx_regs) + (_reg)) #define XRXTX_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1569,7 +1576,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XP_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xprop_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xprop_regs) + (_reg)) #define XP_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XP_IOREAD((_pdata), (_reg)), \ @@ -1577,7 +1584,8 @@ do { \ _reg##_##_field##_WIDTH) #define XP_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xprop_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xprop_regs) + (_reg)) #define XP_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1602,7 +1610,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XI2C_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xi2c_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xi2c_regs) + (_reg)) #define XI2C_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XI2C_IOREAD((_pdata), (_reg)), \ @@ -1610,7 +1618,8 @@ do { \ _reg##_##_field##_WIDTH) #define XI2C_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xi2c_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xi2c_regs) + (_reg)) #define XI2C_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index 8c7b0ee..61a600c 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -589,10 +589,12 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) pdata->pci_dev = pci_dev; pdata->xgmac_regs = - (uint64_t)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; - pdata->xprop_regs = pdata->xgmac_regs + AXGBE_MAC_PROP_OFFSET; - pdata->xi2c_regs = pdata->xgmac_regs + AXGBE_I2C_CTRL_OFFSET; - pdata->xpcs_regs = (uint64_t)pci_dev->mem_resource[AXGBE_XPCS_BAR].addr; + (void *)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; + pdata->xprop_regs = (void *)((uint8_t *)pdata->xgmac_regs + + AXGBE_MAC_PROP_OFFSET); + pdata->xi2c_regs = (void *)((uint8_t *)pdata->xgmac_regs + + AXGBE_I2C_CTRL_OFFSET); + pdata->xpcs_regs = (void *)pci_dev->mem_resource[AXGBE_XPCS_BAR].addr; /* version specific driver data*/ if (pci_dev->id.device_id == AMD_PCI_AXGBE_DEVICE_V2A) diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h index e977448..7bd2900 100644 --- a/drivers/net/axgbe/axgbe_ethdev.h +++ b/drivers/net/axgbe/axgbe_ethdev.h @@ -445,10 +445,10 @@ struct axgbe_port { struct axgbe_version_data *vdata; /* AXGMAC/XPCS related mmio registers */ - uint64_t xgmac_regs; /* AXGMAC CSRs */ - uint64_t xpcs_regs; /* XPCS MMD registers */ - uint64_t xprop_regs; /* AXGBE property registers */ - uint64_t xi2c_regs; /* AXGBE I2C CSRs */ + void *xgmac_regs; /* AXGMAC CSRs */ + void *xpcs_regs; /* XPCS MMD registers */ + void *xprop_regs; /* AXGBE property registers */ + void *xi2c_regs; /* AXGBE I2C CSRs */ /* XPCS indirect addressing lock */ unsigned int xpcs_window_def_reg; diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index cdc428c..17982bf 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -70,9 +70,9 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, rxq->queue_id = queue_idx; rxq->port_id = dev->data->port_id; rxq->nb_desc = rx_desc; - rxq->dma_regs = pdata->xgmac_regs + DMA_CH_BASE + - (DMA_CH_INC * rxq->queue_id); - rxq->dma_tail_reg = (volatile uint32_t *)(rxq->dma_regs + + rxq->dma_regs = (void *)((uint8_t *)pdata->xgmac_regs + DMA_CH_BASE + + (DMA_CH_INC * rxq->queue_id)); + rxq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)rxq->dma_regs + DMA_CH_RDTR_LO); rxq->crc_len = (uint8_t)((dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) ? 0 : ETHER_CRC_LEN); @@ -387,9 +387,9 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, txq->desc = tz->addr; txq->queue_id = queue_idx; txq->port_id = dev->data->port_id; - txq->dma_regs = pdata->xgmac_regs + DMA_CH_BASE + - (DMA_CH_INC * txq->queue_id); - txq->dma_tail_reg = (volatile uint32_t *)(txq->dma_regs + + txq->dma_regs = (void *)((uint8_t *)pdata->xgmac_regs + DMA_CH_BASE + + (DMA_CH_INC * txq->queue_id)); + txq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)txq->dma_regs + DMA_CH_TDTR_LO); txq->cur = 0; txq->dirty = 0; diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h index f221cc3..1ec6c2c 100644 --- a/drivers/net/axgbe/axgbe_rxtx.h +++ b/drivers/net/axgbe/axgbe_rxtx.h @@ -80,7 +80,7 @@ struct axgbe_rx_queue { /* Ring physical address */ uint64_t ring_phys_addr; /* Dma Channel register address */ - uint64_t dma_regs; + void *dma_regs; /* Dma channel tail register address*/ volatile uint32_t *dma_tail_reg; /* DPDK queue index */ @@ -127,7 +127,7 @@ struct axgbe_tx_queue { /* Physical address of ring */ uint64_t ring_phys_addr; /* Dma channel register space */ - uint64_t dma_regs; + void *dma_regs; /* Dma tail register address of ring*/ volatile uint32_t *dma_tail_reg; /* Tx queue index/id*/ -- 2.7.4