[Feature][ZXW-311] add lynq nv config support & merge changes for sihai
Only Configure :No
Affected branch: master
Affected module: uboot/ap
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: Ie02a4c5daad09441e82b92c9746d5aff0a603692
diff --git a/boot/common/src/uboot/drivers/peripheral/peripheral.c b/boot/common/src/uboot/drivers/peripheral/peripheral.c
index fe410a9..3898062 100755
--- a/boot/common/src/uboot/drivers/peripheral/peripheral.c
+++ b/boot/common/src/uboot/drivers/peripheral/peripheral.c
@@ -28,6 +28,11 @@
#include <drvs_gpio.h>
#include "common.h"
#include <dma_cfg.h>
+#include "../rsa/drv_rsa.h"
+
+#ifdef LYNQ_NV_CFG_SUPPORT
+extern void lynq_setup_nv_cfg(void);
+#endif
//#include <gpio.h>
@@ -67,9 +72,16 @@
int ret = 0;
ret = power_init();
+ BOOT_PRINTF(UBOOT_NOTICE, "cy: peripheral_init 2\n");
+
+#ifndef LYNQ_NV_CFG_SUPPORT
/*mmc config*/
- REG32(MMC_FLAG_ADDR) &=~0x3;//clear bit0~1
+ REG32(MMC_FLAG_ADDR) &=~0x3;//clear bit0~1
REG32(MMC_FLAG_ADDR) |=((MMC0_USED_EN<<0)|(MMC1_USED_EN<<1));
+#else
+ lynq_setup_nv_cfg();
+#endif
+
/*led*/
/*lcd*/