Skip to content

Commit

Permalink
ayufan: rock64: add board_init_sdmmc_pwr_en to configure iomux in SPL…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
ayufan committed May 27, 2019
1 parent 05a8e06 commit f324aa8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions arch/arm/mach-rockchip/rk3328-board-spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,34 @@
#include <asm/arch/periph.h>
#include <asm/arch/timer.h>

#define GRF_BASE 0xFF100000

DECLARE_GLOBAL_DATA_PTR;

void board_debug_uart_init(void)
{
}

void board_init_sdmmc_pwr_en(void)
{
struct rk3328_grf_regs * const grf = (void *)GRF_BASE;

printf("board_init_sdmmc_pwr_en\n");

rk_clrsetreg(&grf->com_iomux,
IOMUX_SEL_SDMMC_MASK,
IOMUX_SEL_SDMMC_M1 << IOMUX_SEL_SDMMC_SHIFT);

rk_clrsetreg(&grf->gpio0d_iomux,
GPIO0D6_SEL_MASK,
GPIO0D6_GPIO << GPIO0D6_SEL_SHIFT);

rk_clrsetreg(&grf->gpio1a_iomux,
GPIO1A0_SEL_MASK,
GPIO1A0_CARD_DATA_CLK_CMD_DETN
<< GPIO1A0_SEL_SHIFT);
}

void board_init_f(ulong dummy)
{
struct udevice *dev;
Expand All @@ -36,6 +58,7 @@ void board_init_f(ulong dummy)
}

preloader_console_init();
board_init_sdmmc_pwr_en();

ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
Expand Down

0 comments on commit f324aa8

Please sign in to comment.