You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/09/19 04:19:55 UTC
[incubator-nuttx] branch master updated: arch: arm: tlsr: Use flase_read ins of memcpy
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3461990ef4 arch: arm: tlsr: Use flase_read ins of memcpy
3461990ef4 is described below
commit 3461990ef420fee7a336f4adf22bb5255302f10c
Author: Lingao Meng <me...@xiaomi.com>
AuthorDate: Mon Sep 19 09:55:18 2022 +0800
arch: arm: tlsr: Use flase_read ins of memcpy
Since tlsr arch support A/B bank, the hardware support
relative addr to load or store, but for flash read,
must use absolute addr. also combine with flash_<*>_method.
Signed-off-by: Lingao Meng <me...@xiaomi.com>
---
arch/arm/src/tlsr82/tlsr82_flash.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/tlsr82/tlsr82_flash.c b/arch/arm/src/tlsr82/tlsr82_flash.c
index fa11d993b1..c3ddd04215 100644
--- a/arch/arm/src/tlsr82/tlsr82_flash.c
+++ b/arch/arm/src/tlsr82/tlsr82_flash.c
@@ -729,7 +729,10 @@ void tlsr82_flash_calibrate(uint32_t mid)
{
#if defined(CONFIG_ARCH_CHIP_TLSR8278)
- uint16_t cali_data = *(uint16_t *)CONFIG_TLSR82_FLASH_CALI_PARA_ADDR;
+ uint16_t cali_data;
+
+ tlsr82_flash_read_data(CONFIG_TLSR82_FLASH_CALI_PARA_ADDR, cali_data,
+ sizeof(cali_data));
finfo("cali_data=0x%x\n");
@@ -769,7 +772,10 @@ void tlsr82_flash_calibrate(uint32_t mid)
#elif defined(CONFIG_ARCH_CHIP_TLSR8258)
- uint8_t cali_data = *(uint8_t *)CONFIG_TLSR82_FLASH_CALI_PARA_ADDR;
+ uint8_t cali_data;
+
+ tlsr82_flash_read_data(CONFIG_TLSR82_FLASH_CALI_PARA_ADDR, cali_data,
+ sizeof(cali_data));
finfo("cali_data=0x%x\n");