/* SF Ctrl disable iahb to flash wrap access for XTS mode.  */
__WEAK void ATTR_TCM_SECTION bflb_sf_ctrl_disable_wrap_access(uint8_t disable)
/* SF Ctrl disable iahb to flash wrap access for XTS mode.  */
__WEAK void ATTR_TCM_SECTION bflb_sf_ctrl_disable_wrap_access(uint8_t disable)
{
    uint32_t reg_base = 0;
    uint32_t regval = 0;
    reg_base = BFLB_SF_CTRL_BASE;
    regval = getreg32(reg_base + SF_CTRL_1_OFFSET);
    if (disable) {
        regval &= ~SF_CTRL_SF_AHB2SIF_DISWRAP;
    } else {
        regval |= SF_CTRL_SF_AHB2SIF_DISWRAP;
    }
    putreg32(regval, reg_base+SF_CTRL_1_OFFSET);
}