Commit graph

564129 commits

Author SHA1 Message Date
Tony Truong
3787c82d21 msm: pcie: add PCIe MSI support on 3.14 kernel
To support PCIe MSI on 3.14 kernel, the client's host
driver must use the QGIC IRQ number to request/enable
the interrupt while the client's firmware must use
the SPI number to trigger the interrupt. Therefore,
add this logic in PCIe bus driver to support MSI
interrupts on 3.14 kernel.

Change-Id: I165022281c9e795be8c5e2e4a4faa34d4c004a45
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:11 -07:00
Tony Truong
72532613ca msm: pcie: correct PCIe PHY dump status register read
After writing to a PCIe PHY debug register, the wrong
PCIe PHY status register is being read back. This change
corrects the PCIe PHY status register that is read back.

Change-Id: If360aa6f9b4530e4c07acfcc1af684c6d7ecc234
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:11 -07:00
Tony Truong
fd85b29d71 msm: pcie: add PCIe support for thulium
Add PCIe support for thulium. Added enumeration,
interrupts, and hardware configurations support for
PCIe.

Change-Id: I48b2fc8a51303a6aea7b1b2a97c4de25f19ded4c
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:10 -07:00
Tony Truong
5e37fdc3f1 msm: pcie: sanity check when calculating EP CAP offset
When searching for the endpoint's capabilities register,
check that the value from the register read is valid.

Change-Id: Ia64de3c75618ca0a51aa4588ac97f2fcb26d8829
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:09 -07:00
Tony Truong
3dabd56768 msm: pcie: correct the shadow save for RC L1 register
When reading shadow registers, the wrong value is being
recovered for root complex L1 register. Currently,
the value being recovered is a shadow of the endpoint's
L1 register. This change will recover the correct shadow
value for RC L1 register.

Change-Id: I82b1810ef8761de90b350743cdd9b24a74efb62f
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:08 -07:00
Tony Truong
bdb83a975e msm: pcie: remove duplicate call to get aux clk from dt
There is an extra identical call made to check if aux clk
is supported base from PCIe device tree node. There is no
need to do this check twice; therefore, remove the duplicate
call.

Change-Id: If705e98e637287969d68ea2241e62447aa505eb0
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:07 -07:00
Tony Truong
a30643faee msm: pcie: only look for EP CAP reg for certain testcases
Not all the testcases for debugfs needs the calculated offset
of an endpoint's capability register. Therefore, only calculate
the offset of an endpoint's capanility register if that testcase
needs it.

Change-Id: Iffddcea682d8c9344f51a04b57f60ba906b01dc6
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:06 -07:00
Tony Truong
c6c800ef6b msm: pcie: add support to enable common clock for RC
When the clients want to enable common clock for the
endpoint, also enable it for the root complex.

Change-Id: I55d5a69be0746a745b073051452d45a38d0a4e65
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:05 -07:00
Tony Truong
7746e958de msm: pcie: add PCIe PHY support for FSM9010
FSM9010 requires a different PHY sequence. Therefore,
this change adds the PCIe PHY support for FSM9010.

Change-Id: Ic98860d3ac1f7b644b76064032f399f070fc9b47
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:04 -07:00
Tony Truong
1d3fd3942e msm: pcie: add support to enable clk power management for EP
Add support to enable the clock power management for the
endpoint.

Change-Id: I02bebfeb5d32eb8e1f75ee5feb4c4fff956ece66
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:04 -07:00
Tony Truong
b0ac5910b0 msm: pcie: add support to enable common clk config for EP
Add support to enable the common clock configuration for the
endpoint.

Change-Id: I9f6c33eb6cfa032837a07e437f349a7c1a60704c
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:03 -07:00
Tony Truong
b80470b0c1 msm: pcie: calculate EP's capability register offsets
The start address of the capability register varies
depending on the endpoint. This change calculates the
endpoint's capability register offset instead of using
a fixed one.

Change-Id: I28a97d316aee8c34afe313838b91fcc06af0847f
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:02 -07:00
Tony Truong
b77df9a263 msm: pcie: add PM support for multiple endpoints on a bridge
In the case of multiple endpoints connected to a bridge,
PM logic is not present. Therefore, this change adds
PM support for when there are multiple endpoints on a bridge.

Change-Id: I5a1876db85d0d161ae537a09a508a93b5099aa56
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:01 -07:00
Tony Truong
5fec693e9b msm: pcie: add PCIe bus driver snapshot
This PCIe bus driver snapshot is taken as of msm-3.10 commit:
 803998b (Merge "ASoC: wcd: don't set autozeroing for conga")

This change adds the PCIe bus driver and its dependecies from
msm-3.10 to msm-3.14. All the files are as is from msm-3.10.
No additional changes were made.

Change-Id: Ia1a2d0eea0cc87c16357c95bfcc4df72e910cd34
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:00 -07:00
Mao Jinlong
99b719c3d8 Enable CONFIG_RTC_DRV_QPNP
Enable CONFIG_RTC_DRV_QPNP as power_on_alarm_init is added by
change : I781389c658fb00ba7f0ce089d706c10f202a7dc6

Change-Id: I48bc69e2215e45e0c5c7bc8aa2c489fca995c201
Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
2016-03-22 11:08:59 -07:00
Mao Jinlong
f0aafc9926 rtc: alarm: Add power-on alarm feature
Android does not support powering-up the phone through alarm.
Set rtc alarm in timerfd to power-up the phone after alarm
expiration.

Change-Id: I781389c658fb00ba7f0ce089d706c10f202a7dc6
Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
2016-03-22 11:08:58 -07:00
Mao Jinlong
439e21802e alarmtimer: add rtc irq support for alarm
Add the rtc irq support for alarmtimer to wakeup the
alarm during system suspend.

Change-Id: I41b774ed4e788359321e1c6a564551cc9cd40c8e
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
2016-03-22 11:08:57 -07:00
Satya Durga Srinivasu Prabhala
b11b09aa65 defconfig: arm64: msm: Enable sensors SSC driver
Enable sensors SSC driver.

Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:08:57 -07:00
Satya Durga Srinivasu Prabhala
7e023a98ca Snapshot: SSC Sensor driver
This snapshot is taken as of msm-3.18 commit 95a59da3cf
(msm: hdcp: proper state sanitization for different versions)

Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:08:56 -07:00
Cassidy Burden
b17da672a8 irqchip: gic-v3: Add panic handler to save registers
Save gic-v3 distributor registers on panic. Allows for inspection of
gic-v3 state at the time of a panic.

Change-Id: I3236577161abab4e292a01254e1e1ecb50bb38de
Signed-off-by: Cassidy Burden <cburden@codeaurora.org>
2016-03-22 11:08:55 -07:00
Abhimanyu Kapur
f070ea53db ARM: gic-v3: Log the IRQs in RTB before handling an IRQ
Gic-v3 did not log IRQs in RTB like gic-v2. Thus add the LOGK_IRQ log
before calling the IRQ handler like gic-v2.

Change-Id: I46a5951e733a05b9a7d5d6323568fa800dfb5d62
Signed-off-by: Cassidy Burden <cburden@codeaurora.org>
[abhimany: resolve minor merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:54 -07:00
Abhimanyu Kapur
0574be1ea8 irqchip: GICv3: Check if GIC register access is controlled
Add support to configure ITS registers only if higher
exception levels have not already configured them.

Change-Id: I45eaa51e56e034d011cf41d8b924fb674f63447d
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
[abhimany: resolved minor merge conflict]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:53 -07:00
Abhimanyu Kapur
c36ce4acc9 drivers: GICv3: Add mb() after the read of the IAR1_EL1 and other registers
As per the GICv3 architecture spec section "Observability
of GIC Register Accsses", architecture execution of the "DSB"
gurantees that last interrupt identifier read from ICC_IAR{0,1}_EL1
is observable by the top-level Distributor and by accesses from
any processor to the top-level Distributor.

Same comment goes for the ICC_PMR_EL1 and ICC_SGI1R_EL1 too.

CRs-Fixed: 960754
Change-Id: I9c7bcdee51f71d369e2a6f04faf7a22c3c1381bc
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
[abhimany: relocate mb()'s to header files]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:52 -07:00
Trilok Soni
7ae4a36f57 irqchip: gicv3: Add GICv3 access control Kconfig option
Some SOCs(System-on-chip) S/W configurations restricts the access
to particular set of the GIC registers to prevent invalid
accesses for the security reasons. Provide a configuration
option for the GICv3 driver and also restrict the access
of the GICR_WAKER registers from the non-secure world.

If this Kconfig option is not selected then it means that
access control configuration is enabled from the secure world.

CRs-Fixed: 958251
Change-Id: I91f06484b6b6bf58d05e6b621ee84610a71fe3e7
[abhimany: minor merge conflict resolution]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:51 -07:00
Se Wang (Patrick) Oh
a1c9d666be arm: traps: emulate a MRCC instruction reading CNTPCT register
A user space application is planned to support feature for
synchronized timestamp among debug packets across peripherals.
As part of the feature, it is responsible for providing physical
timer count value to user space. If memory mapped timer is used
in ARM arch, Usersapce can't read the physical timer count directly
with a MRCC ASM instruction. So Kernel traps the instruction and
returns the physical timer count.

Change-Id: Ia3f0d9c8c06ca9e2204187890c0c57c8640e4f7e
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
[abhimany: minor merge conflict resolution]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:51 -07:00
Se Wang (Patrick) Oh
56e8f397e6 clocksource: arch_timer: Enable user access to the physical counter
A user space application is planned to support feature for
synchronized timestamp among debug packets across peripherals.
As part of the feature, it is responsible for providing physical
timer count value to user space. So Enable user access to the
physical counter in cp15 register.

Change-Id: Idf7f6375713d842925e6f72a4b1fb98a7168726d
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
2016-03-22 11:08:50 -07:00
Abhimanyu Kapur
e98a81ee60 defconfig: arm64: enable boot stats reporting on msmcortex
Enable boot stats reporting on the debug and perf msmcortex
configs.

Change-Id: I3baa866f93a484acdde5789dbd3ac02a03bc561a
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:49 -07:00
Karthikeyan Ramasubramanian
12ca113b10 Documentation: arm: msm: Add document for SMEM Driver
The Shared Memory Manager driver implements an interface for allocating
and accessing items in the memory area shared among all of the
processors in a Qualcomm platform.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:48 -07:00
Karthikeyan Ramasubramanian
a8d687d1ee soc: qcom: Add snapshot of System Health Monitor
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>
2016-03-22 11:08:47 -07:00
Karthikeyan Ramasubramanian
856dcc3bd8 defconfig: arm64: msm: Enable smd_tty
Enable userspace access to SMD channels via a streaming interface.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:46 -07:00
Karthikeyan Ramasubramanian
21753c44f4 drivers: tty: serial: Add snapshot of SMD_TTY 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>
2016-03-22 11:08:46 -07:00
Karthikeyan Ramasubramanian
9053dfa552 defconfig: arm64: msm: Enable glink_pkt
The glink_pkt driver provides packet access to G-Link channels for
userspace clients.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:45 -07:00
Karthikeyan Ramasubramanian
f6f22bd54e soc: qcom: Add snapshot of GLINK_PKT 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>
2016-03-22 11:08:44 -07:00
Abhimanyu Kapur
85b08d32e4 msm: boot_stats: Add snapshot of boot_stats driver
Add a snapshot of the msm boot_stats driver as of commit
acdce027751d5a7488b283f0ce3111f873a5816d (Merge "defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")

Change-Id: Iee7ec288fe44606b468dc533bb4221f8d018b3cb
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
[abhimany: resolve trivial merge conflicts and add header file]
Signed-off-by: Abhimanyu Kapur  <abhimany@codeaurora.org>
2016-03-22 11:08:43 -07:00
Matt Wagantall
6b75e9afc1 soc: qcom: rq_stats: add snapshot of run queue stats driver
Add a snapshot of the run queue stats driver as of msm-3.10 commit
4bf320bd ("Merge "ASoC: msm8952: set async flag for 8952 dailink"")

Resolve checkpatch warnings in the process, notably the replacement
of sscanf with kstrtouint.

Change-Id: I7e2f98223677e6477df114ffe770c0740ed37de9
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:42 -07:00
Abhimanyu Kapur
5de8258ed3 defconfig: msmcortex: enable core hang detection
Enable core  hang detection debug feature on
msmcortex defconfig.

Change-Id: I4cbf8811f190d88e6a0efddc23ee19f80b5a74df
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:41 -07:00
Prasad Sodagudi
6fb5665397 soc: qcom: core_hang: Add core hang driver
Add driver for core hang detection.
This drivers provides sysfs entries to configure
threshold, pmu event select and enable parameters
for core hang detection feature.

Change-Id: Ieb19b309238fc11f1a631842564a7e43b16651dc
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-22 11:08:41 -07:00
Abhimanyu Kapur
e160d231b9 defconfig: msmcortex: enable gladiator hang detection
Enable gladiator hang detection debug feature on the
msmcortex defconfig.

Change-Id: Ie33697d94cf9bd964b6a832ce7aeebf960e00e2a
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:08:39 -07:00
Runmin Wang
7e19ad7eb6 soc: qcom: gladiator_hang: Add gladiator hang driver
Add driver for gladiator hang detection.
This driver provides sysfs entries to configure thresholds,
enable parameters for ACE, IO, M1, M2, PCIO gladiator ports.

Change-Id: Ib4bfa084a4265d6b6a149e8c932a5e6f884a043e
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-03-22 11:08:38 -07:00
Aparna Mallavarapu
04b8d88395 soc: qcom: Correct the logic to determine if device is secure boot or not.
Correct the logic to determine if device is secure boot or not
and accordingly disable the gladiator ERP driver for secure boot devices.

Change-Id: I7fc38983f293eb48abbeb3e4996bc3e03046b962
Signed-off-by: Aparna Mallavarapu <aparnam@codeaurora.org>
2016-03-22 11:08:37 -07:00
Abhimanyu Kapur
33f308b999 soc: qcom: Add support for gladiator error reporting
Add support for gladiator cache interconnect error
detection and reporting. The Gladiator is the cache
coherent interconnect in between two or more CPU
clusters. This driver helps detect the errors related to
snoop data transfer and Distributed Virtual Memory(DVM)
on READ/WRITE transactions.

Change-Id: Ic1aa2066df239672a8ed3d99a63318ed32a11af2
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2016-03-22 11:08:36 -07:00
Yan He
29ed1335c5 defconfig: msm: enable SPS/BAM driver
Enable SPS/BAM driver on 4.4 kernel.

Change-Id: Ib7a7bce4564f0a817fd93612fcc0d8824bd1c9cf
Signed-off-by: Yan He <yanhe@codeaurora.org>
2016-03-22 11:08:36 -07:00
Yan He
f46f720b22 platform: msm: Add snapshot of the SPS/BAM driver
Add the MSM SPS (Smart Peripheral Switch) driver.

SPS may be used as a DMA engine to move data in either Peripheral-to-
Peripheral (a.k.a. BAM-to-BAM) mode or Peripheral-to-Memory (a.k.a
BAM-System) mode.

This snapshot is taken as of msm-3.18 commit 132e1315c1

Change-Id: I7ec9781c3b608b9ee0fffdf7ba3e1b33bfa4dfcd
Signed-off-by: Yan He <yanhe@codeaurora.org>
2016-03-22 11:08:35 -07:00
Mahesh Sivasubramanian
b68798fafa soc: qcom: Snapshot of thermal/LMH drivers
This snapshot is taken as of msm-3.18 commit e70ad0c (Promotion of
kernel.lnx.3.18-151201.)

Include necessary thermal_core changes to convert long to int inline with
upstream kernel changes.

Change-Id: I642b666518fe72385794b743989a0f5e5120ec03

Conflicts:
	drivers/thermal/Makefile
2016-03-22 11:08:34 -07:00
Subbaraman Narayanamurthy
3da2a8c7d1 kobject: increase number of kobject uevent pointers to 64
Power supply framework uses uevents to notify the power supply
change events to the userspace. Some power supplies have their
properties increasing thus overflowing the number of kobject
uevent pointers, triggering warning shown below.

[   10.577545] WARNING: CPU: 3 PID: 406 at kernel/lib/kobject_uevent.c:393 add_uevent_var+0xc0/0x100()
[   10.589680] add_uevent_var: too many keys
[   10.593809] Modules linked in:
[   10.596686] CPU: 3 PID: 406 Comm: kworker/3:2 Tainted: G        W      3.18.20-g5e99605-00057-gd18285f #603
[   10.606373] Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 MTP (DT)
[   10.614188] Workqueue: events power_supply_changed_work
[   10.619366] Call trace:
[   10.621803] [<ffffffc00008881c>] dump_backtrace+0x0/0x130
[   10.627175] [<ffffffc00008895c>] show_stack+0x10/0x1c
[   10.632237] [<ffffffc000cc4d00>] dump_stack+0x74/0xb8
[   10.637253] [<ffffffc0000a0fec>] warn_slowpath_common+0x90/0xb8
[   10.643170] [<ffffffc0000a1060>] warn_slowpath_fmt+0x4c/0x58
[   10.648814] [<ffffffc00031121c>] add_uevent_var+0xbc/0x100
[   10.654259] [<ffffffc0003116f8>] kobject_uevent_env+0x498/0x5a8
[   10.660185] [<ffffffc000311814>] kobject_uevent+0xc/0x18
[   10.665457] [<ffffffc0007fd3c0>] power_supply_changed_work+0xb0/0xf0
[   10.671830] [<ffffffc0000b617c>] process_one_work+0x23c/0x3f4
[   10.677529] [<ffffffc0000b7338>] worker_thread+0x280/0x3a8
[   10.683017] [<ffffffc0000bb384>] kthread+0xe0/0xec

Fix this warning by increasing the number of kobject uevent
pointers from 32 to 64.

CRs-Fixed: 971954
Change-Id: Ide942d25006abd36ba7be945be397a535e91d970
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-22 11:08:33 -07:00
Jack Pham
f06b6d52a9 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>
2016-03-22 11:08:32 -07:00
Jack Pham
72e0641e1b 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>
2016-03-22 11:08:31 -07:00
Jack Pham
3b393d9d9a 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>
2016-03-22 11:08:30 -07:00
Jack Pham
bd6470c7bb 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>
2016-03-22 11:08:30 -07:00
Jack Pham
01e29a0238 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>
2016-03-22 11:08:29 -07:00