mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
slim-msm-ngd: Check current state of sub system restart notifier
Check for the current state of sub system restart notifier when the LOCATOR_UP notification is given to slimbus driver and do the slimbus initialization if the current state is already set to SERVREG_NOTIF_SERVICE_STATE_UP_V01. This change is needed in the cases where LOCATOR_UP notification to slimbus driver got delayed and the state of the sub system restart notifier is already set to SERVREG_NOTIF_SERVICE_STATE_UP_V01 as slimbus will be expecting the SERVREG_NOTIF_SERVICE_STATE_UP_V01 notification which is not going to come as the notifier state is already changed. Change-Id: I4804bbb13e065ac78be7a442993286532402db9d Signed-off-by: Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
This commit is contained in:
parent
e7761f93ac
commit
80269d295f
1 changed files with 14 additions and 2 deletions
|
|
@ -272,7 +272,7 @@ static int dsp_domr_notify_cb(struct notifier_block *n, unsigned long code,
|
|||
break;
|
||||
case SUBSYS_AFTER_POWERUP:
|
||||
case SERVREG_NOTIF_SERVICE_STATE_UP_V01:
|
||||
SLIM_INFO(dev, "SLIM DSP SSR notify cb:%lu\n", code);
|
||||
SLIM_INFO(dev, "SLIM DSP SSR notify cb:0x%x\n", code);
|
||||
/* Hold wake lock until notify slaves thread is done */
|
||||
pm_stay_awake(dev->dev);
|
||||
atomic_set(&dev->init_in_progress, 1);
|
||||
|
|
@ -302,9 +302,21 @@ static int dsp_domr_notify_cb(struct notifier_block *n, unsigned long code,
|
|||
&cur);
|
||||
SLIM_INFO(dev, "reg-PD client:%s with service:%s\n",
|
||||
reg->client_name, reg->service_name);
|
||||
SLIM_INFO(dev, "reg-PD dom:%s instance:%d, cur:%d\n",
|
||||
SLIM_INFO(dev, "reg-PD dom:%s instance:%d, cur:0x%x\n",
|
||||
reg->domain_list->name,
|
||||
reg->domain_list->instance_id, cur);
|
||||
|
||||
if (cur == SERVREG_NOTIF_SERVICE_STATE_UP_V01) {
|
||||
pm_stay_awake(dev->dev);
|
||||
atomic_set(&dev->init_in_progress, 1);
|
||||
if (dev->lpass_mem_usage) {
|
||||
dev->lpass_mem->start = dev->lpass_phy_base;
|
||||
dev->lpass.base = dev->lpass_virt_base;
|
||||
}
|
||||
atomic_set(&dev->ssr_in_progress, 0);
|
||||
schedule_work(&dev->dsp.dom_up);
|
||||
}
|
||||
|
||||
if (IS_ERR_OR_NULL(dev->dsp.domr))
|
||||
ngd_reg_ssr(dev);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue