[U-Boot] [PATCH 1/2] igep00x0: disable environment

ISEE's U-Boot and Linux are using 1bit ECC scheme, while we switched to 8bit ECC to fullfill flash specification requirements. However when trying to run U-Boot on board with 1bit ECC'd data on flash, UBI code takes several minutes to pass scan as reading of every block ends with ecc error (which is also printed on console). So, until proper solution is developed, disable environment alltogether.
Signed-off-by: Ladislav Michl ladis@linux-mips.org --- include/configs/omap3_igep00x0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index ac0df3e08b..70d337e6f1 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h @@ -140,7 +140,7 @@ #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000
/* environment organization */ -#define CONFIG_ENV_IS_IN_UBI 1 +#define CONFIG_ENV_IS_NOWHERE 1 #define CONFIG_ENV_UBI_PART "UBI" #define CONFIG_ENV_UBI_VOLUME "config" #define CONFIG_ENV_UBI_VOLUME_REDUND "config_r"

Leave only detected flash type enabled in FTD as otherwise GPMC CS is claimed (and never freed) by Linux, causing 'concurent' flash type not to be probed.
Signed-off-by: Ladislav Michl ladis@linux-mips.org --- board/isee/igep00x0/igep00x0.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 65cc7dfdec..e032f313a6 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -214,6 +214,20 @@ void board_mmc_power_init(void) #endif
#ifdef CONFIG_OF_BOARD_SETUP +static int ft_enable_by_compatible(void *blob, char *compat, int enable) +{ + int off = fdt_node_offset_by_compatible(blob, -1, compat); + if (off < 0) + return off; + + if (enable) + fdt_status_okay(blob, off); + else + fdt_status_disabled(blob, off); + + return 0; +} + int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FDT_FIXUP_PARTITIONS @@ -224,6 +238,11 @@ int ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); #endif + ft_enable_by_compatible(blob, "ti,omap2-nand", + gpmc_cs0_flash == MTD_DEV_TYPE_NAND); + ft_enable_by_compatible(blob, "ti,omap2-onenand", + gpmc_cs0_flash == MTD_DEV_TYPE_ONENAND); + return 0; } #endif

On Sun, Feb 19, 2017 at 12:24:49AM +0100, Ladislav Michl wrote:
Leave only detected flash type enabled in FTD as otherwise GPMC CS is claimed (and never freed) by Linux, causing 'concurent' flash type not to be probed.
Signed-off-by: Ladislav Michl ladis@linux-mips.org
Applied to u-boot/master, thanks!

On Sun, Feb 19, 2017 at 12:23:39AM +0100, Ladislav Michl wrote:
ISEE's U-Boot and Linux are using 1bit ECC scheme, while we switched to 8bit ECC to fullfill flash specification requirements. However when trying to run U-Boot on board with 1bit ECC'd data on flash, UBI code takes several minutes to pass scan as reading of every block ends with ecc error (which is also printed on console). So, until proper solution is developed, disable environment alltogether.
Signed-off-by: Ladislav Michl ladis@linux-mips.org
Applied to u-boot/master, thanks!
participants (2)
-
Ladislav Michl
-
Tom Rini