This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch vipul/juul-master-steam-10-18-2023
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 9ae1dd991159289f41a522f00a7aed7db6dc6ebb
Author: Andy Gross <[email protected]>
AuthorDate: Tue Jul 26 11:59:32 2022 -0500

    da146x: hal_flash: Add export of RDID detection
    
    This patch adds a globally exported pointer to the RDID information detected
    during flash init.  This can be used by other software to make decisions 
about
    special actions taken with specific flash devices.
    
    Signed-off-by: Andy Gross <[email protected]>
---
 hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h | 2 +-
 hw/mcu/dialog/da1469x/src/hal_flash.c           | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h 
b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
index 78e167528..01014963e 100755
--- a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
+++ b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
@@ -85,7 +85,7 @@ struct qspi_flash_config {
 extern const struct qspi_flash_config rdids[];
 extern const int qspi_flash_config_array_size;
 
-const struct qspi_flash_config *da1469x_qspi_get_config(void);
+extern const struct qspi_flash_config *rdid_detected;
 
 #ifdef __cplusplus
 }
diff --git a/hw/mcu/dialog/da1469x/src/hal_flash.c 
b/hw/mcu/dialog/da1469x/src/hal_flash.c
index 2b84da115..18b37ea46 100644
--- a/hw/mcu/dialog/da1469x/src/hal_flash.c
+++ b/hw/mcu/dialog/da1469x/src/hal_flash.c
@@ -34,7 +34,7 @@ union da1469x_qspi_data_reg {
     uint8_t d8;
 };
 
-static const struct qspi_flash_config *rdid_detected = NULL;
+const struct qspi_flash_config *rdid_detected = NULL;
 
 static int da1469x_hff_read(const struct hal_flash *dev, uint32_t address,
                             void *dst, uint32_t num_bytes);
@@ -461,7 +461,6 @@ qspi_read_rdid(const struct hal_flash *dev)
 static sec_text_ram_core void
 da1469x_hff_mcu_custom_init(const struct hal_flash *dev)
 {
-    const struct qspi_flash_config *config = NULL;
     uint32_t primask;
 
     __HAL_DISABLE_INTERRUPTS(primask);

Reply via email to