diff options
author | Tony Lindgren <tony@atomide.com> | 2009-10-19 18:25:28 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-10-19 18:25:28 -0400 |
commit | b0002e0e37de53782580a7587ad26b2131555653 (patch) | |
tree | 21d59f17bbdefc78a8511a8c0d49f2d77562e03c | |
parent | e4e7a13af2007edf215ad1164fc8d94c366cb72c (diff) |
omap: Use ioremap in dispc.c
Use ioremap in dispc.c
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | drivers/video/omap/dispc.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index f16e42154229..6f957ceee084 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -204,6 +204,7 @@ static u32 inline dispc_read_reg(int idx) | |||
204 | /* Select RFBI or bypass mode */ | 204 | /* Select RFBI or bypass mode */ |
205 | static void enable_rfbi_mode(int enable) | 205 | static void enable_rfbi_mode(int enable) |
206 | { | 206 | { |
207 | void __iomem *rfbi_control; | ||
207 | u32 l; | 208 | u32 l; |
208 | 209 | ||
209 | l = dispc_read_reg(DISPC_CONTROL); | 210 | l = dispc_read_reg(DISPC_CONTROL); |
@@ -216,9 +217,15 @@ static void enable_rfbi_mode(int enable) | |||
216 | dispc_write_reg(DISPC_CONTROL, l); | 217 | dispc_write_reg(DISPC_CONTROL, l); |
217 | 218 | ||
218 | /* Set bypass mode in RFBI module */ | 219 | /* Set bypass mode in RFBI module */ |
219 | l = __raw_readl(OMAP2_IO_ADDRESS(RFBI_CONTROL)); | 220 | rfbi_control = ioremap(RFBI_CONTROL, SZ_1K); |
221 | if (!rfbi_control) { | ||
222 | pr_err("Unable to ioremap rfbi_control\n"); | ||
223 | return; | ||
224 | } | ||
225 | l = __raw_readl(rfbi_control); | ||
220 | l |= enable ? 0 : (1 << 1); | 226 | l |= enable ? 0 : (1 << 1); |
221 | __raw_writel(l, OMAP2_IO_ADDRESS(RFBI_CONTROL)); | 227 | __raw_writel(l, rfbi_control); |
228 | iounmap(rfbi_control); | ||
222 | } | 229 | } |
223 | 230 | ||
224 | static void set_lcd_data_lines(int data_lines) | 231 | static void set_lcd_data_lines(int data_lines) |
@@ -1367,6 +1374,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1367 | int r; | 1374 | int r; |
1368 | u32 l; | 1375 | u32 l; |
1369 | struct lcd_panel *panel = fbdev->panel; | 1376 | struct lcd_panel *panel = fbdev->panel; |
1377 | void __iomem *ram_fw_base; | ||
1370 | int tmo = 10000; | 1378 | int tmo = 10000; |
1371 | int skip_init = 0; | 1379 | int skip_init = 0; |
1372 | int i; | 1380 | int i; |
@@ -1441,7 +1449,13 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1441 | } | 1449 | } |
1442 | 1450 | ||
1443 | /* L3 firewall setting: enable access to OCM RAM */ | 1451 | /* L3 firewall setting: enable access to OCM RAM */ |
1444 | __raw_writel(0x402000b0, OMAP2_IO_ADDRESS(0x680050a0)); | 1452 | ram_fw_base = ioremap(0x68005000, SZ_1K); |
1453 | if (!ram_fw_base) { | ||
1454 | dev_err(dispc.fbdev->dev, "Cannot ioremap to enable OCM RAM\n"); | ||
1455 | goto fail1; | ||
1456 | } | ||
1457 | __raw_writel(0x402000b0, ram_fw_base + 0xa0); | ||
1458 | iounmap(ram_fw_base); | ||
1445 | 1459 | ||
1446 | if ((r = alloc_palette_ram()) < 0) | 1460 | if ((r = alloc_palette_ram()) < 0) |
1447 | goto fail2; | 1461 | goto fail2; |