diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2015-10-13 13:49:04 -0700 |
---|---|---|
committer | Santosh Shilimkar <ssantosh@kernel.org> | 2015-10-13 13:49:04 -0700 |
commit | 045016902bf7abeeb2a86fc9284c30dce228f055 (patch) | |
tree | 5d3555a274a3f27b79c46cdd7ac43ea0bca466c9 /drivers/soc/ti/knav_qmss_queue.c | |
parent | 96ee19becc3bd7b2cebae5828c3eacfebb50b993 (diff) | |
download | talos-obmc-linux-045016902bf7abeeb2a86fc9284c30dce228f055.tar.gz talos-obmc-linux-045016902bf7abeeb2a86fc9284c30dce228f055.zip |
soc: ti: qmss: make acc queue support optional in the driver
acc channels are available only if accumulator PDSP is loaded and
running in the SoC. As this requires firmware and user may not have
firmware in the file system, make the accumulator queue support
available in qmss driver optional. To use accumulator queus user needs
to add firmware to the file system and boot up kernel.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Diffstat (limited to 'drivers/soc/ti/knav_qmss_queue.c')
-rw-r--r-- | drivers/soc/ti/knav_qmss_queue.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 06d9de826758..f3a0b6a4b54e 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1504,6 +1504,8 @@ static int knav_queue_stop_pdsp(struct knav_device *kdev, dev_err(kdev->dev, "timed out on pdsp %s stop\n", pdsp->name); return ret; } + pdsp->loaded = false; + pdsp->started = false; return 0; } @@ -1592,16 +1594,24 @@ static int knav_queue_start_pdsps(struct knav_device *kdev) int ret; knav_queue_stop_pdsps(kdev); - /* now load them all */ + /* now load them all. We return success even if pdsp + * is not loaded as acc channels are optional on having + * firmware availability in the system. We set the loaded + * and stated flag and when initialize the acc range, check + * it and init the range only if pdsp is started. + */ for_each_pdsp(kdev, pdsp) { ret = knav_queue_load_pdsp(kdev, pdsp); - if (ret < 0) - return ret; + if (!ret) + pdsp->loaded = true; } for_each_pdsp(kdev, pdsp) { - ret = knav_queue_start_pdsp(kdev, pdsp); - WARN_ON(ret); + if (pdsp->loaded) { + ret = knav_queue_start_pdsp(kdev, pdsp); + if (!ret) + pdsp->started = true; + } } return 0; } |