Commit f49bc65a authored by Russell King's avatar Russell King

[MMC] Remove block knowledge from MMCI driver.

Convert MMCI driver to use the scatter list provided by the upper
MMC layers.  This removes all knowledge of struct request from the
MMCI driver.
parent 986394da
...@@ -501,7 +501,7 @@ static int mmci_probe(struct amba_device *dev, void *id) ...@@ -501,7 +501,7 @@ static int mmci_probe(struct amba_device *dev, void *id)
* We can do SGIO * We can do SGIO
*/ */
mmc->max_hw_segs = 16; mmc->max_hw_segs = 16;
mmc->max_phys_segs = 16; mmc->max_phys_segs = NR_SG;
/* /*
* Since we only have a 16-bit data length register, we must * Since we only have a 16-bit data length register, we must
......
...@@ -139,7 +139,6 @@ struct mmci_host { ...@@ -139,7 +139,6 @@ struct mmci_host {
struct timer_list timer; struct timer_list timer;
unsigned int oldstat; unsigned int oldstat;
struct scatterlist sg[NR_SG];
unsigned int sg_len; unsigned int sg_len;
/* pio stuff */ /* pio stuff */
...@@ -150,14 +149,11 @@ struct mmci_host { ...@@ -150,14 +149,11 @@ struct mmci_host {
static inline void mmci_init_sg(struct mmci_host *host, struct mmc_data *data) static inline void mmci_init_sg(struct mmci_host *host, struct mmc_data *data)
{ {
struct scatterlist *sg = host->sg;
struct request *req = data->req;
/* /*
* Ideally, we want the higher levels to pass us a scatter list. * Ideally, we want the higher levels to pass us a scatter list.
*/ */
host->sg_len = blk_rq_map_sg(req->q, req, sg); host->sg_len = data->sg_len;
host->sg_ptr = sg; host->sg_ptr = data->sg;
host->sg_off = 0; host->sg_off = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment