diff --git a/plat/hisilicon/hikey/hikey_bl1_setup.c b/plat/hisilicon/hikey/hikey_bl1_setup.c index da6f6a51949f2428b36e94d51aa6fb90368c29de..ec779f46a4f0784e1c903e63110de724d8fc4383 100644 --- a/plat/hisilicon/hikey/hikey_bl1_setup.c +++ b/plat/hisilicon/hikey/hikey_bl1_setup.c @@ -10,11 +10,11 @@ #include <console.h> #include <debug.h> #include <dw_mmc.h> -#include <emmc.h> #include <errno.h> #include <hi6220.h> #include <hikey_def.h> #include <hikey_layout.h> +#include <mmc.h> #include <mmio.h> #include <platform.h> #include <string.h> @@ -97,6 +97,7 @@ void bl1_plat_arch_setup(void) void bl1_platform_setup(void) { dw_mmc_params_t params; + struct mmc_device_info info; assert((HIKEY_BL1_MMC_DESC_BASE >= SRAM_BASE) && ((SRAM_BASE + SRAM_SIZE) >= @@ -115,9 +116,10 @@ void bl1_platform_setup(void) params.desc_base = HIKEY_BL1_MMC_DESC_BASE; params.desc_size = 1 << 20; params.clk_rate = 24 * 1000 * 1000; - params.bus_width = EMMC_BUS_WIDTH_8; - params.flags = EMMC_FLAG_CMD23; - dw_mmc_init(¶ms); + params.bus_width = MMC_BUS_WIDTH_8; + params.flags = MMC_FLAG_CMD23; + info.mmc_dev_type = MMC_IS_EMMC; + dw_mmc_init(¶ms, &info); hikey_io_setup(); } diff --git a/plat/hisilicon/hikey/hikey_bl2_setup.c b/plat/hisilicon/hikey/hikey_bl2_setup.c index a3fc607bb241c5cf2836c59a1109e9c31c192403..aad350bf81ad01533f11ee9796852cff799dabf4 100644 --- a/plat/hisilicon/hikey/hikey_bl2_setup.c +++ b/plat/hisilicon/hikey/hikey_bl2_setup.c @@ -11,11 +11,11 @@ #include <debug.h> #include <desc_image_load.h> #include <dw_mmc.h> -#include <emmc.h> #include <errno.h> #include <hi6220.h> #include <hisi_mcu.h> #include <hisi_sram_map.h> +#include <mmc.h> #include <mmio.h> #ifdef SPD_opteed #include <optee_utils.h> @@ -299,6 +299,7 @@ void bl2_el3_plat_arch_setup(void) void bl2_platform_setup(void) { dw_mmc_params_t params; + struct mmc_device_info info; hikey_sp804_init(); hikey_gpio_init(); @@ -328,9 +329,10 @@ void bl2_platform_setup(void) params.desc_base = HIKEY_MMC_DESC_BASE; params.desc_size = 1 << 20; params.clk_rate = 24 * 1000 * 1000; - params.bus_width = EMMC_BUS_WIDTH_8; - params.flags = EMMC_FLAG_CMD23; - dw_mmc_init(¶ms); + params.bus_width = MMC_BUS_WIDTH_8; + params.flags = MMC_FLAG_CMD23; + info.mmc_dev_type = MMC_IS_EMMC; + dw_mmc_init(¶ms, &info); hikey_io_setup(); } diff --git a/plat/hisilicon/hikey/hikey_io_storage.c b/plat/hisilicon/hikey/hikey_io_storage.c index ef552244887dc11ec6c869fd5f5c2884d5300cd1..3efbefe8c6a1fdb498aefe54df30dd91bd857cd5 100644 --- a/plat/hisilicon/hikey/hikey_io_storage.c +++ b/plat/hisilicon/hikey/hikey_io_storage.c @@ -7,7 +7,6 @@ #include <arch_helpers.h> #include <assert.h> #include <debug.h> -#include <emmc.h> #include <errno.h> #include <firmware_image_package.h> #include <io_block.h> @@ -15,6 +14,7 @@ #include <io_fip.h> #include <io_memmap.h> #include <io_storage.h> +#include <mmc.h> #include <mmio.h> #include <platform_def.h> #include <semihosting.h> /* For FOPEN_MODE_... */ @@ -59,10 +59,10 @@ static const io_block_dev_spec_t emmc_dev_spec = { }, #endif .ops = { - .read = emmc_read_blocks, - .write = emmc_write_blocks, + .read = mmc_read_blocks, + .write = mmc_write_blocks, }, - .block_size = EMMC_BLOCK_SIZE, + .block_size = MMC_BLOCK_SIZE, }; static const io_uuid_spec_t bl31_uuid_spec = { diff --git a/plat/hisilicon/hikey/platform.mk b/plat/hisilicon/hikey/platform.mk index 6a2474e8eb4c0df823ce23237a119822892ef533..ccc7296023d6ef1d35d5f5cbda283c1f888c16c4 100644 --- a/plat/hisilicon/hikey/platform.mk +++ b/plat/hisilicon/hikey/platform.mk @@ -65,7 +65,7 @@ BL1_SOURCES += bl1/tbbr/tbbr_img_desc.c \ drivers/io/io_block.c \ drivers/io/io_fip.c \ drivers/io/io_storage.c \ - drivers/emmc/emmc.c \ + drivers/mmc/mmc.c \ drivers/synopsys/emmc/dw_mmc.c \ lib/cpus/aarch64/cortex_a53.S \ plat/hisilicon/hikey/aarch64/hikey_helpers.S \ @@ -81,7 +81,7 @@ BL2_SOURCES += common/desc_image_load.c \ drivers/io/io_block.c \ drivers/io/io_fip.c \ drivers/io/io_storage.c \ - drivers/emmc/emmc.c \ + drivers/mmc/mmc.c \ drivers/synopsys/emmc/dw_mmc.c \ lib/cpus/aarch64/cortex_a53.S \ plat/hisilicon/hikey/aarch64/hikey_helpers.S \