aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/poplar/bl1_plat_setup.c
diff options
context:
space:
mode:
authorVictor Chong <victor.chong@linaro.org>2018-01-03 01:53:08 +0900
committerVictor Chong <victor.chong@linaro.org>2018-01-22 23:33:07 +0900
commit59149bbe89c45b2fab2f4111a34c26506ef1e158 (patch)
tree215d8fcbe96d1d59f8fbb98e18badfe95b7932e3 /plat/hisilicon/poplar/bl1_plat_setup.c
parent0caaa03bf182429e40d8785e4a9017c443841a52 (diff)
downloadtrusted-firmware-a-59149bbe89c45b2fab2f4111a34c26506ef1e158.tar.gz
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>
Diffstat (limited to 'plat/hisilicon/poplar/bl1_plat_setup.c')
-rw-r--r--plat/hisilicon/poplar/bl1_plat_setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c
index c65e29e97..827a15cea 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_plat_arch_setup(void)
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 @@ void bl1_platform_setup(void)
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(&params);
+
plat_io_setup();
}