[Letux-kernel] [PATCH] boards/gta04: turning on mmc power also on non-spl builds This enables reading the mmc also after loading spl+uboot from nand

H. Nikolaus Schaller hns at goldelico.com
Sun Jan 15 10:51:31 CET 2017


> Am 14.01.2017 um 23:04 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> ---
> board/goldelico/letux-gta04/gta04.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/board/goldelico/letux-gta04/gta04.c b/board/goldelico/letux-gta04/gta04.c
> index 4570025..00f982c 100644
> --- a/board/goldelico/letux-gta04/gta04.c
> +++ b/board/goldelico/letux-gta04/gta04.c
> @@ -626,6 +626,7 @@ int board_mmc_init(bd_t *bis)
> #endif
> 
> #if defined(CONFIG_GENERIC_MMC) && defined(CONFIG_SPL_BUILD)
> +#endif	/* defined(CONFIG_GENERIC_MMC) */
> 
> static void gta04a5(void)
> {
> @@ -644,17 +645,17 @@ static void gta04a5(void)
> void board_mmc_power_init(void)
> {
> 	int pop_mfr = 0, pop_id = 0;
> -
> +#if defined(CONFIG_SPL_BUILD)
> 	identify_nand_chip(&pop_mfr, &pop_id);
> #if 1
> 	printf("pop_mfr = %02x pop_id = %02x\n", pop_mfr, pop_id);
> #endif
> +#endif
> 	twl4030_power_mmc_init(0);
> 
> 	if (get_gta04_revision() == 5)
> 		gta04a5();
> }
> -#endif	/* defined(CONFIG_GENERIC_MMC) */
> 
> #if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
> /* Call usb_stop() before starting the kernel */
> -- 
> 2.1.4

Applied and does what it promises!

Now (together with another config fix) I can flash
and boot from NAND and OneNAND :)

There are still some tiny rough edges. E.g. correctly
booing kernel+DT from NAND.

Or U-Boot and kernel do not agree about ECC mode of NAND,
leading to ECC errors when trying to use fw_printenv.

But generally we are very close to be able to switch to
letux-2016.11 U-Boot for letux-4.10.

BR and thanks for the patch,
Nikolaus



More information about the Letux-kernel mailing list