SLIM_INFO(dev, "Slimbus QMI NGD CB received event:%ld\n", code);
switch (code) {
case QMI_SERVER_ARRIVE:
+ atomic_set(&dev->ssr_in_progress, 0);
schedule_work(&dev->dsp.dom_up);
break;
default:
switch (code) {
case SUBSYS_BEFORE_SHUTDOWN:
case SERVREG_NOTIF_SERVICE_STATE_DOWN_V01:
+ SLIM_INFO(dev, "SLIM DSP SSR notify cb:%lu\n", code);
+ atomic_set(&dev->ssr_in_progress, 1);
/* wait for current transaction */
mutex_lock(&dev->tx_lock);
/* make sure autosuspend is not called until ADSP comes up*/
}
if (dev->bulk.size > dev->bulk.buf_sz) {
void *temp = krealloc(dev->bulk.base, dev->bulk.size,
- GFP_KERNEL);
+ GFP_KERNEL | GFP_DMA);
if (!temp) {
ret = -ENOMEM;
goto retpath;
if (ret) {
SLIM_WARN(dev, "SLIM power req failed:%d, retry:%d\n",
ret, retries);
- msm_slim_qmi_power_request(dev, false);
- if (retries < INIT_MX_RETRIES) {
+ if (!atomic_read(&dev->ssr_in_progress))
+ msm_slim_qmi_power_request(dev, false);
+ if (retries < INIT_MX_RETRIES &&
+ !atomic_read(&dev->ssr_in_progress)) {
retries++;
goto hw_init_retry;
}
SLIM_WARN(dev,
"slim capability time-out:%d, stat:0x%x,cfg:0x%x\n",
retries, laddr, cfg);
- if (retries < INIT_MX_RETRIES) {
+ if ((retries < INIT_MX_RETRIES) &&
+ !atomic_read(&dev->ssr_in_progress)) {
retries++;
goto capability_retry;
}
/* typical txn numbers and size used in bulk operation */
dev->bulk.buf_sz = SLIM_MAX_TXNS * 8;
- dev->bulk.base = kzalloc(dev->bulk.buf_sz, GFP_KERNEL);
+ dev->bulk.base = kzalloc(dev->bulk.buf_sz, GFP_KERNEL | GFP_DMA);
if (!dev->bulk.base) {
ret = -ENOMEM;
goto err_nobulk;
dev->ee = 1;
dev->irq = irq->start;
dev->bam.irq = bam_irq->start;
+ atomic_set(&dev->ssr_in_progress, 0);
if (rxreg_access)
dev->use_rx_msgqs = MSM_MSGQ_DISABLED;
struct platform_device *pdev = to_platform_device(device);
struct msm_slim_ctrl *dev = platform_get_drvdata(pdev);
int ret = 0;
+
mutex_lock(&dev->tx_lock);
if (dev->state >= MSM_CTRL_ASLEEP)
ret = ngd_slim_power_up(dev, false);