summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/omap/lcdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/omap/lcdc.c')
-rw-r--r--drivers/video/fbdev/omap/lcdc.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/video/fbdev/omap/lcdc.c b/drivers/video/fbdev/omap/lcdc.c
index fa73acfc1371..53ca58ec5eed 100644
--- a/drivers/video/fbdev/omap/lcdc.c
+++ b/drivers/video/fbdev/omap/lcdc.c
@@ -5,8 +5,10 @@
* Copyright (C) 2004 Nokia Corporation
* Author: Imre Deak <imre.deak@nokia.com>
*/
+
#include <linux/module.h>
#include <linux/device.h>
+#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/err.h>
@@ -17,7 +19,8 @@
#include <linux/clk.h>
#include <linux/gfp.h>
-#include <mach/lcdc.h>
+#include <linux/soc/ti/omap1-io.h>
+#include <linux/soc/ti/omap1-soc.h>
#include <linux/omap-dma.h>
#include <asm/mach-types.h>
@@ -25,6 +28,7 @@
#include "omapfb.h"
#include "lcdc.h"
+#include "lcd_dma.h"
#define MODULE_NAME "lcdc"
@@ -328,13 +332,13 @@ static int omap_lcdc_setup_plane(int plane, int channel_out,
lcdc.bpp = 12;
break;
}
- /* fallthrough */
+ fallthrough;
case OMAPFB_COLOR_YUV422:
if (lcdc.ext_mode) {
lcdc.bpp = 16;
break;
}
- /* fallthrough */
+ fallthrough;
default:
/* FIXME: other BPPs.
* bpp1: code 0, size 256
@@ -704,16 +708,14 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
if (machine_is_ams_delta())
rate /= 4;
- if (machine_is_omap_h3())
- rate /= 3;
r = clk_set_rate(lcdc.lcd_ck, rate);
if (r) {
dev_err(fbdev->dev, "failed to adjust LCD rate\n");
goto fail1;
}
- clk_enable(lcdc.lcd_ck);
+ clk_prepare_enable(lcdc.lcd_ck);
- r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
+ r = request_irq(fbdev->int_irq, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
if (r) {
dev_err(fbdev->dev, "unable to get IRQ\n");
goto fail2;
@@ -744,9 +746,9 @@ fail5:
fail4:
omap_free_lcd_dma();
fail3:
- free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
+ free_irq(fbdev->int_irq, lcdc.fbdev);
fail2:
- clk_disable(lcdc.lcd_ck);
+ clk_disable_unprepare(lcdc.lcd_ck);
fail1:
clk_put(lcdc.lcd_ck);
fail0:
@@ -759,8 +761,8 @@ static void omap_lcdc_cleanup(void)
free_palette_ram();
free_fbmem();
omap_free_lcd_dma();
- free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
- clk_disable(lcdc.lcd_ck);
+ free_irq(lcdc.fbdev->int_irq, lcdc.fbdev);
+ clk_disable_unprepare(lcdc.lcd_ck);
clk_put(lcdc.lcd_ck);
}