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
This commit is contained in:
4
Kbuild
4
Kbuild
@@ -74,6 +74,10 @@ ifeq ($(CONFIG_CNSS2_ENUM_WITH_LOW_SPEED),y)
|
|||||||
KBUILD_CPPFLAGS += -DCONFIG_CNSS2_ENUM_WITH_LOW_SPEED
|
KBUILD_CPPFLAGS += -DCONFIG_CNSS2_ENUM_WITH_LOW_SPEED
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_SLATE_MODULE_ENABLED), y)
|
||||||
|
KBUILD_CPPFLAGS += -DSLATE_MODULE_ENABLED
|
||||||
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_CNSS2) += cnss2/
|
obj-$(CONFIG_CNSS2) += cnss2/
|
||||||
obj-$(CONFIG_ICNSS2) += icnss2/
|
obj-$(CONFIG_ICNSS2) += icnss2/
|
||||||
obj-$(CONFIG_CNSS_GENL) += cnss_genl/
|
obj-$(CONFIG_CNSS_GENL) += cnss_genl/
|
||||||
|
@@ -45,7 +45,9 @@
|
|||||||
#include <linux/soc/qcom/pdr.h>
|
#include <linux/soc/qcom/pdr.h>
|
||||||
#include <linux/remoteproc.h>
|
#include <linux/remoteproc.h>
|
||||||
#include <trace/hooks/remoteproc.h>
|
#include <trace/hooks/remoteproc.h>
|
||||||
|
#ifdef SLATE_MODULE_ENABLED
|
||||||
#include <linux/soc/qcom/slatecom_interface.h>
|
#include <linux/soc/qcom/slatecom_interface.h>
|
||||||
|
#endif
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "qmi.h"
|
#include "qmi.h"
|
||||||
#include "debug.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,
|
static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
@@ -865,17 +901,8 @@ static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
|||||||
|
|
||||||
set_bit(ICNSS_WLFW_CONNECTED, &priv->state);
|
set_bit(ICNSS_WLFW_CONNECTED, &priv->state);
|
||||||
|
|
||||||
if (priv->is_slate_rfa) {
|
if (priv->is_slate_rfa)
|
||||||
if (!test_bit(ICNSS_SLATE_UP, &priv->state)) {
|
icnss_wait_for_slate_complete(priv);
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = wlfw_ind_register_send_sync_msg(priv);
|
ret = wlfw_ind_register_send_sync_msg(priv);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -1194,10 +1221,8 @@ static int icnss_driver_event_fw_ready_ind(struct icnss_priv *priv, void *data)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->is_slate_rfa && test_bit(ICNSS_SLATE_UP, &priv->state)) {
|
if (priv->is_slate_rfa && test_bit(ICNSS_SLATE_UP, &priv->state))
|
||||||
send_wlan_state(GMI_MGR_WLAN_BOOT_COMPLETE);
|
icnss_send_wlan_boot_complete();
|
||||||
icnss_pr_info("sent wlan boot complete command\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test_bit(ICNSS_PD_RESTART, &priv->state)) {
|
if (test_bit(ICNSS_PD_RESTART, &priv->state)) {
|
||||||
ret = icnss_pd_restart_complete(priv);
|
ret = icnss_pd_restart_complete(priv);
|
||||||
@@ -2319,6 +2344,7 @@ static int icnss_wpss_ssr_register_notifier(struct icnss_priv *priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SLATE_MODULE_ENABLED
|
||||||
static int icnss_slate_notifier_nb(struct notifier_block *nb,
|
static int icnss_slate_notifier_nb(struct notifier_block *nb,
|
||||||
unsigned long code,
|
unsigned long code,
|
||||||
void *data)
|
void *data)
|
||||||
@@ -2386,6 +2412,17 @@ static int icnss_slate_ssr_unregister_notifier(struct icnss_priv *priv)
|
|||||||
|
|
||||||
return 0;
|
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)
|
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_WORK(&priv->event_work, icnss_driver_event_work);
|
||||||
INIT_LIST_HEAD(&priv->event_list);
|
INIT_LIST_HEAD(&priv->event_list);
|
||||||
|
|
||||||
|
if (priv->is_slate_rfa)
|
||||||
|
init_completion(&priv->slate_boot_complete);
|
||||||
|
|
||||||
ret = icnss_register_fw_service(priv);
|
ret = icnss_register_fw_service(priv);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
icnss_pr_err("fw service registration failed: %d\n", ret);
|
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);
|
init_completion(&priv->unblock_shutdown);
|
||||||
|
|
||||||
if (priv->is_slate_rfa)
|
|
||||||
init_completion(&priv->slate_boot_complete);
|
|
||||||
|
|
||||||
if (priv->device_id == WCN6750_DEVICE_ID ||
|
if (priv->device_id == WCN6750_DEVICE_ID ||
|
||||||
priv->device_id == WCN6450_DEVICE_ID) {
|
priv->device_id == WCN6450_DEVICE_ID) {
|
||||||
priv->soc_wake_wq = alloc_workqueue("icnss_soc_wake_event",
|
priv->soc_wake_wq = alloc_workqueue("icnss_soc_wake_event",
|
||||||
|
Reference in New Issue
Block a user