poplar: Enable emmc support
Let bl1 and bl2 have the ability to load images from emmc instead of
dram (mmap).
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c
index c65e29e..827a15c 100644
--- a/plat/hisilicon/poplar/bl1_plat_setup.c
+++ b/plat/hisilicon/poplar/bl1_plat_setup.c
@@ -9,6 +9,8 @@
#include <bl_common.h>
#include <console.h>
#include <debug.h>
+#include <dw_mmc.h>
+#include <emmc.h>
#include <errno.h>
#include <generic_delay_timer.h>
#include <mmio.h>
@@ -71,6 +73,7 @@
void bl1_platform_setup(void)
{
int i;
+ dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE);
generic_delay_timer_init();
@@ -78,6 +81,10 @@
for (i = 0; i < GPIO_MAX; i++)
pl061_gpio_register(GPIO_BASE(i), i);
+ /* SoC-specific emmc register are initialized/configured by bootrom */
+ INFO("BL1: initializing emmc\n");
+ dw_mmc_init(¶ms);
+
plat_io_setup();
}