Skip to contentSkip to conversation

soc: qcom: geni: shield geni_icc_get() for ACPI boot

PATCH Applied Shawn Guo 3 participants 3 messages Jan 14, 2021 – Mar 1, 2021

Subsystems (2)
lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH v2 1/1 soc: qcom: geni: shield geni_icc_get() for ACPI boot

Currently, GENI devices like i2c-qcom-geni fails to probe in ACPI boot, if interconnect support is enabled. That's because interconnect driver only supports DT right now. As interconnect is not necessarily required for basic function of GENI devices, let's shield geni_icc_get() call, and then all other ICC calls become nop due to NULL icc_path, so that GENI devices keep working for ACPI boot.

---
Changes for v2:
- Only shield geni_icc_get(), as all other ICC calls will become nop anyway due to NULL icc_path.

 drivers/soc/qcom/qcom-geni-se.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/soc/qcom/qcom-geni-se.c +3 -0
index f42954e2c98e..c7c03ccfe888 100644
@@ -760,6 +760,9 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr)
 	int i, err;
 	const char *icc_names[] = {"qup-core", "qup-config", icc_ddr};
 
+	if (has_acpi_companion(se->dev))
+		return 0;
+
 	for (i = 0; i < ARRAY_SIZE(se->icc_paths); i++) {
 		if (!icc_names[i])
 			continue;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Shawn Guo

Currently, GENI devices like i2c-qcom-geni fails to probe in ACPI boot, if interconnect support is enabled. That's because interconnect driver only supports DT right now. As interconnect is not necessarily required for basic function of GENI devices, let's shield geni_icc_get() call, and then all other ICC calls become nop due to NULL icc_path, so that GENI devices keep working for ACPI boot.

Regards,
Bjorn

Quoted 26 lines

---
Changes for v2:
- Only shield geni_icc_get(), as all other ICC calls will become nop anyway due to NULL icc_path.

 drivers/soc/qcom/qcom-geni-se.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/soc/qcom/qcom-geni-se.c +3 -0
index f42954e2c98e..c7c03ccfe888 100644
@@ -760,6 +760,9 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr)
 	int i, err;
 	const char *icc_names[] = {"qup-core", "qup-config", icc_ddr};
 
+	if (has_acpi_companion(se->dev))
+		return 0;
+
 	for (i = 0; i < ARRAY_SIZE(se->icc_paths); i++) {
 		if (!icc_names[i])
 			continue;
Signature · 1 line
2.17.1
#2 lore raw
In reply to Shawn Guo
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

Quoted 8 lines · On Thu, 14 Jan 2021 19:29:28 +0800 you wrote:

Currently, GENI devices like i2c-qcom-geni fails to probe in ACPI boot, if interconnect support is enabled. That's because interconnect driver only supports DT right now. As interconnect is not necessarily required for basic function of GENI devices, let's shield geni_icc_get() call, and then all other ICC calls become nop due to NULL icc_path, so that GENI devices keep working for ACPI boot.

[...]

Here is the summary with links:
- [v2] soc: qcom: geni: shield geni_icc_get() for ACPI boot

    https://git.kernel.org/qcom/c/ee23057b4d6f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html