Re: [PATCH 4/6] soc: qcom: geni-se: Define the QSPI firmware protocol
From: Jyothi Kumar Seerapu
Date: Mon Nov 09 2026 - 09:45:22 EST
On 11/9/2026 7:14 PM, Krzysztof Kozlowski wrote:
On Fri, Nov 06, 2026 at 08:31:22PM +0530, Jyothi Kumar Seerapu wrote:
Add GENI_SE_QSPI with firmware protocol ID 9. The GENI SPI driver uses
this value to request QSPI firmware and validate the protocol running
on a serial engine.
Extend the firmware loader's protocol-name table to accept QSPI.
Reject unused protocol IDs in the sparse table before looking up
firmware.
Signed-off-by: Jyothi Kumar Seerapu <jyothi.seerapu@xxxxxxxxxxxxxxxx>
---
drivers/soc/qcom/qcom-geni-se.c | 7 +++++--
include/linux/soc/qcom/geni-se.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 873bfbd6b2b7..396f3d81d292 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -122,7 +122,10 @@ struct geni_se_desc {
static const char * const icc_path_names[] = {"qup-core", "qup-config",
"qup-memory"};
-static const char * const protocol_name[] = { "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE" };
+static const char * const protocol_name[] = {
+ "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE",
+ [GENI_SE_QSPI] = "QSPI",
Why are you creating holes in this array?
Hi Krzysztof,
The array is indexed by the GENI protocol ID. QSPI uses ID 9, while the existing entries cover IDs 0–5, so the designated initializer leaves entries 6–8 empty.
The added NULL check rejects these unused entries before accessing the protocol name. Appending "QSPI" directly would incorrectly associate it with ID 6.
Best regards,
Krzysztof