diff options
-rw-r--r-- | board/freescale/mx7dsabresd/mx7dsabresd.c | 21 | ||||
-rw-r--r-- | include/configs/mx7dsabresd.h | 14 |
2 files changed, 26 insertions, 9 deletions
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 <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/imx-common/boot_mode.h> #include <asm/io.h> #include <linux/sizes.h> #include <common.h> @@ -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; } diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index 7f68def..75d2043 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -68,6 +68,7 @@ #ifdef CONFIG_IMX_BOOTAUX +#ifdef CONFIG_FSL_QSPI #define UPDATE_M4_ENV \ "m4image=m4_qspi.bin\0" \ "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \ @@ -77,12 +78,18 @@ "setexpr fw_sz ${filesize} + 0xffff; " \ "setexpr fw_sz ${fw_sz} / 0x10000; " \ "setexpr fw_sz ${fw_sz} * 0x10000; " \ - "sf erase 0x0 ${fw_sz}; " \ - "sf write ${loadaddr} 0x0 ${filesize}; " \ + "sf erase 0x100000 ${fw_sz}; " \ + "sf write ${loadaddr} 0x100000 ${filesize}; " \ "fi; " \ "fi\0" \ "m4boot=sf probe 1:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0" #else +#define UPDATE_M4_ENV \ + "m4image=m4_qspi.bin\0" \ + "loadm4image=fatload mmc ${mmcdev}:${mmcpart} "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)" ${m4image}\0" \ + "m4boot=run loadm4image; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0" +#endif +#else #define UPDATE_M4_ENV "" #endif @@ -113,7 +120,6 @@ #if defined(CONFIG_NAND_BOOT) #define CONFIG_EXTRA_ENV_SETTINGS \ - UPDATE_M4_ENV \ CONFIG_MFG_ENV_SETTINGS \ "panel=TFT43AB\0" \ "fdt_addr=0x83000000\0" \ @@ -291,6 +297,8 @@ #define CONFIG_IMX_THERMAL +#define CONFIG_CMD_BMODE + #define CONFIG_USBD_HS #define CONFIG_USB_FUNCTION_MASS_STORAGE |