[U-Boot] [PATCH 1/3] board: engicam: Fix to remove legacy board/icorem6_rqs

board/icorem6_rqs/ is forgot to remove while moving common board files together in (sha1: 52aaddd6f415397bb2eae0d68a8cc1c5c4a98bb3) "i..MX6: engicam: Add imx6q/imx6ul boards for existing boards"
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- board/engicam/icorem6_rqs/icorem6_rqs.c | 48 --------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 board/engicam/icorem6_rqs/icorem6_rqs.c
diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c deleted file mode 100644 index a55a754..0000000 --- a/board/engicam/icorem6_rqs/icorem6_rqs.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2016 Amarula Solutions B.V. - * Copyright (C) 2016 Engicam S.r.l. - * Author: Jagan Teki jagan@amarulasolutions.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <asm/arch/sys_proto.h> - -DECLARE_GLOBAL_DATA_PTR; - -#ifdef CONFIG_ENV_IS_IN_MMC -int board_mmc_get_env_dev(int devno) -{ - return devno - 1; -} -#endif - -#ifdef CONFIG_SPL_BUILD -#include <spl.h> - -#ifdef CONFIG_ENV_IS_IN_MMC -void board_boot_order(u32 *spl_boot_list) -{ - u32 bmode = imx6_src_get_boot_mode(); - u8 boot_dev = BOOT_DEVICE_MMC1; - - switch ((bmode & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) { - case IMX6_BMODE_SD: - case IMX6_BMODE_ESD: - /* SD/eSD - BOOT_DEVICE_MMC1 */ - break; - case IMX6_BMODE_MMC: - case IMX6_BMODE_EMMC: - /* MMC/eMMC */ - boot_dev = BOOT_DEVICE_MMC2; - break; - default: - /* Default - BOOT_DEVICE_MMC1 */ - printf("Wrong board boot order\n"); - break; - } - - spl_boot_list[0] = boot_dev; -} -#endif -#endif /* CONFIG_SPL_BUILD */

from i.MX6QDRM.pdf, Table 8-7 nand boot device selection on i.MX6QDL not only depends on bit 7 of BOOT_CFG1 but other three bits are don't care like BOOT_CFG1[7:4] should be 1xxx
So, check BOOT_CFG1[7:4] values from 8 to 0xf for nand boot device selection in spl_boot_device
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- arch/arm/include/asm/mach-imx/sys_proto.h | 1 + arch/arm/mach-imx/spl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index 5184e00..92c953b 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -82,6 +82,7 @@ enum imx6_bmode { IMX6_BMODE_MMC, IMX6_BMODE_EMMC, IMX6_BMODE_NAND, + IMX6_BMODE_NANDxxx = 0xf, };
static inline u8 imx6_is_bmode_from_gpr9(void) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index d0d1b73..2bd9048 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -90,8 +90,8 @@ u32 spl_boot_device(void) case IMX6_BMODE_MMC: case IMX6_BMODE_EMMC: return BOOT_DEVICE_MMC1; - /* NAND Flash: 8.5.2, Table 8-10 */ - case IMX6_BMODE_NAND: + /* NAND Flash: 8.5.2, Table 8-10, Table 8-7 CFG1[7:4] = 1xxx */ + case IMX6_BMODE_NAND ... IMX6_BMODE_NANDxxx: return BOOT_DEVICE_NAND; } return BOOT_DEVICE_NONE;

It is not much needed to print nand size in SPL during nand boot, and most of nand spl drivers doesn't print the same.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Note: currently it is showing : 512 MiB can be fixed as NAND: 512 MiB
but I didn't see any need of showing nand size here.
drivers/mtd/nand/mxs_nand_spl.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/mtd/nand/mxs_nand_spl.c b/drivers/mtd/nand/mxs_nand_spl.c index b6c9208..910f76d 100644 --- a/drivers/mtd/nand/mxs_nand_spl.c +++ b/drivers/mtd/nand/mxs_nand_spl.c @@ -153,7 +153,6 @@ static int mxs_nand_init(void) nand_chip.numchips = 1;
/* identify flash device */ - puts(": "); if (mxs_flash_ident(mtd)) { printf("Failed to identify\n"); return -1; @@ -167,7 +166,6 @@ static int mxs_nand_init(void) mtd->size = nand_chip.chipsize; nand_chip.scan_bbt(mtd);
- printf("%llu MiB\n", (mtd->size / (1024 * 1024))); return 0; }
participants (1)
-
Jagan Teki