diff options
author | Tony Lindgren <tony@atomide.com> | 2009-10-19 15:25:28 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-10-19 15:25:28 -0700 |
commit | b0002e0e37de53782580a7587ad26b2131555653 (patch) | |
tree | 21d59f17bbdefc78a8511a8c0d49f2d77562e03c /drivers/video | |
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>
Diffstat (limited to 'drivers/video')
-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 f16e4215422..6f957ceee08 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) /* Select RFBI or bypass mode */ static void enable_rfbi_mode(int enable) { + void __iomem *rfbi_control; u32 l; l = dispc_read_reg(DISPC_CONTROL); @@ -216,9 +217,15 @@ static void enable_rfbi_mode(int enable) dispc_write_reg(DISPC_CONTROL, l); /* Set bypass mode in RFBI module */ - l = __raw_readl(OMAP2_IO_ADDRESS(RFBI_CONTROL)); + rfbi_control = ioremap(RFBI_CONTROL, SZ_1K); + if (!rfbi_control) { + pr_err("Unable to ioremap rfbi_control\n"); + return; + } + l = __raw_readl(rfbi_control); l |= enable ? 0 : (1 << 1); - __raw_writel(l, OMAP2_IO_ADDRESS(RFBI_CONTROL)); + __raw_writel(l, rfbi_control); + iounmap(rfbi_control); } 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, int r; u32 l; struct lcd_panel *panel = fbdev->panel; + void __iomem *ram_fw_base; int tmo = 10000; int skip_init = 0; int i; @@ -1441,7 +1449,13 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, } /* L3 firewall setting: enable access to OCM RAM */ - __raw_writel(0x402000b0, OMAP2_IO_ADDRESS(0x680050a0)); + ram_fw_base = ioremap(0x68005000, SZ_1K); + if (!ram_fw_base) { + dev_err(dispc.fbdev->dev, "Cannot ioremap to enable OCM RAM\n"); + goto fail1; + } + __raw_writel(0x402000b0, ram_fw_base + 0xa0); + iounmap(ram_fw_base); if ((r = alloc_palette_ram()) < 0) goto fail2; |