icnss2: Synchronize qmi server arrive with co-processor up
WLAN RFA is present in another co-processor subsystem. In order to prevent unclocked access, Wait for SLATE_POWER_UP event before starting wlan cold boot qmi handshakes. Change-Id: If24816c270c32c5f0191227ef66bc4a31549c54d
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d2bd912107
commit
951c866f53
@@ -419,6 +419,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
|
|||||||
continue;
|
continue;
|
||||||
case ICNSS_SLATE_SSR_REGISTERED:
|
case ICNSS_SLATE_SSR_REGISTERED:
|
||||||
seq_puts(s, "SLATE SSR REGISTERED");
|
seq_puts(s, "SLATE SSR REGISTERED");
|
||||||
|
continue;
|
||||||
|
case ICNSS_SLATE_UP:
|
||||||
|
seq_puts(s, "ICNSS SLATE UP");
|
||||||
}
|
}
|
||||||
|
|
||||||
seq_printf(s, "UNKNOWN-%d", i);
|
seq_printf(s, "UNKNOWN-%d", i);
|
||||||
|
@@ -827,6 +827,13 @@ 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 && !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);
|
||||||
|
}
|
||||||
|
|
||||||
ret = wlfw_ind_register_send_sync_msg(priv);
|
ret = wlfw_ind_register_send_sync_msg(priv);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret == -EALREADY) {
|
if (ret == -EALREADY) {
|
||||||
@@ -2204,6 +2211,17 @@ static int icnss_slate_notifier_nb(struct notifier_block *nb,
|
|||||||
unsigned long code,
|
unsigned long code,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
|
struct icnss_priv *priv = container_of(nb, struct icnss_priv,
|
||||||
|
slate_ssr_nb);
|
||||||
|
icnss_pr_vdbg("Slate-subsys-notify: event %lu\n", code);
|
||||||
|
|
||||||
|
if (code == QCOM_SSR_AFTER_POWERUP) {
|
||||||
|
set_bit(ICNSS_SLATE_UP, &priv->state);
|
||||||
|
complete(&priv->slate_boot_complete);
|
||||||
|
icnss_pr_dbg("Slate boot complete, state: 0x%lx\n",
|
||||||
|
priv->state);
|
||||||
|
}
|
||||||
|
|
||||||
return NOTIFY_OK;
|
return NOTIFY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4393,6 +4411,9 @@ 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->soc_wake_wq = alloc_workqueue("icnss_soc_wake_event",
|
priv->soc_wake_wq = alloc_workqueue("icnss_soc_wake_event",
|
||||||
WQ_UNBOUND|WQ_HIGHPRI, 1);
|
WQ_UNBOUND|WQ_HIGHPRI, 1);
|
||||||
|
@@ -126,6 +126,7 @@ enum icnss_driver_state {
|
|||||||
ICNSS_COLD_BOOT_CAL,
|
ICNSS_COLD_BOOT_CAL,
|
||||||
ICNSS_QMI_DMS_CONNECTED,
|
ICNSS_QMI_DMS_CONNECTED,
|
||||||
ICNSS_SLATE_SSR_REGISTERED,
|
ICNSS_SLATE_SSR_REGISTERED,
|
||||||
|
ICNSS_SLATE_UP,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ce_irq_list {
|
struct ce_irq_list {
|
||||||
@@ -499,6 +500,7 @@ struct icnss_priv {
|
|||||||
bool is_rf_subtype_valid;
|
bool is_rf_subtype_valid;
|
||||||
u32 rf_subtype;
|
u32 rf_subtype;
|
||||||
u8 is_slate_rfa;
|
u8 is_slate_rfa;
|
||||||
|
struct completion slate_boot_complete;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct icnss_reg_info {
|
struct icnss_reg_info {
|
||||||
|
Reference in New Issue
Block a user