aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-02-17 22:07:29 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:41:56 -0400
commit4f95bf404870cccb08ff6d59e1986d43aee5efb6 (patch)
treeb403dede853d5999b50167c83f8d27fbaaae0f2f /drivers/mmc
parentfcd67979d3808afbe357048d928470ef9b37cd4b (diff)
mmc: Use mfd_data instead of driver_data for tmio-mmc
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes tmio-mmc only; mfd drivers with other cells are not modified. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 67c9d0f595ef..f8cb06b8ed65 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -303,8 +303,7 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock)
303 303
304static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) 304static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
305{ 305{
306 struct mfd_cell *cell = mfd_get_cell(host->pdev); 306 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
307 struct tmio_mmc_data *pdata = cell->driver_data;
308 307
309 /* 308 /*
310 * Testing on sh-mobile showed that SDIO IRQs are unmasked when 309 * Testing on sh-mobile showed that SDIO IRQs are unmasked when
@@ -327,8 +326,7 @@ static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
327 326
328static void tmio_mmc_clk_start(struct tmio_mmc_host *host) 327static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
329{ 328{
330 struct mfd_cell *cell = mfd_get_cell(host->pdev); 329 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
331 struct tmio_mmc_data *pdata = cell->driver_data;
332 330
333 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | 331 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 |
334 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); 332 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
@@ -669,8 +667,7 @@ out:
669static irqreturn_t tmio_mmc_irq(int irq, void *devid) 667static irqreturn_t tmio_mmc_irq(int irq, void *devid)
670{ 668{
671 struct tmio_mmc_host *host = devid; 669 struct tmio_mmc_host *host = devid;
672 struct mfd_cell *cell = mfd_get_cell(host->pdev); 670 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
673 struct tmio_mmc_data *pdata = cell->driver_data;
674 unsigned int ireg, irq_mask, status; 671 unsigned int ireg, irq_mask, status;
675 unsigned int sdio_ireg, sdio_irq_mask, sdio_status; 672 unsigned int sdio_ireg, sdio_irq_mask, sdio_status;
676 673
@@ -799,8 +796,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
799 struct scatterlist *sg = host->sg_ptr, *sg_tmp; 796 struct scatterlist *sg = host->sg_ptr, *sg_tmp;
800 struct dma_async_tx_descriptor *desc = NULL; 797 struct dma_async_tx_descriptor *desc = NULL;
801 struct dma_chan *chan = host->chan_rx; 798 struct dma_chan *chan = host->chan_rx;
802 struct mfd_cell *cell = mfd_get_cell(host->pdev); 799 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
803 struct tmio_mmc_data *pdata = cell->driver_data;
804 dma_cookie_t cookie; 800 dma_cookie_t cookie;
805 int ret, i; 801 int ret, i;
806 bool aligned = true, multiple = true; 802 bool aligned = true, multiple = true;
@@ -869,8 +865,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
869 struct scatterlist *sg = host->sg_ptr, *sg_tmp; 865 struct scatterlist *sg = host->sg_ptr, *sg_tmp;
870 struct dma_async_tx_descriptor *desc = NULL; 866 struct dma_async_tx_descriptor *desc = NULL;
871 struct dma_chan *chan = host->chan_tx; 867 struct dma_chan *chan = host->chan_tx;
872 struct mfd_cell *cell = mfd_get_cell(host->pdev); 868 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
873 struct tmio_mmc_data *pdata = cell->driver_data;
874 dma_cookie_t cookie; 869 dma_cookie_t cookie;
875 int ret, i; 870 int ret, i;
876 bool aligned = true, multiple = true; 871 bool aligned = true, multiple = true;
@@ -1063,8 +1058,7 @@ static void tmio_mmc_release_dma(struct tmio_mmc_host *host)
1063static int tmio_mmc_start_data(struct tmio_mmc_host *host, 1058static int tmio_mmc_start_data(struct tmio_mmc_host *host,
1064 struct mmc_data *data) 1059 struct mmc_data *data)
1065{ 1060{
1066 struct mfd_cell *cell = mfd_get_cell(host->pdev); 1061 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
1067 struct tmio_mmc_data *pdata = cell->driver_data;
1068 1062
1069 pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n", 1063 pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n",
1070 data->blksz, data->blocks); 1064 data->blksz, data->blocks);
@@ -1169,8 +1163,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
1169static int tmio_mmc_get_ro(struct mmc_host *mmc) 1163static int tmio_mmc_get_ro(struct mmc_host *mmc)
1170{ 1164{
1171 struct tmio_mmc_host *host = mmc_priv(mmc); 1165 struct tmio_mmc_host *host = mmc_priv(mmc);
1172 struct mfd_cell *cell = mfd_get_cell(host->pdev); 1166 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
1173 struct tmio_mmc_data *pdata = cell->driver_data;
1174 1167
1175 return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || 1168 return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
1176 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1; 1169 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1;
@@ -1179,8 +1172,7 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
1179static int tmio_mmc_get_cd(struct mmc_host *mmc) 1172static int tmio_mmc_get_cd(struct mmc_host *mmc)
1180{ 1173{
1181 struct tmio_mmc_host *host = mmc_priv(mmc); 1174 struct tmio_mmc_host *host = mmc_priv(mmc);
1182 struct mfd_cell *cell = mfd_get_cell(host->pdev); 1175 struct tmio_mmc_data *pdata = mfd_get_data(host->pdev);
1183 struct tmio_mmc_data *pdata = cell->driver_data;
1184 1176
1185 if (!pdata->get_cd) 1177 if (!pdata->get_cd)
1186 return -ENOSYS; 1178 return -ENOSYS;
@@ -1252,7 +1244,7 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
1252 if (!res_ctl) 1244 if (!res_ctl)
1253 goto out; 1245 goto out;
1254 1246
1255 pdata = cell->driver_data; 1247 pdata = mfd_get_data(dev);
1256 if (!pdata || !pdata->hclk) 1248 if (!pdata || !pdata->hclk)
1257 goto out; 1249 goto out;
1258 1250