Commit Graph

135 Commits

Author SHA1 Message Date
Khaja Hussain Shaik Khaji
dc03cfa27f drivers: qcom: pil: Use update_marker for modem book kpi
Use update_marker instead of place_marker to avoid OOM
issue if boot kpi file keeps growing.
Add update_marker() declaration in boot_stats header file.

Change-Id: I9b842c10670b2adb918e246174fdac45fb53de40
Signed-off-by: Khaja Hussain Shaik Khaji <quic_kshaikkh@quicinc.com>
2023-08-07 14:47:36 +05:30
Sandeep Singh
90bd82d3f8 icnss2: Add code to pass device configs to wlan driver
Add code to pass device configs to wlan driver.

Change-Id: I977fc564914f9fbdabc0004eff4c5c2f14a1fc7c
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-03-09 20:16:22 +05:30
Rishi Gupta
15614d336d drivers: qcom: sdx_ext_ipc: notify remote processor wokeup
When the remote processor wants to wake up local processor
it toggles one of the GPIO. The IRQ handler at local
end will notify registered listeners about it.

Change-Id: Iccbfb7c86538c1e111c97bbe438ef5846182405e
Signed-off-by: Rishi Gupta <rishgupt@codeaurora.org>
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-08-30 08:48:39 +05:30
Maria Yu
64fdb4fa1d soc: wdog: Ensure missing user watchdog pet can trigger bite
The user watchdog was waiting the hardware watchdog bite by
stop petting it. But in the cpu suspend scenarios, the auto petting
by hardware prevent the expected watchdog bite. So add a new user pet
timer to explicitly trigger the watchdog bite by software when the user
watchdog petting is not happenned before timeout.

Change-Id: I71b1139192baa960ae00f7a27c630aedaf5a3ffa
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2021-07-01 05:55:35 -07:00
Pavankumar Kondeti
cea7789bf1 irqchip: mpm: Add mpm mapping for Blair
Currently both Blair and Holi use the same MPM pins mapping
configuration as they use the same compatible string. USB PHY
has a different GIC IRQ on Blair, so different MPM configuration
is required.

Change-Id: I1d72a70c0139abeac2d2ee32d103b7119a192ec9
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-06-16 00:24:21 +05:30
Manaf Meethalavalappu Pallikunhi
e27a837f09 soc: qcom: Add snapshot for Cx iPeak limit driver
Add snapshot of common driver to limit Cx ipeak based on
voting from various clients in multimedia.

Change-Id: I800cc3a08783f9f33761e1a68a2c3072c7294bc0
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2021-06-08 19:31:15 +05:30
qctecmdr
9a5b5c1a33 Merge "irqchip: mpm: Add mpm mapping for SA2150P" 2021-05-26 23:35:33 -07:00
Akshaya Bhat
afc0718a7a irqchip: mpm: Add mpm mapping for SA2150P
Add mpm mapping for gic wakeup capable interrupts for
SA2150P.

Change-Id: I958721057ef868506c3bf5eeb2cd31d2a6aa07cd
Signed-off-by: Akshaya Bhat <akshayab@codeaurora.org>
2021-05-26 14:55:28 +05:30
Naman Padhiar
fcce8906f5 icnss2: Add ICNSS_SMMU_FAULT uevent
Add ICNSS_SMMU_FAULT enum to be used from Host driver.

Change-Id: Ia10a103a0e24aceffe1d691ed9545f7aa59024c5
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-05-25 21:33:10 +05:30
Will Huang
e67e76d6d1 cnss: Add cnss_get_restart_level() support
WLAN host driver requires this API to get SSR state, avoid doing
ramdump when SSR happen and quick restart WLAN subsys.

Add back subsys_get_restart_level() support and fix return -EIVAL
in cnss_put_hw_resources().

Change-Id: I902d81b5693ab76028ed7e97183e07ea970930c1
CRs-Fixed: 2945893
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
2021-05-17 09:56:11 +08:00
qctecmdr
54a9c89962 Merge "icnss2: Add support for MHI state info" 2021-05-06 22:22:59 -07:00
Srinivas Rao L
618e2b8131 drivers: irqchip: Add Monaco MPM wake interrupt mapping
Add wakeup capable interrupts mapping for MPM.

Change-Id: Ia2e02bf22ea32cafdb7a5327470aafd01cf05ad4
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2021-05-05 05:48:55 -07:00
Naman Padhiar
578ed3c90d icnss2: Add support for MHI state info
Read MHI state from MSA and export API to get MHI state.
Add SMP2P handshakes according to below sequence to manage
PCI EP low power state.
1. Host driver calls prevent_l1.
2. ICNSS sends SMP2P to FW with PCI_EP_POWER_SAVE_EXIT.
3. FW bring EP out of power save and update in memory
   location.
4. Once Host reads updated value it access registers.
4. Host driver calls allow_l1.
5. ICNSS send SMP2P to FW with PCI_EP_POWER_SAVE_ENTER.

Change-Id: Ia93a270cbe86d1fb7c8402c69eb9b64b1400abb6
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-04-29 13:32:46 +05:30
qctecmdr
36666de1db Merge "drivers: qcom: Add declaration of msm_timer_get_sclk_ticks" 2021-04-27 22:49:32 -07:00
Shreyas K K
5b9c90fb86 drivers: Update boot marker config name
Boot marker config name is changed from CONFIG_MSM_BOOT_TIME_MARKER
to CONFIG_QGKI_MSM_BOOT_TIME_MARKER. Update the same.

Change-Id: I2eaebf14821388cf28a064f9ec961e33c23d2577
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-04-23 11:14:30 +05:30
Lei wang
0675c71004 profiler: Add a communication interface between userspace and tz services
Add snapshot of profiler driver from msm-4.4.
This snapshot is taken as of msm-4.4 commit bf01369440c0
(profiler: Add a communication interface between userspace and tz services)
Refine code for llcc support and use API in kernel 5.4.

Change-Id: Icc545138781c26a82ae6234965cb975b11b7079e
Signed-off-by: Lei wang <leiwan@codeaurora.org>
2021-04-09 09:45:42 +08:00
Shreyas K K
9f4cb5aba1 drivers: qcom: Add declaration of msm_timer_get_sclk_ticks
Add declaration of msm_timer_get_sclk_ticks to boot_stats.h
to allow reference from other files.

Change-Id: I4f1980cf03c362474babde270d4656eeb1593993
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-04-06 19:10:15 +05:30
qctecmdr
7422f86139 Merge "irqchip: mpm: Add mpm mapping for gic wakeup capable irqs" 2021-03-17 06:25:18 -07:00
Raghavendra Kakarla
292ced4931 irqchip: mpm: Add mpm mapping for gic wakeup capable irqs
Add mpm mapping for gic wakeup capable interrupts for
sdxnightjar.

Change-Id: I1d895706dc9bfca7b1236200aabedfebf31d8c0c
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-03-16 22:15:16 +05:30
Raghavendra Kakarla
e48c59bf5a drivers: soc: qcom: Enable SPM driver
Enables the support SPM and AVS wrapper hardware.

Change-Id: I2525d5fadf5be318f55ce722c26e598640af926f
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-03-15 10:10:15 -07:00
Sivasri Kumar Vanka
7aac6c873e lpm_levels_legacy: Rectified compilation errors
Compilation failed, due to updated function declarations lpm_levels
driver where the lpm_levels_legacy driver is not updated in parallel
Rectified all errors occurred during compilation for mdm9607 target.

Change-Id: Iacb6ce9949454a949bcba90a8e8285ca18b832d5
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: Haribabu Gattem <haribabu@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-03-15 09:51:03 -07:00
Maulik Shah
d23cd81540 cpuidle: lpm-levels: Enable LPM support for non psci target
Add non psci legacy lpm support. Modify and align changes
for clock event, MPM and cpu hotplug for LPM callback notification.

Remove deprecated scheduler c-state(idle cpu), d-state(idle cluster)
setting from lpm driver.

Snapshot is taken from msm-4.9 kernel version @commit b9ad452666da39.
("soc: qcom: bgrsb: Increase time out for RSB channel opening").

Change-Id: I8958ab4f098cc6d875071e3f100b8b74845e0cfa
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Signed-off-by: Haribabu Gattem <haribabu@codeaurora.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Suresh Kumar Allam <allamsuresh@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-03-15 09:50:56 -07:00
Shreyas K K
47342c7683 drivers: qcom: boot_stats: Fix compiler error
Fix compiler error due to multiple definitions
of boot_marker_enabled function.

Change-Id: Ibeb5a33e8b13ad97d9109847c412a2442979653e
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-03-02 16:59:07 +05:30
Shreyas K K
5f4ebb2c89 drivers: qcom: boot_stats: Update function signature
Update init_bootkpi and boot_marker_enabled as inline
functions to avoid -Wunused-function compiler error.

Change-Id: I61098c8bcc941d21a2ff30905cd93d82af1cf1f4
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-02-18 14:16:15 +05:30
Shreyas K K
a7785a897c drivers: qcom: Add support for kernel boot markers
The existing boot_stats module captures the timestamps
of various events before the kernel start, like bootloader
start, kernel load time, etc.

Extend support to capture timestamps of events after kernel
starts execution. Users can call place_marker from different
points of execution to capture the timestamp.

Expose a sysfs node to read the complete list of events
captured by the boot_stats module.

Change-Id: Icbc2341b34fe7e2559a37c092a5ab74919703184
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-02-15 22:36:16 -08:00
Neeraj Upadhyay
b7a740512b soc: qcom: Add AMU register access interfaces
Add AMU counters interfaces for Arm cortex-A76, cortex-A77
and cortex-A78 CPUs.

Change-Id: I81ae250fc5e1b2a2ffec904f4335f84f05543a83
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2021-02-11 22:33:39 +05:30
Monika Singh
d9858f6b11 qseecom : Add support for fuse syscall
Add changes to support syscall to return fuse
configuration on the device. Also rename
function to improve redability.

Change-Id: Idec01fec75a5dd6a86ad6dc319d18129c4ec2740
Signed-off-by: Monika Singh <monising@codeaurora.org>
2021-01-25 10:42:24 +05:30
Sibi Sankar
295e404917 soc: qcom: cmd-db: Fix compilation error when CMD_DB is disabled
If CONFIG_QCOM_COMMAND_DB=n the following compilation errors will be
seen. Fix this by including the appropriate linux headers.

./include/soc/qcom/cmd-db.h: In function ‘cmd_db_read_aux_data’:
./include/soc/qcom/cmd-db.h: error: implicit declaration of function ‘ERR_PTR’;

Change-Id: I76ed6230b00f88cefbb78e5f2ee4a534316078d7
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200227125615.4727-1-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Git-commit: 7ad18bb5c2c4bd50c8b83d375ee19be992022cf3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2020-12-15 12:10:04 +05:30
Aman Mehta
b712bdb81b msm: kgsl: Including drawobj flag for msm-perf api
The inclusion of draw object flag for msm_perf_events_update.
Since user-space thread is triggered based on kgsl events
this will be vital to distinguish the events based on frame
states and prevent undesirable user-space thread wake-ups.

Change-Id: I28040808d6c114b718aad0e0ab63554683e77460
Signed-off-by: Aman Mehta <amanmeht@codeaurora.org>
2020-12-04 01:24:32 -08:00
Tao,Zhang
dee26de962 coresight: Doesn't save and restore ETMs state while CPU hot-plug
Doesn't save and restore ETMs state while CPU being offline and
online hot-plug. Since ETM driver can save and restore ETMs state
in hot-plug process. If JTAG driver save and restore ETMs state
as well, there could be some conflicts with ETM driver.

Change-Id: Ib4de3c0e3d0abb4cb15946fc444e0c1fc9188fd1
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-11-24 10:45:53 +08:00
qctecmdr
61717f9f5f Merge "soc: qcom: msm_perf: enable msm_perf driver on default config" 2020-11-17 17:05:48 -08:00
Kishore Sri venkata Ganesh Bolisetty
206e048a12 soc: qcom: msm_perf: enable msm_perf driver on default config
carve out frequency boost functionality of msm_perf driver
and enable it on non perf images too.

Change-Id: I2a0af988edf04a88d2fc16018f50830a0ab73220
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
2020-11-16 14:35:54 -08:00
Melody Olvera
2a75fc5624 Revert "soc: qcom: Remove watchdog percpu interrupts"
This reverts commit d71acda6dc.
This is being reverted because sdxlemur uses percpu interrupts
in its watchdog. This change also adds back in fields used by
this code and fixes issues introduced by new code.

Change-Id: Ic5ddbebd6c6f4b4c5d157a86a3ecd827e1b5376f
Signed-off-by: Melody Olvera <molvera@codeaurora.org>
2020-11-11 08:08:18 -08:00
Naman Padhiar
e926a43389 icnss2: Export API to host driver to exit power save
Avoid sending EXIT_POWER_SAVE QMI message to FW from
kernel pm_resume callback. Send EXIT_POWER_SAVE QMI
from new exported API which will be called from Host
driver at the time of HOST_WAKEUP_FROM_SLEEP.
When FW receive EXIT_POWER_SAVE QMI, it will implicitly
consider that it also received HOST_WAKEUP_FROM_SLEEP
and send ACK for it through CE2.

Change-Id: Iba6e0d026749bbe5fb4fca5547cad4540932142f
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2020-10-01 18:06:41 -07:00
Neeraj Upadhyay
047ca2390b soc: qcom: Add a die notifier for qcom watchdog
To give sufficient time to die notifier to complete
their work, add a watchdog die notifier, to reset the
watchdog. Also, increase priority of watchdog panic
notifier and make minidump oops notifiers run after
watchdog oops notifiers.

Change-Id: Ifc53cc5c3b1ecc1554a971b9f2334319cad62bfd
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-18 12:23:57 +05:30
Vijayanand Jitta
796c864c72 soc: qcom: Enable slabowner support in minidump
Register and dump slabowner on kernel panic to minidump
table.

Change-Id: I1644ead8ce75ddfca7181ccf102dedabf42c6ad7
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-09-10 11:48:20 +05:30
Vijayanand Jitta
3f17f5a3dc soc: qcom: Enable pageowner support in minidump
Register and dump pageowner on kernel panic to minidump
table.

Change-Id: I410fe9a6e875e1485bd2e9d0ad5798015d2ce3e6
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-09-10 11:34:13 +05:30
qctecmdr
5a6978730b Merge "msm-perf: Kgsl events collection for perf" 2020-09-09 18:24:28 -07:00
qctecmdr
9204b9429b Merge "soc: qcom: secure_buffer: add API page_accessible" 2020-09-09 18:24:27 -07:00
Aman Mehta
3c2b8124f8 msm-perf: Kgsl events collection for perf
Send KGSL events to perf module.

Change-Id: Icb76a3067296544b2489e4be60ea7417739da211
Signed-off-by: Aman Mehta <amanmeht@codeaurora.org>
2020-09-08 03:10:44 -07:00
Vijayanand Jitta
0d1287fa01 soc: qcom: minidump: Add md_get_region function
Add a function md_get_region which returns md_region
when we pass minidump entry name to it.

Change-Id: Ibbd84737041c5b1c25cc46b9c740d415978de7e6
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-09-07 09:23:58 -07:00
Vijayanand Jitta
65caff8352 soc: qcom: Enable slabinfo support in minidump
Register and dump slabinfo on kernel panic to minidump
table.

Change-Id: I8e2eabf63233bdb0039a7c7c962b980fba2e21ef
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-09-07 09:23:52 -07:00
Vijayanand Jitta
2ae883be00 soc: qcom: Enable meminfo support in minidump
Register and dump meminfo on kernel panic to minidump
table.

Change-Id: I367d09ce8aabf4feda6d352411d9e10038a37ff9
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-09-07 09:23:42 -07:00
Neeraj Upadhyay
52a0d3dcb7 soc: qcom: Enable ftrace support in minidump
Register and dump ftrace buffer on kernel panic, to minidump
table. The dumps are collected in parsed format.

Change-Id: I10605467d2b566425cc2cb4fd67dbc59fcd592e7
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-07 17:36:17 +05:30
Prateek Sood
8569bead28 soc: wdog: implement irq tracker to get stats
Implement IRQ tracker for information:
1) Top 10 device IRQ's with count.
2) Per cpu total irq counts.
3) Per IPI total count.
Tracker will be invoked from watchdog pet,
watchdog bark and kernel panics.

Change-Id: I5159e122e25a7bbf389be4d5f57753378c7afb6d
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 20:49:29 +05:30
Neeraj Upadhyay
49148c6626 soc: qcom: Handle device hangs during suspend/resume
As cpus can serve ipis and timers during suspend and
resume; msm watchdog would periodically pet hardware,
even when some of suspend/resume callbacks are stuck,
due to software deadlocks. This can cause device hangs,
particularly when noirq callbacks are stuck. To recover
from this, register late suspend (and early resume)
callbacks in msm watchdog; these callbacks would
disable/enable watchdog pet.

Change-Id: Id12251f2bb6565b04a59802a53b6c3cadd017327
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 03:39:38 -07:00
Neeraj Upadhyay
62ea1d38b6 soc: qcom: Move watchdog suspend/resume callbacks to syscore ops
Move suspend resume callbacks to syscore ops, to ensure that
watchdog is kept enabled while _noirq callbacks are run; to
catch any watchdog hang during these callbacks run.

Change-Id: I5ef61eb2ce2cd74a07847d6f5ff048a7b27b95a1
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 03:39:16 -07:00
Lingutla Chandrasekhar
465231e616 Minidump: Add update region support for minidump regions
Add support to update client's entry physical/virtual addresses,
which is useful for DLKM, dynamic address changing clients.

Currently, msm_minidump_add_region() returns 0 on success, instead
of that, return 'region number' of the entry in the minidump table.

So clients who wants to update their address in future, needs to
book keep their entry in minidump table.

Change-Id: I03abbbd87bf6d2e11cf637525412d352772821cf
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-04 15:41:56 +05:30
Raghavendra Kakarla
cd5a2ae207 drivers: coresight: Add interrupt service routine for apss tgu
Add the interrupt service routine for apss tgu to handle tgu
interrupt.

Change-Id: Ic0128e41ed7a8e837ebab12a28c744af85109bda
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-08-31 10:44:07 +05:30
Branden Bonaby
065a08cb14 soc: qcom: Create framework for qcom watchdogs
Separate core watchdog functionality from the qcom watchdog
driver to create a framework for other qcom watchdogs. This
will reduce the duplication of code for future watchdog
drivers and allow them to take advantage of this framework.

Change-Id: I1234af9d92de6841bd09157042a4fbba1745f11b
Signed-off-by: Branden Bonaby <bbonaby@codeaurora.org>
2020-08-18 12:17:42 -07:00