Adding Dogo device support

Change-Id: I64c244326adf18ddc1ce9ff6fdce4598ec7425ff
dogo: update kernel defconfig

Change-Id: Ic9d93f560c75bdcb1eeca2ec24910cca67db8c11
ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS

The {get,put}_user macros don't perform range checking on the provided
__user address when !CPU_HAS_DOMAINS.

This patch reworks the out-of-line assembly accessors to check the user
address against a specified limit, returning -EFAULT if is is out of
range.

[will: changed get_user register allocation to match put_user]
[rmk: fixed building on older ARM architectures]

CRs-Fixed: 504011
Change-Id: I3818045a136fcdf72deb1371b132e090fd7ed643
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 8404663f81d212918ff85f493649a7991209fa04
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
Slim_msm: Wait for reconfig sequence to complete

Wait for current reconfiguration to complete during
reconfigure_now sequnce. Earlier we are not waiting
for reconfiguration done interrupt after sending the
reconfiguration message to the slimus hardware. This
may lead to hardware synchronization issues in lower
slimbus clock frequencies.

In this patch we are waiting for the reconfiguration
done interrupt from slimbus hardware.

CRs-Fixed: 490022
Change-Id: If0126dac9a1ad2d931e9a0e345d19559fe36f67a
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
qseecom: fix memory leak in qseecom_start_app()

Fixes the incorrect reurn path in qseecom_start_app() function with
proper clean-up. With out this patch, there are lot of memory leaks.

Change-Id: Ib9f7b08dd86952c1b0a1572d9a7d81517c3b2189
CRs-fixed: 509111
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
qseecom: Fix error handling path in receive_req()

This patch fixes the error handling path in receive_req() function
called from userspace. Issue seen if user is calling the receive_req
function without calling the listener registration. qseecom_find_svc()
should return NULL if there are no services found.

Change-Id: Id51d8f48d7266b5acbc845f7b9ac0068d16b1ede
CRs-fixed: 496927
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
qseecom: Fix QSEECOM_IOCTL_UNLOAD_EXTERNAL_ELF_REQ kernel crash

Fixes the kernel crash occuring with IOCTL_UNLOAD_EXTERNAL_ELF_REQ
ioctl by adding unavailable client type to qseecom_client_handle_type
enum, which is required in the driver during qseecom_release().

Change-Id: I73b817255149ffc4a808852feb2954a0ba3c317f
CRs-fixed: 508253
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
qseecom: Add NULL pointer check in qseecom_ioctl

NULL pointer check is added to the qseecom driver in qseecom_ioctl,
which is required to validate the data pointer before executing any
other code from ioctl's.

Change-Id: I6fecf13769b4d7e94eebd4dc075a5ece79b18e1b
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Giulio Cervera <giulio.cervera@cyanogenmod.org>
msm: kgsl: Don't refer the NULL context

This fix ensure the BIRT test case will not
cause any device crash.

Change-Id: Ibbcdca293f4da05b21d16674f605aac729905959
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: kgsl: KlocWork fixes

KlocWork fixes to avoid NULL pinter dereference

Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>
Change-Id: Iaa193683bc0ea092ff37fe77ca6a4be88dd55214
Revert "dogo: update kernel defconfig"

This reverts commit 1d760bd2562d23647788613c77fc5bc5d2f66be5.

Change-Id: I0d1c7408a52f5bfeed55ec16422dd80d82f60883
dogo: add cm defconfig

Change-Id: Ifea857c6444807985d9e91e110da60998d7780a4
ASoC: wcd9304: Wait enough time during mbhc calibration

If mbhc micbias has a capacitor which is large enough to delay micbias
voltage ramp up/down, initial calibration also needs to delay enough time
after changing mux to be able to calibrate ground and micbias voltage
accurately.  Increase delay to 50ms during calibration and improve
calibration accuracy.

CRs-Fixed: 495526
Change-Id: I8bf1297045565740175292a522168131754e7940
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9304: recalibrate microphone ground voltage

Different clock sources can affect mbhc voltage inconsistent measurement
accumulation which consecutively results in inaccurate button detection.
Recalibrate ground voltage on dce handler to enhance mbhc button detection
accuracy.

CRs-Fixed: 495526
Change-Id: I30c548677a85febe644da1dfb4ce1c6622c8a658
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9304: Fix dce and sta wait time

Apply correct dce and sta wait time based on calculation
rather than using default values.

CRs-Fixed: 521904
Change-Id: I15578c8ca5ba606af3d7ded85014c178ffc1effe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

0.3 mA higher sleep current .This happens due to manually
forcing digital mic clock pin to GPIO mode from functional
mode through the TLMM mux.

CRs-Fixed: 529174

This reverts commit 061a10151c1420459f57a8676749216a40c4c8be.

Change-Id: Ic94c8b867d445b2e341751f4e04982dd6bbefda6
Signed-off-by: johny <mjshai@codeaurora.org>
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

0.3 mA higher sleep current .This happens due to manually
forcing digital mic clock pin to GPIO mode from functional
mode through the TLMM mux.

CRs-Fixed: 529174

This reverts commit 474bb04e27aa93c9dcdad780fe63100013c9d4eb.

Change-Id: I0b81bdc157115a4c6791f556f56f092607c5f597
Signed-off-by: johny <mjshai@codeaurora.org>
msm: kgsl: Verify the user doesn't accidentally submit a zero length IB

Indirect buffers to be executed will not be (and cannot be) zero length.
Check and reject.

Change-Id: Ic0dedbadea429c4f7bd386c5e64603b51ea8af61
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: scm: Add scm_call_noalloc and helper macros

Currently, scm_call internally calls kmalloc() to allocate a command
buffer structure. This prevents scm_call from working before kmalloc
structures are initialized or during atomic contexts. Allow clients
to pass in a pre-allocated buffer for scm_call to be used for internal
structures.

Change-Id: Id09500c8c696298228aefdcc2a61953e654677c9
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
arm: Add ARCH_RANDOM Kconfig

Some boards may support architecture generated random numbers. Add
the appropriate Kconfig.

Change-Id: I0077a982c9bb6d3a35435cc27fe40b7e0596ca84
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	arch/arm/Kconfig