Re: [PATCH v1 4/7] soc: qcom: geni-se:: Add support to load QUP SE Firmware via Linux subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/4/2024 8:54 PM, neil.armstrong@xxxxxxxxxx wrote:
Hi,

On 04/12/2024 16:03, Viken Dadhaniya wrote:
Load the firmware to QUP SE based on the "qcom,load-firmware" property
specified in devicetree. Populate Serial engine and base address details
in the probe function of the protocol driver and pass to firmware load
routine.

Skip the firmware loading if the firmware is already loaded in Serial
Engine's firmware memory area.

Co-developed-by: Mukesh Kumar Savaliya <quic_msavaliy@xxxxxxxxxxx>
Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@xxxxxxxxxxx>
Signed-off-by: Viken Dadhaniya <quic_vdadhani@xxxxxxxxxxx>
---
  drivers/soc/qcom/qcom-geni-se.c      | 445 +++++++++++++++++++++++++++
  include/linux/soc/qcom/geni-se.h     |  17 +
  include/linux/soc/qcom/qup-fw-load.h | 179 +++++++++++
  3 files changed, 641 insertions(+)
  create mode 100644 include/linux/soc/qcom/qup-fw-load.h

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 4cb959106efa..423102fac3fc 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -1,5 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0
  // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+// Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.   /* Disable MMIO tracing to prevent excessive logging of unwanted MMIO traces */
  #define __DISABLE_TRACE_MMIO__
@@ -15,6 +16,7 @@
  #include <linux/pinctrl/consumer.h>
  #include <linux/platform_device.h>
  #include <linux/soc/qcom/geni-se.h>
+#include <linux/soc/qcom/qup-fw-load.h>
  /**
   * DOC: Overview
@@ -97,6 +99,9 @@ struct geni_wrapper {
      unsigned int num_clks;
  };
+/* elf file should be at /lib/firmware/ */
+#define QUP_FW_ELF_FILE    "qupv3fw.elf"

I supposed the qupv3fw.elf is SoC specific, so it should use /lib/firmware/qcom
base path and also a SoC/platform specific path that should be specified
with firmware-name in DT.

With this property, "qcom,load-firmware" could be dropped.


Agree, will update in next patch.

+
  /**
   * struct geni_se_desc - Data structure to represent the QUP Wrapper resources
   * @clks:        Name of the primary & optional secondary AHB clocks
@@ -110,6 +115,9 @@ 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"};
+
  #define QUP_HW_VER_REG            0x4
<snip>





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux