Commmand Descriptor, Pipe Lock, Notify-When-Done(NWD) and Immediate
Commmand Descriptor are enabled in NDP-BAM and BAM-Lite. Add the
support in SPS driver for these new features.
Change-Id: I0ec9efe0bd801345aa416270739a52d7d6c5e01c
Signed-off-by: Yan He <yanhe@codeaurora.org>
When set up a new pipe but the resource for that pipe is already
in use, we should return error directly instead of first disabling
that pipe in BAM HW.
CRs-Fixed: 341066
Signed-off-by: Yan He <yanhe@codeaurora.org>
The debugging functions in SPS driver are enhanced as follows:
1> Change some logging output from pr_info() to pr_debug() to reduce
log amount.
2> Formalize the log content since some logs did not have the keyword
which shows they are from SPS driver. This modification can help
people find the error or other information from SPS driver more
conveniently.
3> SPS driver did not output error messages in some places where an
error is captured. Add error message output for these places.
4> SPS driver is used by some peripherals (such as SDCC) which have
high throughput. When DEBUG level logging is enabled, the log
output is tremendous and sometimes even hinders the analysis of
the log, although some log messages are very helpful to the
debugging of particular issues. Thus, add fine-grained DEBUG level
log output control via debugfs.
5> Add the options via debugfs which dump the content of selected BAM
registers. This can help analyze the BAM-related issues without
additional software tools.
Change-Id: Ie97dc5d3b2736ea840125dad978e81abb960b27a
Signed-off-by: Yan He <yanhe@codeaurora.org>
Upstream has changed the clock voting api from a single api that must
be atmoic context compatable, to a split api with atomic and non-atomic
components. Migrate to the new api as the old one is deprecated and
will be removed soon.
Change-Id: I5e2eaad78728a8fb9e10e18d8fd49bbec67cb40e
Signed-off-by: Yan He <yanhe@codeaurora.org>
Add checking of null pointer and array index boundary
Change-Id: I5a8d044af791897c7e728d0a870069b1c7b24acb
Signed-off-by: Yan He <yanhe@codeaurora.org>
Add new APIs which facilitates the setup of BAM-to-BAM connections
in client drivers.
Change-Id: Id6653961c3125bcc15b31a9c4061e76d927ae2b2
Signed-off-by: Yan He <yanhe@codeaurora.org>
sps_disconnect() calls mutex inside spinlock protected code, and thus gets
the warning "sleeping function called from invalid context". Change
spinlock to mutex in sps_disconnect().
Change-Id: Ied30595f20d0f5976d53575138b072ba251fc10e
Signed-off-by: Yan He <yanhe@codeaurora.org>
Client drivers of SPS driver will vote for dfab clock when it is
needed and relinquish the clock when it is not needed.
SPS driver only votes for dfab clock when it configures BAM-DMA
and relinquishes the clock after that.
Change-Id: I46a03633069a30f73b5159545c21e300140c5e6e
Signed-off-by: Yan He <yanhe@codeaurora.org>
improvements include:
1> avoid unnecessary string operation in ISR
2> enable detailed debug info output at runtime
3> use unlikely() macro to improve success of branch prediction
Signed-off-by: Yan He <yanhe@codeaurora.org>
When client drivers use spinlock and embrace SPS APIs that use mutex,
scheduling error may happen. Use spinlock for these SPS APIs instead.
Signed-off-by: Yan He <yanhe@codeaurora.org>