]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
Merge commit 'v3.2-rc2' into fbdev-next
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 21 Nov 2011 23:42:06 +0000 (23:42 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 21 Nov 2011 23:42:06 +0000 (23:42 +0000)
1  2 
arch/arm/mach-at91/board-cap9adk.c
arch/arm/mach-at91/board-neocore926.c
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c
arch/arm/mach-at91/board-sam9rlek.c
drivers/video/Kconfig
drivers/video/atmel_lcdfb.c

index ae962bf7ca0db5f627e5ac81f6b7218c61d660dd,5dffd3be62d25878b52cdbb46150a7d71ad965ac..911d9862e6fffe2c116af50c04caaa9dc250f7d6
@@@ -22,6 -22,7 +22,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -41,7 -42,6 +42,6 @@@
  #include <asm/mach/map.h>
  
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91cap9_matrix.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/system_rev.h>
@@@ -169,19 -169,14 +169,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(cap9adk_nand_partitions);
-       return cap9adk_nand_partitions;
- }
  static struct atmel_nand_data __initdata cap9adk_nand_data = {
        .ale            = 21,
        .cle            = 22,
  //    .det_pin        = ... not connected
  //    .rdy_pin        = ... not connected
        .enable_pin     = AT91_PIN_PD15,
-       .partition_info = nand_partitions,
+       .parts          = cap9adk_nand_partitions,
+       .num_parts      = ARRAY_SIZE(cap9adk_nand_partitions),
  };
  
  static struct sam9_smc_config __initdata cap9adk_nand_smc_config = {
@@@ -304,7 -299,7 +299,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(4965),
  
 -              .left_margin    = 1,            .right_margin   = 33,
 +              .left_margin    = 1,            .right_margin   = 34,
                .upper_margin   = 1,            .lower_margin   = 0,
                .hsync_len      = 5,            .vsync_len      = 1,
  
index 583878ed9a6d58eab622d141950a9c2c9686d898,ef816c17dc61ebd0a0b9fb0c04ab134912f5b4c7..190dc19ce467225d8a6c85b62afcc54b3c43fe0a
@@@ -21,6 -21,7 +21,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -44,7 -45,6 +45,6 @@@
  
  #include <mach/hardware.h>
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91sam9_smc.h>
  
  #include "sam9_smc.h"
@@@ -182,19 -182,14 +182,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(neocore926_nand_partition);
-       return neocore926_nand_partition;
- }
  static struct atmel_nand_data __initdata neocore926_nand_data = {
        .ale                    = 21,
        .cle                    = 22,
        .rdy_pin                = AT91_PIN_PB19,
        .rdy_pin_active_low     = 1,
        .enable_pin             = AT91_PIN_PD15,
-       .partition_info         = nand_partitions,
+       .parts                  = neocore926_nand_partition,
+       .num_parts              = ARRAY_SIZE(neocore926_nand_partition),
  };
  
  static struct sam9_smc_config __initdata neocore926_nand_smc_config = {
@@@ -235,7 -230,7 +230,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(5000),
  
 -              .left_margin    = 1,            .right_margin   = 33,
 +              .left_margin    = 1,            .right_margin   = 34,
                .upper_margin   = 1,            .lower_margin   = 0,
                .hsync_len      = 5,            .vsync_len      = 1,
  
index 8dda83bd279117a93b207ed03bc8001ea1c0f3e4,b005b738e8ff7bc6dc4af3c8e173421bd9b234c7..4f469ea469690979d4825228a8e606c91cf76947
@@@ -20,6 -20,7 +20,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -45,7 -46,6 +46,6 @@@
  
  #include <mach/hardware.h>
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/at91_shdwc.h>
  #include <mach/system_rev.h>
@@@ -179,19 -179,14 +179,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(ek_nand_partition);
-       return ek_nand_partition;
- }
  static struct atmel_nand_data __initdata ek_nand_data = {
        .ale            = 22,
        .cle            = 21,
  //    .det_pin        = ... not connected
        .rdy_pin        = AT91_PIN_PC15,
        .enable_pin     = AT91_PIN_PC14,
-       .partition_info = nand_partitions,
+       .parts          = ek_nand_partition,
+       .num_parts      = ARRAY_SIZE(ek_nand_partition),
  };
  
  static struct sam9_smc_config __initdata ek_nand_smc_config = {
@@@ -370,7 -365,7 +365,7 @@@ static struct fb_videomode at91_stn_mod
                .xres           = 320,          .yres           = 240,
                .pixclock       = KHZ2PICOS(1440),
  
 -              .left_margin    = 1,            .right_margin   = 1,
 +              .left_margin    = 1,            .right_margin   = 2,
                .upper_margin   = 0,            .lower_margin   = 0,
                .hsync_len      = 1,            .vsync_len      = 1,
  
@@@ -431,7 -426,7 +426,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(4965),
  
 -              .left_margin    = 1,            .right_margin   = 33,
 +              .left_margin    = 1,            .right_margin   = 34,
                .upper_margin   = 1,            .lower_margin   = 0,
                .hsync_len      = 5,            .vsync_len      = 1,
  
index e2600700440285b6ad038a481bb3f3df54f89e93,bccdcf23caa106e392dba97fa4df69f9775a5337..0e96ee9e4ad313dc8e0fab14a7e10501fd319ec2
@@@ -20,6 -20,7 +20,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -44,7 -45,6 +45,6 @@@
  
  #include <mach/hardware.h>
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/at91_shdwc.h>
  #include <mach/system_rev.h>
@@@ -180,19 -180,14 +180,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(ek_nand_partition);
-       return ek_nand_partition;
- }
  static struct atmel_nand_data __initdata ek_nand_data = {
        .ale            = 21,
        .cle            = 22,
  //    .det_pin        = ... not connected
        .rdy_pin        = AT91_PIN_PA22,
        .enable_pin     = AT91_PIN_PD15,
-       .partition_info = nand_partitions,
+       .parts          = ek_nand_partition,
+       .num_parts      = ARRAY_SIZE(ek_nand_partition),
  };
  
  static struct sam9_smc_config __initdata ek_nand_smc_config = {
@@@ -258,7 -253,7 +253,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(4965),
  
 -              .left_margin    = 1,            .right_margin   = 33,
 +              .left_margin    = 1,            .right_margin   = 34,
                .upper_margin   = 1,            .lower_margin   = 0,
                .hsync_len      = 5,            .vsync_len      = 1,
  
index 5e9a5ca54d4c66e0cbf9ae22579ff5520aef3cd6,92de9127923a6dd0ecf6b61780129a1e3e9d6cf2..855c68b378d66cf26f32cad71349a6773a543dc9
@@@ -14,6 -14,7 +14,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -38,7 -39,6 +39,6 @@@
  #include <asm/mach/irq.h>
  
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/at91_shdwc.h>
  #include <mach/system_rev.h>
@@@ -137,19 -137,14 +137,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(ek_nand_partition);
-       return ek_nand_partition;
- }
  /* det_pin is not connected */
  static struct atmel_nand_data __initdata ek_nand_data = {
        .ale            = 21,
        .cle            = 22,
        .rdy_pin        = AT91_PIN_PC8,
        .enable_pin     = AT91_PIN_PC14,
-       .partition_info = nand_partitions,
+       .parts          = ek_nand_partition,
+       .num_parts      = ARRAY_SIZE(ek_nand_partition),
  };
  
  static struct sam9_smc_config __initdata ek_nand_smc_config = {
@@@ -197,7 -192,7 +192,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 480,          .yres           = 272,
                .pixclock       = KHZ2PICOS(9000),
  
 -              .left_margin    = 1,            .right_margin   = 1,
 +              .left_margin    = 1,            .right_margin   = 2,
                .upper_margin   = 40,           .lower_margin   = 1,
                .hsync_len      = 45,           .vsync_len      = 1,
  
index ad9e5c93d8769adc9feb11b1002444d97cbd5234,b2b748239f365ab77627a6d96a7c442be91fd161..0e943a2d95029e2cd44a63e4bad91243a4239e56
@@@ -8,6 -8,7 +8,7 @@@
   */
  
  #include <linux/types.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/mm.h>
  #include <linux/module.h>
@@@ -30,7 -31,6 +31,6 @@@
  
  #include <mach/hardware.h>
  #include <mach/board.h>
- #include <mach/gpio.h>
  #include <mach/at91sam9_smc.h>
  #include <mach/at91_shdwc.h>
  
@@@ -88,19 -88,14 +88,14 @@@ static struct mtd_partition __initdata 
        },
  };
  
- static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
- {
-       *num_partitions = ARRAY_SIZE(ek_nand_partition);
-       return ek_nand_partition;
- }
  static struct atmel_nand_data __initdata ek_nand_data = {
        .ale            = 21,
        .cle            = 22,
  //    .det_pin        = ... not connected
        .rdy_pin        = AT91_PIN_PD17,
        .enable_pin     = AT91_PIN_PB6,
-       .partition_info = nand_partitions,
+       .parts          = ek_nand_partition,
+       .num_parts      = ARRAY_SIZE(ek_nand_partition),
  };
  
  static struct sam9_smc_config __initdata ek_nand_smc_config = {
@@@ -154,7 -149,7 +149,7 @@@ static struct fb_videomode at91_tft_vga
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(4965),
  
 -              .left_margin    = 1,            .right_margin   = 33,
 +              .left_margin    = 1,            .right_margin   = 34,
                .upper_margin   = 1,            .lower_margin   = 0,
                .hsync_len      = 5,            .vsync_len      = 1,
  
diff --combined drivers/video/Kconfig
index 1b5b98f294821f831d532ab03635042537d77a27,d83e967e4e15b6380fa1dc94584aac871b6a4b1d..dcf0a828f66ebd684571143457a6bd4f04fe1a5c
@@@ -1753,7 -1753,7 +1753,7 @@@ endchoic
  
  config FB_AU1100
        bool "Au1100 LCD Driver"
-       depends on (FB = y) && MIPS && SOC_AU1100
+       depends on (FB = y) && MIPS_ALCHEMY
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
  
  config FB_AU1200
        bool "Au1200 LCD Driver"
-       depends on (FB = y) && MIPS && SOC_AU1200
+       depends on (FB = y) && MIPS_ALCHEMY
        select FB_SYS_FILLRECT
        select FB_SYS_COPYAREA
        select FB_SYS_IMAGEBLIT
@@@ -2413,6 -2413,7 +2413,6 @@@ source "drivers/video/omap/Kconfig
  source "drivers/video/omap2/Kconfig"
  
  source "drivers/video/backlight/Kconfig"
 -source "drivers/video/display/Kconfig"
  
  if VT
        source "drivers/video/console/Kconfig"
index 2226aca44c5744a5f658efd448d6ddbcef642ca2,63409c122ae804ec9fea9dd684cfac1b516a32ef..ced4419e56e2f3ca6c3166e372625408b7ff165d
  #include <linux/delay.h>
  #include <linux/backlight.h>
  #include <linux/gfp.h>
+ #include <linux/module.h>
  
  #include <mach/board.h>
  #include <mach/cpu.h>
- #include <mach/gpio.h>
+ #include <asm/gpio.h>
  
  #include <video/atmel_lcdc.h>
  
@@@ -99,11 -100,8 +100,11 @@@ static int atmel_bl_update_status(struc
                brightness = 0;
  
        lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness);
 -      lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
 +      if (contrast_ctr & ATMEL_LCDC_POL_POSITIVE)
 +              lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
                        brightness ? contrast_ctr : 0);
 +      else
 +              lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
  
        bl->props.fb_blank = bl->props.power = sinfo->bl_power = power;
  
@@@ -399,7 -397,7 +400,7 @@@ static int atmel_lcdfb_check_var(struc
        var->lower_margin = min_t(u32, var->lower_margin,
                        ATMEL_LCDC_VFP);
        var->right_margin = min_t(u32, var->right_margin,
 -                      (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 1);
 +                      (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 2);
        var->hsync_len = min_t(u32, var->hsync_len,
                        (ATMEL_LCDC_HPW >> ATMEL_LCDC_HPW_OFFSET) + 1);
        var->left_margin = min_t(u32, var->left_margin,
@@@ -584,7 -582,7 +585,7 @@@ static int atmel_lcdfb_set_par(struct f
        lcdc_writel(sinfo, ATMEL_LCDC_TIM1, value);
  
        /* Horizontal timing */
 -      value = (info->var.right_margin - 1) << ATMEL_LCDC_HFP_OFFSET;
 +      value = (info->var.right_margin - 2) << ATMEL_LCDC_HFP_OFFSET;
        value |= (info->var.hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET;
        value |= (info->var.left_margin - 1);
        dev_dbg(info->device, "  * LCDTIM2 = %08lx\n", value);
@@@ -684,30 -682,14 +685,30 @@@ static int atmel_lcdfb_setcolreg(unsign
  
        case FB_VISUAL_PSEUDOCOLOR:
                if (regno < 256) {
 -                      val  = ((red   >> 11) & 0x001f);
 -                      val |= ((green >>  6) & 0x03e0);
 -                      val |= ((blue  >>  1) & 0x7c00);
 -
 -                      /*
 -                       * TODO: intensity bit. Maybe something like
 -                       *   ~(red[10] ^ green[10] ^ blue[10]) & 1
 -                       */
 +                      if (cpu_is_at91sam9261() || cpu_is_at91sam9263()
 +                          || cpu_is_at91sam9rl()) {
 +                              /* old style I+BGR:555 */
 +                              val  = ((red   >> 11) & 0x001f);
 +                              val |= ((green >>  6) & 0x03e0);
 +                              val |= ((blue  >>  1) & 0x7c00);
 +
 +                              /*
 +                               * TODO: intensity bit. Maybe something like
 +                               *   ~(red[10] ^ green[10] ^ blue[10]) & 1
 +                               */
 +                      } else {
 +                              /* new style BGR:565 / RGB:565 */
 +                              if (sinfo->lcd_wiring_mode ==
 +                                  ATMEL_LCDC_WIRING_RGB) {
 +                                      val  = ((blue >> 11) & 0x001f);
 +                                      val |= ((red  >>  0) & 0xf800);
 +                              } else {
 +                                      val  = ((red  >> 11) & 0x001f);
 +                                      val |= ((blue >>  0) & 0xf800);
 +                              }
 +
 +                              val |= ((green >>  5) & 0x07e0);
 +                      }
  
                        lcdc_writel(sinfo, ATMEL_LCDC_LUT(regno), val);
                        ret = 0;