You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2020/02/21 07:22:59 UTC

[mynewt-core] branch master updated: encflash/da_1469x: cleanup DMA key transfer function (#2198)

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

vipulrahane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 3dc483f  encflash/da_1469x: cleanup DMA key transfer function (#2198)
3dc483f is described below

commit 3dc483fff8ce29a963475d4d84bb90f86b9a09a7
Author: Naveen Kaje <na...@juul.com>
AuthorDate: Fri Feb 21 01:22:49 2020 -0600

    encflash/da_1469x: cleanup DMA key transfer function (#2198)
    
    key is securely transferred from OTP Key area to AES engine.
    Nothing to do with QSPI. Cleanup incorrect code.
    
    Signed-off-by: Naveen Kaje <na...@juul.com>
---
 hw/drivers/flash/enc_flash/ef_da1469x/src/hw_enc_flash.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/drivers/flash/enc_flash/ef_da1469x/src/hw_enc_flash.c b/hw/drivers/flash/enc_flash/ef_da1469x/src/hw_enc_flash.c
index 451276c..7d74393 100644
--- a/hw/drivers/flash/enc_flash/ef_da1469x/src/hw_enc_flash.c
+++ b/hw/drivers/flash/enc_flash/ef_da1469x/src/hw_enc_flash.c
@@ -41,13 +41,10 @@ do_dma_key_tx(const struct hal_flash *h_dev, uint32_t slot)
     da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_OTP_ENABLE_Msk);
     da1469x_otp_set_mode(OTPC_MODE_READ);
 
-    /* program start and end addresses */
-    QSPIC->QSPIC_CTR_SADDR_REG = h_dev->hf_base_addr;
-    QSPIC->QSPIC_CTR_EADDR_REG = h_dev->hf_size + h_dev->hf_base_addr;
-
     /* securely DMA hardware key from secret storage to QSPI decrypt engine */
     dma_regs->DMA_REQ_MUX_REG |= 0xf000;
     dma_regs->DMA7_LEN_REG = 8;
+    /* program source and destination addresses */
     dma_regs->DMA7_A_START_REG = MCU_OTPM_BASE + OTP_SEGMENT_USER_DATA_KEYS +
                                  (32 * (slot));
     dma_regs->DMA7_B_START_REG = (uint32_t)&AES_HASH->CRYPTO_KEYS_START;