提交 1f1a361a 编写于 作者: L Lior David 提交者: Kalle Valo

wil6210: add oob_mode module parameter

Add module parameter oob_mode. Takes effect the next time
the interface is brought up and FW is loaded. Puts the FW
in special "out of the box" (OOB) mode which is used for
diagnostics and certification.
Signed-off-by: NLior David <qca_liord@qca.qualcomm.com>
Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 b4944f2c
...@@ -27,6 +27,11 @@ bool debug_fw; /* = false; */ ...@@ -27,6 +27,11 @@ bool debug_fw; /* = false; */
module_param(debug_fw, bool, S_IRUGO); module_param(debug_fw, bool, S_IRUGO);
MODULE_PARM_DESC(debug_fw, " do not perform card reset. For FW debug"); MODULE_PARM_DESC(debug_fw, " do not perform card reset. For FW debug");
static bool oob_mode;
module_param(oob_mode, bool, S_IRUGO);
MODULE_PARM_DESC(oob_mode,
" enable out of the box (OOB) mode in FW, for diagnostics and certification");
bool no_fw_recovery; bool no_fw_recovery;
module_param(no_fw_recovery, bool, S_IRUGO | S_IWUSR); module_param(no_fw_recovery, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(no_fw_recovery, " disable automatic FW error recovery"); MODULE_PARM_DESC(no_fw_recovery, " disable automatic FW error recovery");
...@@ -547,6 +552,16 @@ static inline void wil_release_cpu(struct wil6210_priv *wil) ...@@ -547,6 +552,16 @@ static inline void wil_release_cpu(struct wil6210_priv *wil)
wil_w(wil, RGF_USER_USER_CPU_0, 1); wil_w(wil, RGF_USER_USER_CPU_0, 1);
} }
static void wil_set_oob_mode(struct wil6210_priv *wil, bool enable)
{
wil_info(wil, "%s: enable=%d\n", __func__, enable);
if (enable) {
wil_s(wil, RGF_USER_USAGE_6, BIT_USER_OOB_MODE);
} else {
wil_c(wil, RGF_USER_USAGE_6, BIT_USER_OOB_MODE);
}
}
static int wil_target_reset(struct wil6210_priv *wil) static int wil_target_reset(struct wil6210_priv *wil)
{ {
int delay = 0; int delay = 0;
...@@ -823,6 +838,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) ...@@ -823,6 +838,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
if (rc) if (rc)
return rc; return rc;
wil_set_oob_mode(wil, oob_mode);
if (load_fw) { if (load_fw) {
wil_info(wil, "Use firmware <%s> + board <%s>\n", WIL_FW_NAME, wil_info(wil, "Use firmware <%s> + board <%s>\n", WIL_FW_NAME,
WIL_FW2_NAME); WIL_FW2_NAME);
......
...@@ -132,6 +132,7 @@ struct RGF_ICR { ...@@ -132,6 +132,7 @@ struct RGF_ICR {
/* registers - FW addresses */ /* registers - FW addresses */
#define RGF_USER_USAGE_1 (0x880004) #define RGF_USER_USAGE_1 (0x880004)
#define RGF_USER_USAGE_6 (0x880018) #define RGF_USER_USAGE_6 (0x880018)
#define BIT_USER_OOB_MODE BIT(31)
#define RGF_USER_HW_MACHINE_STATE (0x8801dc) #define RGF_USER_HW_MACHINE_STATE (0x8801dc)
#define HW_MACHINE_BOOT_DONE (0x3fffffd) #define HW_MACHINE_BOOT_DONE (0x3fffffd)
#define RGF_USER_USER_CPU_0 (0x8801e0) #define RGF_USER_USER_CPU_0 (0x8801e0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册