Commit graph

563936 commits

Author SHA1 Message Date
Tony Truong
c27c02ee65 msm: pcie: add SMMU support to calculate SID for PCIe EP
SMMU requires PCIe to provide a SID for each of its endpoint
so that the endpoint can successful transaction on the bus.
This change adds the support for PCIe bus driver to calculate
a SID for its endpoint and give it to the SMMU driver.

Change-Id: I52099bbfed0a38c75b0277b0f58f45f6e6559695
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:18 -07:00
Tony Truong
58763943bc msm: pcie: correct exit code for invalid Root Complex indexes
In the case where the Root Complex fails to retrive a valid
index, the exit code fails to handle this correctly. This
change corrects the way the exit code handles invalid root
complex indexes.

Change-Id: Ie832fec1be2b05dea05b8917348a1c08cdc1d681
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:17 -07:00
Tony Truong
66be162558 msm: pcie: add support to enable additional GPIO for endpoint
Some EP requires additional GPIO to be enabled for link training.
Add the support in PCIe Bus Driver to manage this GPIO.

Change-Id: I837edae478779fdaf3e94c70a0a031f9d0580a77
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:16 -07:00
Tony Truong
e20be88c34 Documentation: devicetree: add iommus entry for PCIe
PCIe on some targets require the iommus device tree entry.
Therefore, add this device tree entry to the PCIe
documentation.

Change-Id: Iec6c4cfcd5e51d6aa1259bb826fe60d131072170
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:15 -07:00
Tony Truong
25314fd288 msm: pcie: update PCIe PHY sequence on MSM8996
There are new PCIe PHY settings that have been updated
to improve performance and stablilty. Therefore, update
the PCIe PHY sequence on MSM8996.

Change-Id: If321471c51ff6a91595b68bd2cae08c8c043d6bb
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:14 -07:00
Tony Truong
9211102764 msm: pcie: add entry and exit detail logging for PCIe
To support more accurate benchmarks, add entry and exit logs
for PCIe functions.

Change-Id: I49f27263722adfaa8ae3973f242faa6a589d3358
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:13 -07:00
Tony Truong
55820fda33 msm: pcie: correct the offset of a PCIe AXI register
Correct the offset of a PCIe AXI register.

Change-Id: I429c3e42cc8bb6cc7e23b5e461e51ec10435a89d
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-22 11:09:12 -07:00
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