]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
Merge branch 'sa11x0-mcp' into sa11x0
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Mar 2012 22:56:30 +0000 (23:56 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Mar 2012 22:57:10 +0000 (23:57 +0100)
Conflicts:
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/shannon.c

1  2 
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/cerf.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/generic.h
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/shannon.c
arch/arm/mach-sa1100/simpad.c

index c3f5064df4bf9449756cb8856fe4eb1702aecc99,b5955ad35945e4a5ac17093556758f98aff7fa74..e708a93a7ddb3b4092928b3284a0837db39e07d7
@@@ -71,7 -70,41 +72,13 @@@ void ASSABET_BCR_frob(unsigned int mask
  
  EXPORT_SYMBOL(ASSABET_BCR_frob);
  
+ static void assabet_ucb1x00_reset(enum ucb1x00_reset state)
+ {
+       if (state == UCB_RST_PROBE)
+               ASSABET_BCR_set(ASSABET_BCR_CODEC_RST);
+ }
  
 -static void assabet_backlight_power(int on)
 -{
 -#ifndef ASSABET_PAL_VIDEO
 -      if (on)
 -              ASSABET_BCR_set(ASSABET_BCR_LIGHT_ON);
 -      else
 -#endif
 -              ASSABET_BCR_clear(ASSABET_BCR_LIGHT_ON);
 -}
 -
 -/*
 - * Turn on/off the backlight.  When turning the backlight on,
 - * we wait 500us after turning it on so we don't cause the
 - * supplies to droop when we enable the LCD controller (and
 - * cause a hard reset.)
 - */
 -static void assabet_lcd_power(int on)
 -{
 -#ifndef ASSABET_PAL_VIDEO
 -      if (on) {
 -              ASSABET_BCR_set(ASSABET_BCR_LCD_ON);
 -              udelay(500);
 -      } else
 -#endif
 -              ASSABET_BCR_clear(ASSABET_BCR_LCD_ON);
 -}
 -
 -
  /*
   * Assabet flash support code.
   */
@@@ -170,110 -215,9 +182,111 @@@ static struct ucb1x00_plat_data assabet
  static struct mcp_plat_data assabet_mcp_data = {
        .mccr0          = MCCR0_ADM,
        .sclk_rate      = 11981000,
+       .codec_pdata    = &assabet_ucb1x00_data,
  };
  
 +static void assabet_lcd_set_visual(u32 visual)
 +{
 +      u_int is_true_color = visual == FB_VISUAL_TRUECOLOR;
 +
 +      if (machine_is_assabet()) {
 +#if 1         // phase 4 or newer Assabet's
 +              if (is_true_color)
 +                      ASSABET_BCR_set(ASSABET_BCR_LCD_12RGB);
 +              else
 +                      ASSABET_BCR_clear(ASSABET_BCR_LCD_12RGB);
 +#else
 +              // older Assabet's
 +              if (is_true_color)
 +                      ASSABET_BCR_clear(ASSABET_BCR_LCD_12RGB);
 +              else
 +                      ASSABET_BCR_set(ASSABET_BCR_LCD_12RGB);
 +#endif
 +      }
 +}
 +
 +#ifndef ASSABET_PAL_VIDEO
 +static void assabet_lcd_backlight_power(int on)
 +{
 +      if (on)
 +              ASSABET_BCR_set(ASSABET_BCR_LIGHT_ON);
 +      else
 +              ASSABET_BCR_clear(ASSABET_BCR_LIGHT_ON);
 +}
 +
 +/*
 + * Turn on/off the backlight.  When turning the backlight on, we wait
 + * 500us after turning it on so we don't cause the supplies to droop
 + * when we enable the LCD controller (and cause a hard reset.)
 + */
 +static void assabet_lcd_power(int on)
 +{
 +      if (on) {
 +              ASSABET_BCR_set(ASSABET_BCR_LCD_ON);
 +              udelay(500);
 +      } else
 +              ASSABET_BCR_clear(ASSABET_BCR_LCD_ON);
 +}
 +
 +/*
 + * The assabet uses a sharp LQ039Q2DS54 LCD module.  It is actually
 + * takes an RGB666 signal, but we provide it with an RGB565 signal
 + * instead (def_rgb_16).
 + */
 +static struct sa1100fb_mach_info lq039q2ds54_info = {
 +      .pixclock       = 171521,       .bpp            = 16,
 +      .xres           = 320,          .yres           = 240,
 +
 +      .hsync_len      = 5,            .vsync_len      = 1,
 +      .left_margin    = 61,           .upper_margin   = 3,
 +      .right_margin   = 9,            .lower_margin   = 0,
 +
 +      .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
 +      .lccr3          = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
 +
 +      .backlight_power = assabet_lcd_backlight_power,
 +      .lcd_power = assabet_lcd_power,
 +      .set_visual = assabet_lcd_set_visual,
 +};
 +#else
 +static void assabet_pal_backlight_power(int on)
 +{
 +      ASSABET_BCR_clear(ASSABET_BCR_LIGHT_ON);
 +}
 +
 +static void assabet_pal_power(int on)
 +{
 +      ASSABET_BCR_clear(ASSABET_BCR_LCD_ON);
 +}
 +
 +static struct sa1100fb_mach_info pal_info = {
 +      .pixclock       = 67797,        .bpp            = 16,
 +      .xres           = 640,          .yres           = 512,
 +
 +      .hsync_len      = 64,           .vsync_len      = 6,
 +      .left_margin    = 125,          .upper_margin   = 70,
 +      .right_margin   = 115,          .lower_margin   = 36,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
 +      .lccr3          = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512),
 +
 +      .backlight_power = assabet_pal_backlight_power,
 +      .lcd_power = assabet_pal_power,
 +      .set_visual = assabet_lcd_set_visual,
 +};
 +#endif
 +
 +#ifdef CONFIG_ASSABET_NEPONSET
 +static struct resource neponset_resources[] = {
 +      DEFINE_RES_MEM(0x10000000, 0x08000000),
 +      DEFINE_RES_MEM(0x18000000, 0x04000000),
 +      DEFINE_RES_MEM(0x40000000, SZ_8K),
 +      DEFINE_RES_IRQ(IRQ_GPIO25),
 +};
 +#endif
 +
  static void __init assabet_init(void)
  {
        /*
        PPDR |= PPC_TXD3 | PPC_TXD1;
        PPSR |= PPC_TXD3 | PPC_TXD1;
  
 -      sa1100fb_lcd_power = assabet_lcd_power;
 -      sa1100fb_backlight_power = assabet_backlight_power;
 -
+       sa11x0_ppc_configure_mcp();
        if (machine_has_neponset()) {
                /*
                 * Angel sets this, but other bootloaders may not.
Simple merge
index 841041e118152d3dee9fe77f68fa43f8f28a7aa9,0e73597851594d6a9c0e9a073468c18b19652d90..d4339d6394756637eed375d2d5a614418d132e7b
@@@ -339,8 -346,9 +344,12 @@@ static void __init collie_init(void
  
        GPSR |= _COLLIE_GPIO_UCB1x00_RESET;
  
 +      collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN);
 +      collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN);
++
+       sa11x0_ppc_configure_mcp();
        platform_scoop_config = &collie_pcmcia_config;
  
        ret = platform_add_devices(devices, ARRAY_SIZE(devices));
index 0296d69622ace09b6f1368221d0f31a0537926c7,9379c53d3018488c9f3f0eda3d78e313eef3251e..97e9bdf7f2979863a64e58d9ac92fb5a7ae8b479
@@@ -194,8 -215,21 +194,9 @@@ static struct platform_device sa11x0uar
  };
  
  static struct resource sa11x0mcp_resources[] = {
 -      [0] = {
 -              .start  = __PREG(Ser4MCCR0),
 -              .end    = __PREG(Ser4MCCR0) + 0xffff,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = __PREG(Ser4MCCR1),
 -              .end    = __PREG(Ser4MCCR1) + 4 - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [2] = {
 -              .start  = IRQ_Ser4MCP,
 -              .end    = IRQ_Ser4MCP,
 -              .flags  = IORESOURCE_IRQ,
 -      },
 +      [0] = DEFINE_RES_MEM(__PREG(Ser4MCCR0), SZ_64K),
-       [1] = DEFINE_RES_IRQ(IRQ_Ser4MCP),
++      [1] = DEFINE_RES_MEM(__PREG(Ser4MCCR1), 4),
++      [2] = DEFINE_RES_IRQ(IRQ_Ser4MCP),
  };
  
  static u64 sa11x0mcp_dma_mask = 0xffffffffUL;
index 5c68be858e0c8f4b3376bfdd73bb59b2cf3f264a,9236ff42bd1f3770e3159ed9a46646c87d91f331..9eb3b3cd5a63501f18297676fc8c32dbdca21b57
@@@ -36,7 -39,5 +36,8 @@@ struct irda_platform_data
  void sa11x0_register_irda(struct irda_platform_data *irda);
  
  struct mcp_plat_data;
+ void sa11x0_ppc_configure_mcp(void);
  void sa11x0_register_mcp(struct mcp_plat_data *data);
 +
 +struct sa1100fb_mach_info;
 +void sa11x0_register_lcd(struct sa1100fb_mach_info *inf);
index 463a322a425b0736c0b040aa4992b62562ec1570,eba64b7815009b19dbf4c8278a32a72a021ba98f..570f75fb73a283504ee8b6b69401746536e88cdf
@@@ -28,85 -26,9 +28,86 @@@ static struct mcp_plat_data lart_mcp_da
        .sclk_rate      = 11981000,
  };
  
 +#ifdef LART_GREY_LCD
 +static struct sa1100fb_mach_info lart_grey_info = {
 +      .pixclock       = 150000,       .bpp            = 4,
 +      .xres           = 320,          .yres           = 240,
 +
 +      .hsync_len      = 1,            .vsync_len      = 1,
 +      .left_margin    = 4,            .upper_margin   = 0,
 +      .right_margin   = 2,            .lower_margin   = 0,
 +
 +      .cmap_greyscale = 1,
 +      .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 +
 +      .lccr0          = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono,
 +      .lccr3          = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512),
 +};
 +#endif
 +#ifdef LART_COLOR_LCD
 +static struct sa1100fb_mach_info lart_color_info = {
 +      .pixclock       = 150000,       .bpp            = 16,
 +      .xres           = 320,          .yres           = 240,
 +
 +      .hsync_len      = 2,            .vsync_len      = 3,
 +      .left_margin    = 69,           .upper_margin   = 14,
 +      .right_margin   = 8,            .lower_margin   = 4,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
 +      .lccr3          = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512),
 +};
 +#endif
 +#ifdef LART_VIDEO_OUT
 +static struct sa1100fb_mach_info lart_video_info = {
 +      .pixclock       = 39721,        .bpp            = 16,
 +      .xres           = 640,          .yres           = 480,
 +
 +      .hsync_len      = 95,           .vsync_len      = 2,
 +      .left_margin    = 40,           .upper_margin   = 32,
 +      .right_margin   = 24,           .lower_margin   = 11,
 +
 +      .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
 +      .lccr3          = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512),
 +};
 +#endif
 +
 +#ifdef LART_KIT01_LCD
 +static struct sa1100fb_mach_info lart_kit01_info = {
 +      .pixclock       = 63291,        .bpp            = 16,
 +      .xres           = 640,          .yres           = 480,
 +
 +      .hsync_len      = 64,           .vsync_len      = 3,
 +      .left_margin    = 122,          .upper_margin   = 45,
 +      .right_margin   = 10,           .lower_margin   = 10,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
 +      .lccr3          = LCCR3_OutEnH | LCCR3_PixFlEdg
 +};
 +#endif
 +
  static void __init lart_init(void)
  {
 +      struct sa1100fb_mach_info *inf = NULL;
 +
 +#ifdef LART_GREY_LCD
 +      inf = &lart_grey_info;
 +#endif
 +#ifdef LART_COLOR_LCD
 +      inf = &lart_color_info;
 +#endif
 +#ifdef LART_VIDEO_OUT
 +      inf = &lart_video_info;
 +#endif
 +#ifdef LART_KIT01_LCD
 +      inf = &lart_kit01_info;
 +#endif
 +
 +      if (inf)
 +              sa11x0_register_lcd(inf);
 +
+       sa11x0_ppc_configure_mcp();
        sa11x0_register_mcp(&lart_mcp_data);
  }
  
index 77b2b9b522aca5d8625e58f8ef73c1ddbfe1e174,3efb4ac6224092d117a0c1e86d69d98402df1bb4..08bb1228961f3dca8acea793c74fa992de543c4e
@@@ -56,23 -57,9 +56,24 @@@ static struct mcp_plat_data shannon_mcp
        .sclk_rate      = 11981000,
  };
  
 +static struct sa1100fb_mach_info shannon_lcd_info = {
 +      .pixclock       = 152500,       .bpp            = 8,
 +      .xres           = 640,          .yres           = 480,
 +
 +      .hsync_len      = 4,            .vsync_len      = 3,
 +      .left_margin    = 2,            .upper_margin   = 0,
 +      .right_margin   = 1,            .lower_margin   = 0,
 +
 +      .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 +
 +      .lccr0          = LCCR0_Color | LCCR0_Dual | LCCR0_Pas,
 +      .lccr3          = LCCR3_ACBsDiv(512),
 +};
 +
  static void __init shannon_init(void)
  {
+       sa11x0_ppc_configure_mcp();
 +      sa11x0_register_lcd(&shannon_lcd_info);
        sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1);
        sa11x0_register_mcp(&shannon_mcp_data);
  }
index cdb9d197c092429af79f4aa72a794fbe5231b37b,81506562ee26e6514138b79d09964a544ef779e9..3da4c1f11cf59cab0a965047b99fcb632d6286dd
@@@ -176,10 -177,21 +177,14 @@@ static struct flash_platform_data simpa
  
  
  static struct resource simpad_flash_resources [] = {
 -      {
 -              .start     = SA1100_CS0_PHYS,
 -              .end       = SA1100_CS0_PHYS + SZ_16M -1,
 -              .flags     = IORESOURCE_MEM,
 -      }, {
 -              .start     = SA1100_CS1_PHYS,
 -              .end       = SA1100_CS1_PHYS + SZ_16M -1,
 -              .flags     = IORESOURCE_MEM,
 -      }
 +      DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_16M),
 +      DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_16M),
  };
  
+ static struct ucb1x00_plat_data simpad_ucb1x00_data = {
+       .gpio_base      = SIMPAD_UCB1X00_GPIO_BASE,
+ };
  static struct mcp_plat_data simpad_mcp_data = {
        .mccr0          = MCCR0_ADM,
        .sclk_rate      = 11981000,