aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:25:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:25:32 -0400
commit8ef50901d3c619127858b7d7f614fcab45e09d6b (patch)
treee75a0d48029d4a5857033e4edf1cd572a5a3fc62 /drivers
parent435263702ef0fc9ffdc6301a71c03b1d9ac0f1e0 (diff)
parent2502991560dc8244dbe10e48473d85722c1e2ec1 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (51 commits) [ARM] 5308/1: Fix Viper ISA IRQ handling [ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error [ARM] 5306/1: pxa: fix build error on CM-X270 [ARM] 5302/1: ARM: OMAP: Revert omap3 WDT changes to avoid merge conflict [ARM] 5305/1: ARM: OMAP: Fix compile of McBSP by removing unnecessary check [ARM] 5301/1: ARM: OMAP: Add missing irq defines ARM: OMAP3: Add default kernel config for OMAP LDP ARM: OMAP3: Add basic board support for OMAP LDP ARM: OMAP3: Defconfig for the Gumstix Overo board (rev 3) ARM: OMAP3: Add support for the Gumstix Overo board (rev 3) ARM: OMAP3: Add Beagle defconfig ARM: OMAP3: Add minimal Beagle board support ARM: OMAP3: Add minimal omap3430 support ARM: OMAP2: Fix sparse, checkpatch warnings in OMAP2/3 IRQ code ARM: OMAP: Fixes to omap_mcbsp_request function ARM: OMAP: Add support for OMAP2430 in McBSP ARM: OMAP: Add support for McBSP devices 3 - 5 on 34xx ARM: OMAP: Allocate McBSP devices dynamically Fix sections for omap-mcbsp platform driver [ARM] S3C24XX: Additional include moves ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/omap-rng.c33
-rw-r--r--drivers/i2c/busses/i2c-omap.c12
-rw-r--r--drivers/input/keyboard/omap-keypad.c2
-rw-r--r--drivers/mmc/host/omap.c11
-rw-r--r--drivers/pcmcia/Makefile3
-rw-r--r--drivers/serial/8250.c23
-rw-r--r--drivers/serial/s3c2400.c2
-rw-r--r--drivers/serial/s3c2410.c2
-rw-r--r--drivers/serial/s3c2412.c2
-rw-r--r--drivers/serial/s3c2440.c2
-rw-r--r--drivers/serial/samsung.c2
-rw-r--r--drivers/spi/omap2_mcspi.c18
-rw-r--r--drivers/spi/omap_uwire.c23
-rw-r--r--drivers/usb/host/ohci-omap.c14
-rw-r--r--drivers/video/omap/dispc.c21
-rw-r--r--drivers/video/omap/dispc.h2
-rw-r--r--drivers/video/omap/lcd_h4.c4
-rw-r--r--drivers/video/omap/lcdc.c2
-rw-r--r--drivers/video/omap/lcdc.h2
-rw-r--r--drivers/video/omap/omapfb_main.c15
-rw-r--r--drivers/video/omap/rfbi.c9
-rw-r--r--drivers/video/omap/sossi.c8
22 files changed, 156 insertions, 56 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 51738bdd834e..d4e7dca06e4f 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -118,18 +118,21 @@ static int __init omap_rng_probe(struct platform_device *pdev)
118 118
119 mem = request_mem_region(res->start, res->end - res->start + 1, 119 mem = request_mem_region(res->start, res->end - res->start + 1,
120 pdev->name); 120 pdev->name);
121 if (mem == NULL) 121 if (mem == NULL) {
122 return -EBUSY; 122 ret = -EBUSY;
123 goto err_region;
124 }
123 125
124 dev_set_drvdata(&pdev->dev, mem); 126 dev_set_drvdata(&pdev->dev, mem);
125 rng_base = (u32 __force __iomem *)io_p2v(res->start); 127 rng_base = ioremap(res->start, res->end - res->start + 1);
128 if (!rng_base) {
129 ret = -ENOMEM;
130 goto err_ioremap;
131 }
126 132
127 ret = hwrng_register(&omap_rng_ops); 133 ret = hwrng_register(&omap_rng_ops);
128 if (ret) { 134 if (ret)
129 release_resource(mem); 135 goto err_register;
130 rng_base = NULL;
131 return ret;
132 }
133 136
134 dev_info(&pdev->dev, "OMAP Random Number Generator ver. %02x\n", 137 dev_info(&pdev->dev, "OMAP Random Number Generator ver. %02x\n",
135 omap_rng_read_reg(RNG_REV_REG)); 138 omap_rng_read_reg(RNG_REV_REG));
@@ -138,6 +141,18 @@ static int __init omap_rng_probe(struct platform_device *pdev)
138 rng_dev = pdev; 141 rng_dev = pdev;
139 142
140 return 0; 143 return 0;
144
145err_register:
146 iounmap(rng_base);
147 rng_base = NULL;
148err_ioremap:
149 release_resource(mem);
150err_region:
151 if (cpu_is_omap24xx()) {
152 clk_disable(rng_ick);
153 clk_put(rng_ick);
154 }
155 return ret;
141} 156}
142 157
143static int __exit omap_rng_remove(struct platform_device *pdev) 158static int __exit omap_rng_remove(struct platform_device *pdev)
@@ -148,6 +163,8 @@ static int __exit omap_rng_remove(struct platform_device *pdev)
148 163
149 omap_rng_write_reg(RNG_MASK_REG, 0x0); 164 omap_rng_write_reg(RNG_MASK_REG, 0x0);
150 165
166 iounmap(rng_base);
167
151 if (cpu_is_omap24xx()) { 168 if (cpu_is_omap24xx()) {
152 clk_disable(rng_ick); 169 clk_disable(rng_ick);
153 clk_put(rng_ick); 170 clk_put(rng_ick);
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index e7eb7bf9ddec..608038d64f81 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -589,11 +589,16 @@ omap_i2c_probe(struct platform_device *pdev)
589 589
590 dev->dev = &pdev->dev; 590 dev->dev = &pdev->dev;
591 dev->irq = irq->start; 591 dev->irq = irq->start;
592 dev->base = (void __iomem *) IO_ADDRESS(mem->start); 592 dev->base = ioremap(mem->start, mem->end - mem->start + 1);
593 if (!dev->base) {
594 r = -ENOMEM;
595 goto err_free_mem;
596 }
597
593 platform_set_drvdata(pdev, dev); 598 platform_set_drvdata(pdev, dev);
594 599
595 if ((r = omap_i2c_get_clocks(dev)) != 0) 600 if ((r = omap_i2c_get_clocks(dev)) != 0)
596 goto err_free_mem; 601 goto err_iounmap;
597 602
598 omap_i2c_unidle(dev); 603 omap_i2c_unidle(dev);
599 604
@@ -640,6 +645,8 @@ err_unuse_clocks:
640 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); 645 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
641 omap_i2c_idle(dev); 646 omap_i2c_idle(dev);
642 omap_i2c_put_clocks(dev); 647 omap_i2c_put_clocks(dev);
648err_iounmap:
649 iounmap(dev->base);
643err_free_mem: 650err_free_mem:
644 platform_set_drvdata(pdev, NULL); 651 platform_set_drvdata(pdev, NULL);
645 kfree(dev); 652 kfree(dev);
@@ -661,6 +668,7 @@ omap_i2c_remove(struct platform_device *pdev)
661 i2c_del_adapter(&dev->adapter); 668 i2c_del_adapter(&dev->adapter);
662 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); 669 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
663 omap_i2c_put_clocks(dev); 670 omap_i2c_put_clocks(dev);
671 iounmap(dev->base);
664 kfree(dev); 672 kfree(dev);
665 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 673 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
666 release_mem_region(mem->start, (mem->end - mem->start) + 1); 674 release_mem_region(mem->start, (mem->end - mem->start) + 1);
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 9a816db7cc25..69e674ecf19a 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -62,7 +62,7 @@ struct omap_kp {
62 unsigned int debounce; 62 unsigned int debounce;
63}; 63};
64 64
65DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0); 65static DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0);
66 66
67static int *keymap; 67static int *keymap;
68static unsigned int *row_gpios; 68static unsigned int *row_gpios;
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index c16028872bbb..1b9fc3c6b875 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -172,7 +172,7 @@ struct mmc_omap_host {
172 struct omap_mmc_platform_data *pdata; 172 struct omap_mmc_platform_data *pdata;
173}; 173};
174 174
175void mmc_omap_fclk_offdelay(struct mmc_omap_slot *slot) 175static void mmc_omap_fclk_offdelay(struct mmc_omap_slot *slot)
176{ 176{
177 unsigned long tick_ns; 177 unsigned long tick_ns;
178 178
@@ -182,7 +182,7 @@ void mmc_omap_fclk_offdelay(struct mmc_omap_slot *slot)
182 } 182 }
183} 183}
184 184
185void mmc_omap_fclk_enable(struct mmc_omap_host *host, unsigned int enable) 185static void mmc_omap_fclk_enable(struct mmc_omap_host *host, unsigned int enable)
186{ 186{
187 unsigned long flags; 187 unsigned long flags;
188 188
@@ -1455,7 +1455,9 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1455 1455
1456 host->irq = irq; 1456 host->irq = irq;
1457 host->phys_base = host->mem_res->start; 1457 host->phys_base = host->mem_res->start;
1458 host->virt_base = (void __iomem *) IO_ADDRESS(host->phys_base); 1458 host->virt_base = ioremap(res->start, res->end - res->start + 1);
1459 if (!host->virt_base)
1460 goto err_ioremap;
1459 1461
1460 if (cpu_is_omap24xx()) { 1462 if (cpu_is_omap24xx()) {
1461 host->iclk = clk_get(&pdev->dev, "mmc_ick"); 1463 host->iclk = clk_get(&pdev->dev, "mmc_ick");
@@ -1510,6 +1512,8 @@ err_free_iclk:
1510 clk_put(host->iclk); 1512 clk_put(host->iclk);
1511 } 1513 }
1512err_free_mmc_host: 1514err_free_mmc_host:
1515 iounmap(host->virt_base);
1516err_ioremap:
1513 kfree(host); 1517 kfree(host);
1514err_free_mem_region: 1518err_free_mem_region:
1515 release_mem_region(res->start, res->end - res->start + 1); 1519 release_mem_region(res->start, res->end - res->start + 1);
@@ -1536,6 +1540,7 @@ static int mmc_omap_remove(struct platform_device *pdev)
1536 if (host->fclk && !IS_ERR(host->fclk)) 1540 if (host->fclk && !IS_ERR(host->fclk))
1537 clk_put(host->fclk); 1541 clk_put(host->fclk);
1538 1542
1543 iounmap(host->virt_base);
1539 release_mem_region(pdev->resource[0].start, 1544 release_mem_region(pdev->resource[0].start,
1540 pdev->resource[0].end - pdev->resource[0].start + 1); 1545 pdev->resource[0].end - pdev->resource[0].start + 1);
1541 1546
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 74d1c906c5d6..b46c60b72708 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -64,10 +64,11 @@ sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o
64sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o 64sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
65 65
66pxa2xx_lubbock_cs-y += pxa2xx_lubbock.o sa1111_generic.o 66pxa2xx_lubbock_cs-y += pxa2xx_lubbock.o sa1111_generic.o
67pxa2xx_cm_x2xx_cs-y += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o
67pxa2xx-obj-$(CONFIG_ARCH_LUBBOCK) += pxa2xx_lubbock_cs.o 68pxa2xx-obj-$(CONFIG_ARCH_LUBBOCK) += pxa2xx_lubbock_cs.o
68pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o 69pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o
69pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o 70pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o
70pxa2xx-obj-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o 71pxa2xx-obj-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x2xx_cs.o
71pxa2xx-obj-$(CONFIG_ARCH_VIPER) += pxa2xx_viper.o 72pxa2xx-obj-$(CONFIG_ARCH_VIPER) += pxa2xx_viper.o
72pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps.o 73pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps.o
73pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o 74pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index d3ca7d32abe0..1528de23a650 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2223,9 +2223,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
2223 serial_outp(up, UART_EFR, efr); 2223 serial_outp(up, UART_EFR, efr);
2224 } 2224 }
2225 2225
2226#ifdef CONFIG_ARCH_OMAP15XX 2226#ifdef CONFIG_ARCH_OMAP
2227 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ 2227 /* Workaround to enable 115200 baud on OMAP1510 internal ports */
2228 if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) { 2228 if (cpu_is_omap1510() && is_omap_port(up)) {
2229 if (baud == 115200) { 2229 if (baud == 115200) {
2230 quot = 1; 2230 quot = 1;
2231 serial_out(up, UART_OMAP_OSC_12M_SEL, 1); 2231 serial_out(up, UART_OMAP_OSC_12M_SEL, 1);
@@ -2278,18 +2278,27 @@ serial8250_pm(struct uart_port *port, unsigned int state,
2278 p->pm(port, state, oldstate); 2278 p->pm(port, state, oldstate);
2279} 2279}
2280 2280
2281static unsigned int serial8250_port_size(struct uart_8250_port *pt)
2282{
2283 if (pt->port.iotype == UPIO_AU)
2284 return 0x100000;
2285#ifdef CONFIG_ARCH_OMAP
2286 if (is_omap_port(pt))
2287 return 0x16 << pt->port.regshift;
2288#endif
2289 return 8 << pt->port.regshift;
2290}
2291
2281/* 2292/*
2282 * Resource handling. 2293 * Resource handling.
2283 */ 2294 */
2284static int serial8250_request_std_resource(struct uart_8250_port *up) 2295static int serial8250_request_std_resource(struct uart_8250_port *up)
2285{ 2296{
2286 unsigned int size = 8 << up->port.regshift; 2297 unsigned int size = serial8250_port_size(up);
2287 int ret = 0; 2298 int ret = 0;
2288 2299
2289 switch (up->port.iotype) { 2300 switch (up->port.iotype) {
2290 case UPIO_AU: 2301 case UPIO_AU:
2291 size = 0x100000;
2292 /* fall thru */
2293 case UPIO_TSI: 2302 case UPIO_TSI:
2294 case UPIO_MEM32: 2303 case UPIO_MEM32:
2295 case UPIO_MEM: 2304 case UPIO_MEM:
@@ -2323,12 +2332,10 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)
2323 2332
2324static void serial8250_release_std_resource(struct uart_8250_port *up) 2333static void serial8250_release_std_resource(struct uart_8250_port *up)
2325{ 2334{
2326 unsigned int size = 8 << up->port.regshift; 2335 unsigned int size = serial8250_port_size(up);
2327 2336
2328 switch (up->port.iotype) { 2337 switch (up->port.iotype) {
2329 case UPIO_AU: 2338 case UPIO_AU:
2330 size = 0x100000;
2331 /* fall thru */
2332 case UPIO_TSI: 2339 case UPIO_TSI:
2333 case UPIO_MEM32: 2340 case UPIO_MEM32:
2334 case UPIO_MEM: 2341 case UPIO_MEM:
diff --git a/drivers/serial/s3c2400.c b/drivers/serial/s3c2400.c
index c8b4266ac35f..4873f2978bd2 100644
--- a/drivers/serial/s3c2400.c
+++ b/drivers/serial/s3c2400.c
@@ -19,7 +19,7 @@
19 19
20#include <mach/hardware.h> 20#include <mach/hardware.h>
21 21
22#include <asm/plat-s3c/regs-serial.h> 22#include <plat/regs-serial.h>
23#include <mach/regs-gpio.h> 23#include <mach/regs-gpio.h>
24 24
25#include "samsung.h" 25#include "samsung.h"
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 40a2531b5541..87c182ef71b8 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -21,7 +21,7 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <plat/regs-serial.h>
25#include <mach/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
diff --git a/drivers/serial/s3c2412.c b/drivers/serial/s3c2412.c
index d0170319c729..fd017b375568 100644
--- a/drivers/serial/s3c2412.c
+++ b/drivers/serial/s3c2412.c
@@ -21,7 +21,7 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <plat/regs-serial.h>
25#include <mach/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
diff --git a/drivers/serial/s3c2440.c b/drivers/serial/s3c2440.c
index d4a2b17b2498..317d239ab740 100644
--- a/drivers/serial/s3c2440.c
+++ b/drivers/serial/s3c2440.c
@@ -21,7 +21,7 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <plat/regs-serial.h>
25#include <mach/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index 5a88b3f9fe9b..1e219d3d0352 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -47,7 +47,7 @@
47 47
48#include <mach/hardware.h> 48#include <mach/hardware.h>
49 49
50#include <asm/plat-s3c/regs-serial.h> 50#include <plat/regs-serial.h>
51#include <mach/regs-gpio.h> 51#include <mach/regs-gpio.h>
52 52
53#include "samsung.h" 53#include "samsung.h"
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 9d2186fd74aa..454a2712e629 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
126struct omap2_mcspi_cs { 127struct 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,7 +1008,13 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
1005 goto err1; 1008 goto err1;
1006 } 1009 }
1007 1010
1008 mcspi->base = (void __iomem *) io_p2v(r->start); 1011 mcspi->phys = r->start;
1012 mcspi->base = ioremap(r->start, r->end - r->start + 1);
1013 if (!mcspi->base) {
1014 dev_dbg(&pdev->dev, "can't ioremap MCSPI\n");
1015 status = -ENOMEM;
1016 goto err1aa;
1017 }
1009 1018
1010 INIT_WORK(&mcspi->work, omap2_mcspi_work); 1019 INIT_WORK(&mcspi->work, omap2_mcspi_work);
1011 1020
@@ -1055,6 +1064,8 @@ err3:
1055err2: 1064err2:
1056 clk_put(mcspi->ick); 1065 clk_put(mcspi->ick);
1057err1a: 1066err1a:
1067 iounmap(mcspi->base);
1068err1aa:
1058 release_mem_region(r->start, (r->end - r->start) + 1); 1069 release_mem_region(r->start, (r->end - r->start) + 1);
1059err1: 1070err1:
1060 spi_master_put(master); 1071 spi_master_put(master);
@@ -1067,6 +1078,7 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
1067 struct omap2_mcspi *mcspi; 1078 struct omap2_mcspi *mcspi;
1068 struct omap2_mcspi_dma *dma_channels; 1079 struct omap2_mcspi_dma *dma_channels;
1069 struct resource *r; 1080 struct resource *r;
1081 void __iomem *base;
1070 1082
1071 master = dev_get_drvdata(&pdev->dev); 1083 master = dev_get_drvdata(&pdev->dev);
1072 mcspi = spi_master_get_devdata(master); 1084 mcspi = spi_master_get_devdata(master);
@@ -1078,7 +1090,9 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
1078 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1090 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1079 release_mem_region(r->start, (r->end - r->start) + 1); 1091 release_mem_region(r->start, (r->end - r->start) + 1);
1080 1092
1093 base = mcspi->base;
1081 spi_unregister_master(master); 1094 spi_unregister_master(master);
1095 iounmap(base);
1082 kfree(dma_channels); 1096 kfree(dma_channels);
1083 1097
1084 return 0; 1098 return 0;
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index 5515eb97d7c5..bab6ff061e91 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -59,7 +59,6 @@
59 * and irqs should show there too... 59 * and irqs should show there too...
60 */ 60 */
61#define UWIRE_BASE_PHYS 0xFFFB3000 61#define UWIRE_BASE_PHYS 0xFFFB3000
62#define UWIRE_BASE ((void *__iomem)IO_ADDRESS(UWIRE_BASE_PHYS))
63 62
64/* uWire Registers: */ 63/* uWire Registers: */
65#define UWIRE_IO_SIZE 0x20 64#define UWIRE_IO_SIZE 0x20
@@ -103,16 +102,21 @@ struct uwire_state {
103}; 102};
104 103
105/* REVISIT compile time constant for idx_shift? */ 104/* REVISIT compile time constant for idx_shift? */
105/*
106 * Or, put it in a structure which is used throughout the driver;
107 * that avoids having to issue two loads for each bit of static data.
108 */
106static unsigned int uwire_idx_shift; 109static unsigned int uwire_idx_shift;
110static void __iomem *uwire_base;
107 111
108static inline void uwire_write_reg(int idx, u16 val) 112static inline void uwire_write_reg(int idx, u16 val)
109{ 113{
110 __raw_writew(val, UWIRE_BASE + (idx << uwire_idx_shift)); 114 __raw_writew(val, uwire_base + (idx << uwire_idx_shift));
111} 115}
112 116
113static inline u16 uwire_read_reg(int idx) 117static inline u16 uwire_read_reg(int idx)
114{ 118{
115 return __raw_readw(UWIRE_BASE + (idx << uwire_idx_shift)); 119 return __raw_readw(uwire_base + (idx << uwire_idx_shift));
116} 120}
117 121
118static inline void omap_uwire_configure_mode(u8 cs, unsigned long flags) 122static inline void omap_uwire_configure_mode(u8 cs, unsigned long flags)
@@ -492,6 +496,14 @@ static int __init uwire_probe(struct platform_device *pdev)
492 return -ENODEV; 496 return -ENODEV;
493 497
494 uwire = spi_master_get_devdata(master); 498 uwire = spi_master_get_devdata(master);
499
500 uwire_base = ioremap(UWIRE_BASE_PHYS, UWIRE_IO_SIZE);
501 if (!uwire_base) {
502 dev_dbg(&pdev->dev, "can't ioremap UWIRE\n");
503 spi_master_put(master);
504 return -ENOMEM;
505 }
506
495 dev_set_drvdata(&pdev->dev, uwire); 507 dev_set_drvdata(&pdev->dev, uwire);
496 508
497 uwire->ck = clk_get(&pdev->dev, "armxor_ck"); 509 uwire->ck = clk_get(&pdev->dev, "armxor_ck");
@@ -520,8 +532,10 @@ static int __init uwire_probe(struct platform_device *pdev)
520 uwire->bitbang.txrx_bufs = uwire_txrx; 532 uwire->bitbang.txrx_bufs = uwire_txrx;
521 533
522 status = spi_bitbang_start(&uwire->bitbang); 534 status = spi_bitbang_start(&uwire->bitbang);
523 if (status < 0) 535 if (status < 0) {
524 uwire_off(uwire); 536 uwire_off(uwire);
537 iounmap(uwire_base);
538 }
525 return status; 539 return status;
526} 540}
527 541
@@ -534,6 +548,7 @@ static int __exit uwire_remove(struct platform_device *pdev)
534 548
535 status = spi_bitbang_stop(&uwire->bitbang); 549 status = spi_bitbang_stop(&uwire->bitbang);
536 uwire_off(uwire); 550 uwire_off(uwire);
551 iounmap(uwire_base);
537 return status; 552 return status;
538} 553}
539 554
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 95b3ec89c126..522185629624 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -344,7 +344,12 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
344 goto err1; 344 goto err1;
345 } 345 }
346 346
347 hcd->regs = (void __iomem *) (int) IO_ADDRESS(hcd->rsrc_start); 347 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
348 if (!hcd->regs) {
349 dev_err(&pdev->dev, "can't ioremap OHCI HCD\n");
350 retval = -ENOMEM;
351 goto err2;
352 }
348 353
349 ohci = hcd_to_ohci(hcd); 354 ohci = hcd_to_ohci(hcd);
350 ohci_hcd_init(ohci); 355 ohci_hcd_init(ohci);
@@ -355,11 +360,11 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
355 irq = platform_get_irq(pdev, 0); 360 irq = platform_get_irq(pdev, 0);
356 if (irq < 0) { 361 if (irq < 0) {
357 retval = -ENXIO; 362 retval = -ENXIO;
358 goto err2; 363 goto err3;
359 } 364 }
360 retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); 365 retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
361 if (retval) 366 if (retval)
362 goto err2; 367 goto err3;
363 368
364 host_initialized = 1; 369 host_initialized = 1;
365 370
@@ -367,6 +372,8 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
367 omap_ohci_clock_power(0); 372 omap_ohci_clock_power(0);
368 373
369 return 0; 374 return 0;
375err3:
376 iounmap(hcd->regs);
370err2: 377err2:
371 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); 378 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
372err1: 379err1:
@@ -401,6 +408,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
401 } 408 }
402 if (machine_is_omap_osk()) 409 if (machine_is_omap_osk())
403 omap_free_gpio(9); 410 omap_free_gpio(9);
411 iounmap(hcd->regs);
404 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); 412 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
405 usb_put_hcd(hcd); 413 usb_put_hcd(hcd);
406 clk_put(usb_dc_ck); 414 clk_put(usb_dc_ck);
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 6efcf89e7fbe..dfb72f5e4c96 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -156,7 +156,7 @@ struct resmap {
156}; 156};
157 157
158static struct { 158static struct {
159 u32 base; 159 void __iomem *base;
160 160
161 struct omapfb_mem_desc mem_desc; 161 struct omapfb_mem_desc mem_desc;
162 struct resmap *res_map[DISPC_MEMTYPE_NUM]; 162 struct resmap *res_map[DISPC_MEMTYPE_NUM];
@@ -212,9 +212,9 @@ static void enable_rfbi_mode(int enable)
212 dispc_write_reg(DISPC_CONTROL, l); 212 dispc_write_reg(DISPC_CONTROL, l);
213 213
214 /* Set bypass mode in RFBI module */ 214 /* Set bypass mode in RFBI module */
215 l = __raw_readl(io_p2v(RFBI_CONTROL)); 215 l = __raw_readl(IO_ADDRESS(RFBI_CONTROL));
216 l |= enable ? 0 : (1 << 1); 216 l |= enable ? 0 : (1 << 1);
217 __raw_writel(l, io_p2v(RFBI_CONTROL)); 217 __raw_writel(l, IO_ADDRESS(RFBI_CONTROL));
218} 218}
219 219
220static void set_lcd_data_lines(int data_lines) 220static void set_lcd_data_lines(int data_lines)
@@ -1349,14 +1349,19 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
1349 1349
1350 memset(&dispc, 0, sizeof(dispc)); 1350 memset(&dispc, 0, sizeof(dispc));
1351 1351
1352 dispc.base = io_p2v(DISPC_BASE); 1352 dispc.base = ioremap(DISPC_BASE, SZ_1K);
1353 if (!dispc.base) {
1354 dev_err(fbdev->dev, "can't ioremap DISPC\n");
1355 return -ENOMEM;
1356 }
1357
1353 dispc.fbdev = fbdev; 1358 dispc.fbdev = fbdev;
1354 dispc.ext_mode = ext_mode; 1359 dispc.ext_mode = ext_mode;
1355 1360
1356 init_completion(&dispc.frame_done); 1361 init_completion(&dispc.frame_done);
1357 1362
1358 if ((r = get_dss_clocks()) < 0) 1363 if ((r = get_dss_clocks()) < 0)
1359 return r; 1364 goto fail0;
1360 1365
1361 enable_interface_clocks(1); 1366 enable_interface_clocks(1);
1362 enable_lcd_clocks(1); 1367 enable_lcd_clocks(1);
@@ -1414,7 +1419,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
1414 } 1419 }
1415 1420
1416 /* L3 firewall setting: enable access to OCM RAM */ 1421 /* L3 firewall setting: enable access to OCM RAM */
1417 __raw_writel(0x402000b0, io_p2v(0x680050a0)); 1422 __raw_writel(0x402000b0, IO_ADDRESS(0x680050a0));
1418 1423
1419 if ((r = alloc_palette_ram()) < 0) 1424 if ((r = alloc_palette_ram()) < 0)
1420 goto fail2; 1425 goto fail2;
@@ -1464,7 +1469,8 @@ fail1:
1464 enable_lcd_clocks(0); 1469 enable_lcd_clocks(0);
1465 enable_interface_clocks(0); 1470 enable_interface_clocks(0);
1466 put_dss_clocks(); 1471 put_dss_clocks();
1467 1472fail0:
1473 iounmap(dispc.base);
1468 return r; 1474 return r;
1469} 1475}
1470 1476
@@ -1481,6 +1487,7 @@ static void omap_dispc_cleanup(void)
1481 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); 1487 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
1482 enable_interface_clocks(0); 1488 enable_interface_clocks(0);
1483 put_dss_clocks(); 1489 put_dss_clocks();
1490 iounmap(dispc.base);
1484} 1491}
1485 1492
1486const struct lcd_ctrl omap2_int_ctrl = { 1493const struct lcd_ctrl omap2_int_ctrl = {
diff --git a/drivers/video/omap/dispc.h b/drivers/video/omap/dispc.h
index eb1512b56ce8..ef720a78f6d5 100644
--- a/drivers/video/omap/dispc.h
+++ b/drivers/video/omap/dispc.h
@@ -40,4 +40,6 @@ extern void omap_dispc_enable_digit_out(int enable);
40extern int omap_dispc_request_irq(void (*callback)(void *data), void *data); 40extern int omap_dispc_request_irq(void (*callback)(void *data), void *data);
41extern void omap_dispc_free_irq(void); 41extern void omap_dispc_free_irq(void);
42 42
43extern const struct lcd_ctrl omap2_int_ctrl;
44
43#endif 45#endif
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c
index 88c19d424ef7..6ff56430341b 100644
--- a/drivers/video/omap/lcd_h4.c
+++ b/drivers/video/omap/lcd_h4.c
@@ -47,7 +47,7 @@ static unsigned long h4_panel_get_caps(struct lcd_panel *panel)
47 return 0; 47 return 0;
48} 48}
49 49
50struct lcd_panel h4_panel = { 50static struct lcd_panel h4_panel = {
51 .name = "h4", 51 .name = "h4",
52 .config = OMAP_LCDC_PANEL_TFT, 52 .config = OMAP_LCDC_PANEL_TFT,
53 53
@@ -91,7 +91,7 @@ static int h4_panel_resume(struct platform_device *pdev)
91 return 0; 91 return 0;
92} 92}
93 93
94struct platform_driver h4_panel_driver = { 94static struct platform_driver h4_panel_driver = {
95 .probe = h4_panel_probe, 95 .probe = h4_panel_probe,
96 .remove = h4_panel_remove, 96 .remove = h4_panel_remove,
97 .suspend = h4_panel_suspend, 97 .suspend = h4_panel_suspend,
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
index 83514f066712..6e2ea7518761 100644
--- a/drivers/video/omap/lcdc.c
+++ b/drivers/video/omap/lcdc.c
@@ -34,6 +34,8 @@
34 34
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
37#include "lcdc.h"
38
37#define MODULE_NAME "lcdc" 39#define MODULE_NAME "lcdc"
38 40
39#define OMAP_LCDC_BASE 0xfffec000 41#define OMAP_LCDC_BASE 0xfffec000
diff --git a/drivers/video/omap/lcdc.h b/drivers/video/omap/lcdc.h
index adb731e5314a..845222270db3 100644
--- a/drivers/video/omap/lcdc.h
+++ b/drivers/video/omap/lcdc.h
@@ -4,4 +4,6 @@
4int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data); 4int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data);
5void omap_lcdc_free_dma_callback(void); 5void omap_lcdc_free_dma_callback(void);
6 6
7extern const struct lcd_ctrl omap1_int_ctrl;
8
7#endif 9#endif
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 51a138bd113c..5a5e407dc45f 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -31,11 +31,14 @@
31#include <mach/dma.h> 31#include <mach/dma.h>
32#include <mach/omapfb.h> 32#include <mach/omapfb.h>
33 33
34#include "lcdc.h"
35#include "dispc.h"
36
34#define MODULE_NAME "omapfb" 37#define MODULE_NAME "omapfb"
35 38
36static unsigned int def_accel; 39static unsigned int def_accel;
37static unsigned long def_vram[OMAPFB_PLANE_NUM]; 40static unsigned long def_vram[OMAPFB_PLANE_NUM];
38static int def_vram_cnt; 41static unsigned int def_vram_cnt;
39static unsigned long def_vxres; 42static unsigned long def_vxres;
40static unsigned long def_vyres; 43static unsigned long def_vyres;
41static unsigned int def_rotate; 44static unsigned int def_rotate;
@@ -84,12 +87,10 @@ static struct caps_table_struct color_caps[] = {
84 * LCD panel 87 * LCD panel
85 * --------------------------------------------------------------------------- 88 * ---------------------------------------------------------------------------
86 */ 89 */
87extern struct lcd_ctrl omap1_int_ctrl;
88extern struct lcd_ctrl omap2_int_ctrl;
89extern struct lcd_ctrl hwa742_ctrl; 90extern struct lcd_ctrl hwa742_ctrl;
90extern struct lcd_ctrl blizzard_ctrl; 91extern struct lcd_ctrl blizzard_ctrl;
91 92
92static struct lcd_ctrl *ctrls[] = { 93static const struct lcd_ctrl *ctrls[] = {
93#ifdef CONFIG_ARCH_OMAP1 94#ifdef CONFIG_ARCH_OMAP1
94 &omap1_int_ctrl, 95 &omap1_int_ctrl,
95#else 96#else
@@ -740,7 +741,7 @@ static int omapfb_update_win(struct fb_info *fbi,
740 int ret; 741 int ret;
741 742
742 omapfb_rqueue_lock(plane->fbdev); 743 omapfb_rqueue_lock(plane->fbdev);
743 ret = omapfb_update_window_async(fbi, win, NULL, 0); 744 ret = omapfb_update_window_async(fbi, win, NULL, NULL);
744 omapfb_rqueue_unlock(plane->fbdev); 745 omapfb_rqueue_unlock(plane->fbdev);
745 746
746 return ret; 747 return ret;
@@ -768,7 +769,7 @@ static int omapfb_update_full_screen(struct fb_info *fbi)
768 win.format = 0; 769 win.format = 0;
769 770
770 omapfb_rqueue_lock(fbdev); 771 omapfb_rqueue_lock(fbdev);
771 r = fbdev->ctrl->update_window(fbi, &win, NULL, 0); 772 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL);
772 omapfb_rqueue_unlock(fbdev); 773 omapfb_rqueue_unlock(fbdev);
773 774
774 return r; 775 return r;
@@ -1047,7 +1048,7 @@ void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval)
1047 win.height = 2; 1048 win.height = 2;
1048 win.out_width = 2; 1049 win.out_width = 2;
1049 win.out_height = 2; 1050 win.out_height = 2;
1050 fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, 0); 1051 fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, NULL);
1051 } 1052 }
1052 omapfb_rqueue_unlock(fbdev); 1053 omapfb_rqueue_unlock(fbdev);
1053} 1054}
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
index 4a6f13d3facf..a13c8dcad2a8 100644
--- a/drivers/video/omap/rfbi.c
+++ b/drivers/video/omap/rfbi.c
@@ -59,7 +59,7 @@
59#define DISPC_CONTROL 0x0040 59#define DISPC_CONTROL 0x0040
60 60
61static struct { 61static struct {
62 u32 base; 62 void __iomem *base;
63 void (*lcdc_callback)(void *data); 63 void (*lcdc_callback)(void *data);
64 void *lcdc_callback_data; 64 void *lcdc_callback_data;
65 unsigned long l4_khz; 65 unsigned long l4_khz;
@@ -518,7 +518,11 @@ static int rfbi_init(struct omapfb_device *fbdev)
518 int r; 518 int r;
519 519
520 rfbi.fbdev = fbdev; 520 rfbi.fbdev = fbdev;
521 rfbi.base = io_p2v(RFBI_BASE); 521 rfbi.base = ioremap(RFBI_BASE, SZ_1K);
522 if (!rfbi.base) {
523 dev_err(fbdev->dev, "can't ioremap RFBI\n");
524 return -ENOMEM;
525 }
522 526
523 if ((r = rfbi_get_clocks()) < 0) 527 if ((r = rfbi_get_clocks()) < 0)
524 return r; 528 return r;
@@ -566,6 +570,7 @@ static void rfbi_cleanup(void)
566{ 570{
567 omap_dispc_free_irq(); 571 omap_dispc_free_irq();
568 rfbi_put_clocks(); 572 rfbi_put_clocks();
573 iounmap(rfbi.base);
569} 574}
570 575
571const struct lcd_ctrl_extif omap2_ext_if = { 576const struct lcd_ctrl_extif omap2_ext_if = {
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
index 6359353c2c67..a76946220249 100644
--- a/drivers/video/omap/sossi.c
+++ b/drivers/video/omap/sossi.c
@@ -574,7 +574,12 @@ static int sossi_init(struct omapfb_device *fbdev)
574 struct clk *dpll1out_ck; 574 struct clk *dpll1out_ck;
575 int r; 575 int r;
576 576
577 sossi.base = (void __iomem *)IO_ADDRESS(OMAP_SOSSI_BASE); 577 sossi.base = ioremap(OMAP_SOSSI_BASE, SZ_1K);
578 if (!sossi.base) {
579 dev_err(fbdev->dev, "can't ioremap SoSSI\n");
580 return -ENOMEM;
581 }
582
578 sossi.fbdev = fbdev; 583 sossi.fbdev = fbdev;
579 spin_lock_init(&sossi.lock); 584 spin_lock_init(&sossi.lock);
580 585
@@ -665,6 +670,7 @@ static void sossi_cleanup(void)
665{ 670{
666 omap_lcdc_free_dma_callback(); 671 omap_lcdc_free_dma_callback();
667 clk_put(sossi.fck); 672 clk_put(sossi.fck);
673 iounmap(sossi.base);
668} 674}
669 675
670struct lcd_ctrl_extif omap1_ext_if = { 676struct lcd_ctrl_extif omap1_ext_if = {