40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From d00c7f54a14f2d1557dc1213f9d11eea1e33dcec Mon Sep 17 00:00:00 2001
|
|
From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
|
|
Date: Thu, 11 Sep 2025 10:02:56 +0530
|
|
Subject: [PATCH] serial: qcom-geni: Load UART qup Firmware from linux side
|
|
|
|
Add provision to load firmware of Serial engine for UART protocol from
|
|
Linux Execution Environment on running on APPS processor.
|
|
|
|
Co-developed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
|
|
Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
|
|
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
|
|
Link: https://lore.kernel.org/r/20250911043256.3523057-7-viken.dadhaniya@oss.qualcomm.com
|
|
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
|
---
|
|
drivers/tty/serial/qcom_geni_serial.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
|
|
index 5dfe4e599..e7e1291e0 100644
|
|
--- a/drivers/tty/serial/qcom_geni_serial.c
|
|
+++ b/drivers/tty/serial/qcom_geni_serial.c
|
|
@@ -1145,7 +1145,13 @@ static int qcom_geni_serial_port_setup(struct uart_port *uport)
|
|
int ret;
|
|
|
|
proto = geni_se_read_proto(&port->se);
|
|
- if (proto != GENI_SE_UART) {
|
|
+ if (proto == GENI_SE_INVALID_PROTO) {
|
|
+ ret = geni_load_se_firmware(&port->se, GENI_SE_UART);
|
|
+ if (ret) {
|
|
+ dev_err(uport->dev, "UART firmware load failed ret: %d\n", ret);
|
|
+ return ret;
|
|
+ }
|
|
+ } else if (proto != GENI_SE_UART) {
|
|
dev_err(uport->dev, "Invalid FW loaded, proto: %d\n", proto);
|
|
return -ENXIO;
|
|
}
|
|
--
|
|
2.51.1
|
|
|