Commit Graph

19 Commits

Author SHA1 Message Date
Yan He
f879bb0f09 platform-drivers: msm: sps: add new features on NDP-BAM/BAM-Lite
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>
2012-03-30 13:25:50 -07:00
Yan He
1ad4982314 platform-drivers: msm: sps: fix an error in pipe assignment
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>
2012-03-26 17:10:24 -07:00
Yan He
fd730fdb5e platform-drivers: msm: sps: enhance the debugging functions
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>
2012-01-29 01:16:48 -07:00
Yan He
fe572dec64 platform-drivers: msm: sps: migrate to new clock API
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>
2012-01-26 13:58:44 -08:00
Yan He
c5570a0d24 platform-drivers: msm: sps: improve robustness of SPS driver
Add checking of null pointer and array index boundary

Change-Id: I5a8d044af791897c7e728d0a870069b1c7b24acb
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-12-13 17:42:39 -08:00
Yan He
1466daa90c platform-drivers: msm: sps: Add SPS support for msm copper
Change-Id: If5b686e17fe8691024ef7475d5a89f2670390b8e
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-12-05 12:49:11 -08:00
Bryan Huntsman
849b79e1f0 msm: trivial: 'chmod 644' for non-executable files
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-22 18:44:06 -08:00
Yan He
2027bd8023 platform-drivers: msm: sps: Add APIs for BAM-to-BAM connection
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>
2011-11-14 10:26:48 -08:00
Yan He
c324a794ba platform-drivers: msm: sps: Support IRQ wakeup in SPS driver
Change-Id: Ibe994732dca2433db19445a92742d298ce15f1cf
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-11-11 11:44:49 -07:00
Yan He
93c04f0890 platform-drivers: msm: sps: fix sleeping function called from atomic issue
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>
2011-11-08 09:52:29 -08:00
Yan He
0446b43fb1 platform-drivers: msm: sps: remove dfab clock voting in SPS driver
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>
2011-11-07 16:31:28 -08:00
Matt Wagantall
d86d683996 msm: sps: Rename PMEM clocks to match the new naming convention
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-10-03 16:18:07 -07:00
Yan He
7887c510b7 platform-drivers: msm: sps: use spin_lock_irqsave for SPS driver
Use spin_lock_irqsave to prevent the deadlock caused by SoftIRQ

Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-10-03 16:16:18 -07:00
Yan He
9775260c6a platform-drivers: msm: sps: clear BAM global IRQ status after interrupt
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-10-03 16:14:54 -07:00
Yan He
882152a3d3 platform-drivers: msm: sps: fix spinlock bug
add init for spinlock.

Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-10-03 10:28:38 -07:00
Yan He
161d678fa7 platform-drivers: msm: sps: debugging function enhancement
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>
2011-10-03 10:27:25 -07:00
Yan He
160633ed06 platform-drivers: msm: sps: add DFAB clock support for SPS driver.
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-10-03 10:26:49 -07:00
Yan He
15f8646855 platform-drivers: msm: sps: add spinlock for BAM
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>
2011-10-03 10:26:39 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00