]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/imxfb.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / video / imxfb.c
index 8fe1c12a17bdd9393e4a3d298cbf311000e743bc..1d54d3d6960b6f09be29a340794050a520d7f772 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <asm/hardware.h>
 #include <asm/io.h>
-#include <asm/mach-types.h>
 #include <asm/uaccess.h>
 #include <asm/arch/imxfb.h>
 
@@ -249,9 +248,6 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
        /* disable hardware cursor */
        LCDC_CPOS       &= ~(CPOS_CC0 | CPOS_CC1);
 
-       /* fixed burst length (see erratum 11) */
-       LCDC_DMACR = DMACR_BURST | DMACR_HM(8) | DMACR_TM(2);
-
        LCDC_RMCR = RMCR_LCDC_EN;
 
        if(fbi->backlight_power)
@@ -359,6 +355,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
        LCDC_PCR        = fbi->pcr;
        LCDC_PWMR       = fbi->pwmr;
        LCDC_LSCR1      = fbi->lscr1;
+       LCDC_DMACR      = fbi->dmacr;
 
        return 0;
 }
@@ -427,7 +424,7 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi)
  * Power management hooks.  Note that we won't be called from IRQ context,
  * unlike the blank functions above, so we may sleep.
  */
-static int imxfb_suspend(struct device *dev, u32 state, u32 level)
+static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level)
 {
        struct imxfb_info *fbi = dev_get_drvdata(dev);
        pr_debug("%s\n",__FUNCTION__);
@@ -509,6 +506,7 @@ static int __init imxfb_init_fbinfo(struct device *dev)
        fbi->cmap_inverse               = inf->cmap_inverse;
        fbi->pcr                        = inf->pcr;
        fbi->lscr1                      = inf->lscr1;
+       fbi->dmacr                      = inf->dmacr;
        fbi->pwmr                       = inf->pwmr;
        fbi->lcd_power                  = inf->lcd_power;
        fbi->backlight_power            = inf->backlight_power;
@@ -642,12 +640,12 @@ static int imxfb_remove(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
        struct fb_info *info = dev_get_drvdata(dev);
+       struct imxfb_info *fbi = info->par;
        struct resource *res;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-       /* disable LCD controller */
-       LCDC_RMCR &= ~RMCR_LCDC_EN;
+       imxfb_disable_controller(fbi);
 
        unregister_framebuffer(info);
 
@@ -663,8 +661,9 @@ static int imxfb_remove(struct device *dev)
 
 void  imxfb_shutdown(struct device * dev)
 {
-       /* disable LCD Controller */
-       LCDC_RMCR &= ~RMCR_LCDC_EN;
+       struct fb_info *info = dev_get_drvdata(dev);
+       struct imxfb_info *fbi = info->par;
+       imxfb_disable_controller(fbi);
 }
 
 static struct device_driver imxfb_driver = {