Skip to contentSkip to conversation

board: engicam: Fix to remove legacy board/icorem6_rqs

PATCH New Jagan Teki 1 participant 3 messages Jan 5, 2018

Subsystems (5)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

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"

---
 board/engicam/icorem6_rqs/icorem6_rqs.c | 48 ---------------------------------
 1 file changed, 48 deletions(-)
 delete mode 100644 board/engicam/icorem6_rqs/icorem6_rqs.c
board/engicam/icorem6_rqs/icorem6_rqs.c deleted +0 -48
deleted file mode 100644
index a55a754..0000000
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2016 Amarula Solutions B.V.
- * Copyright (C) 2016 Engicam S.r.l.
- * Author: Jagan Teki <[email protected]>
- *
- * 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 */
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/3 arm: i.MX6: nand boot device slection

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

---
 arch/arm/include/asm/mach-imx/sys_proto.h | 1 +
 arch/arm/mach-imx/spl.c                   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/mach-imx/sys_proto.h +1 -0
index 5184e00..92c953b 100644
@@ -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)
arch/arm/mach-imx/spl.c +2 -2
index d0d1b73..2bd9048 100644
@@ -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;
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 3/3 mtd: nand: mxs_nand_spl: Remove nand size print

In reply to Jagan Teki

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.

---
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(-)
drivers/mtd/nand/mxs_nand_spl.c +0 -2
index b6c9208..910f76d 100644
@@ -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;
 }
 
Signature · 1 line
2.7.4