Commit 2baa7270 authored by Tien Hock, Loh's avatar Tien Hock, Loh
Browse files

driver: synosys: Fix SD MMC not initializing correctly



dw_params.mmc_dev_type should be assigned before mmc_init, otherwise SDMMC
initialization will fail as the initialization treats the device as EMMC
instead of SD.
Signed-off-by: default avatarTien Hock, Loh <tien.hock.loh@intel.com>
parent cc0dcf42
...@@ -426,8 +426,7 @@ void dw_mmc_init(dw_mmc_params_t *params, struct mmc_device_info *info) ...@@ -426,8 +426,7 @@ void dw_mmc_init(dw_mmc_params_t *params, struct mmc_device_info *info)
memcpy(&dw_params, params, sizeof(dw_mmc_params_t)); memcpy(&dw_params, params, sizeof(dw_mmc_params_t));
mmio_write_32(dw_params.reg_base + DWMMC_FIFOTH, 0x103ff); mmio_write_32(dw_params.reg_base + DWMMC_FIFOTH, 0x103ff);
dw_params.mmc_dev_type = info->mmc_dev_type;
mmc_init(&dw_mmc_ops, params->clk_rate, params->bus_width, mmc_init(&dw_mmc_ops, params->clk_rate, params->bus_width,
params->flags, info); params->flags, info);
dw_params.mmc_dev_type = info->mmc_dev_type;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment