diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-14 22:24:42 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-14 22:24:42 +0100 |
commit | b6825d2df55aa7d7341c715b577b73a6a03dc944 (patch) | |
tree | ae4f0f52f4c2ad4e501dd323318486ccdd7fcd93 /drivers/video | |
parent | 6defd90433729c2d795865165cb34d938d8ff07c (diff) | |
parent | aa59e19d05114f9fb7718d6bc8398255476fb4f5 (diff) |
Merge branch 'omap-all' into devel
Conflicts:
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/irq.c
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap/dispc.c | 21 | ||||
-rw-r--r-- | drivers/video/omap/dispc.h | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_h4.c | 4 | ||||
-rw-r--r-- | drivers/video/omap/lcdc.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcdc.h | 2 | ||||
-rw-r--r-- | drivers/video/omap/omapfb_main.c | 15 | ||||
-rw-r--r-- | drivers/video/omap/rfbi.c | 9 | ||||
-rw-r--r-- | drivers/video/omap/sossi.c | 8 |
8 files changed, 44 insertions, 19 deletions
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 6efcf89e7fb..dfb72f5e4c9 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -156,7 +156,7 @@ struct resmap { }; static struct { - u32 base; + void __iomem *base; struct omapfb_mem_desc mem_desc; struct resmap *res_map[DISPC_MEMTYPE_NUM]; @@ -212,9 +212,9 @@ static void enable_rfbi_mode(int enable) dispc_write_reg(DISPC_CONTROL, l); /* Set bypass mode in RFBI module */ - l = __raw_readl(io_p2v(RFBI_CONTROL)); + l = __raw_readl(IO_ADDRESS(RFBI_CONTROL)); l |= enable ? 0 : (1 << 1); - __raw_writel(l, io_p2v(RFBI_CONTROL)); + __raw_writel(l, IO_ADDRESS(RFBI_CONTROL)); } static void set_lcd_data_lines(int data_lines) @@ -1349,14 +1349,19 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, memset(&dispc, 0, sizeof(dispc)); - dispc.base = io_p2v(DISPC_BASE); + dispc.base = ioremap(DISPC_BASE, SZ_1K); + if (!dispc.base) { + dev_err(fbdev->dev, "can't ioremap DISPC\n"); + return -ENOMEM; + } + dispc.fbdev = fbdev; dispc.ext_mode = ext_mode; init_completion(&dispc.frame_done); if ((r = get_dss_clocks()) < 0) - return r; + goto fail0; enable_interface_clocks(1); enable_lcd_clocks(1); @@ -1414,7 +1419,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, } /* L3 firewall setting: enable access to OCM RAM */ - __raw_writel(0x402000b0, io_p2v(0x680050a0)); + __raw_writel(0x402000b0, IO_ADDRESS(0x680050a0)); if ((r = alloc_palette_ram()) < 0) goto fail2; @@ -1464,7 +1469,8 @@ fail1: enable_lcd_clocks(0); enable_interface_clocks(0); put_dss_clocks(); - +fail0: + iounmap(dispc.base); return r; } @@ -1481,6 +1487,7 @@ static void omap_dispc_cleanup(void) free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); enable_interface_clocks(0); put_dss_clocks(); + iounmap(dispc.base); } const struct lcd_ctrl omap2_int_ctrl = { diff --git a/drivers/video/omap/dispc.h b/drivers/video/omap/dispc.h index eb1512b56ce..ef720a78f6d 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); extern int omap_dispc_request_irq(void (*callback)(void *data), void *data); extern void omap_dispc_free_irq(void); +extern const struct lcd_ctrl omap2_int_ctrl; + #endif diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c index 88c19d424ef..6ff56430341 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) return 0; } -struct lcd_panel h4_panel = { +static struct lcd_panel h4_panel = { .name = "h4", .config = OMAP_LCDC_PANEL_TFT, @@ -91,7 +91,7 @@ static int h4_panel_resume(struct platform_device *pdev) return 0; } -struct platform_driver h4_panel_driver = { +static struct platform_driver h4_panel_driver = { .probe = h4_panel_probe, .remove = h4_panel_remove, .suspend = h4_panel_suspend, diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c index 83514f06671..6e2ea751876 100644 --- a/drivers/video/omap/lcdc.c +++ b/drivers/video/omap/lcdc.c @@ -34,6 +34,8 @@ #include <asm/mach-types.h> +#include "lcdc.h" + #define MODULE_NAME "lcdc" #define OMAP_LCDC_BASE 0xfffec000 diff --git a/drivers/video/omap/lcdc.h b/drivers/video/omap/lcdc.h index adb731e5314..845222270db 100644 --- a/drivers/video/omap/lcdc.h +++ b/drivers/video/omap/lcdc.h @@ -4,4 +4,6 @@ int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data); void omap_lcdc_free_dma_callback(void); +extern const struct lcd_ctrl omap1_int_ctrl; + #endif diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 51a138bd113..5a5e407dc45 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -31,11 +31,14 @@ #include <mach/dma.h> #include <mach/omapfb.h> +#include "lcdc.h" +#include "dispc.h" + #define MODULE_NAME "omapfb" static unsigned int def_accel; static unsigned long def_vram[OMAPFB_PLANE_NUM]; -static int def_vram_cnt; +static unsigned int def_vram_cnt; static unsigned long def_vxres; static unsigned long def_vyres; static unsigned int def_rotate; @@ -84,12 +87,10 @@ static struct caps_table_struct color_caps[] = { * LCD panel * --------------------------------------------------------------------------- */ -extern struct lcd_ctrl omap1_int_ctrl; -extern struct lcd_ctrl omap2_int_ctrl; extern struct lcd_ctrl hwa742_ctrl; extern struct lcd_ctrl blizzard_ctrl; -static struct lcd_ctrl *ctrls[] = { +static const struct lcd_ctrl *ctrls[] = { #ifdef CONFIG_ARCH_OMAP1 &omap1_int_ctrl, #else @@ -740,7 +741,7 @@ static int omapfb_update_win(struct fb_info *fbi, int ret; omapfb_rqueue_lock(plane->fbdev); - ret = omapfb_update_window_async(fbi, win, NULL, 0); + ret = omapfb_update_window_async(fbi, win, NULL, NULL); omapfb_rqueue_unlock(plane->fbdev); return ret; @@ -768,7 +769,7 @@ static int omapfb_update_full_screen(struct fb_info *fbi) win.format = 0; omapfb_rqueue_lock(fbdev); - r = fbdev->ctrl->update_window(fbi, &win, NULL, 0); + r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); omapfb_rqueue_unlock(fbdev); return r; @@ -1047,7 +1048,7 @@ void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval) win.height = 2; win.out_width = 2; win.out_height = 2; - fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, 0); + fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, NULL); } omapfb_rqueue_unlock(fbdev); } diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index 4a6f13d3fac..a13c8dcad2a 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c @@ -59,7 +59,7 @@ #define DISPC_CONTROL 0x0040 static struct { - u32 base; + void __iomem *base; void (*lcdc_callback)(void *data); void *lcdc_callback_data; unsigned long l4_khz; @@ -518,7 +518,11 @@ static int rfbi_init(struct omapfb_device *fbdev) int r; rfbi.fbdev = fbdev; - rfbi.base = io_p2v(RFBI_BASE); + rfbi.base = ioremap(RFBI_BASE, SZ_1K); + if (!rfbi.base) { + dev_err(fbdev->dev, "can't ioremap RFBI\n"); + return -ENOMEM; + } if ((r = rfbi_get_clocks()) < 0) return r; @@ -566,6 +570,7 @@ static void rfbi_cleanup(void) { omap_dispc_free_irq(); rfbi_put_clocks(); + iounmap(rfbi.base); } const struct lcd_ctrl_extif omap2_ext_if = { diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c index 6359353c2c6..a7694622024 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) struct clk *dpll1out_ck; int r; - sossi.base = (void __iomem *)IO_ADDRESS(OMAP_SOSSI_BASE); + sossi.base = ioremap(OMAP_SOSSI_BASE, SZ_1K); + if (!sossi.base) { + dev_err(fbdev->dev, "can't ioremap SoSSI\n"); + return -ENOMEM; + } + sossi.fbdev = fbdev; spin_lock_init(&sossi.lock); @@ -665,6 +670,7 @@ static void sossi_cleanup(void) { omap_lcdc_free_dma_callback(); clk_put(sossi.fck); + iounmap(sossi.base); } struct lcd_ctrl_extif omap1_ext_if = { |