From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0080.outbound.protection.outlook.com [104.47.40.80]) by dpdk.org (Postfix) with ESMTP id DC3782B93 for ; Thu, 2 Mar 2017 12:37:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yIz3nuq5gkVDH8Pk+Au6e0oXV8PGoQyH86cOkZZ+YAI=; b=bmgFidgOSx0CForFETMjPkUHPTWkXbpKveluYZCdiWmB+V1AA9M2C4PiMeXVVJYHXNbZF8/YcFvTriMEGnrxAHhHsGtVN+ZTQMynrhEx8EBsD4vO5JTkcdXfE33zNon7KIIHDt9kkJtHbAGodBY9zZBZh3pzOrBF1LNvJpZkD/c= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 2 Mar 2017 11:37:35 +0000 From: Shijith Thotton To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Thu, 2 Mar 2017 17:02:07 +0530 Message-Id: <1488454371-3342-3-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.163.198.156) To CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) X-MS-Office365-Filtering-Correlation-Id: 4a37b277-fb4a-4dbe-67c2-08d4616087f5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:jyTS/aj17ugb/Za+SQ7KDJPahzMWwwoJKbCWHKBayUL1d2LL2p/Vz4dgl0L5PriEgUKFjoXWm9ndKlDUR1yIiZbXtyh+vZ56mcKnVsdJEQKNRI/BQSDrQAm1mtpYN8zq6vGkP8wvWjIK8NNItgb3JZG6jQbWG0r9zT7t58+qzubIR7ysQ9g9EZCF4WD1R4WUQ2/ziiknp2OMh8P8lGJ0yx7KPT7pDIVzdPre2viQqPAT0xqMNqugqrjxJtRShVFVj8m0aG+oRs76plmAGehfpA==; 25:A3tFYw3ybiedORJtYNowvK4YyipQ2oFDzvszIT9i0KKzx4vPhjepk9VE/0RjEMUcfksgCuCBE+PqLy+W6eJs+1HMUIIFA5Ogtdc1bSQR8JIKtJNKBxC0KNDYZ7CLj7F51tOMM2eAqsa5bpgnJoAzSSjOtIYbvjwJ5rori5c4ZHvNNZQ64dsK+xWJ9sfM+rf3Z8blUJJ6MElBWw6nlHQnpt0NCD2uLLJyGFZUoxvSrs7pgzIx77tZi5kVVQhu6iqmlmPRbRz3WuLXI9oWYXbm22iomIX1Whh7yHWPA2JziLbzW6qGes1iFXwypRx1PoJk/zjrfUOaArSDxBK0QKnf/g/Tmg+hryCuVFhc3CehQtSWNHx9paYQ6EDV3qfYvf+Mm0uYES7IjUPpwkgeT0h+tk3TDHWwwj9zv3dvJ4AF8hRrkProEdIhIKQZTxY9I5/WjEyfVwOa3n79yqk+g/bxKQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:3LEb4f9hgAtoYK9aE7FqNpsS4jv51EfyPXp1IY+OjnnTvWxDT43bEyByJMGo8XAOU4FyWWO18BQQ5pq31dEZOVmHulyT+NUeIkgGsEy2f2EdEw/7dRTKWH8vJjylyNu5U9Bus7w4fT+UkRHcL+9+x27ozCVD6/o43NvWUVnpURX9yxsaHrgxBVl2Eg5Yn2wkZPCMiAwtEF+hVrnvNFC2qlASF63yabnzzIZ2rsK35+w=; 20:Q2nBMTfXfMlKzCuKnGT/Y4YjcSQHwQCqFygWsFwXjyd4pDvy9AkSUFdzmaxIy2uqp9vsoIw1/H+f/Oi++7YGIL1HmPaGL4TICeqWGxk6smj55CKgPnMQ1+osi+xtWDdFtriaX1BICgobszjozT/Pr+AexcYMr3ql0K75mXMPHDnDmbSRNKytI31q0qPmdiohLYZaGjgyy+haqL0E3ii8HaXCBvCvd4s0JIz6ewoaIAZS7qv7R28vf6E4FuxWOqCLgM1OkvGACbU5/UaeyAIYclzm3cFKZbUqT8D6OT7OMzYJn9v6y2+L2ESEAgFuRin0RGtecMMUOKxcoHlADl+nNVE3VLXHG+wyHEPCawmASLPjqE1mjNsIfD2QhNbqSIGZ7Pd3mqhHmME/S+AW6wWeZDXtDrDX3mxQoE9ShaKMUdPRY+PhR8GGwh4XR3Ok7ugdyKm2LE9vFerZWkthgtBdCrApL3IzsMtuTZqDSSyGagFBxnjwwIErp83WjARfwnKKXPU9wGcZ5xXbhHRrpSHSuAowkFPdzQUbs5snAIn007C9pAeJZfIBD2BD+eex81vAlejnOdXfmtOHV/KKEox8tUe+bZG3rKsNC2zIrH+iHrY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR07MB2277; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 4:7H9na8vtV/mRKhMGAuRDPmvLhwMiBsc41ZoTpystLlspxLUl1fAoZijGmuPn72G+IUl0RjUks7uWN+DEMo2xbm+GPQTKuIjtmSUX20Em2CM0LO/xcikxb47fv6tTvk1/HdQchBgVqYr+UtmkxGEGnnK+Ka6bZbN5l3E2LgglaiAVZR58cmsnPJR/wF78xMjD5/dkPiJRPstEcn2hTE4KtU58VKp9vZPL82yAvQH75xdEa5NffG42x8l37UkWAgDEvdFWlVOi7HpqLbMEUhxh1OvzYA7DQ94dksmCN6s0sitrY6eukbZ23hql6UEnghaz5ZTPsgjrLz3se6zkncjkPDiKM+DaBmFLb/sxSl/RCk67yfGUt7EL2brBiPvpTrhCbbjnD7TpHr4eykx6ZPmudEVg8xUbZeaxFd1Mpk1SrFGCs4cgvghuMT5Ai8Icn4zro81hVIiObyYeIlIdF8MMPlPyriWQdqXDRyWUTlbTaxtLMQRFGQ/wl3Ux3HZO1bXJSRdY4FvUtD1mxpPbDJPbLR4sjbgWRvetaH8oiv3ptAVKUF4JJPO3j9y96gapEtPBatioNH3SckeeUQMqahNjg2TFDpW4OWdibM4qhD3KaUA= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(2950100002)(6916009)(42882006)(5660300001)(92566002)(4720700003)(33646002)(48376002)(50226002)(6666003)(2906002)(5003940100001)(36756003)(8676002)(50466002)(81166006)(110136004)(38730400002)(4326008)(305945005)(2361001)(53936002)(2351001)(25786008)(6512007)(189998001)(54906002)(47776003)(6506006)(6486002)(66066001)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(7736002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2277; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2277; 23:2f1zlG/YoA38M2d2zbCcUPQhsibxcO3dAQGaoguhH?= =?us-ascii?Q?IU0GRWa2ft42kTp6X9TRm40pbtDLro+pDoojNuV5j1Qj+S/n5r1C0AZVL8RJ?= =?us-ascii?Q?aLG8rVWu71g+QpNHP/PpghH5GRMNbb7H4pPLFiF5CnoKMdCe/MckPvC+JdcC?= =?us-ascii?Q?0e3bBTM6VJNwHuqe/5gzJYu8LT69zfZsDgviuA6m6r8wh9kZLygc3sVzKqaX?= =?us-ascii?Q?PrvRBEoetFhV+skSlVR9LsufyYxtRdhriykaxibfz6G321tDH1rGsY1RYK02?= =?us-ascii?Q?IRLkJ1J88WcFuFgOn4rsbWl3ynWWAmD20QNOrYJXTRk3rnVqY085J2exo1Tr?= =?us-ascii?Q?/xzSHljIkIMlKvCe7Hek304/k9yGzCZwEvKX5xojefJmzniA0qBpk8jO00qH?= =?us-ascii?Q?a5jwZKN1zJe+K0MzJLwyEeN8z3h8ANhgVaX9f0IQ1bwX1gM8Vl7BPWQnVSCK?= =?us-ascii?Q?igdYRyvSuEb9tXwqIfXi92/6pgoJyltxp2uVpICbcH25sLUAA9iIBgAOpUIo?= =?us-ascii?Q?rdPNEAycFfXbwhJLOutQOMfyCRLAod7153QJbuLbpr6JSdghAdgddHgA0WYA?= =?us-ascii?Q?lf4G9qTWTg9bwsUoUEL+I0QcCwHxxYtdu7VMYgHUX8ZjRVd5KAb+xt4b/ew9?= =?us-ascii?Q?DfntC16qJdKaJIUSY3KJey/BWCX1u0jHwExRRCG/qJsh6iFylPfyAZMj2acD?= =?us-ascii?Q?RXUjjq7b5ZaPfN2qqoTNRO51HmntBSVEWwtR8EwbuVq3/fNuyfAyNSJkG8wo?= =?us-ascii?Q?b+nlfhn93Y2Ddx6j4uAl4ThwVL3wPKyQmPx7U8TkaBdxs9DKeZlM6nOv1wm0?= =?us-ascii?Q?3oVfa4e51BwBxygoPVi5s6BM3hWadaGM61vCkimNWdY/jaj3kfwXjdVAdQ86?= =?us-ascii?Q?4DMDSBte3qZABstr0i3zQmednJrNvNVTX0IboDf0e685aP3rj8YwaufPHzC0?= =?us-ascii?Q?OoEJlPvTzSCeJnAwINSLQijNKyFRmIZ/MqKzMrBDN4I3LFUc+JwrviyFc5d9?= =?us-ascii?Q?H0a76c+/VuSNoLa+80goodEN0k9UbDxsoilhGSjw60gONDME0PwL2EewkL62?= =?us-ascii?Q?6tVzDVcyOPNkxZoaOSzAY8CnVqvVCZX1mI0D2MkXprL3gXvyg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 6:yrojQH4v8KGG18KyLBTyRZJ0zxzp6HIdn+drJGnTrNEtq+szJvrbLUcxWFCiirC/z1CCX4nMzAmxW1uwg9Xopd+XKnkky318CEOzacSxRapDk4Ep5gEVZZgqW3xzJnfLP1EgRHBg1oEN4zf5JLh1R4kct2EK7arPimOlou8RXV53ajwGh4VV1Z369sd5+su01b8AlHuRTe9ArzVn4VdXc/oXes4xrdtantrNk0GOVJSqASljG+TWfOPbnYJ43nFxCQMCnrqOPbfXwv3nGSF6/IQf1pJNLStHD7Y7JcWO66RYSNLZ8rliIhjmIrbq8W0jikOqj/LSjO2wq8xIp3o3B8L/+SVC7qo1lXygjKh96wGXCwueAWcgVOVBttlvJ6SFOAfQXi/a9xvxbd5DpqNFzg==; 5:Pl2XfuLG8B3F1RGc+B2oUY/YuXCaCNKcAI48ZIErAZydyA+xrwXjS2D7l0AttUJxvzLSGkxu509HRiol8RPu/gp//VShgdiKvArmlUA7Fl6TExSlQqMb/Y0Tfelk+EmoqxujNmoihDK172vs/hnKcQ==; 24:EizsuuqoFlDoI8ooSL5hgPxHV8AAjLEY5J9DYDp5A4qNgq6LTmwdU3/hwYQp2twhQY0hEvGCeUeWqn1jATzf/QGem6HZMjlRP0neynNAYk8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 7:yPPbBFo6hXWrDSl3eIsG2oLU+ACCXtILdOdy4n0ZJplDpjaJjKB5e2sSV6GF+SoWEWn6a7SwiN/nz4dKyaz4yvvHq0kHaRIQI6D50W2EwNEhdseVDQs+tGqc1dRuHDEMj7UpSe5UExYFfRlA9/H3gYPmBw7O2ufOSaYTDSd4GCIeddZXC+lj4/6XkZ4NFOXR27dCBIRdzIbKP89Ew4ckfaiBR7IzllPpiRGaWW9wkRM8r7Is6mcOgfzDtnxReDznr8aOngJWAyqpwpiNwcuz0jODk2IJ/HU4jV6MNYZxI5WiVSbb/yfWtfofuSri9RAqnTTV3DqOB+STW4HiwcedFA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:37:35.6530 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 02/46] net/liquidio/base: hardware register definitions 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, 02 Mar 2017 11:37:41 -0000 Add HW register definitions for LiquidIO II CN23XX adapter. Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Srisivasubramanian S Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/base/lio_23xx_reg.h | 194 +++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 drivers/net/liquidio/base/lio_23xx_reg.h diff --git a/drivers/net/liquidio/base/lio_23xx_reg.h b/drivers/net/liquidio/base/lio_23xx_reg.h new file mode 100644 index 0000000..794bc2c --- /dev/null +++ b/drivers/net/liquidio/base/lio_23xx_reg.h @@ -0,0 +1,194 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2017 Cavium, Inc.. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LIO_23XX_REG_H_ +#define _LIO_23XX_REG_H_ + +/* ###################### REQUEST QUEUE ######################### */ + +/* 64 registers for Input Queues Start Addr - SLI_PKT(0..63)_INSTR_BADDR */ +#define CN23XX_SLI_PKT_INSTR_BADDR_START64 0x10010 + +/* 64 registers for Input Doorbell - SLI_PKT(0..63)_INSTR_BAOFF_DBELL */ +#define CN23XX_SLI_PKT_INSTR_BADDR_DBELL_START 0x10020 + +/* 64 registers for Input Queue size - SLI_PKT(0..63)_INSTR_FIFO_RSIZE */ +#define CN23XX_SLI_PKT_INSTR_FIFO_RSIZE_START 0x10030 + +/* 64 registers for Input Queue Instr Count - SLI_PKT_IN_DONE(0..63)_CNTS */ +#define CN23XX_SLI_PKT_IN_DONE_CNTS_START64 0x10040 + +/* 64 registers (64-bit) - ES, RO, NS, Arbitration for Input Queue Data & + * gather list fetches. SLI_PKT(0..63)_INPUT_CONTROL. + */ +#define CN23XX_SLI_PKT_INPUT_CONTROL_START64 0x10000 + +/* ------- Request Queue Macros --------- */ + +/* Each Input Queue register is at a 16-byte Offset in BAR0 */ +#define CN23XX_IQ_OFFSET 0x20000 + +#define CN23XX_SLI_IQ_PKT_CONTROL64(iq) \ + (CN23XX_SLI_PKT_INPUT_CONTROL_START64 + ((iq) * CN23XX_IQ_OFFSET)) + +#define CN23XX_SLI_IQ_BASE_ADDR64(iq) \ + (CN23XX_SLI_PKT_INSTR_BADDR_START64 + ((iq) * CN23XX_IQ_OFFSET)) + +#define CN23XX_SLI_IQ_SIZE(iq) \ + (CN23XX_SLI_PKT_INSTR_FIFO_RSIZE_START + ((iq) * CN23XX_IQ_OFFSET)) + +#define CN23XX_SLI_IQ_DOORBELL(iq) \ + (CN23XX_SLI_PKT_INSTR_BADDR_DBELL_START + ((iq) * CN23XX_IQ_OFFSET)) + +#define CN23XX_SLI_IQ_INSTR_COUNT64(iq) \ + (CN23XX_SLI_PKT_IN_DONE_CNTS_START64 + ((iq) * CN23XX_IQ_OFFSET)) + +/* Number of instructions to be read in one MAC read request. + * setting to Max value(4) + */ +#define CN23XX_PKT_INPUT_CTL_RDSIZE (3 << 25) +#define CN23XX_PKT_INPUT_CTL_IS_64B (1 << 24) +#define CN23XX_PKT_INPUT_CTL_RST (1 << 23) +#define CN23XX_PKT_INPUT_CTL_QUIET (1 << 28) +#define CN23XX_PKT_INPUT_CTL_RING_ENB (1 << 22) +#define CN23XX_PKT_INPUT_CTL_DATA_ES_64B_SWAP (1 << 6) +#define CN23XX_PKT_INPUT_CTL_USE_CSR (1 << 4) +#define CN23XX_PKT_INPUT_CTL_GATHER_ES_64B_SWAP (2) + +/* These bits[47:44] select the Physical function number within the MAC */ +#define CN23XX_PKT_INPUT_CTL_PF_NUM_POS 45 +/* These bits[43:32] select the function number within the PF */ +#define CN23XX_PKT_INPUT_CTL_VF_NUM_POS 32 + +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN +#define CN23XX_PKT_INPUT_CTL_MASK \ + (CN23XX_PKT_INPUT_CTL_RDSIZE | \ + CN23XX_PKT_INPUT_CTL_DATA_ES_64B_SWAP | \ + CN23XX_PKT_INPUT_CTL_USE_CSR) +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN +#define CN23XX_PKT_INPUT_CTL_MASK \ + (CN23XX_PKT_INPUT_CTL_RDSIZE | \ + CN23XX_PKT_INPUT_CTL_DATA_ES_64B_SWAP | \ + CN23XX_PKT_INPUT_CTL_USE_CSR | \ + CN23XX_PKT_INPUT_CTL_GATHER_ES_64B_SWAP) +#endif + +/* ############################ OUTPUT QUEUE ######################### */ + +/* 64 registers for Output queue control - SLI_PKT(0..63)_OUTPUT_CONTROL */ +#define CN23XX_SLI_PKT_OUTPUT_CONTROL_START 0x10050 + +/* 64 registers for Output queue buffer and info size + * SLI_PKT(0..63)_OUT_SIZE + */ +#define CN23XX_SLI_PKT_OUT_SIZE 0x10060 + +/* 64 registers for Output Queue Start Addr - SLI_PKT(0..63)_SLIST_BADDR */ +#define CN23XX_SLI_SLIST_BADDR_START64 0x10070 + +/* 64 registers for Output Queue Packet Credits + * SLI_PKT(0..63)_SLIST_BAOFF_DBELL + */ +#define CN23XX_SLI_PKT_SLIST_BAOFF_DBELL_START 0x10080 + +/* 64 registers for Output Queue size - SLI_PKT(0..63)_SLIST_FIFO_RSIZE */ +#define CN23XX_SLI_PKT_SLIST_FIFO_RSIZE_START 0x10090 + +/* 64 registers for Output Queue Packet Count - SLI_PKT(0..63)_CNTS */ +#define CN23XX_SLI_PKT_CNTS_START 0x100B0 + +/* Each Output Queue register is at a 16-byte Offset in BAR0 */ +#define CN23XX_OQ_OFFSET 0x20000 + +/* ------- Output Queue Macros --------- */ + +#define CN23XX_SLI_OQ_PKT_CONTROL(oq) \ + (CN23XX_SLI_PKT_OUTPUT_CONTROL_START + ((oq) * CN23XX_OQ_OFFSET)) + +#define CN23XX_SLI_OQ_BASE_ADDR64(oq) \ + (CN23XX_SLI_SLIST_BADDR_START64 + ((oq) * CN23XX_OQ_OFFSET)) + +#define CN23XX_SLI_OQ_SIZE(oq) \ + (CN23XX_SLI_PKT_SLIST_FIFO_RSIZE_START + ((oq) * CN23XX_OQ_OFFSET)) + +#define CN23XX_SLI_OQ_BUFF_INFO_SIZE(oq) \ + (CN23XX_SLI_PKT_OUT_SIZE + ((oq) * CN23XX_OQ_OFFSET)) + +#define CN23XX_SLI_OQ_PKTS_SENT(oq) \ + (CN23XX_SLI_PKT_CNTS_START + ((oq) * CN23XX_OQ_OFFSET)) + +#define CN23XX_SLI_OQ_PKTS_CREDIT(oq) \ + (CN23XX_SLI_PKT_SLIST_BAOFF_DBELL_START + ((oq) * CN23XX_OQ_OFFSET)) + +/* ------------------ Masks ---------------- */ +#define CN23XX_PKT_OUTPUT_CTL_IPTR (1 << 11) +#define CN23XX_PKT_OUTPUT_CTL_ES (1 << 9) +#define CN23XX_PKT_OUTPUT_CTL_NSR (1 << 8) +#define CN23XX_PKT_OUTPUT_CTL_ROR (1 << 7) +#define CN23XX_PKT_OUTPUT_CTL_DPTR (1 << 6) +#define CN23XX_PKT_OUTPUT_CTL_BMODE (1 << 5) +#define CN23XX_PKT_OUTPUT_CTL_ES_P (1 << 3) +#define CN23XX_PKT_OUTPUT_CTL_NSR_P (1 << 2) +#define CN23XX_PKT_OUTPUT_CTL_ROR_P (1 << 1) +#define CN23XX_PKT_OUTPUT_CTL_RING_ENB (1 << 0) + +/* Rings per Virtual Function [RO] */ +#define CN23XX_PKT_INPUT_CTL_RPVF_MASK 0x3F +#define CN23XX_PKT_INPUT_CTL_RPVF_POS 48 + +/* These bits[47:44][RO] give the Physical function + * number info within the MAC + */ +#define CN23XX_PKT_INPUT_CTL_PF_NUM_MASK 0x7 + +/* These bits[43:32][RO] give the virtual function + * number info within the PF + */ +#define CN23XX_PKT_INPUT_CTL_VF_NUM_MASK 0x1FFF + +/* ######################### Mailbox Reg Macros ######################## */ +#define CN23XX_SLI_PKT_PF_VF_MBOX_SIG_START 0x10200 +#define CN23XX_VF_SLI_PKT_MBOX_INT_START 0x10210 + +#define CN23XX_SLI_MBOX_OFFSET 0x20000 +#define CN23XX_SLI_MBOX_SIG_IDX_OFFSET 0x8 + +#define CN23XX_SLI_PKT_PF_VF_MBOX_SIG(q, idx) \ + (CN23XX_SLI_PKT_PF_VF_MBOX_SIG_START + \ + ((q) * CN23XX_SLI_MBOX_OFFSET + \ + (idx) * CN23XX_SLI_MBOX_SIG_IDX_OFFSET)) + +#define CN23XX_VF_SLI_PKT_MBOX_INT(q) \ + (CN23XX_VF_SLI_PKT_MBOX_INT_START + ((q) * CN23XX_SLI_MBOX_OFFSET)) + +#endif /* _LIO_23XX_REG_H_ */ -- 1.8.3.1