mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 11:28:28 +00:00
mmc: dw_mmc: Override blk_settings with platdata on IDMAC
When use the IDMAC, we can also want to use the pdata->blk-setting. So if pdata->blk-setting is unset, use the default value. if not, use the pdata->blk-setting. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
62ca8034d9
commit
a39e5746e4
@ -1725,13 +1725,6 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
|
||||
else
|
||||
mmc->power_notify_type = MMC_HOST_PW_NOTIFY_NONE;
|
||||
|
||||
#ifdef CONFIG_MMC_DW_IDMAC
|
||||
mmc->max_segs = host->ring_size;
|
||||
mmc->max_blk_size = 65536;
|
||||
mmc->max_blk_count = host->ring_size;
|
||||
mmc->max_seg_size = 0x1000;
|
||||
mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
|
||||
#else
|
||||
if (host->pdata->blk_settings) {
|
||||
mmc->max_segs = host->pdata->blk_settings->max_segs;
|
||||
mmc->max_blk_size = host->pdata->blk_settings->max_blk_size;
|
||||
@ -1740,13 +1733,20 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
|
||||
mmc->max_seg_size = host->pdata->blk_settings->max_seg_size;
|
||||
} else {
|
||||
/* Useful defaults if platform data is unset. */
|
||||
#ifdef CONFIG_MMC_DW_IDMAC
|
||||
mmc->max_segs = host->ring_size;
|
||||
mmc->max_blk_size = 65536;
|
||||
mmc->max_blk_count = host->ring_size;
|
||||
mmc->max_seg_size = 0x1000;
|
||||
mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
|
||||
#else
|
||||
mmc->max_segs = 64;
|
||||
mmc->max_blk_size = 65536; /* BLKSIZ is 16 bits */
|
||||
mmc->max_blk_count = 512;
|
||||
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
|
||||
mmc->max_seg_size = mmc->max_req_size;
|
||||
}
|
||||
#endif /* CONFIG_MMC_DW_IDMAC */
|
||||
}
|
||||
|
||||
host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
|
||||
if (IS_ERR(host->vmmc)) {
|
||||
|
Loading…
Reference in New Issue
Block a user