diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2011-02-10 10:09:50 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-03-15 13:49:14 -0400 |
commit | f38f94c6b226f7c6888bedbcadf0ed2ddca7d029 (patch) | |
tree | f37e327fdfb66bfe0960c52a1f01f10b7eab8005 /drivers/mmc | |
parent | 9dc3fb5e4584630c50f7a5405efe9835d321ad44 (diff) |
mmc: sh_mmcif: rename and retype activity variable
The host_sglen is now actually used to keep track of whether DMA
is active or not, so rename and retype it to bool.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 61ad19ecfbf8..e247031f91f7 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c | |||
@@ -169,7 +169,7 @@ struct sh_mmcif_host { | |||
169 | struct dma_chan *chan_rx; | 169 | struct dma_chan *chan_rx; |
170 | struct dma_chan *chan_tx; | 170 | struct dma_chan *chan_tx; |
171 | struct completion dma_complete; | 171 | struct completion dma_complete; |
172 | unsigned int dma_sglen; | 172 | bool dma_active; |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static inline void sh_mmcif_bitset(struct sh_mmcif_host *host, | 175 | static inline void sh_mmcif_bitset(struct sh_mmcif_host *host, |
@@ -216,7 +216,7 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host) | |||
216 | ret = dma_map_sg(chan->device->dev, sg, host->data->sg_len, | 216 | ret = dma_map_sg(chan->device->dev, sg, host->data->sg_len, |
217 | DMA_FROM_DEVICE); | 217 | DMA_FROM_DEVICE); |
218 | if (ret > 0) { | 218 | if (ret > 0) { |
219 | host->dma_sglen = ret; | 219 | host->dma_active = true; |
220 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, | 220 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, |
221 | DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 221 | DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
222 | } | 222 | } |
@@ -241,7 +241,7 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host) | |||
241 | if (ret >= 0) | 241 | if (ret >= 0) |
242 | ret = -EIO; | 242 | ret = -EIO; |
243 | host->chan_rx = NULL; | 243 | host->chan_rx = NULL; |
244 | host->dma_sglen = 0; | 244 | host->dma_active = false; |
245 | dma_release_channel(chan); | 245 | dma_release_channel(chan); |
246 | /* Free the Tx channel too */ | 246 | /* Free the Tx channel too */ |
247 | chan = host->chan_tx; | 247 | chan = host->chan_tx; |
@@ -269,7 +269,7 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host) | |||
269 | ret = dma_map_sg(chan->device->dev, sg, host->data->sg_len, | 269 | ret = dma_map_sg(chan->device->dev, sg, host->data->sg_len, |
270 | DMA_TO_DEVICE); | 270 | DMA_TO_DEVICE); |
271 | if (ret > 0) { | 271 | if (ret > 0) { |
272 | host->dma_sglen = ret; | 272 | host->dma_active = true; |
273 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, | 273 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, |
274 | DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 274 | DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
275 | } | 275 | } |
@@ -294,7 +294,7 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host) | |||
294 | if (ret >= 0) | 294 | if (ret >= 0) |
295 | ret = -EIO; | 295 | ret = -EIO; |
296 | host->chan_tx = NULL; | 296 | host->chan_tx = NULL; |
297 | host->dma_sglen = 0; | 297 | host->dma_active = false; |
298 | dma_release_channel(chan); | 298 | dma_release_channel(chan); |
299 | /* Free the Rx channel too */ | 299 | /* Free the Rx channel too */ |
300 | chan = host->chan_rx; | 300 | chan = host->chan_rx; |
@@ -321,7 +321,7 @@ static bool sh_mmcif_filter(struct dma_chan *chan, void *arg) | |||
321 | static void sh_mmcif_request_dma(struct sh_mmcif_host *host, | 321 | static void sh_mmcif_request_dma(struct sh_mmcif_host *host, |
322 | struct sh_mmcif_plat_data *pdata) | 322 | struct sh_mmcif_plat_data *pdata) |
323 | { | 323 | { |
324 | host->dma_sglen = 0; | 324 | host->dma_active = false; |
325 | 325 | ||
326 | /* We can only either use DMA for both Tx and Rx or not use it at all */ | 326 | /* We can only either use DMA for both Tx and Rx or not use it at all */ |
327 | if (pdata->dma) { | 327 | if (pdata->dma) { |
@@ -368,7 +368,7 @@ static void sh_mmcif_release_dma(struct sh_mmcif_host *host) | |||
368 | dma_release_channel(chan); | 368 | dma_release_channel(chan); |
369 | } | 369 | } |
370 | 370 | ||
371 | host->dma_sglen = 0; | 371 | host->dma_active = false; |
372 | } | 372 | } |
373 | 373 | ||
374 | static void sh_mmcif_clock_control(struct sh_mmcif_host *host, unsigned int clk) | 374 | static void sh_mmcif_clock_control(struct sh_mmcif_host *host, unsigned int clk) |
@@ -757,7 +757,7 @@ static void sh_mmcif_start_cmd(struct sh_mmcif_host *host, | |||
757 | } | 757 | } |
758 | sh_mmcif_get_response(host, cmd); | 758 | sh_mmcif_get_response(host, cmd); |
759 | if (host->data) { | 759 | if (host->data) { |
760 | if (!host->dma_sglen) { | 760 | if (!host->dma_active) { |
761 | ret = sh_mmcif_data_trans(host, mrq, cmd->opcode); | 761 | ret = sh_mmcif_data_trans(host, mrq, cmd->opcode); |
762 | } else { | 762 | } else { |
763 | long time = | 763 | long time = |
@@ -769,7 +769,7 @@ static void sh_mmcif_start_cmd(struct sh_mmcif_host *host, | |||
769 | ret = time; | 769 | ret = time; |
770 | sh_mmcif_bitclr(host, MMCIF_CE_BUF_ACC, | 770 | sh_mmcif_bitclr(host, MMCIF_CE_BUF_ACC, |
771 | BUF_ACC_DMAREN | BUF_ACC_DMAWEN); | 771 | BUF_ACC_DMAREN | BUF_ACC_DMAWEN); |
772 | host->dma_sglen = 0; | 772 | host->dma_active = false; |
773 | } | 773 | } |
774 | if (ret < 0) | 774 | if (ret < 0) |
775 | mrq->data->bytes_xfered = 0; | 775 | mrq->data->bytes_xfered = 0; |