msm: tspp: Fix usage of physical addresses

Do not assume that physical addresses are 32bits
long. This is required to support LPAE.

Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
tspp: Protect against buffer overflow

Change filter->priority to unsigned int. Since it was defined as integer,
it may have had negative value and cause accessing an array outside
of its region

Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: tspp: Fix memory leak

SPS end point was not released when tspp
output pipe was closed.

Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: tspp: Request IRQs on first use

Reserving the IRQs on driver initialization is redundant and should
be done only when client first uses the driver. Also, it may prevent
transition to power saving modes.
Move IRQ requests to be done when first stream is opened, and free
when last stream is closed.

Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
tspp: fix bam irq request preventing sleep

Registering and resetting BAM device upon initialization of tspp
driver requests bam irq resource, which prevents entering sleep.
Instead, BAM device is now initialized only when first needed which
is when the first channel is opened. BAM device is uninitialized
when channel is closed.

Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: tspp: use an actual device structure for DMA allocation

Not supplying the device struct for arch arm64 causes some DMA
functions to issue runtime warning and fail.

Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
platform: msm: Fix compile when CONFIG_PFT is not set

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: pm: Pull-in PM driver from kk-3.5

* PM driver is messed up, so better start clean.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: enable CONFIG_TSPP

Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: updates

Signed-off-by: Dan Trifan <jimsth@gmail.com>