DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dev@dpdk.org>
Cc: <linuxarm@huawei.com>, <xavier_huwei@163.com>,
	<liudongdong3@huawei.com>,  <forest.zhouchang@huawei.com>
Subject: [dpdk-dev] [PATCH 01/22] net/hns3: add hardware registers definition
Date: Fri, 23 Aug 2019 21:46:50 +0800
Message-ID: <1566568031-45991-2-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1566568031-45991-1-git-send-email-xavier.huwei@huawei.com>

The Hisilicon Network Subsytem is a long term evolution IP which is
supposed to be used in Hisilicon ICT SoCs such as Kunpeng 920.

This patch adds hardware definition header file for hns3(Hisilicon
Network Subsystem 3) PMD driver.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/net/hns3/hns3_regs.h | 98 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 drivers/net/hns3/hns3_regs.h

diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
new file mode 100644
index 0000000..5a4f315
--- /dev/null
+++ b/drivers/net/hns3/hns3_regs.h
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018-2019 Hisilicon Limited.
+ */
+
+#ifndef _HNS3_REGS_H_
+#define _HNS3_REGS_H_
+
+/* bar registers for cmdq */
+#define HNS3_CMDQ_TX_ADDR_L_REG		0x27000
+#define HNS3_CMDQ_TX_ADDR_H_REG		0x27004
+#define HNS3_CMDQ_TX_DEPTH_REG		0x27008
+#define HNS3_CMDQ_TX_TAIL_REG		0x27010
+#define HNS3_CMDQ_TX_HEAD_REG		0x27014
+#define HNS3_CMDQ_RX_ADDR_L_REG		0x27018
+#define HNS3_CMDQ_RX_ADDR_H_REG		0x2701c
+#define HNS3_CMDQ_RX_DEPTH_REG		0x27020
+#define HNS3_CMDQ_RX_TAIL_REG		0x27024
+#define HNS3_CMDQ_RX_HEAD_REG		0x27028
+#define HNS3_CMDQ_INTR_STS_REG		0x27104
+#define HNS3_CMDQ_INTR_EN_REG		0x27108
+#define HNS3_CMDQ_INTR_GEN_REG		0x2710C
+
+/* Vector0 interrupt CMDQ event source register(RW) */
+#define HNS3_VECTOR0_CMDQ_SRC_REG	0x27100
+/* Vector0 interrupt CMDQ event status register(RO) */
+#define HNS3_VECTOR0_CMDQ_STAT_REG	0x27104
+
+#define HNS3_VECTOR0_OTHER_INT_STS_REG	0x20800
+
+#define HNS3_MISC_VECTOR_REG_BASE	0x20400
+#define HNS3_VECTOR0_OTER_EN_REG	0x20600
+#define HNS3_MISC_RESET_STS_REG		0x20700
+#define HNS3_GLOBAL_RESET_REG		0x20A00
+#define HNS3_FUN_RST_ING		0x20C00
+#define HNS3_GRO_EN_REG			0x28000
+
+/* Vector0 register bits for reset */
+#define HNS3_VECTOR0_FUNCRESET_INT_B	0
+#define HNS3_VECTOR0_GLOBALRESET_INT_B	5
+#define HNS3_VECTOR0_CORERESET_INT_B	6
+#define HNS3_VECTOR0_IMPRESET_INT_B	7
+
+/* CMDQ register bits for RX event(=MBX event) */
+#define HNS3_VECTOR0_RX_CMDQ_INT_B	1
+#define HNS3_VECTOR0_REG_MSIX_MASK	0x1FF00
+/* RST register bits for RESET event */
+#define HNS3_VECTOR0_RST_INT_B	2
+
+#define HNS3_VF_RST_ING			0x07008
+#define HNS3_VF_RST_ING_BIT		BIT(16)
+
+/* bar registers for rcb */
+#define HNS3_RING_RX_BASEADDR_L_REG		0x00000
+#define HNS3_RING_RX_BASEADDR_H_REG		0x00004
+#define HNS3_RING_RX_BD_NUM_REG			0x00008
+#define HNS3_RING_RX_BD_LEN_REG			0x0000C
+#define HNS3_RING_RX_MERGE_EN_REG		0x00014
+#define HNS3_RING_RX_TAIL_REG			0x00018
+#define HNS3_RING_RX_HEAD_REG			0x0001C
+#define HNS3_RING_RX_FBDNUM_REG			0x00020
+#define HNS3_RING_RX_OFFSET_REG			0x00024
+#define HNS3_RING_RX_FBD_OFFSET_REG		0x00028
+#define HNS3_RING_RX_PKTNUM_RECORD_REG		0x0002C
+#define HNS3_RING_RX_STASH_REG			0x00030
+#define HNS3_RING_RX_BD_ERR_REG			0x00034
+
+#define HNS3_RING_TX_BASEADDR_L_REG		0x00040
+#define HNS3_RING_TX_BASEADDR_H_REG		0x00044
+#define HNS3_RING_TX_BD_NUM_REG			0x00048
+#define HNS3_RING_TX_PRIORITY_REG		0x0004C
+#define HNS3_RING_TX_TC_REG			0x00050
+#define HNS3_RING_TX_MERGE_EN_REG		0x00054
+#define HNS3_RING_TX_TAIL_REG			0x00058
+#define HNS3_RING_TX_HEAD_REG			0x0005C
+#define HNS3_RING_TX_FBDNUM_REG			0x00060
+#define HNS3_RING_TX_OFFSET_REG			0x00064
+#define HNS3_RING_TX_EBD_NUM_REG		0x00068
+#define HNS3_RING_TX_PKTNUM_RECORD_REG		0x0006C
+#define HNS3_RING_TX_EBD_OFFSET_REG		0x00070
+#define HNS3_RING_TX_BD_ERR_REG			0x00074
+
+#define HNS3_RING_EN_REG			0x00090
+
+#define HNS3_RING_EN_B				0
+
+#define HNS3_TQP_REG_OFFSET			0x80000
+#define HNS3_TQP_REG_SIZE			0x200
+
+/* bar registers for tqp interrupt */
+#define HNS3_TQP_INTR_CTRL_REG			0x20000
+#define HNS3_TQP_INTR_GL0_REG			0x20100
+#define HNS3_TQP_INTR_GL1_REG			0x20200
+#define HNS3_TQP_INTR_GL2_REG			0x20300
+#define HNS3_TQP_INTR_RL_REG			0x20900
+
+#define HNS3_TQP_INTR_REG_SIZE			4
+
+#endif /* _HNS3_REGS_H_ */
-- 
2.7.4


  reply index

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 13:46 [dpdk-dev] [PATCH 00/22] add hns3 ethernet PMD driver Wei Hu (Xavier)
2019-08-23 13:46 ` Wei Hu (Xavier) [this message]
2019-08-23 13:46 ` [dpdk-dev] [PATCH 02/22] net/hns3: add some definitions for data structure and macro Wei Hu (Xavier)
2019-08-30  8:25   ` Gavin Hu (Arm Technology China)
2019-09-05  6:01     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 03/22] net/hns3: register hns3 PMD driver Wei Hu (Xavier)
2019-08-30 15:01   ` Ferruh Yigit
2019-09-06  6:20     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 04/22] net/hns3: add support for cmd of " Wei Hu (Xavier)
2019-08-30 15:02   ` Ferruh Yigit
2019-09-06  6:49     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 05/22] net/hns3: add the initialization " Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 06/22] net/hns3: add support for MAC address related operations Wei Hu (Xavier)
2019-08-30 15:03   ` Ferruh Yigit
2019-09-05  5:40     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 07/22] net/hns3: add support for some misc operations Wei Hu (Xavier)
2019-08-30 15:04   ` Ferruh Yigit
2019-08-23 13:46 ` [dpdk-dev] [PATCH 08/22] net/hns3: add support for link update operation Wei Hu (Xavier)
2019-08-30 15:04   ` Ferruh Yigit
2019-09-06  6:56     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 09/22] net/hns3: add support for flow directory of hns3 PMD driver Wei Hu (Xavier)
2019-08-30 15:06   ` Ferruh Yigit
2019-09-06  8:23     ` Wei Hu (Xavier)
2019-09-06 11:08     ` Wei Hu (Xavier)
2019-08-23 13:46 ` [dpdk-dev] [PATCH 10/22] net/hns3: add support for RSS " Wei Hu (Xavier)
2019-08-30 15:07   ` Ferruh Yigit
2019-08-31  9:16     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 11/22] net/hns3: add support for flow control " Wei Hu (Xavier)
2019-08-30 15:07   ` Ferruh Yigit
2019-08-31  8:04     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 12/22] net/hns3: add support for VLAN " Wei Hu (Xavier)
2019-08-30 15:08   ` Ferruh Yigit
2019-08-31  9:04     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 13/22] net/hns3: add support for mailbox " Wei Hu (Xavier)
2019-08-30 15:08   ` Ferruh Yigit
2019-09-06 11:25     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 14/22] net/hns3: add support for hns3 VF " Wei Hu (Xavier)
2019-08-30 15:11   ` Ferruh Yigit
2019-08-31  9:03     ` Wei Hu (Xavier)
2019-09-06 11:27     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 15/22] net/hns3: add package and queue related operation Wei Hu (Xavier)
2019-08-23 15:42   ` Aaron Conole
2019-08-30 15:13   ` Ferruh Yigit
2019-09-11 11:40     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 16/22] net/hns3: add start stop configure promiscuous ops Wei Hu (Xavier)
2019-08-30 15:14   ` Ferruh Yigit
2019-09-06 11:51     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 17/22] net/hns3: add dump register ops for hns3 PMD driver Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 18/22] net/hns3: add abnormal interrupt process " Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 19/22] net/hns3: add stats related ops " Wei Hu (Xavier)
2019-08-30 15:20   ` Ferruh Yigit
2019-08-31  8:49     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 20/22] net/hns3: add reset related process " Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 21/22] net/hns3: add multiple process support " Wei Hu (Xavier)
2019-08-30 15:14   ` Ferruh Yigit
2019-09-02 13:41     ` Wei Hu (Xavier)
2019-08-23 13:47 ` [dpdk-dev] [PATCH 22/22] net/hns3: add hns3 build files Wei Hu (Xavier)
2019-08-23 14:08   ` Jerin Jacob Kollanukkaran
2019-08-30  3:22     ` Wei Hu (Xavier)
2019-08-31  2:10       ` Wei Hu (Xavier)
2019-08-30 14:57     ` Ferruh Yigit
2019-08-30  6:16   ` Stephen Hemminger
2019-08-31  8:46     ` Wei Hu (Xavier)
2019-08-30  6:17   ` Stephen Hemminger
2019-08-31  8:44     ` Wei Hu (Xavier)
2019-09-03 15:27     ` Ye Xiaolong
2019-09-11 11:36       ` Wei Hu (Xavier)
2019-08-30 14:58   ` Ferruh Yigit
2019-09-10 11:43     ` Wei Hu (Xavier)
2019-08-30 15:00   ` Ferruh Yigit
2019-08-31  8:07     ` Wei Hu (Xavier)
2019-08-30 15:12   ` Ferruh Yigit
2019-08-31  8:07     ` Wei Hu (Xavier)
2019-08-30 15:23 ` [dpdk-dev] [PATCH 00/22] add hns3 ethernet PMD driver Ferruh Yigit
2019-08-31  8:06   ` Wei Hu (Xavier)

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1566568031-45991-2-git-send-email-xavier.huwei@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=dev@dpdk.org \
    --cc=forest.zhouchang@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=liudongdong3@huawei.com \
    --cc=xavier_huwei@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git