Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / arm / mach-pxa / lpd270.c
index 12479ae..ec0f43a 100644 (file)
@@ -68,8 +68,7 @@ static void lpd270_unmask_irq(unsigned int irq)
        __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK);
 }
 
-static struct irq_chip lpd270_irq_chip = {
-       .name           = "CPLD",
+static struct irqchip lpd270_irq_chip = {
        .ack            = lpd270_mask_irq,
        .mask           = lpd270_mask_irq,
        .unmask         = lpd270_unmask_irq,
@@ -249,137 +248,58 @@ static void lpd270_backlight_power(int on)
 
 /* 5.7" TFT QVGA (LoLo display number 1) */
 static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = {
-       .pixclock               = 150000,
-       .xres                   = 320,
-       .yres                   = 240,
+       .pixclock               = 100000,
+       .xres                   = 240,
+       .yres                   = 320,
        .bpp                    = 16,
-       .hsync_len              = 0x14,
-       .left_margin            = 0x28,
-       .right_margin           = 0x0a,
-       .vsync_len              = 0x02,
+       .hsync_len              = 64,
+       .left_margin            = 0x27,
+       .right_margin           = 0x09,
+       .vsync_len              = 0x04,
        .upper_margin           = 0x08,
        .lower_margin           = 0x14,
-       .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+       .sync                   = 0,
        .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
-       .pxafb_backlight_power  = lpd270_backlight_power,
-};
-
-/* 12.1" TFT SVGA (LoLo display number 2) */
-static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = {
-       .pixclock               = 50000,
-       .xres                   = 800,
-       .yres                   = 600,
-       .bpp                    = 16,
-       .hsync_len              = 0x05,
-       .left_margin            = 0x52,
-       .right_margin           = 0x05,
-       .vsync_len              = 0x04,
-       .upper_margin           = 0x14,
-       .lower_margin           = 0x0a,
-       .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
-       .pxafb_backlight_power  = lpd270_backlight_power,
-};
-
-/* 3.6" TFT QVGA (LoLo display number 3) */
-static struct pxafb_mach_info sharp_lq036q1da01 __initdata = {
-       .pixclock               = 150000,
-       .xres                   = 320,
-       .yres                   = 240,
-       .bpp                    = 16,
-       .hsync_len              = 0x0e,
-       .left_margin            = 0x04,
-       .right_margin           = 0x0a,
-       .vsync_len              = 0x03,
-       .upper_margin           = 0x03,
-       .lower_margin           = 0x03,
-       .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lccr3                  = 0x04400007,
        .pxafb_backlight_power  = lpd270_backlight_power,
 };
 
 /* 6.4" TFT VGA (LoLo display number 5) */
 static struct pxafb_mach_info sharp_lq64d343 __initdata = {
-       .pixclock               = 25000,
+       .pixclock               = 20000,
        .xres                   = 640,
        .yres                   = 480,
        .bpp                    = 16,
-       .hsync_len              = 0x31,
+       .hsync_len              = 49,
        .left_margin            = 0x89,
        .right_margin           = 0x19,
-       .vsync_len              = 0x12,
+       .vsync_len              = 18,
        .upper_margin           = 0x22,
-       .lower_margin           = 0x00,
+       .lower_margin           = 0,
        .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
        .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
-       .pxafb_backlight_power  = lpd270_backlight_power,
-};
-
-/* 10.4" TFT VGA (LoLo display number 7) */
-static struct pxafb_mach_info sharp_lq10d368 __initdata = {
-       .pixclock               = 25000,
-       .xres                   = 640,
-       .yres                   = 480,
-       .bpp                    = 16,
-       .hsync_len              = 0x31,
-       .left_margin            = 0x89,
-       .right_margin           = 0x19,
-       .vsync_len              = 0x12,
-       .upper_margin           = 0x22,
-       .lower_margin           = 0x00,
-       .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lccr3                  = 0x04400001,
        .pxafb_backlight_power  = lpd270_backlight_power,
 };
 
 /* 3.5" TFT QVGA (LoLo display number 8) */
 static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = {
-       .pixclock               = 150000,
+       .pixclock               = 100000,
        .xres                   = 240,
        .yres                   = 320,
        .bpp                    = 16,
-       .hsync_len              = 0x0e,
-       .left_margin            = 0x0a,
-       .right_margin           = 0x0a,
-       .vsync_len              = 0x03,
+       .hsync_len              = 0x34,
+       .left_margin            = 0x09,
+       .right_margin           = 0x09,
+       .vsync_len              = 0x08,
        .upper_margin           = 0x05,
        .lower_margin           = 0x14,
-       .sync                   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+       .sync                   = 0,
        .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lccr3                  = 0x04400007,
        .pxafb_backlight_power  = lpd270_backlight_power,
 };
 
-static struct pxafb_mach_info *lpd270_lcd_to_use;
-
-static int __init lpd270_set_lcd(char *str)
-{
-       if (!strnicmp(str, "lq057q3dc02", 11)) {
-               lpd270_lcd_to_use = &sharp_lq057q3dc02;
-       } else if (!strnicmp(str, "lq121s1dg31", 11)) {
-               lpd270_lcd_to_use = &sharp_lq121s1dg31;
-       } else if (!strnicmp(str, "lq036q1da01", 11)) {
-               lpd270_lcd_to_use = &sharp_lq036q1da01;
-       } else if (!strnicmp(str, "lq64d343", 8)) {
-               lpd270_lcd_to_use = &sharp_lq64d343;
-       } else if (!strnicmp(str, "lq10d368", 8)) {
-               lpd270_lcd_to_use = &sharp_lq10d368;
-       } else if (!strnicmp(str, "lq035q7db02-20", 14)) {
-               lpd270_lcd_to_use = &sharp_lq035q7db02_20;
-       } else {
-               printk(KERN_INFO "lpd270: unknown lcd panel [%s]\n", str);
-       }
-
-       return 1;
-}
-
-__setup("lcd=", lpd270_set_lcd);
-
 static struct platform_device *platform_devices[] __initdata = {
        &smc91x_device,
        &lpd270_audio_device,
@@ -425,8 +345,9 @@ static void __init lpd270_init(void)
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 
-       if (lpd270_lcd_to_use != NULL)
-               set_pxa_fb_info(lpd270_lcd_to_use);
+       // set_pxa_fb_info(&sharp_lq057q3dc02);
+       set_pxa_fb_info(&sharp_lq64d343);
+       // set_pxa_fb_info(&sharp_lq035q7db02_20);
 
        pxa_set_ohci_info(&lpd270_ohci_platform_data);
 }