diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-01 16:51:50 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-05 12:02:29 -0400 |
commit | e5480b7397f497482083da056f5f300dd4ca43f3 (patch) | |
tree | 061290ebaab25353cc16ef768230e77922059540 /drivers/spi/omap2_mcspi.c | |
parent | f2eda27d1cd218f6544cd9367be47fb01c70a95d (diff) |
[ARM] omap: remove an io_v2p() usage
When omap_udc is also incorporated, this macro will no longer be used.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/spi/omap2_mcspi.c')
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 9d2186fd74aa..576ae29c39d8 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -119,12 +119,14 @@ struct omap2_mcspi { | |||
119 | struct clk *fck; | 119 | struct clk *fck; |
120 | /* Virtual base address of the controller */ | 120 | /* Virtual base address of the controller */ |
121 | void __iomem *base; | 121 | void __iomem *base; |
122 | unsigned long phys; | ||
122 | /* SPI1 has 4 channels, while SPI2 has 2 */ | 123 | /* SPI1 has 4 channels, while SPI2 has 2 */ |
123 | struct omap2_mcspi_dma *dma_channels; | 124 | struct omap2_mcspi_dma *dma_channels; |
124 | }; | 125 | }; |
125 | 126 | ||
126 | struct omap2_mcspi_cs { | 127 | struct omap2_mcspi_cs { |
127 | void __iomem *base; | 128 | void __iomem *base; |
129 | unsigned long phys; | ||
128 | int word_len; | 130 | int word_len; |
129 | }; | 131 | }; |
130 | 132 | ||
@@ -233,7 +235,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) | |||
233 | c = count; | 235 | c = count; |
234 | word_len = cs->word_len; | 236 | word_len = cs->word_len; |
235 | 237 | ||
236 | base = (unsigned long) io_v2p(cs->base); | 238 | base = cs->phys; |
237 | tx_reg = base + OMAP2_MCSPI_TX0; | 239 | tx_reg = base + OMAP2_MCSPI_TX0; |
238 | rx_reg = base + OMAP2_MCSPI_RX0; | 240 | rx_reg = base + OMAP2_MCSPI_RX0; |
239 | rx = xfer->rx_buf; | 241 | rx = xfer->rx_buf; |
@@ -633,6 +635,7 @@ static int omap2_mcspi_setup(struct spi_device *spi) | |||
633 | if (!cs) | 635 | if (!cs) |
634 | return -ENOMEM; | 636 | return -ENOMEM; |
635 | cs->base = mcspi->base + spi->chip_select * 0x14; | 637 | cs->base = mcspi->base + spi->chip_select * 0x14; |
638 | cs->phys = mcspi->phys + spi->chip_select * 0x14; | ||
636 | spi->controller_state = cs; | 639 | spi->controller_state = cs; |
637 | } | 640 | } |
638 | 641 | ||
@@ -1005,6 +1008,7 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev) | |||
1005 | goto err1; | 1008 | goto err1; |
1006 | } | 1009 | } |
1007 | 1010 | ||
1011 | mcspi->phys = r->start; | ||
1008 | mcspi->base = (void __iomem *) io_p2v(r->start); | 1012 | mcspi->base = (void __iomem *) io_p2v(r->start); |
1009 | 1013 | ||
1010 | INIT_WORK(&mcspi->work, omap2_mcspi_work); | 1014 | INIT_WORK(&mcspi->work, omap2_mcspi_work); |