Skip to content

Commit 309f439

Browse files
mukesh-savaliyavdadhani
authored andcommitted
FROMLIST: soc: qcom: geni-se: Keep pinctrl active for multi-owner controllers
On platforms where a GENI Serial Engine is shared with another system processor, selecting the "sleep" pinctrl state can disrupt ongoing transfers initiated by the other processor. Teach geni_se_resources_off() to skip selecting the pinctrl sleep state when the Serial Engine is marked as shared, while still allowing the rest of the resource shutdown sequence to proceed. This is required for multi-owner configurations (described via DeviceTree with qcom,qup-multi-owner on the protocol controller node). Link: https://lore.kernel.org/all/20260331114742.2896317-4-mukesh.savaliya@oss.qualcomm.com/ Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
1 parent 9586b3e commit 309f439

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

drivers/soc/qcom/qcom-geni-se.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,17 @@ int geni_se_resources_off(struct geni_se *se)
597597

598598
if (has_acpi_companion(se->dev))
599599
return 0;
600-
601-
ret = pinctrl_pm_select_sleep_state(se->dev);
602-
if (ret)
603-
return ret;
600+
/*
601+
* Select the "sleep" pinctrl state only when the serial engine is
602+
* exclusively owned by this system processor. For shared controller
603+
* configurations, another system processor may still be using the pins,
604+
* and switching them to "sleep" can disrupt ongoing transfers.
605+
*/
606+
if (!se->multi_owner) {
607+
ret = pinctrl_pm_select_sleep_state(se->dev);
608+
if (ret)
609+
return ret;
610+
}
604611

605612
geni_se_clks_off(se);
606613
return 0;

include/linux/soc/qcom/geni-se.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct geni_icc_path {
6363
* @num_clk_levels: Number of valid clock levels in clk_perf_tbl
6464
* @clk_perf_tbl: Table of clock frequency input to serial engine clock
6565
* @icc_paths: Array of ICC paths for SE
66+
* @multi_owner: True if SE is shared between multiprocessors.
6667
*/
6768
struct geni_se {
6869
void __iomem *base;
@@ -72,6 +73,7 @@ struct geni_se {
7273
unsigned int num_clk_levels;
7374
unsigned long *clk_perf_tbl;
7475
struct geni_icc_path icc_paths[3];
76+
bool multi_owner;
7577
};
7678

7779
/* Common SE registers */

0 commit comments

Comments
 (0)