diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-01-12 23:58:46 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-20 04:23:01 -0500 |
commit | e471df0bcaa137f1bbe7c5f75db6ce7566caa292 (patch) | |
tree | 802e9ae6868b0e80a4aa21ac6f46271316e83f4f /drivers/mmc | |
parent | 7445bf9e6f4e5d7755e22c7c9b06f4ae0d6160c6 (diff) |
mmc: tmio: tmio_mmc_data has .alignment_shift
Current .alignment_shift is implemented under tmio_mmc_dma.
It goes to tmio_mmc_data by this patch.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sh_mobile_sdhi.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 1 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc_dma.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 0db2a0a0376b..782d8cf942a7 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c | |||
@@ -241,10 +241,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
241 | dma_priv->slave_id_rx = p->dma_slave_rx; | 241 | dma_priv->slave_id_rx = p->dma_slave_rx; |
242 | } | 242 | } |
243 | } | 243 | } |
244 | |||
245 | dma_priv->alignment_shift = 1; /* 2-byte alignment */ | ||
246 | dma_priv->filter = shdma_chan_filter; | 244 | dma_priv->filter = shdma_chan_filter; |
247 | 245 | ||
246 | mmc_data->alignment_shift = 1; /* 2-byte alignment */ | ||
247 | |||
248 | /* | 248 | /* |
249 | * All SDHI blocks support 2-byte and larger block sizes in 4-bit | 249 | * All SDHI blocks support 2-byte and larger block sizes in 4-bit |
250 | * bus width mode. | 250 | * bus width mode. |
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index a5d30bfa7e64..9482abceeb9c 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -45,7 +45,6 @@ struct tmio_mmc_dma { | |||
45 | void *chan_priv_rx; | 45 | void *chan_priv_rx; |
46 | int slave_id_tx; | 46 | int slave_id_tx; |
47 | int slave_id_rx; | 47 | int slave_id_rx; |
48 | int alignment_shift; | ||
49 | dma_addr_t dma_rx_offset; | 48 | dma_addr_t dma_rx_offset; |
50 | bool (*filter)(struct dma_chan *chan, void *arg); | 49 | bool (*filter)(struct dma_chan *chan, void *arg); |
51 | }; | 50 | }; |
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index ee0131eb078d..d2b02de2f378 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c | |||
@@ -52,7 +52,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) | |||
52 | dma_cookie_t cookie; | 52 | dma_cookie_t cookie; |
53 | int ret, i; | 53 | int ret, i; |
54 | bool aligned = true, multiple = true; | 54 | bool aligned = true, multiple = true; |
55 | unsigned int align = (1 << host->dma->alignment_shift) - 1; | 55 | unsigned int align = (1 << host->pdata->alignment_shift) - 1; |
56 | 56 | ||
57 | for_each_sg(sg, sg_tmp, host->sg_len, i) { | 57 | for_each_sg(sg, sg_tmp, host->sg_len, i) { |
58 | if (sg_tmp->offset & align) | 58 | if (sg_tmp->offset & align) |
@@ -128,7 +128,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) | |||
128 | dma_cookie_t cookie; | 128 | dma_cookie_t cookie; |
129 | int ret, i; | 129 | int ret, i; |
130 | bool aligned = true, multiple = true; | 130 | bool aligned = true, multiple = true; |
131 | unsigned int align = (1 << host->dma->alignment_shift) - 1; | 131 | unsigned int align = (1 << host->pdata->alignment_shift) - 1; |
132 | 132 | ||
133 | for_each_sg(sg, sg_tmp, host->sg_len, i) { | 133 | for_each_sg(sg, sg_tmp, host->sg_len, i) { |
134 | if (sg_tmp->offset & align) | 134 | if (sg_tmp->offset & align) |