diff options
author | Tom Rini <trini@konsulko.com> | 2017-12-29 09:27:04 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-12-29 09:27:04 -0500 |
commit | 3bb6dc04a9b78c3db7c130bea7e817d77add275e (patch) | |
tree | f8c48e1764ce3996e9569c93bd4463421a5ded53 /board/freescale | |
parent | 8e5f0497c8a8ab9bd7314737f2edb4711733b6fe (diff) | |
parent | d6abd1d53992cf863019aed1251924c45893a46b (diff) |
Merge git://git.denx.de/u-boot-imx
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/mx6sabreauto/mx6sabreauto.c | 47 | ||||
-rw-r--r-- | board/freescale/mx6slevk/imximage.cfg | 9 | ||||
-rw-r--r-- | board/freescale/mx6sxsabresd/mx6sxsabresd.c | 16 |
3 files changed, 26 insertions, 46 deletions
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index bdeb5f7667..9c83e350d4 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -397,39 +397,9 @@ int board_eth_init(bd_t *bis) return cpu_eth_init(bis); } -#define BOARD_REV_B 0x200 -#define BOARD_REV_A 0x100 - -static int mx6sabre_rev(void) -{ - /* - * Get Board ID information from OCOTP_GP1[15:8] - * i.MX6Q ARD RevA: 0x01 - * i.MX6Q ARD RevB: 0x02 - */ - struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; - struct fuse_bank *bank = &ocotp->bank[4]; - struct fuse_bank4_regs *fuse = - (struct fuse_bank4_regs *)bank->fuse_regs; - int reg = readl(&fuse->gp1); - int ret; - - switch (reg >> 8 & 0x0F) { - case 0x02: - ret = BOARD_REV_B; - break; - case 0x01: - default: - ret = BOARD_REV_A; - break; - } - - return ret; -} - u32 get_board_rev(void) { - int rev = mx6sabre_rev(); + int rev = nxp_board_rev(); return (get_cpu_rev() & ~(0xF << 8)) | rev; } @@ -703,20 +673,7 @@ int board_late_init(void) int checkboard(void) { - int rev = mx6sabre_rev(); - char *revname; - - switch (rev) { - case BOARD_REV_B: - revname = "B"; - break; - case BOARD_REV_A: - default: - revname = "A"; - break; - } - - printf("Board: MX6Q-Sabreauto rev%s\n", revname); + printf("Board: MX6Q-Sabreauto rev%c\n", nxp_board_rev_string()); return 0; } diff --git a/board/freescale/mx6slevk/imximage.cfg b/board/freescale/mx6slevk/imximage.cfg index 024de9cdb4..9722eb5d7e 100644 --- a/board/freescale/mx6slevk/imximage.cfg +++ b/board/freescale/mx6slevk/imximage.cfg @@ -8,6 +8,8 @@ * * The syntax is taken as close as possible with the kwbimage */ +#define __ASSEMBLY__ +#include <config.h> /* image version */ @@ -21,6 +23,13 @@ IMAGE_VERSION 2 BOOT_FROM sd /* + * Secure boot support + */ +#ifdef CONFIG_SECURE_BOOT +CSF CONFIG_CSF_SIZE +#endif + +/* * Device Configuration Data (DCD) * * Each entry must have the format: diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 2aeef61ffd..3ad2140314 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -540,9 +540,23 @@ int board_init(void) return 0; } +static bool is_reva(void) +{ + return (nxp_board_rev() == 1); +} + +int board_late_init(void) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + if (is_reva()) + env_set("board_rev", "REVA"); +#endif + return 0; +} + int checkboard(void) { - puts("Board: MX6SX SABRE SDB\n"); + printf("Board: MX6SX SABRE SDB rev%c\n", nxp_board_rev_string()); return 0; } |