projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace base with virt_base and phys_base
[linux-2.6-block.git]
/
drivers
/
mmc
/
omap.c
diff --git
a/drivers/mmc/omap.c
b/drivers/mmc/omap.c
index 52c9e52e6b781126ece1830f84e329293365ed1d..4bf7df8c42757af0ab57f8e2eff2e93e4ae97104 100644
(file)
--- a/
drivers/mmc/omap.c
+++ b/
drivers/mmc/omap.c
@@
-60,8
+60,9
@@
struct mmc_omap_host {
unsigned char id; /* 16xx chips have 2 MMC blocks */
struct clk * iclk;
struct clk * fclk;
unsigned char id; /* 16xx chips have 2 MMC blocks */
struct clk * iclk;
struct clk * fclk;
- struct resource *res;
- void __iomem *base;
+ struct resource *mem_res;
+ void __iomem *virt_base;
+ unsigned int phys_base;
int irq;
unsigned char bus_mode;
unsigned char hw_bus_mode;
int irq;
unsigned char bus_mode;
unsigned char hw_bus_mode;
@@
-354,9
+355,9
@@
mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
host->data->bytes_xfered += n;
if (write) {
host->data->bytes_xfered += n;
if (write) {
- __raw_writesw(host->base + OMAP_MMC_REG_DATA, host->buffer, n);
+ __raw_writesw(host->
virt_
base + OMAP_MMC_REG_DATA, host->buffer, n);
} else {
} else {
- __raw_readsw(host->base + OMAP_MMC_REG_DATA, host->buffer, n);
+ __raw_readsw(host->
virt_
base + OMAP_MMC_REG_DATA, host->buffer, n);
}
}
}
}
@@
-377,7
+378,7
@@
static inline void mmc_omap_report_irq(u16 status)
}
}
}
}
-static irqreturn_t mmc_omap_irq(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
{
struct mmc_omap_host * host = (struct mmc_omap_host *)dev_id;
u16 status;
{
struct mmc_omap_host * host = (struct mmc_omap_host *)dev_id;
u16 status;
@@
-514,7
+515,7
@@
static irqreturn_t mmc_omap_irq(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
-static irqreturn_t mmc_omap_switch_irq(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t mmc_omap_switch_irq(int irq, void *dev_id)
{
struct mmc_omap_host *host = (struct mmc_omap_host *) dev_id;
{
struct mmc_omap_host *host = (struct mmc_omap_host *) dev_id;
@@
-581,7
+582,7
@@
mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data)
int dst_port = 0;
int sync_dev = 0;
int dst_port = 0;
int sync_dev = 0;
- data_addr =
io_v2p((u32) host->base)
+ OMAP_MMC_REG_DATA;
+ data_addr =
host->phys_base
+ OMAP_MMC_REG_DATA;
frame = data->blksz;
count = sg_dma_len(sg);
frame = data->blksz;
count = sg_dma_len(sg);
@@
-960,7
+961,7
@@
static int mmc_omap_get_ro(struct mmc_host *mmc)
return host->wp_pin && omap_get_gpio_datain(host->wp_pin);
}
return host->wp_pin && omap_get_gpio_datain(host->wp_pin);
}
-static struct mmc_host_ops mmc_omap_ops = {
+static
const
struct mmc_host_ops mmc_omap_ops = {
.request = mmc_omap_request,
.set_ios = mmc_omap_set_ios,
.get_ro = mmc_omap_get_ro,
.request = mmc_omap_request,
.set_ios = mmc_omap_set_ios,
.get_ro = mmc_omap_get_ro,
@@
-1001,7
+1002,7
@@
static int __init mmc_omap_probe(struct platform_device *pdev)
host->dma_timer.data = (unsigned long) host;
host->id = pdev->id;
host->dma_timer.data = (unsigned long) host;
host->id = pdev->id;
- host->res = r;
+ host->
mem_
res = r;
host->irq = irq;
if (cpu_is_omap24xx()) {
host->irq = irq;
if (cpu_is_omap24xx()) {
@@
-1032,7
+1033,8
@@
static int __init mmc_omap_probe(struct platform_device *pdev)
host->dma_ch = -1;
host->irq = pdev->resource[1].start;
host->dma_ch = -1;
host->irq = pdev->resource[1].start;
- host->base = (void __iomem*)IO_ADDRESS(r->start);
+ host->phys_base = host->mem_res->start;
+ host->virt_base = (void __iomem *) IO_ADDRESS(host->phys_base);
mmc->ops = &mmc_omap_ops;
mmc->f_min = 400000;
mmc->ops = &mmc_omap_ops;
mmc->f_min = 400000;