diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-25 23:12:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-25 23:12:43 -0400 |
commit | 7a1a01c6029039e4fa6aa185cdbbf9a357eecba7 (patch) | |
tree | f145f655379b2298dc58ef11aa03742c159e7f56 /arch | |
parent | 9f9ecd3e4d7839e24c182fb7b24937e19b670f1b (diff) | |
parent | acbc1d86f16cc8372cccb7b862a0b9dc242f8fe5 (diff) |
Merge tag 'u-boot-imx-20200825' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
For 2020.10
-----------
- mx6: SOCs user selectable
Fix for imx6q_logic
Some DM conversion
- mx7: introduce secondary boot device
Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/720918010
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/arch-mx7/mx7-ddr.h | 16 | ||||
-rw-r--r-- | arch/arm/include/asm/mach-imx/boot_mode.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach-imx/sys_proto.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/cmd_bmode.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-imx/init.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx6/Kconfig | 134 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/ddr.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/soc.c | 17 |
9 files changed, 155 insertions, 75 deletions
diff --git a/arch/arm/include/asm/arch-mx7/mx7-ddr.h b/arch/arm/include/asm/arch-mx7/mx7-ddr.h index bea5dd8ec5..8ac721114c 100644 --- a/arch/arm/include/asm/arch-mx7/mx7-ddr.h +++ b/arch/arm/include/asm/arch-mx7/mx7-ddr.h @@ -136,11 +136,21 @@ struct ddr_phy { u32 offset_wr_con0; /* 0x0030 */ u32 reserved5[0x07]; u32 cmd_sdll_con0; /* 0x0050 */ - u32 reserved6[0x12]; + u32 reserved6[0x06]; + u32 cmd_lvl_con0; /* 0x006c */ + u32 reserved7[0x02]; + u32 cmd_lvl_con3; /* 0x0078 */ + u32 cmd_deskew_con0; /* 0x007c */ + u32 cmd_deskew_con1; /* 0x0080 */ + u32 cmd_deskew_con2; /* 0x0084 */ + u32 cmd_deskew_con3; /* 0x0088 */ + u32 reserved8[0x02]; + u32 cmd_deskew_con4; /* 0x0094 */ + u32 reserved9; u32 drvds_con0; /* 0x009c */ - u32 reserved7[0x04]; + u32 reserved10[0x04]; u32 mdll_con0; /* 0x00b0 */ - u32 reserved8[0x03]; + u32 reserved11[0x03]; u32 zq_con0; /* 0x00c0 */ }; diff --git a/arch/arm/include/asm/mach-imx/boot_mode.h b/arch/arm/include/asm/mach-imx/boot_mode.h index 3a483b6afa..6dc5855968 100644 --- a/arch/arm/include/asm/mach-imx/boot_mode.h +++ b/arch/arm/include/asm/mach-imx/boot_mode.h @@ -7,6 +7,8 @@ #define _ASM_BOOT_MODE_H #define MAKE_CFGVAL(cfg1, cfg2, cfg3, cfg4) \ ((cfg4) << 24) | ((cfg3) << 16) | ((cfg2) << 8) | (cfg1) +#define MAKE_CFGVAL_PRIMARY_BOOT 0xfffffff0 +#define MAKE_CFGVAL_SECONDARY_BOOT 0xffffffff enum boot_device { WEIM_NOR_BOOT, diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index ab94024c9b..15d1cba8e7 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -78,7 +78,8 @@ struct bd_info; #define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP)) #ifdef CONFIG_MX6 -#define IMX6_SRC_GPR10_BMODE BIT(28) +#define IMX6_SRC_GPR10_BMODE BIT(28) +#define IMX6_SRC_GPR10_PERSIST_SECONDARY_BOOT BIT(30) #define IMX6_BMODE_MASK GENMASK(7, 0) #define IMX6_BMODE_SHIFT 4 @@ -126,6 +127,11 @@ void gpr_init(void); #endif /* CONFIG_MX6 */ +#ifdef CONFIG_MX7 +#define IMX7_SRC_GPR10_BMODE BIT(28) +#define IMX7_SRC_GPR10_PERSIST_SECONDARY_BOOT BIT(30) +#endif + /* address translation table */ struct rproc_att { u32 da; /* device address (From Cortex M4 view) */ diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 1531d09f3b..8f64e23195 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -62,7 +62,7 @@ config CSF_SIZE config CMD_BMODE bool "Support the 'bmode' command" default y - depends on ARCH_MX6 || ARCH_MX5 + depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 help This enables the 'bmode' (bootmode) command for forcing a boot from specific media. diff --git a/arch/arm/mach-imx/cmd_bmode.c b/arch/arm/mach-imx/cmd_bmode.c index 19bfd9f9a0..cb317499d5 100644 --- a/arch/arm/mach-imx/cmd_bmode.c +++ b/arch/arm/mach-imx/cmd_bmode.c @@ -51,9 +51,19 @@ static int create_usage(char *dest) if (dest) memcpy(dest - 1, " [noreset]", 11); /* include trailing 0 */ size += 10; + + if (dest) + memcpy(dest - 1, "\nbmode - getprisec", 19); + size += 18; + return size; } +__weak int boot_mode_getprisec(void) +{ + return 0; +} + static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -62,6 +72,8 @@ static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 2) return CMD_RET_USAGE; + if (!strcmp(argv[1], "getprisec")) + return boot_mode_getprisec(); p = search_modes(argv[1]); if (!p) return CMD_RET_USAGE; diff --git a/arch/arm/mach-imx/init.c b/arch/arm/mach-imx/init.c index 693b724429..ce3eb4b0b8 100644 --- a/arch/arm/mach-imx/init.c +++ b/arch/arm/mach-imx/init.c @@ -103,15 +103,29 @@ void init_src(void) #ifdef CONFIG_CMD_BMODE void boot_mode_apply(unsigned cfg_val) { - unsigned reg; +#ifdef CONFIG_MX6 + const u32 persist_sec = IMX6_SRC_GPR10_PERSIST_SECONDARY_BOOT; + const u32 bmode = IMX6_SRC_GPR10_BMODE; +#elif CONFIG_MX7 + const u32 persist_sec = IMX7_SRC_GPR10_PERSIST_SECONDARY_BOOT; + const u32 bmode = IMX7_SRC_GPR10_BMODE; +#endif struct src *psrc = (struct src *)SRC_BASE_ADDR; - writel(cfg_val, &psrc->gpr9); - reg = readl(&psrc->gpr10); - if (cfg_val) - reg |= IMX6_SRC_GPR10_BMODE; - else - reg &= ~IMX6_SRC_GPR10_BMODE; - writel(reg, &psrc->gpr10); + unsigned reg; + + if (cfg_val == MAKE_CFGVAL_PRIMARY_BOOT) + clrbits_le32(&psrc->gpr10, persist_sec); + else if (cfg_val == MAKE_CFGVAL_SECONDARY_BOOT) + setbits_le32(&psrc->gpr10, persist_sec); + else { + writel(cfg_val, &psrc->gpr9); + reg = readl(&psrc->gpr10); + if (cfg_val) + reg |= bmode; + else + reg &= ~bmode; + writel(reg, &psrc->gpr10); + } } #endif diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 17173f9839..3d72517fa1 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -15,54 +15,64 @@ config MX6 select GPT_TIMER if !MX6UL && !MX6ULL imply CMD_FUSE +choice + prompt "i.MX6 SoC select" + config MX6D - bool + bool "i.MX 6Dual SoC support" select HAS_CAAM select MX6_SMP config MX6DL - bool + bool "i.MX 6DualLite SoC support" select HAS_CAAM select MX6_SMP config MX6Q - bool + bool "i.MX 6Quad SoC support" select HAS_CAAM select MX6_SMP config MX6QDL - bool + bool "i.MX 6Dual and 6Quad SoC support" select HAS_CAAM select MX6_SMP config MX6S - bool + bool "i.MX 6Solo SoC support" select HAS_CAAM config MX6SL - bool + bool "i.MX 6SoloLite SoC support" config MX6SX - bool + bool "i.MX 6SoloX SoC support" select HAS_CAAM select ROM_UNIFIED_SECTIONS config MX6SLL - bool + bool "i.MX 6SLL SoC support" select ROM_UNIFIED_SECTIONS config MX6UL - bool + bool "i.MX 6UltraLite SoC support" select HAS_CAAM select ROM_UNIFIED_SECTIONS select SYSCOUNTER_TIMER select SYS_L2CACHE_OFF +config MX6ULL + bool "i.MX 6ULL SoC support" + select ROM_UNIFIED_SECTIONS + select SYSCOUNTER_TIMER + select SYS_L2CACHE_OFF + +endchoice + config MX6UL_LITESOM bool select DM select DM_THERMAL - select MX6UL select SUPPORT_SPL imply CMD_DM @@ -73,7 +83,6 @@ config MX6UL_OPOS6UL select DM_GPIO select DM_MMC select DM_THERMAL - select MX6UL select SPL_DM if SPL select SPL_OF_CONTROL if SPL select SPL_PINCTRL if SPL @@ -81,12 +90,6 @@ config MX6UL_OPOS6UL select SUPPORT_SPL imply CMD_DM -config MX6ULL - bool - select ROM_UNIFIED_SECTIONS - select SYSCOUNTER_TIMER - select SYS_L2CACHE_OFF - config MX6_OCRAM_256KB bool "Support 256KB OCRAM" depends on MX6D || MX6Q @@ -110,14 +113,14 @@ choice config TARGET_ADVANTECH_DMS_BA16 bool "Advantech dms-ba16" + depends on MX6Q select BOARD_LATE_INIT - select MX6Q imply CMD_SATA config TARGET_APALIS_IMX6 bool "Toradex Apalis iMX6 board" + depends on MX6Q select BOARD_LATE_INIT - select MX6Q select DM select DM_SERIAL select DM_THERMAL @@ -127,8 +130,8 @@ config TARGET_APALIS_IMX6 config TARGET_ARISTAINETOS2 bool "aristainetos2" + depends on MX6DL select BOARD_LATE_INIT - select MX6DL select SYS_I2C_MXC select MXC_UART select FEC_MXC @@ -138,8 +141,8 @@ config TARGET_ARISTAINETOS2 config TARGET_ARISTAINETOS2B bool "Support aristainetos2-revB" + depends on MX6DL select BOARD_LATE_INIT - select MX6DL select SYS_I2C_MXC select MXC_UART select FEC_MXC @@ -149,8 +152,8 @@ config TARGET_ARISTAINETOS2B config TARGET_ARISTAINETOS2BCSL bool "Support aristainetos2-revB CSL" + depends on MX6DL select BOARD_LATE_INIT - select MX6DL select SYS_I2C_MXC select MXC_UART select FEC_MXC @@ -160,8 +163,8 @@ config TARGET_ARISTAINETOS2BCSL config TARGET_ARISTAINETOS2C bool "Support aristainetos2-revC" + depends on MX6DL select BOARD_LATE_INIT - select MX6DL select SYS_I2C_MXC select MXC_UART select FEC_MXC @@ -171,20 +174,20 @@ config TARGET_ARISTAINETOS2C config TARGET_CGTQMX6EVAL bool "cgtqmx6eval" + depends on MX6QDL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6QDL select SUPPORT_SPL imply CMD_DM config TARGET_CM_FX6 bool "CM-FX6" + depends on MX6QDL select BOARD_LATE_INIT select DM select DM_GPIO select DM_SERIAL - select MX6QDL select SUPPORT_SPL imply CMD_DM @@ -199,14 +202,14 @@ config TARGET_COLIBRI_IMX6 config TARGET_COLIBRI_IMX6ULL bool "Toradex Colibri iMX6ULL" + depends on MX6ULL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6ULL config TARGET_DART_6UL bool "Variscite imx6ULL dart(DART-SOM-6ULL)" - select MX6ULL + depends on MX6ULL select DM select DM_ETH select DM_GPIO @@ -218,17 +221,18 @@ config TARGET_DART_6UL config TARGET_DHCOMIMX6 bool "dh_imx6" + depends on MX6QDL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6QDL select SUPPORT_SPL imply CMD_DM imply CMD_SPL config TARGET_DISPLAY5 bool "LWN DISPLAY5 board" + depends on MX6Q select DM select DM_ETH select DM_I2C @@ -246,12 +250,12 @@ config TARGET_EMBESTMX6BOARDS config TARGET_GE_BX50V3 bool "General Electric Bx50v3" + depends on MX6Q select BOARD_LATE_INIT - select MX6Q config TARGET_GW_VENTANA bool "gw_ventana" - select MX6QDL + depends on MX6QDL select SUPPORT_SPL imply CMD_SATA imply CMD_SPL @@ -272,7 +276,7 @@ config TARGET_KOSAGI_NOVENA config TARGET_MCCMON6 bool "mccmon6" - select MX6QDL + depends on MX6QDL select SUPPORT_SPL select DM select DM_GPIO @@ -284,13 +288,13 @@ config TARGET_MCCMON6 config TARGET_MX6CUBOXI bool "Solid-run mx6 boards" + depends on MX6QDL select BOARD_LATE_INIT - select MX6QDL select SUPPORT_SPL config TARGET_MX6LOGICPD bool "Logic PD i.MX6 SOM" - select MX6Q + depends on MX6Q select SUPPORT_SPL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT @@ -305,6 +309,7 @@ config TARGET_MX6LOGICPD config TARGET_MX6MEMCAL bool "mx6memcal" + depends on MX6QDL select SUPPORT_SPL help The mx6memcal board is a virtual board that can be used to validate @@ -316,6 +321,7 @@ config TARGET_MX6QARM2 config TARGET_MX6DL_MAMOJ bool "Support BTicino Mamoj" + depends on MX6QDL select DM select DM_ETH select DM_GPIO @@ -324,7 +330,6 @@ config TARGET_MX6DL_MAMOJ select DM_PMIC select DM_PMIC_PFUZE100 select DM_THERMAL - select MX6QDL select OF_CONTROL select PINCTRL select SPL @@ -348,6 +353,7 @@ config TARGET_MX6DL_MAMOJ config TARGET_MX6Q_ENGICAM bool "Support Engicam i.Core(RQS)" + depends on MX6QDL select BOARD_LATE_INIT select DM select DM_ETH @@ -355,7 +361,6 @@ config TARGET_MX6Q_ENGICAM select DM_I2C select DM_MMC select DM_THERMAL - select MX6QDL select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -367,75 +372,76 @@ config TARGET_MX6Q_ENGICAM config TARGET_MX6SABREAUTO bool "mx6sabreauto" + depends on MX6QDL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6QDL select SUPPORT_SPL imply CMD_DM config TARGET_MX6SABRESD bool "mx6sabresd" + depends on MX6QDL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6QDL select SUPPORT_SPL imply CMD_DM config TARGET_MX6SLEVK bool "mx6slevk" - select MX6SL + depends on MX6SL select SUPPORT_SPL config TARGET_MX6SLLEVK bool "mx6sll evk" + depends on MX6SLL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6SLL imply CMD_DM config TARGET_MX6SXSABRESD bool "mx6sxsabresd" + depends on MX6SX select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6SX select SUPPORT_SPL config TARGET_MX6SXSABREAUTO bool "mx6sxsabreauto" + depends on MX6SX select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6SX imply CMD_DM config TARGET_MX6UL_9X9_EVK bool "mx6ul_9x9_evk" + depends on MX6UL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6UL select SUPPORT_SPL imply CMD_DM config TARGET_MX6UL_14X14_EVK bool "mx6ul_14x14_evk" + depends on MX6UL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6UL select SUPPORT_SPL imply CMD_DM config TARGET_MX6UL_ENGICAM bool "Support Engicam GEAM6UL/Is.IoT" + depends on MX6UL select BOARD_LATE_INIT select DM select DM_ETH @@ -443,7 +449,6 @@ config TARGET_MX6UL_ENGICAM select DM_I2C select DM_MMC select DM_THERMAL - select MX6UL select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -454,15 +459,15 @@ config TARGET_MX6UL_ENGICAM config TARGET_MX6ULL_14X14_EVK bool "Support mx6ull_14x14_evk" + depends on MX6ULL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6ULL imply CMD_DM config TARGET_MYS_6ULX bool "MYiR MYS-6ULX" - select MX6ULL + depends on MX6ULL select DM select DM_ETH select DM_GPIO @@ -474,14 +479,15 @@ config TARGET_MYS_6ULX config TARGET_NITROGEN6X bool "nitrogen6x" + depends on MX6DL || MX6Q || MX6QDL || MX6S imply USB_ETHER_ASIX imply USB_ETHER_MCS7830 imply USB_ETHER_SMSC95XX imply USB_HOST_ETHER - select MX6QDL config TARGET_OPOS6ULDEV bool "Armadeus OPOS6ULDev board" + depends on MX6UL select MX6UL_OPOS6UL config TARGET_OT1200 @@ -491,23 +497,24 @@ config TARGET_OT1200 config TARGET_PICO_IMX6 bool "PICO-IMX6" + depends on MX6QDL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6QDL select SUPPORT_SPL imply CMD_DM config TARGET_PICO_IMX6UL bool "PICO-IMX6UL-EMMC" - select MX6UL + depends on MX6UL select DM select SUPPORT_SPL imply CMD_DM config TARGET_LITEBOARD bool "Grinn liteBoard (i.MX6UL)" + depends on MX6UL select BOARD_LATE_INIT select MX6UL_LITESOM @@ -521,22 +528,22 @@ config TARGET_PLATINUM_TITANIUM config TARGET_PCM058 bool "Phytec PCM058 i.MX6 Quad" + depends on MX6Q select BOARD_LATE_INIT select SUPPORT_SPL - select MX6Q select DM select OF_CONTROL imply CMD_DM config TARGET_PFLA02 bool "Phytec PFLA02 (PhyFlex) i.MX6 Quad" + depends on MX6QDL select BOARD_LATE_INIT - select MX6QDL select SUPPORT_SPL config TARGET_PCL063 bool "PHYTEC PCL063 (phyCORE-i.MX6UL)" - select MX6UL + depends on MX6UL select DM select DM_ETH select DM_GPIO @@ -548,7 +555,7 @@ config TARGET_PCL063 config TARGET_PCL063_ULL bool "PHYTEC PCL063 (phyCORE-i.MX6ULL)" - select MX6ULL + depends on MX6ULL select DM select DM_ETH select DM_GPIO @@ -563,11 +570,12 @@ config TARGET_SECOMX6 config TARGET_SKSIMX6 bool "sks-imx6" + depends on MX6QDL select SUPPORT_SPL config TARGET_SOMLABS_VISIONSOM_6ULL bool "visionsom-6ull" - select MX6ULL + depends on MX6ULL select BOARD_LATE_INIT select DM select DM_ETH @@ -579,12 +587,15 @@ config TARGET_SOMLABS_VISIONSOM_6ULL config TARGET_TBS2910 bool "TBS2910 Matrix ARM mini PC" + depends on MX6Q config TARGET_TITANIUM bool "titanium" + depends on MX6Q config TARGET_KP_IMX6Q_TPC bool "K+P KP_IMX6Q_TPC i.MX6 Quad" + depends on MX6QDL select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM @@ -598,7 +609,6 @@ config TARGET_KP_IMX6Q_TPC select DM_I2C select DM_GPIO select DM_USB - select MX6QDL select SUPPORT_SPL select SPL_SEPARATE_BSS if SPL imply CMD_DM @@ -621,45 +631,45 @@ config TARGET_TQMA6 config TARGET_UDOO bool "udoo" + depends on MX6QDL select BOARD_LATE_INIT - select MX6QDL select SUPPORT_SPL config TARGET_UDOO_NEO bool "UDOO Neo" + depends on MX6SX select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6SX select SUPPORT_SPL imply CMD_DM config TARGET_SOFTING_VINING_2000 bool "Softing VIN|ING 2000" + depends on MX6SX select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6SX select SUPPORT_SPL imply CMD_DM config TARGET_WANDBOARD bool "wandboard" + depends on MX6QDL select BOARD_LATE_INIT - select MX6QDL select SUPPORT_SPL config TARGET_WARP bool "WaRP" + depends on MX6SL select BOARD_LATE_INIT - select MX6SL config TARGET_XPRESS bool "CCV xPress" + depends on MX6UL select BOARD_LATE_INIT select DM select DM_THERMAL - select MX6UL select SUPPORT_SPL imply CMD_DM @@ -681,8 +691,8 @@ config TARGET_ZC5601 config TARGET_BRPPT2 bool "brppt2" + depends on MX6QDL select BOARD_LATE_INIT - select MX6QDL select OF_CONTROL select SPL_OF_LIBFDT select DM diff --git a/arch/arm/mach-imx/mx7/ddr.c b/arch/arm/mach-imx/mx7/ddr.c index 45954ed1ed..cf25569765 100644 --- a/arch/arm/mach-imx/mx7/ddr.c +++ b/arch/arm/mach-imx/mx7/ddr.c @@ -106,6 +106,15 @@ void mx7_dram_cfg(struct ddrc *ddrc_regs_val, struct ddrc_mp *ddrc_mp_val, ~DDR_PHY_CMD_SDLL_CON0_CTRL_RESYNC_MASK, &ddr_phy_regs->cmd_sdll_con0); writel(ddr_phy_regs_val->offset_lp_con0, &ddr_phy_regs->offset_lp_con0); + writel(ddr_phy_regs_val->cmd_deskew_con0, + &ddr_phy_regs->cmd_deskew_con0); + writel(ddr_phy_regs_val->cmd_deskew_con1, + &ddr_phy_regs->cmd_deskew_con1); + writel(ddr_phy_regs_val->cmd_deskew_con2, + &ddr_phy_regs->cmd_deskew_con2); + writel(ddr_phy_regs_val->cmd_deskew_con3, + &ddr_phy_regs->cmd_deskew_con3); + writel(ddr_phy_regs_val->cmd_lvl_con0, &ddr_phy_regs->cmd_lvl_con0); /* calibration */ for (i = 0; i < calib_param->num_val; i++) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 9cb61f5c34..d0385b36e4 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -13,6 +13,7 @@ #include <asm/mach-imx/hab.h> #include <asm/mach-imx/rdc-sema.h> #include <asm/arch/imx-rdc.h> +#include <asm/mach-imx/boot_mode.h> #include <asm/arch/crm_regs.h> #include <dm.h> #include <env.h> @@ -410,6 +411,22 @@ void s_init(void) return; } +#ifndef CONFIG_SPL_BUILD +const struct boot_mode soc_boot_modes[] = { + {"normal", MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)}, + {"primary", MAKE_CFGVAL_PRIMARY_BOOT}, + {"secondary", MAKE_CFGVAL_SECONDARY_BOOT}, + {NULL, 0}, +}; + +int boot_mode_getprisec(void) +{ + struct src *psrc = (struct src *)SRC_BASE_ADDR; + + return !!(readl(&psrc->gpr10) & IMX7_SRC_GPR10_PERSIST_SECONDARY_BOOT); +} +#endif + void reset_misc(void) { #ifndef CONFIG_SPL_BUILD |