drivers: base: Add generic cross-process locking API

Add a generic locking API for situations where multiple user-space
processes and/or kernel drivers need to cooordinate access to a
shared resource such as a graphics buffer.

Change-Id: Ic0dedbad74b970d7bd1a6624a845b5b1b9847443
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Enable genlock
msm_serial_hs: Enable GSBI6 as UARTDM device

This change configures GSBI6 into UARTDM mode.
It adds configuration require for clocks, ADM Channels and CRCI.

CRs-Fixed: 299610
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: 8064: add support for DMOV in 8064 baseport.

Added io mapping for dmov device.
Added the platform device for dmov. The device is using security
domain 0 for now until TZ comes in, at which point this would
be moved to security domain 1.

Signed-off-by: Joel King <joelking@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: 8064: add support for gpio/tlmm.

Added Kconfig entry to enable the GPIOMUX driver.
Updated Makefile to compile gpiomux driver files.
Added io map for TLMM device, and perform gpiomux
initialization without installing any gpios.
Gpios will be mapped when the peripheral connections
are finalized for virtio, cdp or other targets.

Signed-off-by: Joel King <joelking@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: Add SPI QUP support for APQ8064

Add the device definitions and platform data to support
SPI QUP on APQ8064 simulator and RUMI3 targets.

Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: Add SSBI support for APQ8064

Add the device definitions and platform data to support
SSBI on APQ8064 targets.

Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: board-apq8064: Add USB peripheral and OTG support

Adding USB peripheral and OTG support to 8064 platform.
Also adding DIAG and ADB functions to the android gadget and
enabling DIAG+ADB compositions.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: usb: Fix compilation for multi-target binary

Rename some USB devices to fix concurrent compilation for
8960 and 8064.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: clock: Support multi-target compilation

Having multiple late initcalls across all the clock-$(ARCH) files
won't work when they are compiled together. Register a struct
with msm_clock_init() so that clock.c can driver the init() and
late_init() calls that need to be made per SoC.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: dmov: Support for multiple concurrent targets

Rename the data mover devices to allow one kernel to be
compiled for 8960 and 8064 simultaneously.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: Add I2C QUP support for APQ8064

Add the device definitions and platform data to support
I2C QUP on APQ8064 simulator and RUMI3 targets.

Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: clock: Rename all UART clocks to 'core_clk' or 'iface_clk'

Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: clock: Rename all I2C/SPI clocks to 'core_clk' or "iface_clk"

Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-qrdc.c
	arch/arm/mach-msm/board-qt8660.c
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: clock: Rename SDC clocks to match new naming convention

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: tsif: Register device with clock driver and rename clocks

Rename the clocks per the new naming convention under which
similarly named clocks are distinguished between using their
associated device's name and ID.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: footswitch: Specify footswitch device struct for clk_get()

Use the device names to distinguish between clocks of the same
type rather than the clock name alone.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Use device names to distinguish between graphics clocks

Distinguish between similar clocks on different cores using the
device struct passed to clk_get(). This allows for a common
clock naming convention that spans across targets.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>