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_acc.c | |
parent | 96ee19becc3bd7b2cebae5828c3eacfebb50b993 (diff) | |
download | linux-045016902bf7abeeb2a86fc9284c30dce228f055.tar.bz2 |
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_acc.c')
-rw-r--r-- | drivers/soc/ti/knav_qmss_acc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c index ef6f69db0bd0..37c4aa95492d 100644 --- a/drivers/soc/ti/knav_qmss_acc.c +++ b/drivers/soc/ti/knav_qmss_acc.c @@ -482,8 +482,8 @@ struct knav_range_ops knav_acc_range_ops = { * Return 0 on success or error */ int knav_init_acc_range(struct knav_device *kdev, - struct device_node *node, - struct knav_range_info *range) + struct device_node *node, + struct knav_range_info *range) { struct knav_acc_channel *acc; struct knav_pdsp_info *pdsp; @@ -526,6 +526,12 @@ int knav_init_acc_range(struct knav_device *kdev, return -EINVAL; } + if (!pdsp->started) { + dev_err(kdev->dev, "pdsp id %d not started for range %s\n", + info->pdsp_id, range->name); + return -ENODEV; + } + info->pdsp = pdsp; channels = range->num_queues; if (of_get_property(node, "multi-queue", NULL)) { |