defconfig: Update

Signed-off-by: Kostas K <mpokwsths@gmail.com>
Added the capability of disabling the various tracers

Tracers must be explicitly selected in the defconfig.
Added the proper headers to msm-pm and perf_trace_counters

Signed-off-by: Kostas K <mpokwsths@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm-pm.c
	arch/arm/mach-msm/perf_trace_counters.c
ARM: provide a late_initcall hook for platform initialization

This allows platforms to set up things that need to be done at
late_initcall time.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Robert Lee <rob.lee@linaro.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7465/1: Handle >4GB memory sizes in device tree and mem=size@start option

The memory regions which are passed to arm_add_memory() from
device tree blobs via early_init_dt_add_memory_arch() can
have sizes which are larger than will fit in a 32 bit integer,
so switch to using a phys_addr_t to hold them, to avoid
silently dropping the top 32 bits of the size. Similarly, use
phys_addr_t in early_mem() so that mem=size@start command line
options specifying more than 4GB behave sensibly.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7505/1: split out ATAGS parsing

Make ATAGS parsing into a source file of its own, namely atags_parse.c.
Also rename compat.c to atags_compat.c to make it clearer what it is
about.  Same for atags.c which is now atags_proc.c. Gather all the atags
function declarations into a common atags.h.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
msm: sps: disable cache miss feature in NDP-BAM by default

NDP-BAM has a new feature of cache miss error response. However,
peripherals may not support it. Thus, disable it by default.

Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: Allow EE0 for SPS satellite mode

The Execution Environment (EE) allocation allows the satellite mode
to use EE0 now. Remove the former restriction in the code.

Change-Id: I59f315c23fcdf114edddfaff9322e2055ad4fa5c
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: do not disable channels in BAM DMA

The channels are turned on by TZ now. So do not disable them
in the init of BAM DMA on apps.

Change-Id: I696d26533c7e2590127d482199c72b564282d855
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: make device type independent from BAM DMA

BAM DMA does not exist on some chipsets. Get device type for BAMs
from device tree even if BAM DMA does not exist.

Change-Id: Id736cf47b0a3e80520ad9d73f143ff66855e7038
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: show flow control recommendation

When the client of SPS driver pushes data into the BAM faster
than BAM's consumption speed, the descriptor FIFO of that pipe
will be full and the transfer will return failure. The client
can avoid this situation by monitoring the number of pending
transfers. However, this is up to the implementation of error
handling of the client. Add this debugging message so that SPS
driver will show flow control recommendation to the client
for one time when the descriptor FIFO is ever full.

Change-Id: I1627fae7588eb9ae0cd8ba4a4809bfca282bb1e0
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: add the option for BAM HW configuration

Add the option for BAM Clients to specify whether enable or disable
some HW features of their BAMs.

Change-Id: I98eed08ce32bc6ded93892b5b131f25f1e708817
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: check the result of memory allocation

Check the result of memory allocation request before use it, to avoid NULL
pointer dereference.

Change-Id: I56376b4f503d3c7134ae3ab73fccd5b0b3a40290
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: read pipe number from the exact reg field

The reserved fields in regular BAMs have new meanings in NDP-BAM
and BAM-Lite on B family. Read the exact reg field for pipe number
instead of reading the whole register.

Change-Id: I25dca6ed3c8beab3c2e943120867c759dd5e4095
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: Fix BAM ISR race with pipe disconnect

Pipe EOT can occur while SPS pipe disconnect is being done.
The pipe disconnect can free up resources and pointers that
are used by bam_isr() in parallel in SMP environment and can
cause null pointer dereference.

Fix this by calling synchronize_irq() before freeing up resources
and by spin_lock to avoid race conditions.

Change-Id: I51eb88e1d68123d13d4aaf654e729236a4a3f144
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
msm: sps: enable a pipe only when it is disabled

BAM HW may publish the number of available bytes to the peripheral multiple
times if we enable the same pipe for multiple times. And some peripherials
may overestimate the available bytes by summing the sizes. Thus, enable a
pipe only when the pipe is disabled currently.

Change-Id: I8697ba5003eaed1efbfecc10161cc6b178c43d0b
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: Add \n to the end of each log message

All the log messages need a \n so that they can be posted
properly in the kernel log output.

Change-Id: I91c12351bb1c92841373aa539c93870619605258
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: remove the address checking for descriptors

0x0 is a valid physical address for drivers to use. Thus, remove
the checking of physical address for descriptors.

Change-Id: I19b8e215a4538ec0a9b7def505f9577e204c7730
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: enable BAM DMA client to control BAM DMA clock

For power saving reason, SPS driver will turn off the clock of
BAM DMA after the initial configuration. A new API is provided
to BAM DMA clients to vote for or relinquish BAM DMA clock when
they start/stop using BAM DMA.

Change-Id: I03f8a6cfa19c1722ca4e92e0785ca309fdd10ba2
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: turn off BAM DMA clock after initial config

For power saving, SPS driver will turn off BAM DMA clock after the
initial configuration of BAM DMA. The clients of BAM DMA will vote
for the clock when BAM DMA is used.

Change-Id: I388a21cff3c619ef49705a064d7d5ef760fa9ef8
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: add OCIMEM for pipe memory

BAM uses pipe memory for BAM-to-BAM connnections. OCIMEM is one of
memory types for pipe memory. Add the support for OCIMEM in this
change.

Change-Id: Ifc6fe537060d2c4120a03222cb419f463c7b4ab0
Signed-off-by: Yan He <yanhe@codeaurora.org>

Conflicts:
	drivers/platform/msm/sps/sps.c
	drivers/platform/msm/sps/spsi.h