icnss2: Move AON code under a macro
Move AON related code under a macro to make it as config. Change-Id: I52b35aa8eb06556934250e7347d8d851d29964a6 CRs-Fixed: 3512075
这个提交包含在:
@@ -45,7 +45,9 @@
|
||||
#include <linux/soc/qcom/pdr.h>
|
||||
#include <linux/remoteproc.h>
|
||||
#include <trace/hooks/remoteproc.h>
|
||||
#ifdef SLATE_MODULE_ENABLED
|
||||
#include <linux/soc/qcom/slatecom_interface.h>
|
||||
#endif
|
||||
#include "main.h"
|
||||
#include "qmi.h"
|
||||
#include "debug.h"
|
||||
@@ -837,6 +839,40 @@ static enum wlfw_wlan_rf_subtype_v01 icnss_rf_subtype_value_to_type(u32 val)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SLATE_MODULE_ENABLED
|
||||
static void icnss_send_wlan_boot_init(void)
|
||||
{
|
||||
send_wlan_state(GMI_MGR_WLAN_BOOT_INIT);
|
||||
icnss_pr_info("sent wlan boot init command\n");
|
||||
}
|
||||
|
||||
static void icnss_send_wlan_boot_complete(void)
|
||||
{
|
||||
send_wlan_state(GMI_MGR_WLAN_BOOT_COMPLETE);
|
||||
icnss_pr_info("sent wlan boot complete command\n");
|
||||
}
|
||||
|
||||
static void icnss_wait_for_slate_complete(struct icnss_priv *priv)
|
||||
{
|
||||
if (!test_bit(ICNSS_SLATE_UP, &priv->state)) {
|
||||
reinit_completion(&priv->slate_boot_complete);
|
||||
icnss_pr_err("Waiting for slate boot up notification, 0x%lx\n",
|
||||
priv->state);
|
||||
wait_for_completion(&priv->slate_boot_complete);
|
||||
}
|
||||
|
||||
icnss_send_wlan_boot_init();
|
||||
}
|
||||
#else
|
||||
static void icnss_send_wlan_boot_complete(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void icnss_wait_for_slate_complete(struct icnss_priv *priv)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
||||
void *data)
|
||||
{
|
||||
@@ -865,17 +901,8 @@ static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
||||
|
||||
set_bit(ICNSS_WLFW_CONNECTED, &priv->state);
|
||||
|
||||
if (priv->is_slate_rfa) {
|
||||
if (!test_bit(ICNSS_SLATE_UP, &priv->state)) {
|
||||
reinit_completion(&priv->slate_boot_complete);
|
||||
icnss_pr_dbg("Waiting for slate boot up notification, 0x%lx\n",
|
||||
priv->state);
|
||||
wait_for_completion(&priv->slate_boot_complete);
|
||||
}
|
||||
|
||||
send_wlan_state(GMI_MGR_WLAN_BOOT_INIT);
|
||||
icnss_pr_info("sent wlan boot init command\n");
|
||||
}
|
||||
if (priv->is_slate_rfa)
|
||||
icnss_wait_for_slate_complete(priv);
|
||||
|
||||
ret = wlfw_ind_register_send_sync_msg(priv);
|
||||
if (ret < 0) {
|
||||
@@ -1194,10 +1221,8 @@ static int icnss_driver_event_fw_ready_ind(struct icnss_priv *priv, void *data)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (priv->is_slate_rfa && test_bit(ICNSS_SLATE_UP, &priv->state)) {
|
||||
send_wlan_state(GMI_MGR_WLAN_BOOT_COMPLETE);
|
||||
icnss_pr_info("sent wlan boot complete command\n");
|
||||
}
|
||||
if (priv->is_slate_rfa && test_bit(ICNSS_SLATE_UP, &priv->state))
|
||||
icnss_send_wlan_boot_complete();
|
||||
|
||||
if (test_bit(ICNSS_PD_RESTART, &priv->state)) {
|
||||
ret = icnss_pd_restart_complete(priv);
|
||||
@@ -2319,6 +2344,7 @@ static int icnss_wpss_ssr_register_notifier(struct icnss_priv *priv)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef SLATE_MODULE_ENABLED
|
||||
static int icnss_slate_notifier_nb(struct notifier_block *nb,
|
||||
unsigned long code,
|
||||
void *data)
|
||||
@@ -2386,6 +2412,17 @@ static int icnss_slate_ssr_unregister_notifier(struct icnss_priv *priv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int icnss_slate_ssr_register_notifier(struct icnss_priv *priv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int icnss_slate_ssr_unregister_notifier(struct icnss_priv *priv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int icnss_modem_ssr_register_notifier(struct icnss_priv *priv)
|
||||
{
|
||||
@@ -4593,6 +4630,9 @@ static int icnss_probe(struct platform_device *pdev)
|
||||
INIT_WORK(&priv->event_work, icnss_driver_event_work);
|
||||
INIT_LIST_HEAD(&priv->event_list);
|
||||
|
||||
if (priv->is_slate_rfa)
|
||||
init_completion(&priv->slate_boot_complete);
|
||||
|
||||
ret = icnss_register_fw_service(priv);
|
||||
if (ret < 0) {
|
||||
icnss_pr_err("fw service registration failed: %d\n", ret);
|
||||
@@ -4614,9 +4654,6 @@ static int icnss_probe(struct platform_device *pdev)
|
||||
|
||||
init_completion(&priv->unblock_shutdown);
|
||||
|
||||
if (priv->is_slate_rfa)
|
||||
init_completion(&priv->slate_boot_complete);
|
||||
|
||||
if (priv->device_id == WCN6750_DEVICE_ID ||
|
||||
priv->device_id == WCN6450_DEVICE_ID) {
|
||||
priv->soc_wake_wq = alloc_workqueue("icnss_soc_wake_event",
|
||||
|
在新工单中引用
屏蔽一个用户