aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2022-12-13 23:26:37 +0100
committerRobert Marko <robimarko@gmail.com>2023-01-16 12:42:23 +0100
commit6c9329e08830fe0f56a361ed0f2898b56157ecbb (patch)
treec0cb25368f2cfd95ed084f84fdd81a21a1e9eae9 /target/linux
parentaf6da888146f0307a2c3c803c473318750c70920 (diff)
downloadupstream-6c9329e08830fe0f56a361ed0f2898b56157ecbb.tar.gz
upstream-6c9329e08830fe0f56a361ed0f2898b56157ecbb.tar.bz2
upstream-6c9329e08830fe0f56a361ed0f2898b56157ecbb.zip
generic: 5.15: add MHI SBL callback for ath11k
This adds the MHI SBL callback that ath11k will utilize in order to support multiple PCI cards or AHB+PCI combo which currently does not work due to QRTR ID-s conflicting. This is a prerequisite for the mac80211 patch targeting ath11k as it uses MHI from kernel. Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/pending-5.15/790-bus-mhi-core-add-SBL-state-callback.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.15/790-bus-mhi-core-add-SBL-state-callback.patch b/target/linux/generic/pending-5.15/790-bus-mhi-core-add-SBL-state-callback.patch
new file mode 100644
index 0000000000..00d5cb9ce9
--- /dev/null
+++ b/target/linux/generic/pending-5.15/790-bus-mhi-core-add-SBL-state-callback.patch
@@ -0,0 +1,48 @@
+From 5f7c5e1c0d7a79be144e5efc1f24728ddd7fc25c Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Sat, 5 Nov 2022 20:02:56 +0100
+Subject: [PATCH 1/2] bus: mhi: core: add SBL state callback
+
+Add support for SBL state callback in MHI core.
+
+It is required for ath11k MHI devices in order to be able to set QRTR
+instance ID in the SBL state so that QRTR instance ID-s dont conflict in
+case of multiple PCI/MHI cards or AHB + PCI/MHI card.
+Setting QRTR instance ID is only possible in SBL state and there is
+currently no way to ensure that we are in that state, so provide a
+callback that the controller can trigger off.
+
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+---
+ drivers/bus/mhi/core/main.c | 1 +
+ include/linux/mhi.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bus/mhi/core/main.c
++++ b/drivers/bus/mhi/core/main.c
+@@ -891,6 +891,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
+ switch (event) {
+ case MHI_EE_SBL:
+ st = DEV_ST_TRANSITION_SBL;
++ mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_SBL_MODE);
+ break;
+ case MHI_EE_WFW:
+ case MHI_EE_AMSS:
+--- a/include/linux/mhi.h
++++ b/include/linux/mhi.h
+@@ -34,6 +34,7 @@ struct mhi_buf_info;
+ * @MHI_CB_SYS_ERROR: MHI device entered error state (may recover)
+ * @MHI_CB_FATAL_ERROR: MHI device entered fatal error state
+ * @MHI_CB_BW_REQ: Received a bandwidth switch request from device
++ * @MHI_CB_EE_SBL_MODE: MHI device entered SBL mode
+ */
+ enum mhi_callback {
+ MHI_CB_IDLE,
+@@ -45,6 +46,7 @@ enum mhi_callback {
+ MHI_CB_SYS_ERROR,
+ MHI_CB_FATAL_ERROR,
+ MHI_CB_BW_REQ,
++ MHI_CB_EE_SBL_MODE,
+ };
+
+ /**