Commit a7ae1599 authored by Andre Przywara's avatar Andre Przywara Committed by Jagan Teki

sunxi: board: do MMC pinmux setup for DM_MMC builds

Enabling DM_MMC skips the call to mmc_pinmux_setup() in board.c, as this
is supposed to be handled by the MMC driver, using DT information.

However we don't have a pinctrl driver yet, but would still like to keep
the working pinmux setup for our MMC devices. So bring this particular
call back to the DM_MMC code flow.

When booting from either SD card or eMMC, the SPL does the setup for us,
but when booting from SPI or USB we must not skip this part.

Fixes, boot via FEL or SPI flash, where the SPL won't setup the pinmux
Signed-off-by: default avatarAndre Przywara <>
Acked-by: default avatarJagan Teki <>
[jagan: add Fix details on commit message]
Signed-off-by: Jagan Teki's avatarJagan Teki <>
parent c57572eb
......@@ -208,6 +208,10 @@ enum env_location env_get_location(enum env_operation op, int prio)
static void mmc_pinmux_setup(int sdc);
/* add board specific code here */
int board_init(void)
......@@ -269,6 +273,17 @@ int board_init(void)
* Temporary workaround for enabling MMC clocks until a sunxi DM
* pinctrl driver lands.
#endif /* CONFIG_DM_MMC */
/* Uses dm gpio code so do this here and not in i2c_init_board() */
return soft_i2c_board_init();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment