OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agoarm64: dts: msm: Temporarily disable WiPower charging
Jack Pham [Wed, 3 Feb 2016 04:00:43 +0000 (20:00 -0800)]
arm64: dts: msm: Temporarily disable WiPower charging

WiPower charging depends on VADC which is not yet ported. Disable
it for now in order to allow pmi8994 charger to work for other
use cases, such as USB charging and detection.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agopower: Ensure power_supply_config is zero-initialized
Jack Pham [Wed, 3 Feb 2016 03:56:58 +0000 (19:56 -0800)]
power: Ensure power_supply_config is zero-initialized

Since the config object is created on the stack, ensure that
it is initialized to zero. Otherwise an invalid pointer access
may occur when trying to dereference the cfg->of_node pointer
that's typically left unset.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable USB Gadget ConfigFS drivers
Jack Pham [Wed, 3 Feb 2016 01:43:41 +0000 (17:43 -0800)]
defconfig: arm64: msm: Enable USB Gadget ConfigFS drivers

Enable USB_GADGET, USB_CONFIGFS and several of the most used
function drivers to allow device mode operation. These drivers
provide functionality previously provided by the Android gadget
driver.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable USB DWC3 and PHY drivers (v2)
Jack Pham [Tue, 2 Feb 2016 21:40:19 +0000 (13:40 -0800)]
defconfig: arm64: msm: Enable USB DWC3 and PHY drivers (v2)

Enable DWC3, QUSB and QMP PHY drivers to support the USB
controller hardware. Also enable XHCI_HCD for USB host mode.

This is the second take, after fixing compilation errors in
dwc3-msm.c.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: dwc3-msm: Allow compilation when USB_GADGET=n
Jack Pham [Wed, 10 Feb 2016 00:04:20 +0000 (16:04 -0800)]
usb: dwc3-msm: Allow compilation when USB_GADGET=n

Fix link errors when USB_GADGET=n which causes dwc3/gadget.c
not to be built. These symbols are only used in the msm_ep_config/
unconfig functions so we can conditionally compile them.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agothermal: thermal_sys: Add support for configurable trip points.
Siddartha Mohanadoss [Tue, 7 Dec 2010 06:49:26 +0000 (22:49 -0800)]
thermal: thermal_sys: Add support for configurable trip points.

Add functionality for configurable hi, low and critical low.
Change the trip point attributes to allow userspace clients
with root access to set temperature for configurable hi and
low temperature.

Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
8 years agoRevert "thermal-core: Add a lock to tz_notify_trip()"
Ram Chandrasekar [Wed, 7 Jan 2015 00:46:41 +0000 (17:46 -0700)]
Revert "thermal-core: Add a lock to tz_notify_trip()"

This reverts commit 383ac33a1e2ab375e41387cf05132533ae178c36.

The temperature sensor drivers registering with thermal
core framework can call the thermal_sensor_trip() API in
interrupt context. This might cause potential thermal
reset issues because the interrupt might be disabled till
this API returns.

Change-Id: I8d6dfc55386fbdea8e51e7abbb0e7632208c6c38
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agothermal-core: Add separate threads for sysfs notify
Shiju Mathew [Tue, 30 Dec 2014 19:59:23 +0000 (14:59 -0500)]
thermal-core: Add separate threads for sysfs notify

Add separate threads for sysfs notify. This is required
so that any thermal trip is not blocked while handling
sysfs notify.

Change-Id: Ifee206c29fd1b3c226a342b7f048250d5062397e
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts and updated a call
  of INIT_COMPLETION to reinit_completion]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
8 years agothermal-core: Re-program the thresholds every time
Jeff Bernard [Wed, 10 Dec 2014 04:14:13 +0000 (23:14 -0500)]
thermal-core: Re-program the thresholds every time

Program the thresholds every time regardless so we guarantee
the threshold is programmed.  Previous code didn't reprogram
the threshold if it was already believed to be set.  This
check can be wrong is some cornor cases.

Change-Id: Ie94cb40302c585b2b779da57ad70d32cc2445c96
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
8 years agothermal-core: Add a lock to tz_notify_trip()
Jeff Bernard [Wed, 10 Dec 2014 03:09:48 +0000 (22:09 -0500)]
thermal-core: Add a lock to tz_notify_trip()

Lock the sensor threshold list during notifications so it
isn't updated until notifications are sent out nor can
something else update thresholds until all notifications
are sent out.

Change-Id: Iafce75fa7fceda3de867044861e4a2e3eef47c95
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
8 years agothermal_core: Add sysfs notification support for userspace
Ram Chandrasekar [Fri, 21 Nov 2014 01:25:07 +0000 (18:25 -0700)]
thermal_core: Add sysfs notification support for userspace

Add support to notify the userspace through sysfs
notification when a userspace threshold is crossed.

Change-Id: Ifdea7f15f288d1dca5365aedad16d1bdbc80be6c
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agothermal-core: Add API to get temperature
Archana Sathyakumar [Wed, 12 Mar 2014 15:41:12 +0000 (09:41 -0600)]
thermal-core: Add API to get temperature

Currently, there is no API to query the current temperature
in sensor framework. Add a generic API to get it.

Change-Id: I038e9a118e77eb6a3599b7d45a0cc8757990d2ef
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Conflicts:
include/linux/thermal.h

8 years agothermal-core: Fix to send correct trip type to get trip temperature
Ram Chandrasekar [Wed, 29 Jan 2014 21:02:40 +0000 (14:02 -0700)]
thermal-core: Fix to send correct trip type to get trip temperature

Fix the thermal sys code to pass the proper trip type
expected by tsens driver to get the tsens trip
temperature.

CRs-Fixed: 608753
Change-Id: I527af21bf13d8c5a93b92b34fa5f05c527a08bcd
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agothermal-core: Fix invalid sensor request not accounted correctly
Anji Jonnala [Fri, 22 Nov 2013 16:06:18 +0000 (21:36 +0530)]
thermal-core: Fix invalid sensor request not accounted correctly

Add NULL check for sensor name before using it in sensor_get_id and
return NULL explicitly when sensor id is not valid in get_sensor of
thermal core.

Change-Id: I4200a5691183aa2d40ef8ed64554f0beb8ce6d0d
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
8 years agothermal: Add Support for enabling and disabling tsens trip
Ram Chandrasekar [Wed, 2 Oct 2013 18:23:27 +0000 (12:23 -0600)]
thermal: Add Support for enabling and disabling tsens trip

Add new API to enable or disable the kernel client's trip
threshold request. The enable or disable trip threshold requests
from different kernel clients and userspace client will
activate/deactivate the corresponding clients threshold request.

Modify thermal sys framework to include only the active
thresholds from clients to determine the current trip
thresholds for tsens.

CRs-Fixed: 561775
Change-Id: I304ac00daa8a0a1a68b60153c29ee6cb5c3507b1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
[joshc: drop msm_thermal chunk]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
8 years agothermal: Fix sensor thresholds not accounted correctly
Praveen Chidambaram [Thu, 12 Sep 2013 22:39:44 +0000 (16:39 -0600)]
thermal: Fix sensor thresholds not accounted correctly

Sensor threshold min and max are calculated to be binding around the
current temp, but they fail if there no thresholds available with the
min < curr_temp and the max > curr_temp.

Fix negative temperatures handling.

Change-Id: I124d2a9249f705d41469b8e0efffe2dfdf05e292
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
8 years agothermal: thermal-core: Change temp type from unsigned to int
Siddartha Mohanadoss [Fri, 13 Sep 2013 18:08:57 +0000 (11:08 -0700)]
thermal: thermal-core: Change temp type from unsigned to int

Negative temperature values can be set by thermal clients
to the TSENS driver. Having unsgined long type prevents
clients using the set_trip_temp() thermal api to set
negative temperature values. On msm-3.4 kernel this api
had support to set negative temperature. Change the type
to support the negative temperature.

Change-Id: I987aed5a291b76d8360a9256cad0ff0c1adb06c8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agothermal: Add sensor API to allow any driver to set thresholds
Praveen Chidambaram [Tue, 2 Jul 2013 19:04:58 +0000 (13:04 -0600)]
thermal: Add sensor API to allow any driver to set thresholds

Sensor API allow drivers to set min or max thresholds and get
notified when the corresponding sensor crosses these thresholds.
The sensor API, uses the THERMAL_TRIP_CONFIGURABLE_HI and
THERMAL_TRIP_CONFIGURABLE_LOW, to set the threshold. The existing
sysfs interfaces will not be affected by the newly added API.

Change-Id: I85d2ae132fc3b7b6d157faf0a7390e31fdc7e6da
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Conflicts:
include/linux/thermal.h

8 years agothermal: thermal_sys: Add support for configurable trip points.
Siddartha Mohanadoss [Tue, 7 Dec 2010 06:49:26 +0000 (22:49 -0800)]
thermal: thermal_sys: Add support for configurable trip points.

Add functionality for configurable hi, low and critical low.
Change the trip point attributes to allow userspace clients
with root access to set temperature for configurable hi and
low temperature.

Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Conflicts:
drivers/thermal/thermal_core.c

8 years agothermal: tsens: TSENS driver fixups
Siddartha Mohanadoss [Wed, 29 Apr 2015 16:51:50 +0000 (09:51 -0700)]
thermal: tsens: TSENS driver fixups

Add TSENS Thermal driver. Include support to activate
a trip type and mode.

This snapshot is taken as of msm-3.14 commit 3bc54cf86b
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Conflicts:
drivers/thermal/Kconfig
drivers/thermal/Makefile
include/linux/thermal.h

Change-Id: Ie8a089afc0cf9e45ac000dff425a3e6206c1b9b1

8 years agodefconfig: arm: msm: Enable memshare config flag
Mohit Aggarwal [Thu, 11 Feb 2016 07:53:02 +0000 (13:23 +0530)]
defconfig: arm: msm: Enable memshare config flag

Memshare driver is required to provide memory from HLOS
to clients present on Modem.

Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
8 years agomemshare: Release the memory only if no allocation is done
Katish Paran [Wed, 28 Oct 2015 13:13:35 +0000 (18:43 +0530)]
memshare: Release the memory only if no allocation is done

Currently, memshare relies on the system monitor only for
releasing memory for the allocated clients. It may happen that
XPU is still intact on the modem side while driver tries to
release the memory. This patch ensures that memory release only
happens if XPU is released.

Change-Id: I45716c0abe6bc08559854782ff73a332e148a7cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
8 years agomemshare: Port and add snapshot of changes from msm-3.10
Mohit Aggarwal [Fri, 17 Jul 2015 11:13:48 +0000 (16:43 +0530)]
memshare: Port and add snapshot of changes from msm-3.10

Port the memshare driver and apply the following memshare driver
changes taken from msm-3.10 kernel branch as of msm-3.10 commit
4493220f memshare: Boot time allocation and handling
multiple clients
2ae4997a memshare: Donot re-allocate the memory for the
clients
059dcd59 memshare: Do not overwrite the response for the
failure case
ed6d183f memshare: Change the compatible property field
for child node
b473fc4e2 memshare: Free the memory after XPU unlocking is
done
95c114c39 memshare: Add query size api support for clients
60f310d4e memshare: Change dma attribute to
DMA_ATTR_NO_KERNEL_MAPPING
73075545 memshare: Remove local connection status variable
98dd2908 memshare: Place error check to prevent out of
bound access

Change-Id: Iecf0a9828efd1d56c309a2af882c13ce36e7fc06
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
8 years agodefconfig: msm: Enable CONFIG_UIO and CONFIG_MSM_SHAREDMEM
Rohit Vaswani [Thu, 11 Feb 2016 00:51:28 +0000 (16:51 -0800)]
defconfig: msm: Enable CONFIG_UIO and CONFIG_MSM_SHAREDMEM

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
8 years agouio: msm_sharedmem: Use proper format to print phys_addr_t
Prasad Sodagudi [Wed, 7 Oct 2015 17:34:40 +0000 (23:04 +0530)]
uio: msm_sharedmem: Use proper format to print phys_addr_t

Use proper printk format specifier to print phys_addr_t
type variable.

Change-Id: I7c55e44e813d8d41e1ead03280044c8542a24922
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
8 years agouio: msm_sharedmem: Add support for HYP call
Nikhilesh Reddy [Thu, 4 Jun 2015 18:31:42 +0000 (11:31 -0700)]
uio: msm_sharedmem: Add support for HYP call

Add support for HYP call to setup the sharedmem permissions
for the MPSS client.

Change-Id: I3b48ae962865d8d0a0ea6e3fbb8e21278b59c690
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
8 years agouio: Add snapshot of MSM sharedmem driver
Nikhilesh Reddy [Mon, 1 Jun 2015 23:08:32 +0000 (16:08 -0700)]
uio: Add snapshot of MSM sharedmem driver

This is a snapshot of the MSM sharedmem driver as of msm-3.14
commit:

149717c082aab8168283b7e0c23d8bd5a45b1999
( uio: msm_sharedmem: Add custom mmap )

The following changes are included:
02d55287 uio: msm_sharedmem: Restrict debugfs write to root.
de961fc7 uio: msm_sharedmem: Return ENOMEM if the shared mem addr
 is zero.
b974ce64 uio: msm_sharedmem: Add addtional information to debugfs
c46af547 uio: msm_sharedmem: Add support for dynamic shared memory
 allocation

Change-Id: I49902f018bde1d59d41027b7e46268cc17231a3e
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable kernel QMI Interface
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 21:22:47 +0000 (14:22 -0700)]
defconfig: arm64: msm: Enable kernel QMI Interface

The kernel QMI interface permits QMI communication to/from kernel
drivers.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of QMI
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 21:20:26 +0000 (14:20 -0700)]
soc: qcom: Add snapshot of QMI

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable IPC Router G-Link Transport
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 20:03:17 +0000 (13:03 -0700)]
defconfig: arm64: msm: Enable IPC Router G-Link Transport

The IPC Router G-Link Transport permits IPC Router communication over
G-Link to the other processors in the SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of ipc_router_glink_xprt
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 19:59:45 +0000 (12:59 -0700)]
soc: qcom: Add snapshot of ipc_router_glink_xprt

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of ipc_router_mhi_xprt
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 19:54:31 +0000 (12:54 -0700)]
soc: qcom: Add snapshot of ipc_router_mhi_xprt

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of ipc_router_hsic_xprt
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 19:50:54 +0000 (12:50 -0700)]
soc: qcom: Add snapshot of ipc_router_hsic_xprt

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of ipc_router_smd_xprt
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 19:45:04 +0000 (12:45 -0700)]
soc: qcom: Add snapshot of ipc_router_smd_xprt

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable IPC Router, IPC Router Security
Karthikeyan Ramasubramanian [Tue, 2 Feb 2016 00:00:09 +0000 (17:00 -0700)]
defconfig: arm64: msm: Enable IPC Router, IPC Router Security

IPC Router is a peer-to-peer, message oriented router that supports name
service and limited multihop routing for interprocessor messages in the
SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agonet: ipc_router: Use iov_iter accessor functions
Karthikeyan Ramasubramanian [Wed, 3 Feb 2016 18:56:30 +0000 (11:56 -0700)]
net: ipc_router: Use iov_iter accessor functions

The networking module uses iov_iter library to manage the vector buffers
from user-space. Use iov_iter accessor functions to copy the data from/to
the user-space vector buffers.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agonet: ipc_router: Fix to handle the socket framework updates
Karthikeyan Ramasubramanian [Tue, 2 Feb 2016 00:18:19 +0000 (17:18 -0700)]
net: ipc_router: Fix to handle the socket framework updates

Update the function signature of sendmsg and recvmsg operations.
Pass the kernel socket flag to the updated socket object allocation
function.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agonet: ipc_router: Remove including unused header file
Karthikeyan Ramasubramanian [Tue, 2 Feb 2016 00:09:04 +0000 (17:09 -0700)]
net: ipc_router: Remove including unused header file

qmi_encdec.h header file is no longer required in IPC Router. Remove
including that header file.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agonet: ipc_router: Add snapshot of IPC Router
Karthikeyan Ramasubramanian [Mon, 1 Feb 2016 23:53:22 +0000 (16:53 -0700)]
net: ipc_router: Add snapshot of IPC Router

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable IPC Logging
Karthikeyan Ramasubramanian [Mon, 1 Feb 2016 23:23:41 +0000 (16:23 -0700)]
defconfig: arm64: msm: Enable IPC Logging

IPC Logging is a low latency and minimal overhead logging framework used
by many interprocessor communication drivers such as GLink.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agotrace: ipc_logging: Use virtual counter
Karthikeyan Ramasubramanian [Mon, 8 Feb 2016 19:03:37 +0000 (12:03 -0700)]
trace: ipc_logging: Use virtual counter

Using the physical counter leads to a kernel BUG_ON(). Update the
IPC Logging Driver to use virtual counter.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agotrace: Add snapshot of ipc_logging driver
Karthikeyan Ramasubramanian [Mon, 1 Feb 2016 23:14:18 +0000 (16:14 -0700)]
trace: Add snapshot of ipc_logging driver

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable SMEM log
Karthikeyan Ramasubramanian [Mon, 1 Feb 2016 22:38:37 +0000 (15:38 -0700)]
defconfig: arm64: msm: Enable SMEM log

The SMEM log allows certain log events to be synchronized between
multiple processors in the SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agosoc: qcom: Add snapshot of SMEM_LOG Driver
Karthikeyan Ramasubramanian [Mon, 1 Feb 2016 22:35:34 +0000 (15:35 -0700)]
soc: qcom: Add snapshot of SMEM_LOG Driver

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
8 years agodefconfig: msm-perf: Bring it up-to-date with missing features during upgrade
Rohit Vaswani [Tue, 9 Feb 2016 20:28:52 +0000 (12:28 -0800)]
defconfig: msm-perf: Bring it up-to-date with missing features during upgrade

Also run savedefconfig to remove any diff on both defconfigs.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
8 years agodefconfig: Enable CONFIG_SYNC for Android
Rohit Vaswani [Tue, 9 Feb 2016 20:25:30 +0000 (12:25 -0800)]
defconfig: Enable CONFIG_SYNC for Android

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
8 years agoion: msm: fix Makefile dependencies
Jeremy Gebben [Wed, 10 Feb 2016 17:45:46 +0000 (10:45 -0700)]
ion: msm: fix Makefile dependencies

ion_cma_heap.o, ion_cma_secure_heap.o, and ion_system_secure_heap.o
all call functions which are only available if CONFIG_MSM_ION
is enabled.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
8 years agouapi: scsi: add missing header dependencies
Jeremy Gebben [Tue, 9 Feb 2016 23:20:33 +0000 (16:20 -0700)]
uapi: scsi: add missing header dependencies

Add #include dependencies to pick up definitions of __u32 and HZ.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
8 years agouapi: fix export of msm_ion.h
Jeremy Gebben [Tue, 9 Feb 2016 20:35:27 +0000 (13:35 -0700)]
uapi: fix export of msm_ion.h

Make this file be exported via symlink like the rest
of the android staging uapi headers.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
8 years agomsm: secure_buffer: fix stub functions
Jeremy Gebben [Wed, 10 Feb 2016 17:38:11 +0000 (10:38 -0700)]
msm: secure_buffer: fix stub functions

All of these need to be 'static inline' to avoid multiple
definition problems when MSM_SECURE_BUFFER=n.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
8 years agodefconfig: arm64: Add msmcortex defconfigs
Abhimanyu Kapur [Mon, 8 Feb 2016 22:20:50 +0000 (14:20 -0800)]
defconfig: arm64: Add msmcortex defconfigs

Add defconfig for supporting msmcobalt debug, perf
and other similar targets.

Change-Id: I3a55fea53cbfe65131fc4ccd505bc684cda9b2fa
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
8 years agosmp: Allow booting a specific subset of CPUs
Stepan Moskovchenko [Tue, 20 May 2014 02:07:33 +0000 (19:07 -0700)]
smp: Allow booting a specific subset of CPUs

In a heterogenous multiprocessor system, specifying the
'maxcpus' parameter on the kernel command line does not
provide sufficient control over which CPUs are brought
online at kernel boot time, since CPUs may have nonuniform
performance characteristics. Thus, we introduce a
'boot_cpus' command line argument, allowing the user to
explicitly specify the list of CPUs that shall be brought
online during kernel boot.

Change-Id: I5f119e23202660941fa7be8c4e6dd91a82365451
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
8 years agoarm64: Split out MSM8996 from generic ARCH_QCOM platform Kconfig
Abhimanyu Kapur [Mon, 8 Feb 2016 22:17:14 +0000 (14:17 -0800)]
arm64: Split out MSM8996 from generic ARCH_QCOM platform Kconfig

Add support for CONFIG_MSM89986 and split it out from generic
ARCH_QCOM platform.

Change-Id: Ibc287ffb76e5599ba63449534b264e4f31c98ec6
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
8 years agopinctrl: qcom: Snapshot pinctrl driver for msmcobalt
Abhimanyu Kapur [Mon, 8 Feb 2016 22:09:05 +0000 (14:09 -0800)]
pinctrl: qcom: Snapshot pinctrl driver for msmcobalt

Snapshot pinctrl driver and corresponding makefiles
and Kconfig from msm-3.18@b6a638f8795ee77ca
("Merge "msm: mdss: add support to send dcs cmds by
 left port only in video mode")

Change-Id: I129bb9bd4b7edd252550e6851332867be6fa0423
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
8 years agoARM: dts: qcom: Snapshot all device tree files for MSMCOBALT
Abhimanyu Kapur [Wed, 27 Jan 2016 22:02:10 +0000 (14:02 -0800)]
ARM: dts: qcom: Snapshot all device tree files for MSMCOBALT

Snapshot all device tree files from msm-3.18@b6a638f8795ee77ca
("Merge "msm: mdss: add support to send dcs cmds by
 left port only in video mode")

Change-Id: I631047dffa019c6d2ee731ead328d332f1c7f3b8
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
8 years agoRevert "defconfig: arm64: msm: Enable USB DWC3 and PHY drivers"
Rohit Vaswani [Tue, 9 Feb 2016 23:17:05 +0000 (15:17 -0800)]
Revert "defconfig: arm64: msm: Enable USB DWC3 and PHY drivers"

This reverts commit 52bfd76cadb4bcc4371ea83429d9de0dab981eb7.

8 years agodefconfig: enable subsystem restart, MSM_PIL_GENERIC and PIL_MSS_QDSP6V5
David Keitel [Thu, 4 Feb 2016 18:28:54 +0000 (10:28 -0800)]
defconfig: enable subsystem restart, MSM_PIL_GENERIC and PIL_MSS_QDSP6V5

Enable subsystem restart and relevant PIL drivers to allow secure
peripheral image loading and QDSP6V5 loading to work.

Change-Id: I899382d04e6a348cde2d46e9e0e6f3faadab2c5d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agodefconfig: disable EFI
David Keitel [Thu, 4 Feb 2016 18:11:28 +0000 (10:11 -0800)]
defconfig: disable EFI

Change-Id: I26d6398478a8cbdcc56c93f501b70b9f9f2924e8
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agosoc: qcom: subsys-pil-tz: initialize DMA ops
David Keitel [Thu, 4 Feb 2016 18:03:38 +0000 (10:03 -0800)]
soc: qcom: subsys-pil-tz: initialize DMA ops

Initialize the DMA operations for the MDT data
DMA allocation.

Change-Id: If8eae5e91b4145be8d9e5eeeb28c14cda88e617f
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agosoc: qcom: add snapshot of PIL, SSR and SYSMON drivers/libraries
David Keitel [Wed, 3 Feb 2016 02:24:24 +0000 (18:24 -0800)]
soc: qcom: add snapshot of PIL, SSR and SYSMON drivers/libraries

This is a snapshot of PIL, SSR and SYSMON drivers and libraries as
of msm-3.18 commit
5cef33a285e91869cebe40a25e6294ae1e5fc9cc
(Merge "ASoC: msm: Update the AFE clock API support")

Change-Id: Ibebddee32b15fbcb5b18cceac43769d3309e609c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agofirmware_class: Don't fail request_firmware if we're not using a buffer
Vikram Mulukutla [Thu, 14 May 2015 20:58:06 +0000 (13:58 -0700)]
firmware_class: Don't fail request_firmware if we're not using a buffer

A check that the intermediate firmware actually contains data
is performed before returning from request_firmware. Perform
this check only if we're actually using the intermediate
buffer.

Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Add an additional path to fw_path list
Deepak Katragadda [Thu, 8 Jan 2015 19:46:32 +0000 (11:46 -0800)]
firmware_class: Add an additional path to fw_path list

Add an additional path, /firmware/image to the list of fw paths
that request_firmware looks into for the firmware images.

Change-Id: I4b9164f222bf0a8546072de97838bf9d49dd8252
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agofirmware_class: Change print levels for some warnings
Deepak Katragadda [Thu, 11 Dec 2014 21:25:54 +0000 (13:25 -0800)]
firmware_class: Change print levels for some warnings

Currently, when _request_firmware() fails to find the firmware
from the default /lib location, a couple of error messages are
printed denoting the same. Change the print level for these
messages from dev_warn to dev_dbg as it is fairly common to
have the user-space helper loading the firmware for us.

Change-Id: I5e06b3785f58e85eda45d32130b9acbc75cd2c0a
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
[vmulukut: adjusted for upstream changes]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Correct a null check in firmware_direct_read
Vikram Mulukutla [Fri, 8 Aug 2014 00:36:23 +0000 (17:36 -0700)]
firmware_class: Correct a null check in firmware_direct_read

Don't use the fw pointer before performing the null
check on it.

Change-Id: I303f71681647e2acb0b7e340b8f8580436cfb19d
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Include a size argument in unmap_fw_mem
Vikram Mulukutla [Tue, 31 Mar 2015 01:24:47 +0000 (18:24 -0700)]
firmware_class: Include a size argument in unmap_fw_mem

Some implementations may need to know the size of a
region allocated by map_fw_mem in the context of the
unmap_fw_mem callback. Add this as an argument to the
callback signature.

Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Allow private data in [unmap|map]_fw_mem
Vikram Mulukutla [Fri, 11 Apr 2014 03:23:30 +0000 (20:23 -0700)]
firmware_class: Allow private data in [unmap|map]_fw_mem

Some callers of request_firmware_direct may need additional
context to be able to map firmware memory. Allow private data
to be passed in with request_firmware_direct, and send this
data along with the [unmap|map]_fw_mem callbacks.

Change-Id: I05a15eb46cc663a4476b784e30e80182a28e10c3
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[joshc: dropped PIL portions, fixed trivial conflict in firmware.h due
to API rename]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[vmulukut: adjusted for upstream merge conflicts]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Introduce the request_firmware_direct API
Vikram Mulukutla [Mon, 5 Aug 2013 18:39:20 +0000 (11:39 -0700)]
firmware_class: Introduce the request_firmware_direct API

On devices with low memory, using request_firmware on rather
large firmware images results in a memory usage penalty that
might be unaffordable. Introduce a new API that allows the
firmware image to be directly loaded to a destination address
without using any intermediate buffer.

Change-Id: I51b55dd9044ea669e2126a3f908028850bf76325
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[joshc: renamed request_firmware_direct to request_firmware_into_buf,
avoiding namespace conflict]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[vmulukut: upstream merge conflict fixups]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[dkeitel: upstream merge conflict fixups]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agofirmware_class: Provide infrastructure to make fw caching optional
Vikram Mulukutla [Mon, 5 Aug 2013 18:17:29 +0000 (11:17 -0700)]
firmware_class: Provide infrastructure to make fw caching optional

Some low memory systems with complex peripherals cannot
afford to have the relatively large firmware images taking
up valuable memory during suspend and resume. Change the
internal implementation of firmware_class to disallow
caching based on a configurable option. In the near future,
variants of request_firmware will take advantage of this
configurability.

Change-Id: I44be7ce3b308b642fb018086def99fcb800a1109
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[joshc: reworked to use opt_flags instead of 'nocache' bool in fw_desc]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[vmulukut: adjusted for upstream additions to opt_flags]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agofirmware_class: Introduce a firmware descriptor structure
Vikram Mulukutla [Mon, 5 Aug 2013 17:38:35 +0000 (10:38 -0700)]
firmware_class: Introduce a firmware descriptor structure

Introduce a firmware descriptor structure that makes it
easier to pass around various configuration options in the
internal implementation of firmware_class.

Change-Id: I5c1da222bccd568fabb26da5baccaa4035331efd
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[joshc: reworked to make use of upstream's opt_flags member]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[vmulukut: adjusted for upstream changes to opt_flags]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[dkeitel: resolved merge conflicts]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agoof: platform: initialize of_reserved_mem
David Keitel [Thu, 4 Feb 2016 18:12:25 +0000 (10:12 -0800)]
of: platform: initialize of_reserved_mem

Initialize reserved memory as part of of_platform_device_create_pdata.

Change-Id: I6bb6ba8279af6771cb61087405cb915f4a0602b3
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agodma-mapping: fix merge conflict mistake
David Keitel [Thu, 4 Feb 2016 18:07:32 +0000 (10:07 -0800)]
dma-mapping: fix merge conflict mistake

As part of the 4.4 upgrade an incorrect merge
conflict resolution in dma-mapping caused the
function  __dma_alloc_coherent to not work correctly.

Fix this by changing correctly resolving the merge conflict
resolution.

Change-Id: I5b2411187768f2e3c4292a7c28cd742f5eb2dc54
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
8 years agodefconfig: enable MSM_PM for msm-perf defconfig
Mahesh Sivasubramanian [Mon, 1 Feb 2016 18:08:14 +0000 (11:08 -0700)]
defconfig: enable MSM_PM for msm-perf defconfig

Enable sleep driver for QCOM chipsets

Change-Id: I67244ff55690c164634e9233e2d0cec3388c5be8
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agodefconfig: Enable MPM for msm-perf defconfig
Mahesh Sivasubramanian [Mon, 25 Jan 2016 22:24:11 +0000 (15:24 -0700)]
defconfig: Enable MPM for msm-perf defconfig

Change-Id: I09313d7809ec939a9d0440d0ab30a5992f512b96

8 years agoirqchip: gic: Propagate CONFIG_PM changes to gic v3
Archana Sathyakumar [Fri, 13 Mar 2015 20:34:06 +0000 (14:34 -0600)]
irqchip: gic: Propagate CONFIG_PM changes to gic v3

Add suspend, idle power collapse callbacks to enable/disable interrupts.

Change-Id: I4b9b38b76d19423345f148054a2437d552299041
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Conflicts:
drivers/irqchip/irq-gic-v3.c

8 years agoirqchip: gic: Add arch extension to GIC v3
Archana Sathyakumar [Fri, 13 Mar 2015 20:32:17 +0000 (14:32 -0600)]
irqchip: gic: Add arch extension to GIC v3

Propagate platform arch extension to call into platform specific
callback functions for GIC operations.

Change-Id: Ief42e9812e0593572bbde0fbe5e641eb9b3f5412
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Conflicts:
drivers/irqchip/irq-gic-common.c
drivers/irqchip/irq-gic-common.h
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic.c

8 years agosoc: qcom: Use arch_counter_get_cntvct instead of arch_counter_get_cntpct
Mahesh Sivasubramanian [Fri, 5 Feb 2016 19:45:12 +0000 (12:45 -0700)]
soc: qcom: Use arch_counter_get_cntvct instead of arch_counter_get_cntpct

Kernel version 4.4 has deprecated the use of *pct versions for 64 bit
targets. Hence moving to vct as recommended.

Change-Id: Ibabf3eb28f58daccd58cde207262b34ed3b1c04f

Use vct instead of pct()

Change-Id: Ibabf3eb28f58daccd58cde207262b34ed3b1c04f
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agoarm64: psci: Support for OS initiated scheme
Mahesh Sivasubramanian [Thu, 23 Apr 2015 22:20:05 +0000 (16:20 -0600)]
arm64: psci: Support for OS initiated scheme

Existing PSCI implementation supports platform coordinated means of low
power modes where cluster low power modes are aggregated at the platform
level.  Adding support for OS initiated scheme, where is OS is responsible
for selecting cluster low power modes based on last man determination. With
OS initiated scheme, the OS can make better cluster decisions based on
wakeup times of CPUs within a cluster.

To this effect, in OS initiated schemes, the composite state ID is computed
by the idle driver before calling into the cpu_suspend API. The PSCI driver
is modified to use the composite ID to distinguish between retention and
non-retention states.

Change-Id: Iee5533676a28a8f6beb7942dcb908f2fa3518d78
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Conflicts:
arch/arm64/kernel/psci.c

8 years agoARM64: smp: Prevent cluster LPM modes when pending IPIs on cluster CPUs
Mahesh Sivasubramanian [Fri, 19 Sep 2014 02:33:55 +0000 (20:33 -0600)]
ARM64: smp: Prevent cluster LPM modes when pending IPIs on cluster CPUs

LPM modes can fail if there is a pending IPI interrupt at GIC CPU
interface. On some usecases frequent failure of LPM modes can
cause power and performance degradation. Hence, prevent cluster
low power modes when there is a pending IPI on cluster CPUs.

Change-Id: Id8a0ac24e4867ef824e0a6f11d989f1e1a2b0e93
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Conflicts:
arch/arm/kernel/smp.c
arch/arm64/kernel/smp.c

8 years agocpuidle: lpm-levels: Fix compilation issues
Mahesh Sivasubramanian [Tue, 2 Feb 2016 00:10:22 +0000 (17:10 -0700)]
cpuidle: lpm-levels: Fix compilation issues

Compile drivers/power/qcom based on CONFIG_ARCH_QCOM instead of
CONFIG_ARCH_MSM
Fix use of __get_cpu_var and convert to this__cpu_ptr

Change-Id: I7152d74f9d495f9ab7af0cfd2f3695c9461469fb

8 years agopower: soc: qcom: Remove non-PSCI related drivers
Mahesh Sivasubramanian [Tue, 9 Feb 2016 18:07:45 +0000 (11:07 -0700)]
power: soc: qcom: Remove non-PSCI related drivers

Only PSCI compatible targets are supported moving forward. Remove drivers
that are used in legacy power collapse support.

Change-Id: I022bef78433c9693d3cb8752091c2c0ed2e4e994
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agoregulator: Fix miscellaneous warnings in regulator driver
Mahesh Sivasubramanian [Tue, 2 Feb 2016 00:10:05 +0000 (17:10 -0700)]
regulator: Fix miscellaneous warnings in regulator driver

Fix compiler warnings in regulator code

Change-Id: I8670b5a9591727a8215c6bc56fcdb70e473dd9d8
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agolpm-levels: Do not disable non-sec interrupts in suspend
Murali Nalajala [Tue, 19 May 2015 17:26:11 +0000 (10:26 -0700)]
lpm-levels: Do not disable non-sec interrupts in suspend

When the system suspend is happening, last core disables
the non-sec interrupts at QGIC by setting the GRPEN1_EL1_NS
to ZERO. This makes core not seen any non-sec interrupts
and would result into system do not wake up from any of
interrupts. Do not touch GRPEN1_EL1_NS register while
system is going into suspend.

Change-Id: I7d6c5047fb4743df187fe49fba18b64db3179bc9
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Conflicts:
drivers/irqchip/irq-gic-common.h

8 years agocpuidle: lpm-levels: Fixes for clockevents_notify
Mahesh Sivasubramanian [Mon, 1 Feb 2016 18:14:55 +0000 (11:14 -0700)]
cpuidle: lpm-levels: Fixes for clockevents_notify

The use of clockevents_notify is deprcated and targeted APIs are used
instead of the clockevents_notify callbacks. Switch broadcast timer
notifications to tick_broadcast_enter and tick_broadcast_exit.

Change-Id: I3441873eb4009b105db04f4a18d28ae9ccd07e95

8 years agocpu_pm: Add level to the cluster pm notification
Murali Nalajala [Thu, 8 Jan 2015 03:36:57 +0000 (19:36 -0800)]
cpu_pm: Add level to the cluster pm notification

Cluster pm notifications without level information increases difficulty
and complexity for the registered drivers to figure out when the last
coherency level is going into power collapse.

Send notifications with level information that allows the registered
drivers to easily determine the cluster level that is going in/out of
power collapse.

There is an issue with this implementation. GIC driver saves and
restores the distributed registers as part of cluster notifications. On
newer platforms there are multiple cluster levels are defined (e.g l2,
cci etc). These cluster level notofications can happen independently.
On MSM platforms GIC is still active while the cluster sleeps in idle,
causing the GIC state to be overwritten with an incorrect previous state
of the interrupts. This leads to a system hang. Do not save and restore
on any L2 and higher cache coherency level sleep entry and exit.

Change-Id: I31918d6383f19e80fe3b064cfaf0b55e16b97eb6
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
8 years agoqcom: kconfig: Enable MSM_PM to enable QCOM sleep drivers
Mahesh Sivasubramanian [Mon, 1 Feb 2016 18:08:14 +0000 (11:08 -0700)]
qcom: kconfig: Enable MSM_PM to enable QCOM sleep drivers

Enable sleep driver for QCOM chipsets

Change-Id: I67244ff55690c164634e9233e2d0cec3388c5be8
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agosoc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18
Mahesh Sivasubramanian [Mon, 1 Feb 2016 17:40:26 +0000 (10:40 -0700)]
soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18

This is a snapshot of the Sleep driver and realted functionality as of
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch

Change-Id: I98fec26849898c5c66abbb1b094439780c23964d

8 years agosoc: qcom: mpm-of: Add gpio_arch_extn support
Mahesh Sivasubramanian [Thu, 28 Jan 2016 23:29:33 +0000 (16:29 -0700)]
soc: qcom: mpm-of: Add gpio_arch_extn support

To wake up from system sleep, the MPM driver needs to keep track of enabled
GPIO interrupts. Add gpio_arch_extn to support monitoring of GPIO interrupts

Change-Id: If97f566e11eaab452e4b55db1a05e5457f1a8d3f
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agoReverting "irqchip: gic: Drop support for gic_arch_extn"
Marc Zyngier [Wed, 22 Apr 2015 17:20:04 +0000 (18:20 +0100)]
Reverting "irqchip: gic: Drop support for gic_arch_extn"

MSM chipsets rely on arch_extn to get the necessary functionality. Add them
until a upstream solution  can be arrived at.

Change-Id: I773a3e82ca81b1c49cf2581f5288cacaeb6c6db0
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agoirqchip: msm: Add snaphot of msm irq driver
Abhimanyu Kapur [Mon, 30 Mar 2015 18:55:03 +0000 (11:55 -0700)]
irqchip: msm: Add snaphot of msm irq driver

Snapshot the msm irq driver as of msm-3.14 commit:

3bc54cf86bdc7affa7cd4bf7faa3c57fe8f8819d (Merge "msm:
camera: Add dummy sub module in sensor pipeline")

Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Conflicts:
drivers/irqchip/Kconfig
drivers/irqchip/Makefile

Change-Id: Idf5284906af960fe03dcf881df1b57149c8e6ad8

8 years agodefconfg: Enable MPM for msm defconfig
Mahesh Sivasubramanian [Mon, 25 Jan 2016 22:24:11 +0000 (15:24 -0700)]
defconfg: Enable MPM for msm defconfig

Change-Id: I09313d7809ec939a9d0440d0ab30a5992f512b96

8 years agosoc: qcom: Add snapshot of MPM driver
Mahesh Sivasubramanian [Mon, 25 Jan 2016 22:15:10 +0000 (15:15 -0700)]
soc: qcom: Add snapshot of MPM driver

This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Change-Id: I93b163cdd379e3cb9601512d2a06424987b5a132
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable USB DWC3 and PHY drivers
Jack Pham [Tue, 2 Feb 2016 21:40:19 +0000 (13:40 -0800)]
defconfig: arm64: msm: Enable USB DWC3 and PHY drivers

Enable DWC3, QUSB and QMP PHY drivers to support the USB
controller hardware. Also enable XHCI_HCD for USB host mode.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: dwc3: host: Call arch_setup_dma_ops() before setting DMA mask
Jack Pham [Fri, 5 Feb 2016 06:24:55 +0000 (22:24 -0800)]
usb: dwc3: host: Call arch_setup_dma_ops() before setting DMA mask

For host mode operation, the DWC3 driver instantiates an XHCI
device directly using platform_device_alloc()/_add() instead of
using typical device population methods (i.e. DT or ACPI).
In the latter cases, there is additional setup involved beyond
the allocation itself, not the least of which is DMA setup.

On ARM64 the recent commit 1dccb598df54 ("arm64: simplify
dma_get_ops") sets the default DMA operations to dummy ops. This
causes a regression as this directly created XHCI platform device
now fails probe when the call to dma_set_mask_and_coherent() is
unable to proceed due to dma_supported() returning false.

Since we know that the XHCI device is a child of DWC3 and hence
is also DMA-capable, fix this in the DWC3 host driver by simply
calling arch_setup_dma_ops() after allocating the platform_device.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agodwc3: gadget: Ignore suspend event if USB speed is unknown
Mayank Rana [Thu, 28 Aug 2014 23:47:51 +0000 (16:47 -0700)]
dwc3: gadget: Ignore suspend event if USB speed is unknown

In some of host machine reboot usecases, it has been found that
multiple suspend events are being received before usb device is
being enumerated with host including receiving suspend before
BUS RESET. This suspend event is being seen due to not host
initiated suspend but due to LINE state at that point and may
put USB Host and Device out of sync where host may not send any
more BUS RESET which would cause USB device enumeration as unknown
device with host machine. Fix this issue by honouring suspend
event only when USB enumeration speed is known.

CRs-Fixed: 717151
Change-Id: I201f106d1be71716eaa7a6246d2187889ea53a9c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
8 years agousb: dwc3: Add changes to support dual-role switching
Jack Pham [Tue, 2 Feb 2016 20:57:37 +0000 (12:57 -0800)]
usb: dwc3: Add changes to support dual-role switching

This patch is a squash of several commits from msm-3.18 that
add support for dual-role switching (formerly known as "OTG")
to the DWC3 and XHCI platform drivers.

Based on the following commits:

usb: dwc3: Introduce OTG driver for dwc3
usb: dwc3-msm: Add support for LPM on cable disconnect
DWC3: Enable XHCI host in OTG mode
USB: dwc3: Add support for host bus suspend
usb: dwc3 / xhci_plat: Call xhci_suspend/resume when entering/exiting LPM
USB: dwc3: gadget: Implement gadget_vbus_draw() API
USB: gadget: dwc3: Fix composition switch issue during cable disconnect
usb: dwc3: notify gadget disconnect upon VBUS low
usb: dwc3: msm: Remove last of dwc3_otg
dwc3: Reset USB controller/PHY after psy connect indication at bootup
dwc3: Use otg_sm_work state machine for host and device only mode

Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agousb: dwc3: Add support for POR upon composition switch
Hemant Kumar [Thu, 27 Aug 2015 00:18:36 +0000 (17:18 -0700)]
usb: dwc3: Add support for POR upon composition switch

Composition switch to GSI transport based composition from
another GSI transport based composition requires power on
reset of USB controller to synchronize operation with USB
wrapper for GSI. Specifically GSI_EN bit cannot be
cleared without performing usb controller reset. Hence
introduce gadget restart operation to simulate vbus off
and vbus on and perform  this operation from gsi bind
config.

Change-Id: Ie4695807c73c2d14c0d9e17c486f34a90fd93ddb
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
8 years agousb: dwc3: gadget: Increase the link state change timeout value
Hemant Kumar [Sat, 7 Mar 2015 01:30:03 +0000 (17:30 -0800)]
usb: dwc3: gadget: Increase the link state change timeout value

After the device  remote wake up some USB hosts are driving bus
resume for longer than 3 seconds. As a result link state change does
not happen within 3 seconds and remote wake up fails. In worst case
it is observed that usb host is driving bus resume for 8 seconds.
Hence increase the timeout value to 16 seconds.

CRs-Fixed: 803183
Change-Id: I1cbb29ccd2b4e264c032d7237efcfd87cef71942
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
8 years agousb: dwc3: gadget: Avoid unclocked access due to pm_runtime_get failure
Tarun Gupta [Wed, 10 Jun 2015 13:58:49 +0000 (19:28 +0530)]
usb: dwc3: gadget: Avoid unclocked access due to pm_runtime_get failure

If remote wakeup request is received during system resume where
resume_early is still processing, pm_runtime_get_sync returns -EACCES error
as pm_runtime framework is disabled between late_suspend and early_resume.
Due to failure of this API controller did not exit LPM. This leads to
unclocked access of registers as part of remote wakeup processing causing
target to crash.

Fix this by checking for return value of pm_runtime_get_sync, and queuing
dwc3_gadget_wakeup_work again with intermediate delay of 100ms for maximum
of 20 times.

Change-Id: I8e2215ef9ee708e86356622e85fd2f23a18f7944
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
8 years agousb: dwc3: gadget: Fix PM runtime get/put in case of remote wakeup
Azhar Shaikh [Mon, 27 Apr 2015 22:09:23 +0000 (15:09 -0700)]
usb: dwc3: gadget: Fix PM runtime get/put in case of remote wakeup

In case of remote wakeup interrupt, dwc3_gadget_wakeup_work()
does a pm_runtime_get_sync() and dwc3_gadget_wakeup_interrupt()
does not notify OTG state machine about this state change.
Due to which OTG will be still in B_SUSPEND state.
Now when bus suspend happens, since OTG state machine is already in
B_SUSPEND state, it does not do a pm_runtime_put_autosuspend() and the
count is not decremented.
To fix, this do an unconditional pm_runtime_get_sync() and
pm_runtime_put_noidle() in dwc3_gadget_wakeup_work() to avoid any
unclocked register access. In dwc3_gadget_wakeup_interrupt() kick in
SM machine in all cases and handle the remote wakeup same as host
initiated resume, by clearing the B_SUSPEND bit so that OTG state machine
moves to B_PERIPHERAL state.

CRs-fixed: 829205
Change-Id: I270df517d5dd58fe28bf0087e0ba951c4e9e15ba
Signed-off-by: Azhar Shaikh <azhars@codeaurora.org>
8 years agodwc3: gadget: Replace polling mechnism to go into U0 state
Mayank Rana [Tue, 25 Nov 2014 23:29:58 +0000 (15:29 -0800)]
dwc3: gadget: Replace polling mechnism to go into U0 state

Moving into U0 state is being confirmed by polling for 100ms after
performing remote wakeup from device. In some of cases where host is
taking more time to respond, remote wakeup is failing. Also USB
specification does not define any limit for the host response time.
Hence this change replaces polling mechnism by using LINK status
change event notification with core and increase host response time
from 100ms to 3 seconds. It also makes sure that composite_resume()
is being called after remote wakeup is completed succesfully.

It removes some of flag used to avoid race between bus suspend/resume
and fuction suspend/resume as those are serialize and not required
anymore.

CRs-Fixed: 712681
Change-Id: I71285daf117282c738e139e9a05ead6ef16dd202
Signed-off-by: Mayank Rana <mrana@codeaurora.org>