From 32147576237ff9e49c4314084a1e8b7a6fa5e27a Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 13 Mar 2017 22:54:14 +0800 Subject: MLK-14418-13 imx: mx7dsabresd: Update Misc codes 1. Add BMODE support 2. Update environment variables to align with v2016.03 3. Remove the wdog WCR bit 4 clear. Since we have implemented reset_cpu for mx7d. Signed-off-by: Ye Li --- board/freescale/mx7dsabresd/mx7dsabresd.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'board/freescale/mx7dsabresd') diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index f5cb58f..fd60807 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -597,6 +598,17 @@ int board_init(void) return 0; } +#ifdef CONFIG_CMD_BMODE +static const struct boot_mode board_boot_modes[] = { + /* 4 bit bus width */ + {"sd1", MAKE_CFGVAL(0x10, 0x10, 0x00, 0x00)}, + {"emmc", MAKE_CFGVAL(0x10, 0x2a, 0x00, 0x00)}, + /* TODO: Nand */ + {"qspi", MAKE_CFGVAL(0x00, 0x40, 0x00, 0x00)}, + {NULL, 0}, +}; +#endif + #ifdef CONFIG_DM_PMIC int power_init_board(void) { @@ -622,6 +634,9 @@ int power_init_board(void) int board_late_init(void) { struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; +#ifdef CONFIG_CMD_BMODE + add_board_boot_modes(board_boot_modes); +#endif #ifdef CONFIG_ENV_IS_IN_MMC board_late_mmc_env_init(); @@ -631,12 +646,6 @@ int board_late_init(void) set_wdog_reset(wdog); - /* - * Do not assert internal WDOG_RESET_B_DEB(controlled by bit 4), - * since we use PMIC_PWRON to reset the board. - */ - clrsetbits_le16(&wdog->wcr, 0, 0x10); - return 0; } -- cgit v1.1