From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <Larry.Finger@lwfinger.net>, <linux-wireless@vger.kernel.org>
Subject: [PATCH v3 05/19] rtlwifi: halmac: describe number and size of chip functions
Date: Wed, 25 Apr 2018 10:08:06 +0800 [thread overview]
Message-ID: <20180425020820.6141-6-pkshih@realtek.com> (raw)
In-Reply-To: <20180425020820.6141-1-pkshih@realtek.com>
From: Ping-Ke Shih <pkshih@realtek.com>
The number and size of chip fucntions are different, such as TX/RX FIFO
size, efuse size, etc. So they are defined in an individual file.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
.../halmac_88xx/halmac_8822b/halmac_8822b_cfg.h | 68 ++++++++++++++++++++++
.../rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h | 40 +++++++++++++
2 files changed, 108 insertions(+)
create mode 100644 drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_cfg.h
create mode 100644 drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h
diff --git a/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_cfg.h b/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_cfg.h
new file mode 100644
index 000000000000..f6ed7b44549c
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_cfg.h
@@ -0,0 +1,68 @@
+/******************************************************************************
+ *
+ * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ ******************************************************************************/
+
+#ifndef _HALMAC_8822B_CFG_H_
+#define _HALMAC_8822B_CFG_H_
+
+#include "../halmac_88xx_cfg.h"
+
+#define TX_FIFO_SIZE_8822B 262144
+#define RX_FIFO_SIZE_8822B 24576
+#define TRX_SHARE_SIZE_8822B 65536
+
+#define RX_DESC_DUMMY_SIZE_8822B 72 /* 8 * 9 Bytes */
+#define RX_FIFO_EXPANDING_MODE_PKT_SIZE_MAX_8822B 80 /* 8 Byte alignment*/
+
+/* should be 8 Byte alignment*/
+#if (HALMAC_RX_FIFO_EXPANDING_MODE_PKT_SIZE <= \
+ RX_FIFO_EXPANDING_MODE_PKT_SIZE_MAX_8822B)
+#define RX_FIFO_EXPANDING_UNIT_8822B (RX_DESC_SIZE_88XX + \
+ RX_DESC_DUMMY_SIZE_8822B + HALMAC_RX_FIFO_EXPANDING_MODE_PKT_SIZE)
+#else
+#define RX_FIFO_EXPANDING_UNIT_8822B (RX_DESC_SIZE_88XX + \
+ RX_DESC_DUMMY_SIZE_8822B + RX_FIFO_EXPANDING_MODE_PKT_SIZE_MAX_8822B)
+#endif
+
+#define TX_FIFO_SIZE_LA_8822B (TX_FIFO_SIZE_8822B >> 1)
+#define TX_FIFO_SIZE_RX_EXPAND_1BLK_8822B \
+ (TX_FIFO_SIZE_8822B - TRX_SHARE_SIZE_8822B)
+#define RX_FIFO_SIZE_RX_EXPAND_1BLK_8822B \
+ ((((RX_FIFO_EXPANDING_UNIT_8822B << 8) - 1) >> 10) << 10)
+#define TX_FIFO_SIZE_RX_EXPAND_2BLK_8822B \
+ (TX_FIFO_SIZE_8822B - (2 * TRX_SHARE_SIZE_8822B))
+#define RX_FIFO_SIZE_RX_EXPAND_2BLK_8822B \
+ (RX_FIFO_SIZE_8822B + (2 * TRX_SHARE_SIZE_8822B))
+#define TX_FIFO_SIZE_RX_EXPAND_3BLK_8822B \
+ (TX_FIFO_SIZE_8822B - (3 * TRX_SHARE_SIZE_8822B))
+#define RX_FIFO_SIZE_RX_EXPAND_3BLK_8822B \
+ (RX_FIFO_SIZE_8822B + (3 * TRX_SHARE_SIZE_8822B))
+
+#define EFUSE_SIZE_8822B 1024
+#define EEPROM_SIZE_8822B 768
+#define BT_EFUSE_SIZE_8822B 128
+
+#define SEC_CAM_NUM_8822B 64
+
+#define OQT_ENTRY_AC_8822B 32
+#define OQT_ENTRY_NOAC_8822B 32
+#define MACID_MAX_8822B 128
+
+#define WLAN_FW_IRAM_MAX_SIZE_8822B 196608
+#define WLAN_FW_DRAM_MAX_SIZE_8822B 49152
+#define WLAN_FW_ERAM_MAX_SIZE_8822B 0
+#define WLAN_FW_MAX_SIZE_8822B (WLAN_FW_IRAM_MAX_SIZE_8822B + \
+ WLAN_FW_DRAM_MAX_SIZE_8822B + WLAN_FW_ERAM_MAX_SIZE_8822B)
+
+#endif
diff --git a/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h b/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h
new file mode 100644
index 000000000000..22514ef4680d
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+ *
+ * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ ******************************************************************************/
+
+#ifndef _HALMAC_88XX_CFG_H_
+#define _HALMAC_88XX_CFG_H_
+
+#include "../halmac_api.h"
+
+#define TX_PAGE_SIZE_88XX 128
+#define TX_PAGE_SIZE_SHIFT_88XX 7 /* 128 = 2^7 */
+#define TX_ALIGN_SIZE_88XX 8
+#define SDIO_TX_MAX_SIZE_88XX 31744
+#define RX_BUF_FW_88XX 12288
+
+#define TX_DESC_SIZE_88XX 48
+#define RX_DESC_SIZE_88XX 24
+
+#define H2C_PKT_SIZE_88XX 32 /* Only support 32 byte packet now */
+#define H2C_PKT_HDR_SIZE_88XX 8
+#define C2H_DATA_OFFSET_88XX 10
+#define C2H_PKT_BUF_88XX 256
+
+/* HW memory address */
+#define OCPBASE_TXBUF_88XX 0x18780000
+#define OCPBASE_DMEM_88XX 0x00200000
+#define OCPBASE_EMEM_88XX 0x00100000
+
+#endif
--
2.15.1
next prev parent reply other threads:[~2018-04-25 2:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 2:08 [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac pkshih
2018-04-25 2:08 ` [PATCH v3 01/19] rtlwifi: add halmac structure to wifi.h pkshih
2018-04-25 2:08 ` [PATCH v3 02/19] rtlwifi: add debug ID COMP_HALMAC pkshih
2018-04-25 2:08 ` [PATCH v3 03/19] rtlwifi: add dmdef.h to share with driver and other modules pkshih
2018-04-25 2:08 ` [PATCH v3 04/19] rtlwifi: halmac: add main definition used by halmac pkshih
2018-04-25 2:08 ` pkshih [this message]
2018-04-25 2:08 ` [PATCH v3 06/19] rtlwifi: halmac: add register definitions pkshih
2018-04-25 2:08 ` [PATCH v3 07/19] rtlwifi: halmac: add bit field definitions pkshih
2018-04-25 2:08 ` [PATCH v3 08/19] rtlwifi: halmac: add bit field definitions of rtl8822b pkshih
2018-04-25 2:08 ` [PATCH v3 09/19] rtlwifi: halmac: add definition of TX/RX descriptor pkshih
2018-04-25 2:08 ` [PATCH v3 10/19] rtlwifi: halmac: add GPIO pin/pinmux definitions pkshih
2018-04-25 2:08 ` [PATCH v3 11/19] rtlwifi: halmac: add power sequence to turn on/off wifi card pkshih
2018-04-25 2:08 ` [PATCH v3 12/19] rtlwifi: halmac: access efuse through halmac helper functions pkshih
2018-04-25 2:08 ` [PATCH v3 13/19] rtlwifi: halmac: add files to implement halmac ops pkshih
2018-04-25 2:08 ` [PATCH v3 14/19] rtlwifi: halmac: add halmac init/deinit functions pkshih
2018-04-25 2:08 ` [PATCH v3 15/19] rtlwifi: halmac: add firmware related functions and definitions pkshih
2018-04-25 2:08 ` [PATCH v3 16/19] rtlwifi: halmac: add bus interface commands pkshih
2018-04-25 2:08 ` [PATCH v3 17/19] rtlwifi: halmac: add to control WiFi mac functions and registers pkshih
2018-04-25 2:08 ` [PATCH v3 18/19] rtlwifi: halmac: add to support BB and RF functions pkshih
2018-04-25 2:08 ` [PATCH v3 19/19] rtlwifi: add halmac to Makefile and Kconfig pkshih
2018-04-25 7:36 ` [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac Kalle Valo
2018-04-27 5:44 ` Pkshih
2018-04-27 22:41 ` Barry Day
2018-04-30 2:40 ` Pkshih
2018-04-30 8:33 ` Krishna Chaitanya
2018-05-15 8:08 ` Pkshih
2018-05-16 12:36 ` Kalle Valo
2018-05-18 12:33 ` Pkshih
2018-05-24 8:27 ` Kalle Valo
2018-06-05 1:32 ` Pkshih
2018-06-29 8:38 ` New realtek 11ac driver Kalle Valo
2018-07-02 7:21 ` Dan Carpenter
2018-05-16 12:01 ` [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac Kalle Valo
2018-05-16 12:09 ` Kalle Valo
Reply instructions:
You may reply publicly 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=20180425020820.6141-6-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=Larry.Finger@lwfinger.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.