mmc: tmio: bus_shift become tmio_mmc_data member
.bus_shift is used to 16/32bit register access offset calculation on tmio driver. tmio_mmc_xxx is used from Toshiba/Renesas now, but this bus_shift value depends on HW IP. This patch moves .bus_shift to tmio_mmc_data member and sets it on each driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:

committed by
Chris Ball

parent
05fae4a755
commit
3b159a6e95
@@ -133,10 +133,15 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
|
||||
struct tmio_mmc_data *mmc_data;
|
||||
struct sh_mobile_sdhi_info *p = pdev->dev.platform_data;
|
||||
struct tmio_mmc_host *host;
|
||||
struct resource *res;
|
||||
int irq, ret, i = 0;
|
||||
bool multiplexed_isr = true;
|
||||
struct tmio_mmc_dma *dma_priv;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(struct sh_mobile_sdhi), GFP_KERNEL);
|
||||
if (priv == NULL) {
|
||||
dev_err(&pdev->dev, "kzalloc failed\n");
|
||||
@@ -206,6 +211,9 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
|
||||
mmc_data->flags |= of_data->tmio_flags;
|
||||
}
|
||||
|
||||
/* SD control register space size is 0x100, 0x200 for bus_shift=1 */
|
||||
mmc_data->bus_shift = resource_size(res) >> 9;
|
||||
|
||||
ret = tmio_mmc_host_probe(&host, pdev, mmc_data);
|
||||
if (ret < 0)
|
||||
goto eprobe;
|
||||
|
Reference in New Issue
Block a user