Migrate from emmc framework to mmc framework.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
#include <console.h>
#include <debug.h>
#include <dw_mmc.h>
-#include <emmc.h>
#include <errno.h>
#include <generic_delay_timer.h>
+#include <mmc.h>
#include <mmio.h>
#include <pl061_gpio.h>
#include <platform.h>
void bl1_platform_setup(void)
{
int i;
+ struct mmc_device_info info;
#if !POPLAR_RECOVERY
dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE);
#endif
#if !POPLAR_RECOVERY
/* SoC-specific emmc register are initialized/configured by bootrom */
INFO("BL1: initializing emmc\n");
- dw_mmc_init(¶ms);
+ info.mmc_dev_type = MMC_IS_EMMC;
+ dw_mmc_init(¶ms, &info);
#endif
plat_io_setup();
#include <debug.h>
#include <desc_image_load.h>
#include <dw_mmc.h>
-#include <emmc.h>
#include <errno.h>
#include <generic_delay_timer.h>
+#include <mmc.h>
#include <mmio.h>
#include <optee_utils.h>
#include <partition/partition.h>
void bl2_early_platform_setup(meminfo_t *mem_layout)
{
+ struct mmc_device_info info;
+
#if !POPLAR_RECOVERY
dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE);
#endif
#if !POPLAR_RECOVERY
/* SoC-specific emmc register are initialized/configured by bootrom */
INFO("BL2: initializing emmc\n");
- dw_mmc_init(¶ms);
+ info.mmc_dev_type = MMC_IS_EMMC;
+ dw_mmc_init(¶ms, &info);
#endif
plat_io_setup();
#define EMMC_DESC_SIZE U(0x00100000) /* 1MB */
#define EMMC_INIT_PARAMS(base) \
- { .bus_width = EMMC_BUS_WIDTH_8, \
+ { .bus_width = MMC_BUS_WIDTH_8, \
.clk_rate = 25 * 1000 * 1000, \
.desc_base = (base), \
.desc_size = EMMC_DESC_SIZE, \
- .flags = EMMC_FLAG_CMD23, \
+ .flags = MMC_FLAG_CMD23, \
.reg_base = REG_BASE_MCI, \
}
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
-#include <emmc.h>
#include <firmware_image_package.h>
#include <io_block.h>
#include <io_driver.h>
#include <io_fip.h>
#include <io_memmap.h>
#include <io_storage.h>
+#include <mmc.h>
#include <mmio.h>
#include <partition/partition.h>
#include <semihosting.h>
.length = POPLAR_EMMC_DATA_SIZE,
},
.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,
};
#else
static const io_dev_connector_t *mmap_dev_con;
BL1_SOURCES += \
lib/cpus/aarch64/cortex_a53.S \
drivers/arm/pl061/pl061_gpio.c \
- drivers/emmc/emmc.c \
+ drivers/mmc/mmc.c \
drivers/synopsys/emmc/dw_mmc.c \
drivers/io/io_storage.c \
drivers/io/io_block.c \
BL2_SOURCES += \
drivers/arm/pl061/pl061_gpio.c \
- drivers/emmc/emmc.c \
+ drivers/mmc/mmc.c \
drivers/synopsys/emmc/dw_mmc.c \
drivers/io/io_storage.c \
drivers/io/io_block.c \