Merge branch 'fixes-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Jul 2011 21:53:01 +0000 (23:53 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 11 Jul 2011 21:53:01 +0000 (23:53 +0200)
1  2 
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-overo.c

@@@ -1,9 -1,8 +1,9 @@@
  /*
   * board-cm-t35.c (CompuLab CM-T35 module)
   *
 - * Copyright (C) 2009 CompuLab, Ltd.
 - * Author: Mike Rapoport <mike@compulab.co.il>
 + * Copyright (C) 2009-2011 CompuLab, Ltd.
 + * Authors: Mike Rapoport <mike@compulab.co.il>
 + *        Igor Grinberg <grinberg@compulab.co.il>
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * General Public License for more details.
   *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 - * 02110-1301 USA
 - *
   */
  
  #include <linux/kernel.h>
@@@ -145,12 -149,12 +145,12 @@@ static struct mtd_partition cm_t35_nand
        },
        {
                .name           = "linux",
 -              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x280000 */
 +              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x2A0000 */
                .size           = 32 * NAND_BLOCK_SIZE,
        },
        {
                .name           = "rootfs",
 -              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x680000 */
 +              .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x6A0000 */
                .size           = MTDPART_SIZ_FULL,
        },
  };
@@@ -339,10 -343,6 +339,6 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
  };
  
- static struct regulator_consumer_supply cm_t35_vdac_supply[] = {
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
- };
  static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
        REGULATOR_SUPPLY("vdvi", "omapdss"),
  };
@@@ -377,39 -377,6 +373,6 @@@ static struct regulator_init_data cm_t3
        .consumer_supplies      = cm_t35_vsim_supply,
  };
  
- /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
- static struct regulator_init_data cm_t35_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(cm_t35_vdac_supply),
-       .consumer_supplies      = cm_t35_vdac_supply,
- };
- /* VPLL2 for digital video outputs */
- static struct regulator_init_data cm_t35_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(cm_t35_vdvi_supply),
-       .consumer_supplies      = cm_t35_vdvi_supply,
- };
- static struct twl4030_usb_data cm_t35_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
- };
  static uint32_t cm_t35_keymap[] = {
        KEY(0, 0, KEY_A),       KEY(0, 1, KEY_B),       KEY(0, 2, KEY_LEFT),
        KEY(1, 0, KEY_UP),      KEY(1, 1, KEY_ENTER),   KEY(1, 2, KEY_DOWN),
@@@ -466,9 -433,9 +429,9 @@@ static int cm_t35_twl_gpio_setup(struc
        if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) {
                gpio_export(wlan_rst, 0);
                udelay(10);
 -              gpio_set_value(wlan_rst, 0);
 +              gpio_set_value_cansleep(wlan_rst, 0);
                udelay(10);
 -              gpio_set_value(wlan_rst, 1);
 +              gpio_set_value_cansleep(wlan_rst, 1);
        } else {
                pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
        }
@@@ -488,21 -455,23 +451,23 @@@ static struct twl4030_gpio_platform_dat
  };
  
  static struct twl4030_platform_data cm_t35_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
        /* platform_data for children goes here */
        .keypad         = &cm_t35_kp_data,
-       .usb            = &cm_t35_usb_data,
        .gpio           = &cm_t35_gpio_data,
        .vmmc1          = &cm_t35_vmmc1,
        .vsim           = &cm_t35_vsim,
-       .vdac           = &cm_t35_vdac,
-       .vpll2          = &cm_t35_vpll2,
  };
  
  static void __init cm_t35_init_i2c(void)
  {
+       omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+       cm_t35_twldata.vpll2->constraints.name = "VDVI";
+       cm_t35_twldata.vpll2->num_consumer_supplies =
+                                               ARRAY_SIZE(cm_t35_vdvi_supply);
+       cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
        omap3_pmic_init("tps65930", &cm_t35_twldata);
  }
  
@@@ -265,15 -265,6 +265,6 @@@ static struct omap_dss_board_info overo
        .default_device = &overo_dvi_device,
  };
  
- static struct regulator_consumer_supply overo_vdda_dac_supply[] = {
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
- };
- static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
- };
  static struct mtd_partition overo_nand_partitions[] = {
        {
                .name           = "xloader",
@@@ -433,10 -424,6 +424,6 @@@ static struct twl4030_gpio_platform_dat
        .setup          = overo_twl_gpio_setup,
  };
  
- static struct twl4030_usb_data overo_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
- };
  static struct regulator_init_data overo_vmmc1 = {
        .constraints = {
                .min_uV                 = 1850000,
        .consumer_supplies      = overo_vmmc1_supply,
  };
  
- /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
- static struct regulator_init_data overo_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(overo_vdda_dac_supply),
-       .consumer_supplies      = overo_vdda_dac_supply,
- };
- /* VPLL2 for digital video outputs */
- static struct regulator_init_data overo_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(overo_vdds_dsi_supply),
-       .consumer_supplies      = overo_vdds_dsi_supply,
- };
- static struct twl4030_codec_audio_data overo_audio_data;
- static struct twl4030_codec_data overo_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &overo_audio_data,
- };
  static struct twl4030_platform_data overo_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
        .gpio           = &overo_gpio_data,
-       .usb            = &overo_usb_data,
-       .codec          = &overo_codec_data,
        .vmmc1          = &overo_vmmc1,
-       .vdac           = &overo_vdac,
-       .vpll2          = &overo_vpll2,
  };
  
  static int __init overo_i2c_init(void)
  {
+       omap3_pmic_get_config(&overo_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+       overo_twldata.vpll2->constraints.name = "VDVI";
        omap3_pmic_init("tps65950", &overo_twldata);
        /* i2c2 pins are used for gpio */
        omap_register_i2c_bus(3, 400, NULL, 0);
@@@ -568,6 -519,7 +519,6 @@@ static void __init overo_init(void
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        overo_spi_init();
 -      overo_ads7846_init();
        overo_init_smsc911x();
        overo_display_init();
        overo_init_led();