nkaje commented on a change in pull request #2327:
URL: https://github.com/apache/mynewt-core/pull/2327#discussion_r452747728



##########
File path: hw/drivers/crypto/crypto_da1469x/src/crypto_da1469x.c
##########
@@ -161,6 +162,17 @@ da1469x_crypto_op(struct crypto_dev *crypto, uint8_t op, 
uint16_t algo,
         *keyreg++ = os_bswap_32(*keyp32); keyp32++;
     }
 
+    /*
+     * REAMP_ADR0 when 2, 0 mapped to QSPI Flash. See SYS_CTRL_REG in 
datasheet.
+     * If inbuf is in QSPI Flash, the addresses need to be translated to
+     * to 0x36000000 range for the DMA engine access.
+     */
+    remap_addr0 = (CRG_TOP->SYS_CTRL_REG & 
CRG_TOP_SYS_CTRL_REG_REMAP_ADR0_Msk) >> CRG_TOP_SYS_CTRL_REG_REMAP_ADR0_Pos;
+
+    if (MCU_MEM_QSPIF_M_RANGE_ADDRESS(inbuf) && remap_addr0 == 2) {

Review comment:
       Added a enum definition to list all REMAP_ADR0 values and used it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to