diff options
author | Juha Yrjola juha.yrjola <at solidboot.com> | 2006-11-11 17:36:01 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2006-12-01 12:00:11 -0500 |
commit | 89783b1e44d3a6fc63be911468e09494ebbba3e3 (patch) | |
tree | eb679b41098874da31498cc86bbcb5dbfecf1bfd /drivers | |
parent | ab7aefd0b38297e6d2d71f43e8f81f9f4a36cdae (diff) |
Replace base with virt_base and phys_base
This patch is part of Juha Yrjola's earlier patch to replace base
with virt_base and phys_base
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar <at> indt.org.br>
Signed-off-by: Juha Yrjola <juha.yrjola <at> solidboot.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/omap.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index 895d4879027d..4bf7df8c4275 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c | |||
@@ -60,8 +60,9 @@ struct mmc_omap_host { | |||
60 | unsigned char id; /* 16xx chips have 2 MMC blocks */ | 60 | unsigned char id; /* 16xx chips have 2 MMC blocks */ |
61 | struct clk * iclk; | 61 | struct clk * iclk; |
62 | struct clk * fclk; | 62 | struct clk * fclk; |
63 | struct resource *res; | 63 | struct resource *mem_res; |
64 | void __iomem *base; | 64 | void __iomem *virt_base; |
65 | unsigned int phys_base; | ||
65 | int irq; | 66 | int irq; |
66 | unsigned char bus_mode; | 67 | unsigned char bus_mode; |
67 | unsigned char hw_bus_mode; | 68 | unsigned char hw_bus_mode; |
@@ -354,9 +355,9 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write) | |||
354 | host->data->bytes_xfered += n; | 355 | host->data->bytes_xfered += n; |
355 | 356 | ||
356 | if (write) { | 357 | if (write) { |
357 | __raw_writesw(host->base + OMAP_MMC_REG_DATA, host->buffer, n); | 358 | __raw_writesw(host->virt_base + OMAP_MMC_REG_DATA, host->buffer, n); |
358 | } else { | 359 | } else { |
359 | __raw_readsw(host->base + OMAP_MMC_REG_DATA, host->buffer, n); | 360 | __raw_readsw(host->virt_base + OMAP_MMC_REG_DATA, host->buffer, n); |
360 | } | 361 | } |
361 | } | 362 | } |
362 | 363 | ||
@@ -581,7 +582,7 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data) | |||
581 | int dst_port = 0; | 582 | int dst_port = 0; |
582 | int sync_dev = 0; | 583 | int sync_dev = 0; |
583 | 584 | ||
584 | data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA; | 585 | data_addr = host->phys_base + OMAP_MMC_REG_DATA; |
585 | frame = data->blksz; | 586 | frame = data->blksz; |
586 | count = sg_dma_len(sg); | 587 | count = sg_dma_len(sg); |
587 | 588 | ||
@@ -1001,7 +1002,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1001 | host->dma_timer.data = (unsigned long) host; | 1002 | host->dma_timer.data = (unsigned long) host; |
1002 | 1003 | ||
1003 | host->id = pdev->id; | 1004 | host->id = pdev->id; |
1004 | host->res = r; | 1005 | host->mem_res = r; |
1005 | host->irq = irq; | 1006 | host->irq = irq; |
1006 | 1007 | ||
1007 | if (cpu_is_omap24xx()) { | 1008 | if (cpu_is_omap24xx()) { |
@@ -1032,7 +1033,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1032 | host->dma_ch = -1; | 1033 | host->dma_ch = -1; |
1033 | 1034 | ||
1034 | host->irq = pdev->resource[1].start; | 1035 | host->irq = pdev->resource[1].start; |
1035 | host->base = (void __iomem*)IO_ADDRESS(r->start); | 1036 | host->phys_base = host->mem_res->start; |
1037 | host->virt_base = (void __iomem *) IO_ADDRESS(host->phys_base); | ||
1036 | 1038 | ||
1037 | mmc->ops = &mmc_omap_ops; | 1039 | mmc->ops = &mmc_omap_ops; |
1038 | mmc->f_min = 400000; | 1040 | mmc->f_min = 400000; |