drivers: bcmdhd: merge of Sony 6.1.A.2.45 release

Change-Id: I0e053cebbf7b01fbdcf8b993056a36900195ab5d
msm: bus: Migrate to dynamic printk/debug

Instead of requiring recompilation of the kernel to get bus
driver debugging messages just use dynamic debug. This allows us
to simply enable the printks we desire on the kernel command line
or via sysfs when we want to debug the bus driver.

Change-Id: I489550e21592d696bbddab457ffaad03d852495a
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: msm_bus: Update Clock APIs

The bus scaling driver calls clk_enable and clk_disable from
non-atomic context.
These calls are replaced by clk_prepare_enable and
clk_disable_unprepare respectively.

Change-Id: Ida8de2599cb2afc9f74c81be78cd37b5956de994
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: rpc: invalidate data structures during close

When device powers down, RPC Router close can get called from both the
reboot notifier and from the platform driver remove resulting in an
access-after-free bug.

Invalidate internal data structures and check for NULL to gracefully
handle multiple close operations.

CRs-Fixed: 394129
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit e201a31d51b79b3fb30966edea877666b217f6fb)

Change-Id: I039df5622af28ea0b48ef86d2418681c4b953df4
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm: subsystem_restart: Prevent suspend from occuring during a restart

If a subsystem encounters a fatal error and communicates
this error to the applications processor just as the
application processor is about to enter a sleep mode
(in a suspend cycle), that subsystem may not be restarted
until the system resumes. To prevent this, take a
wakelock as soon as subsystem restart is requested.

For this to work, every client of subsystem restart
must ensure that they call into subsystem restart
from within the context of the interrupt that indicates
a fatal error in that subsystem.

Change-Id: I2e4ab2bc6ca45d3a7abbc8321de32ccd66ab0996
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: subsystem_restart: Make subsystem_restart interrupt context safe

To allow for correct behavior during sleep modes, it is
necessary that clients call subsystem restart within the
interrupt handler assigned to the error interrupt for their
subsystems. This implies that the subsystem_restart() API
needs to be able to safely run in an interrupt context.

Use a workqueue instead of a kthread to perform subsystem
restart, since kthreads cannot be created in an atomic
context. Note that concurrency managed workqueues (cmwq) allow
the behavior of the subsystem restart API to be preserved
even after replacing the kthread with a workqueue. This
is because with cmwq, a work item that sleeps during its
execution will not prevent the next-scheduled-work item
from executing. Thus multiple restart sequences can execute
at the same time, as was the case with kthreads.

Change-Id: I6adaaed0e2312de1d508f289328dc2d5e64679a5
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: subsystem_restart: Use the dedicated subsystem restart workqueue

ssr_wq was introduced to provide a dedicated execution
context for subsystem restart work items. Use it instead
of the system workqueue to run SSR work items.

Change-Id: Ia73f980f4bc26383edbce00f60182d49114b7994
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: subsystem_restart: Cleanup subsystem restart handling.

Simplify and split out the code that handles the
restarting of subsystems from the in the subsystem_restart
API.

Change-Id: I291a9b0fb3dc00de8f03eadcd6fd9dd384581039
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: subsystem_restart: Remove support for RESET_SUBSYS_MIXED

RESET_SUBSYS_MIXED was a temporary implementation for
the 8660 to allow the modem(s) to restart independently
of the lpass and still allow the modem(s) to be restarted
when the lpass crashed.

This implementation is no longer necessary. Remove it.

Change-Id: Icc11c61d0b0fee7901b744c608acd58f83d65e41
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: subsystem_restart: Convert subsystem_list_lock to a spinlock.

Use a spinlock instead of a mutex for subsystem_list_lock,
since this lock may be required in both interrupt and
pre-emptive context. A small list is traversed when this
lock is held, and therefore the penalty of holding this
lock is minimal.

Change-Id: I886747dc77d539c4d572e832fd676314f8e66b9f
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
(cherry picked from commit 705e68969220f568ebea9376c50e80e18e58d5b3)
msm: subsystem_restart: Use a CPU intensive workqueue for SSR

Using the default workqueue settings can result in the SSR
work item blocking the watchdog petting function. To avoid
this, schedule the SSR work on a workqueue that has the
WQ_CPU_INTENSIVE flag set. This will prevent any work item
posted to the workqueue from blocking other work items
posted by other drivers in the system, including the watchdog
pet work item.

Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
(cherry picked from commit 8d4c3f080dd910da4027798bdb11f265921109e9)

CRs-fixed: 390222
Conflicts:

	arch/arm/mach-msm/subsystem_restart.c

Change-Id: Ia0679fb882d66286b1fec74cc7fc6d52d484f973
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: bam_dmux: add missing parameter to bam_dmux_log() call

bam_dmux_log() takes a formatted string and a variable argument list
similar to printf() and creates printf() style output to a private kfifo
log.  This change fixes a particular invocation of bam_dmux_log() which has
an invalid variable argument list for the formatted string used.  Depending
on system timing, this invocation could succeed as expected, or it could
cause a null pointer exception.

To prevent further issues, add the __printf() function attribute so that
the gcc compiler will check at compile time the arguments to bam_dmux_log()
for proper number and types according to printf() usage.

CRs-Fixed: 382037
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
(cherry picked from commit d7d2b0698912348c464e126fe85fa4aca9da0bd5)

Change-Id: I348083c5457f9492984efd914753f389392e0c2c
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: bam_dmux: Add locking around platform device calls

The channel state is used to determine if a platform device has been
registered on a particular channel.  In the case of a subsystem restart
while a channel is being opened, the subsystem restart can occur between
the channel state being set to opened and the platform device being
added.  This will result in the subsystem restart code seeing that the
channel is open and attempting to remove a platform device that has been
added.

This change adds mutex protection around the channel state updates and
the platform device add/remove calls to handle any race conditions.

CRs-Fixed: 378060
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit a623da8bda62e95acf5991905af2847e8e326e09)

Change-Id: I748868194c49e79c9ddb1f7f3734ca71d26793b2
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: bam_dmux: delay premature uplink wakeup votes

Delay processing of wakeup votes until after bam has been initialized.
Premature votes can cause bam_dmux to go into the fatal error state if
wakeup votes are processed before the modem has powered up for the first
time.

Change-Id: I18e6963d6b1003a08c117233c9465795c7aab5b2
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/bam_dmux.c
msm: bam_dmux: abort ul wakeups in the middle of SSR

Abort any uplonk wakeups that happen to occur in the middle of subsystem
restart.  This may occur as a small race condition window exists where
bam_dmux knows SSR has occured, but hadn't yet sent that info to the
clients.  During this small window, a client may try to send some data,
triggering a ul_wakeup()

CRs-Fixed: 392604
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
(cherry picked from commit 00424ff7ef1b7ca6ddb0499a559d1693f6ae5c6a)

Change-Id: I8b725d5a32c00f73bb2339f457efa2b3effd7e1c
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
arm: Fix compilation error with gcc 4.5.2

Fix warning with the LDM/STM instructions. The instructions dont
have a register offset so set the offset to 0.

Change-Id: I2c988373c88e280015faa43076139650747d7ff3
Acked-by: Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
board: blue: remove dead camera code

if CONFIG_SEMC_CAM_MAIN_V4L2 and CONFIG_SEMC_CAM_SUB_V4L2 are not
defined build fails miserably because msm_camera_boardinfo is not
defined

Change-Id: Id5110131990e0463a38943a1b591a79fb7795087
update gitignore

Change-Id: I38bfb6c01c4a25feaa8228ac3268f9f7ba3ac23a