OSDN Git Service

Merge branch 'late/clksrc' into late/cleanup
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 May 2013 21:43:45 +0000 (23:43 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 6 May 2013 21:43:45 +0000 (23:43 +0200)
There is no reason to keep the clksrc cleanups separate from the
other cleanups, and this resolves some merge conflicts.

Conflicts:
arch/arm/mach-spear/spear13xx.c
drivers/irqchip/Makefile

23 files changed:
1  2 
arch/arm/Kconfig
arch/arm/boot/dts/Makefile
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-spear/spear13xx.c
drivers/clk/spear/spear1340_clock.c
drivers/clk/tegra/clk-tegra20.c
drivers/irqchip/Makefile

diff --combined arch/arm/Kconfig
@@@ -673,6 -673,7 +673,7 @@@ config ARCH_TEGR
        select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select SOC_BUS
        select SPARSE_IRQ
        select USE_OF
        help
@@@ -769,12 -770,15 +770,15 @@@ config ARCH_SA110
  config ARCH_S3C24XX
        bool "Samsung S3C24XX SoCs"
        select ARCH_HAS_CPUFREQ
-       select ARCH_USES_GETTIMEOFFSET
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_GPIO
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
+       select MULTI_IRQ_HANDLER
        select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        help
@@@ -787,10 -791,11 +791,11 @@@ config ARCH_S3C64X
        bool "Samsung S3C64XX"
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
-       select ARCH_USES_GETTIMEOFFSET
        select ARM_VIC
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select CPU_V6
+       select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -824,9 -829,11 +829,11 @@@ config ARCH_S5P64X
  
  config ARCH_S5PC100
        bool "Samsung S5PC100"
-       select ARCH_USES_GETTIMEOFFSET
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select CPU_V7
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_GPIO
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -933,8 -940,16 +940,8 @@@ config ARCH_NOMADI
        help
          Support for the Nomadik platform by ST-Ericsson
  
 -config PLAT_SPEAR
 +config PLAT_SPEAR_SINGLE
        bool "ST SPEAr"
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
        help
          Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
  
@@@ -1096,7 -1111,7 +1103,7 @@@ source "arch/arm/plat-samsung/Kconfig
  
  source "arch/arm/mach-socfpga/Kconfig"
  
 -source "arch/arm/plat-spear/Kconfig"
 +source "arch/arm/mach-spear/Kconfig"
  
  source "arch/arm/mach-s3c24xx/Kconfig"
  
@@@ -1165,6 -1180,7 +1172,7 @@@ config PLAT_VERSATIL
  config ARM_TIMER_SP804
        bool
        select CLKSRC_MMIO
+       select CLKSRC_OF if OF
        select HAVE_SCHED_CLOCK
  
  source arch/arm/mm/Kconfig
@@@ -1175,9 -1191,9 +1183,9 @@@ config ARM_NR_BANK
        default 8
  
  config IWMMXT
 -      bool "Enable iWMMXt support"
 +      bool "Enable iWMMXt support" if !CPU_PJ4
        depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
 -      default y if PXA27x || PXA3xx || ARCH_MMP
 +      default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4
        help
          Enable support for iWMMXt context switching at run time if
          running on a CPU that supports it.
@@@ -1431,16 -1447,6 +1439,16 @@@ config ARM_ERRATA_77542
         to deadlock. This workaround puts DSB before executing ISB if
         an abort may occur on cache maintenance.
  
 +config ARM_ERRATA_798181
 +      bool "ARM errata: TLBI/DSB failure on Cortex-A15"
 +      depends on CPU_V7 && SMP
 +      help
 +        On Cortex-A15 (r0p0..r3p2) the TLBI*IS/DSB operations are not
 +        adequately shooting down all use of the old entries. This
 +        option enables the Linux kernel workaround for this erratum
 +        which sends an IPI to the CPUs that are running the same ASID
 +        as the one being invalidated.
 +
  endmenu
  
  source "arch/arm/common/Kconfig"
@@@ -1595,6 -1601,7 +1603,7 @@@ config HAVE_ARM_ARCH_TIME
  config HAVE_ARM_TWD
        bool
        depends on SMP
+       select CLKSRC_OF if OF
        help
          This options enables support for the ARM timer and watchdog unit
  
@@@ -1648,7 -1655,7 +1657,7 @@@ config LOCAL_TIMER
        bool "Use local timer interrupts"
        depends on SMP
        default y
-       select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
+       select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !CLKSRC_EXYNOS_MCT)
        help
          Enable support for local timers on SMP platforms, rather then the
          legacy IPI broadcast method.  Local timers allows the system
@@@ -1663,7 -1670,8 +1672,8 @@@ config ARCH_NR_GPI
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
        default 512 if SOC_OMAP5
        default 355 if ARCH_U8500
-       default 288 if ARCH_VT8500 || ARCH_SUNXI
+       default 352 if ARCH_VT8500
+       default 288 if ARCH_SUNXI
        default 264 if MACH_H4700
        default 0
        help
@@@ -31,11 -31,6 +31,11 @@@ dtb-$(CONFIG_ARCH_AT91) += at91sam9g25e
  dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb
  dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb
  dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb
 +# sama5d3
 +dtb-$(CONFIG_ARCH_AT91)       += sama5d31ek.dtb
 +dtb-$(CONFIG_ARCH_AT91)       += sama5d33ek.dtb
 +dtb-$(CONFIG_ARCH_AT91)       += sama5d34ek.dtb
 +dtb-$(CONFIG_ARCH_AT91)       += sama5d35ek.dtb
  
  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
  dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb
@@@ -170,6 -165,8 +170,8 @@@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-har
        tegra30-cardhu-a04.dtb \
        tegra114-dalmore.dtb \
        tegra114-pluto.dtb
+ dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
+       versatile-pb.dtb
  dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \
        vexpress-v2p-ca9.dtb \
        vexpress-v2p-ca15-tc1.dtb \
@@@ -169,6 -169,8 +169,8 @@@ static struct clk *periph_clocks[] __in
  };
  
  static struct clk_lookup periph_clocks_lookups[] = {
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9261-lcdfb.0", &hck1),
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9g10-lcdfb.0", &hck1),
        CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
        CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
@@@ -337,7 -339,7 +339,7 @@@ static unsigned int at91sam9261_default
        0,      /* Advanced Interrupt Controller */
  };
  
 -AT91_SOC_START(sam9261)
 +AT91_SOC_START(at91sam9261)
        .map_io = at91sam9261_map_io,
        .default_irq_priority = at91sam9261_default_irq_priority,
        .ioremap_registers = at91sam9261_ioremap_registers,
@@@ -190,6 -190,7 +190,7 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
        CLKDEV_CON_DEV_ID("pclk", "fff98000.ssc", &ssc0_clk),
        CLKDEV_CON_DEV_ID("pclk", "fff9c000.ssc", &ssc1_clk),
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9263-lcdfb.0", &lcdc_clk),
        CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
        CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
        CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
@@@ -374,7 -375,7 +375,7 @@@ static unsigned int at91sam9263_default
        0,      /* Advanced Interrupt Controller (IRQ1) */
  };
  
 -AT91_SOC_START(sam9263)
 +AT91_SOC_START(at91sam9263)
        .map_io = at91sam9263_map_io,
        .default_irq_priority = at91sam9263_default_irq_priority,
        .ioremap_registers = at91sam9263_ioremap_registers,
@@@ -228,6 -228,8 +228,8 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_ID("hclk", &macb_clk),
        /* One additional fake clock for ohci */
        CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9g45-lcdfb.0", &lcdc_clk),
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9g45es-lcdfb.0", &lcdc_clk),
        CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
        CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
        CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
@@@ -418,7 -420,7 +420,7 @@@ static unsigned int at91sam9g45_default
        0,      /* Advanced Interrupt Controller (IRQ0) */
  };
  
 -AT91_SOC_START(sam9g45)
 +AT91_SOC_START(at91sam9g45)
        .map_io = at91sam9g45_map_io,
        .default_irq_priority = at91sam9g45_default_irq_priority,
        .ioremap_registers = at91sam9g45_ioremap_registers,
@@@ -179,6 -179,7 +179,7 @@@ static struct clk *periph_clocks[] __in
  };
  
  static struct clk_lookup periph_clocks_lookups[] = {
+       CLKDEV_CON_DEV_ID("hclk", "at91sam9rl-lcdfb.0", &lcdc_clk),
        CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
        CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
@@@ -340,7 -341,7 +341,7 @@@ static unsigned int at91sam9rl_default_
        0,      /* Advanced Interrupt Controller */
  };
  
 -AT91_SOC_START(sam9rl)
 +AT91_SOC_START(at91sam9rl)
        .map_io = at91sam9rl_map_io,
        .default_irq_priority = at91sam9rl_default_irq_priority,
        .ioremap_registers = at91sam9rl_ioremap_registers,
@@@ -35,7 -35,7 +35,7 @@@
  #include "common.h"
  #include <linux/omap-dma.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include "gpmc.h"
  #include "gpmc-smc91x.h"
@@@ -108,38 -108,53 +108,38 @@@ static struct twl4030_keypad_data sdp34
  #define SDP3430_LCD_PANEL_BACKLIGHT_GPIO      8
  #define SDP3430_LCD_PANEL_ENABLE_GPIO         5
  
 -static struct gpio sdp3430_dss_gpios[] __initdata = {
 -      {SDP3430_LCD_PANEL_ENABLE_GPIO,    GPIOF_OUT_INIT_LOW, "LCD reset"    },
 -      {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
 -};
 -
  static void __init sdp3430_display_init(void)
  {
        int r;
  
 -      r = gpio_request_array(sdp3430_dss_gpios,
 -                             ARRAY_SIZE(sdp3430_dss_gpios));
 +      /*
 +       * the backlight GPIO doesn't directly go to the panel, it enables
 +       * an internal circuit on 3430sdp to create the signal V_BKL_28V,
 +       * this is connected to LED+ pin of the sharp panel. This GPIO
 +       * is left enabled in the board file, and not passed to the panel
 +       * as platform_data.
 +       */
 +      r = gpio_request_one(SDP3430_LCD_PANEL_BACKLIGHT_GPIO,
 +                              GPIOF_OUT_INIT_HIGH, "LCD Backlight");
        if (r)
 -              printk(KERN_ERR "failed to get LCD control GPIOs\n");
 -
 -}
 -
 -static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
 -      gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
 -
 -      return 0;
 -}
 +              pr_err("failed to get LCD Backlight GPIO\n");
  
 -static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
 -      gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
 -}
 -
 -static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
 -{
 -      return 0;
 -}
 -
 -static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev)
 -{
  }
  
 +static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = {
 +      .resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO,
 +      .ini_gpio = -1,
 +      .mo_gpio = -1,
 +      .lr_gpio = -1,
 +      .ud_gpio = -1,
 +};
  
  static struct omap_dss_device sdp3430_lcd_device = {
        .name                   = "lcd",
        .driver_name            = "sharp_ls_panel",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .phy.dpi.data_lines     = 16,
 -      .platform_enable        = sdp3430_panel_enable_lcd,
 -      .platform_disable       = sdp3430_panel_disable_lcd,
 +      .data                   = &sdp3430_lcd_data,
  };
  
  static struct tfp410_platform_data dvi_panel = {
@@@ -160,6 -175,8 +160,6 @@@ static struct omap_dss_device sdp3430_t
        .driver_name            = "venc",
        .type                   = OMAP_DISPLAY_TYPE_VENC,
        .phy.venc.type          = OMAP_DSS_VENC_TYPE_SVIDEO,
 -      .platform_enable        = sdp3430_panel_enable_tv,
 -      .platform_disable       = sdp3430_panel_disable_tv,
  };
  
  
@@@ -428,16 -445,23 +428,23 @@@ static void enable_board_wakeup_source(
                OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
  }
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 1,
+               .reset_gpio = 57,
+               .vcc_gpio = -EINVAL,
+       },
+       {
+               .port = 2,
+               .reset_gpio = 61,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = 57,
-       .reset_gpio_port[1]  = 61,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -589,6 -613,8 +596,8 @@@ static void __init omap_3430sdp_init(vo
        board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
        sdp3430_display_init();
        enable_board_wakeup_source();
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
  }
  
@@@ -35,7 -35,8 +35,7 @@@
  
  #include "common.h"
  #include <video/omapdss.h>
 -#include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include "am35xx-emac.h"
  #include "mux.h"
@@@ -120,14 -121,63 +120,14 @@@ static int __init am3517_evm_i2c_init(v
        return 0;
  }
  
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
 -#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
 -              defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
 -static struct gpio am3517_evm_dss_gpios[] __initdata = {
 -      /* GPIO 182 = LCD Backlight Power */
 -      { LCD_PANEL_BKLIGHT_PWR, GPIOF_OUT_INIT_HIGH, "lcd_backlight_pwr" },
 -      /* GPIO 181 = LCD Panel PWM */
 -      { LCD_PANEL_PWM,         GPIOF_OUT_INIT_HIGH, "lcd bl enable"     },
 -      /* GPIO 176 = LCD Panel Power enable pin */
 -      { LCD_PANEL_PWR,         GPIOF_OUT_INIT_HIGH, "dvi enable"        },
 -};
 -
 -static void __init am3517_evm_display_init(void)
 -{
 -      int r;
 -
 -      omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP);
 -      omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN);
 -      omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN);
 -
 -      r = gpio_request_array(am3517_evm_dss_gpios,
 -                             ARRAY_SIZE(am3517_evm_dss_gpios));
 -      if (r) {
 -              printk(KERN_ERR "failed to get DSS panel control GPIOs\n");
 -              return;
 -      }
 -
 -      printk(KERN_INFO "Display initialized successfully\n");
 -}
 -#else
 -static void __init am3517_evm_display_init(void) {}
 -#endif
 -
 -static int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (dvi_enabled) {
 -              printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
 -              return -EINVAL;
 -      }
 -      gpio_set_value(LCD_PANEL_PWR, 1);
 -      lcd_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(LCD_PANEL_PWR, 0);
 -      lcd_enabled = 0;
 -}
 -
  static struct panel_generic_dpi_data lcd_panel = {
        .name                   = "sharp_lq",
 -      .platform_enable        = am3517_evm_panel_enable_lcd,
 -      .platform_disable       = am3517_evm_panel_disable_lcd,
 +      .num_gpios              = 3,
 +      .gpios                  = {
 +              LCD_PANEL_PWR,
 +              LCD_PANEL_BKLIGHT_PWR,
 +              LCD_PANEL_PWM,
 +      },
  };
  
  static struct omap_dss_device am3517_evm_lcd_device = {
        .phy.dpi.data_lines     = 16,
  };
  
 -static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev)
 -{
 -      return 0;
 -}
 -
 -static void am3517_evm_panel_disable_tv(struct omap_dss_device *dssdev)
 -{
 -}
 -
  static struct omap_dss_device am3517_evm_tv_device = {
        .type                   = OMAP_DISPLAY_TYPE_VENC,
        .name                   = "tv",
        .driver_name            = "venc",
        .phy.venc.type          = OMAP_DSS_VENC_TYPE_SVIDEO,
 -      .platform_enable        = am3517_evm_panel_enable_tv,
 -      .platform_disable       = am3517_evm_panel_disable_tv,
  };
  
  static struct tfp410_platform_data dvi_panel = {
@@@ -213,6 -274,14 +213,14 @@@ static __init void am3517_evm_mcbsp1_in
        omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);
  }
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 1,
+               .reset_gpio = 57,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
  #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
  #else
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
  #endif
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = 57,
-       .reset_gpio_port[1]  = -EINVAL,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -288,7 -351,6 +290,6 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
  static void __init am3517_evm_init(void)
  {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  
        /* Configure GPIO for EHCI port */
        omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
        am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
 -      /* DSS */
 -      am3517_evm_display_init();
  
        /* RTC - S35390A */
        am3517_evm_rtc_init();
@@@ -41,7 -41,8 +41,7 @@@
  
  #include <linux/platform_data/mtd-nand-omap2.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  #include <linux/platform_data/spi-omap2-mcspi.h>
  
  #include "common.h"
@@@ -190,12 -191,45 +190,12 @@@ static inline void cm_t35_init_nand(voi
  #define CM_T35_LCD_BL_GPIO 58
  #define CM_T35_DVI_EN_GPIO 54
  
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
 -static int cm_t35_panel_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (dvi_enabled) {
 -              printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
 -              return -EINVAL;
 -      }
 -
 -      gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
 -      gpio_set_value(CM_T35_LCD_BL_GPIO, 1);
 -
 -      lcd_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      lcd_enabled = 0;
 -
 -      gpio_set_value(CM_T35_LCD_BL_GPIO, 0);
 -      gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
 -}
 -
 -static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
 -{
 -      return 0;
 -}
 -
 -static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev)
 -{
 -}
 -
  static struct panel_generic_dpi_data lcd_panel = {
        .name                   = "toppoly_tdo35s",
 -      .platform_enable        = cm_t35_panel_enable_lcd,
 -      .platform_disable       = cm_t35_panel_disable_lcd,
 +      .num_gpios              = 1,
 +      .gpios                  = {
 +              CM_T35_LCD_BL_GPIO,
 +      },
  };
  
  static struct omap_dss_device cm_t35_lcd_device = {
@@@ -224,6 -258,8 +224,6 @@@ static struct omap_dss_device cm_t35_tv
        .driver_name            = "venc",
        .type                   = OMAP_DISPLAY_TYPE_VENC,
        .phy.venc.type          = OMAP_DSS_VENC_TYPE_SVIDEO,
 -      .platform_enable        = cm_t35_panel_enable_tv,
 -      .platform_disable       = cm_t35_panel_disable_tv,
  };
  
  static struct omap_dss_device *cm_t35_dss_devices[] = {
@@@ -257,6 -293,11 +257,6 @@@ static struct spi_board_info cm_t35_lcd
        },
  };
  
 -static struct gpio cm_t35_dss_gpios[] __initdata = {
 -      { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW,  "lcd enable"    },
 -      { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW,  "lcd bl enable" },
 -};
 -
  static void __init cm_t35_init_display(void)
  {
        int err;
        spi_register_board_info(cm_t35_lcd_spi_board_info,
                                ARRAY_SIZE(cm_t35_lcd_spi_board_info));
  
 -      err = gpio_request_array(cm_t35_dss_gpios,
 -                               ARRAY_SIZE(cm_t35_dss_gpios));
 +
 +      err = gpio_request_one(CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW,
 +                      "lcd bl enable");
        if (err) {
 -              pr_err("CM-T35: failed to request DSS control GPIOs\n");
 +              pr_err("CM-T35: failed to request LCD EN GPIO\n");
                return;
        }
  
 -      gpio_export(CM_T35_LCD_EN_GPIO, 0);
 -      gpio_export(CM_T35_LCD_BL_GPIO, 0);
 -
        msleep(50);
        gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
  
        err = omap_display_init(&cm_t35_dss_data);
        if (err) {
                pr_err("CM-T35: failed to register DSS device\n");
 -              gpio_free_array(cm_t35_dss_gpios, ARRAY_SIZE(cm_t35_dss_gpios));
 +              gpio_free(CM_T35_LCD_EN_GPIO);
        }
  }
  
@@@ -376,15 -419,22 +376,22 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 1,
+               .reset_gpio = OMAP_MAX_GPIO_LINES + 6,
+               .vcc_gpio = -EINVAL,
+       },
+       {
+               .port = 2,
+               .reset_gpio = OMAP_MAX_GPIO_LINES + 7,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = OMAP_MAX_GPIO_LINES + 6,
-       .reset_gpio_port[1]  = OMAP_MAX_GPIO_LINES + 7,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  static void  __init cm_t35_init_usbh(void)
                msleep(1);
        }
  
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
  }
  
@@@ -43,7 -43,8 +43,7 @@@
  #include "gpmc.h"
  #include <linux/platform_data/mtd-nand-omap2.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include <linux/platform_data/spi-omap2-mcspi.h>
  #include <linux/input/matrix_keypad.h>
@@@ -103,6 -104,19 +103,6 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
 -static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (gpio_is_valid(dssdev->reset_gpio))
 -              gpio_set_value_cansleep(dssdev->reset_gpio, 1);
 -      return 0;
 -}
 -
 -static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (gpio_is_valid(dssdev->reset_gpio))
 -              gpio_set_value_cansleep(dssdev->reset_gpio, 0);
 -}
 -
  static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
  };
@@@ -114,7 -128,8 +114,7 @@@ static struct regulator_consumer_suppl
  
  static struct panel_generic_dpi_data lcd_panel = {
        .name                   = "innolux_at070tn83",
 -      .platform_enable        = devkit8000_panel_enable_lcd,
 -      .platform_disable       = devkit8000_panel_disable_lcd,
 +      /* gpios filled in code */
  };
  
  static struct omap_dss_device devkit8000_lcd_device = {
@@@ -196,6 -211,8 +196,6 @@@ static struct gpio_led gpio_leds[]
  static int devkit8000_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
  {
 -      int ret;
 -
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
        omap_hsmmc_late_init(mmc);
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
  
        /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
 -      devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0;
 -      ret = gpio_request_one(devkit8000_lcd_device.reset_gpio,
 -                             GPIOF_OUT_INIT_LOW, "LCD_PWREN");
 -      if (ret < 0) {
 -              devkit8000_lcd_device.reset_gpio = -EINVAL;
 -              printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n");
 -      }
 +      lcd_panel.num_gpios = 1;
 +      lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
  
        /* gpio + 7 is "DVI_PD" (out, active low) */
        dvi_panel.power_down_gpio = gpio + 7;
@@@ -415,15 -437,7 +415,7 @@@ static struct platform_device *devkit80
  };
  
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = -EINVAL,
-       .reset_gpio_port[1]  = -EINVAL,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -31,7 -31,7 +31,7 @@@
  #include <asm/mach/arch.h>
  
  #include <video/omapdss.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  #include <linux/platform_data/mtd-onenand-omap2.h>
  
  #include "common.h"
@@@ -527,26 -527,28 +527,28 @@@ static void __init igep_i2c_init(void
        omap3_pmic_init("twl4030", &igep_twldata);
  }
  
+ static struct usbhs_phy_data igep2_phy_data[] __initdata = {
+       {
+               .port = 1,
+               .reset_gpio = IGEP2_GPIO_USBH_NRESET,
+               .vcc_gpio = -EINVAL,
+       },
+ };
+ static struct usbhs_phy_data igep3_phy_data[] __initdata = {
+       {
+               .port = 2,
+               .reset_gpio = IGEP3_GPIO_USBH_NRESET,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset = true,
-       .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
-       .reset_gpio_port[1] = -EINVAL,
-       .reset_gpio_port[2] = -EINVAL,
  };
  
  static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset = true,
-       .reset_gpio_port[0] = -EINVAL,
-       .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
-       .reset_gpio_port[2] = -EINVAL,
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -642,8 -644,10 +644,10 @@@ static void __init igep_init(void
        if (machine_is_igep0020()) {
                omap_display_init(&igep2_dss_data);
                igep2_init_smsc911x();
+               usbhs_init_phys(igep2_phy_data, ARRAY_SIZE(igep2_phy_data));
                usbhs_init(&igep2_usbhs_bdata);
        } else {
+               usbhs_init_phys(igep3_phy_data, ARRAY_SIZE(igep3_phy_data));
                usbhs_init(&igep3_usbhs_bdata);
        }
  }
@@@ -33,6 -33,7 +33,7 @@@
  #include <linux/mtd/nand.h>
  #include <linux/mmc/host.h>
  #include <linux/usb/phy.h>
+ #include <linux/usb/nop-usb-xceiv.h>
  
  #include <linux/regulator/machine.h>
  #include <linux/i2c/twl.h>
@@@ -43,7 -44,7 +44,7 @@@
  #include <asm/mach/flash.h>
  
  #include <video/omapdss.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  #include <linux/platform_data/mtd-nand-omap2.h>
  
  #include "common.h"
@@@ -277,6 -278,21 +278,21 @@@ static struct regulator_consumer_suppl
  
  static struct gpio_led gpio_leds[];
  
+ /* PHY's VCC regulator might be added later, so flag that we need it */
+ static struct nop_usb_xceiv_platform_data hsusb2_phy_data = {
+       .needs_vcc = true,
+ };
+ static struct usbhs_phy_data phy_data[] = {
+       {
+               .port = 2,
+               .reset_gpio = 147,
+               .vcc_gpio = -1,         /* updated in beagle_twl_gpio_setup */
+               .vcc_polarity = 1,      /* updated in beagle_twl_gpio_setup */
+               .platform_data = &hsusb2_phy_data,
+       },
+ };
  static int beagle_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
  {
        }
        dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio;
  
-       gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
-                       "nEN_USB_PWR");
+       /* TWL4030_GPIO_MAX i.e. LED_GPO controls HS USB Port 2 power */
+       phy_data[0].vcc_gpio = gpio + TWL4030_GPIO_MAX;
+       phy_data[0].vcc_polarity = beagle_config.usb_pwr_level;
  
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        return 0;
  }
  
@@@ -453,15 -471,7 +471,7 @@@ static struct platform_device *omap3_be
  };
  
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = -EINVAL,
-       .reset_gpio_port[1]  = 147,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -479,7 -489,7 +489,7 @@@ static int __init beagle_opp_init(void
  
        /* Initialize the omap3 opp table if not already created. */
        r = omap3_opp_init();
-       if (IS_ERR_VALUE(r) && (r != -EEXIST)) {
+       if (r < 0 && (r != -EEXIST)) {
                pr_err("%s: opp default init failed\n", __func__);
                return r;
        }
@@@ -543,7 -553,9 +553,9 @@@ static void __init omap3_beagle_init(vo
  
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        board_nand_init(omap3beagle_nand_partitions,
                        ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS,
                        NAND_BUSWIDTH_16, NULL);
@@@ -51,7 -51,7 +51,7 @@@
  #include "common.h"
  #include <linux/platform_data/spi-omap2-mcspi.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include "soc.h"
  #include "mux.h"
@@@ -155,43 -155,61 +155,43 @@@ static inline void __init omap3evm_init
  #define OMAP3EVM_LCD_PANEL_LR         2
  #define OMAP3EVM_LCD_PANEL_UD         3
  #define OMAP3EVM_LCD_PANEL_INI                152
 -#define OMAP3EVM_LCD_PANEL_ENVDD      153
  #define OMAP3EVM_LCD_PANEL_QVGA               154
  #define OMAP3EVM_LCD_PANEL_RESB               155
 +
 +#define OMAP3EVM_LCD_PANEL_ENVDD      153
  #define OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO       210
 +
 +/*
 + * OMAP3EVM DVI control signals
 + */
  #define OMAP3EVM_DVI_PANEL_EN_GPIO    199
  
 -static struct gpio omap3_evm_dss_gpios[] __initdata = {
 -      { OMAP3EVM_LCD_PANEL_RESB,  GPIOF_OUT_INIT_HIGH, "lcd_panel_resb"  },
 -      { OMAP3EVM_LCD_PANEL_INI,   GPIOF_OUT_INIT_HIGH, "lcd_panel_ini"   },
 -      { OMAP3EVM_LCD_PANEL_QVGA,  GPIOF_OUT_INIT_LOW,  "lcd_panel_qvga"  },
 -      { OMAP3EVM_LCD_PANEL_LR,    GPIOF_OUT_INIT_HIGH, "lcd_panel_lr"    },
 -      { OMAP3EVM_LCD_PANEL_UD,    GPIOF_OUT_INIT_HIGH, "lcd_panel_ud"    },
 -      { OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW,  "lcd_panel_envdd" },
 +static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = {
 +      .resb_gpio = OMAP3EVM_LCD_PANEL_RESB,
 +      .ini_gpio = OMAP3EVM_LCD_PANEL_INI,
 +      .mo_gpio = OMAP3EVM_LCD_PANEL_QVGA,
 +      .lr_gpio = OMAP3EVM_LCD_PANEL_LR,
 +      .ud_gpio = OMAP3EVM_LCD_PANEL_UD,
  };
  
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
  static void __init omap3_evm_display_init(void)
  {
        int r;
  
 -      r = gpio_request_array(omap3_evm_dss_gpios,
 -                             ARRAY_SIZE(omap3_evm_dss_gpios));
 +      r = gpio_request_one(OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW,
 +                              "lcd_panel_envdd");
        if (r)
 -              printk(KERN_ERR "failed to get lcd_panel_* gpios\n");
 -}
 +              pr_err("failed to get lcd_panel_envdd GPIO\n");
  
 -static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (dvi_enabled) {
 -              printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
 -              return -EINVAL;
 -      }
 -      gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
 +      r = gpio_request_one(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO,
 +                              GPIOF_OUT_INIT_LOW, "lcd_panel_bklight");
 +      if (r)
 +              pr_err("failed to get lcd_panel_bklight GPIO\n");
  
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
        else
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 -
 -      lcd_enabled = 1;
 -      return 0;
 -}
 -
 -static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
 -
 -      if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
 -              gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 -      else
 -              gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
 -
 -      lcd_enabled = 0;
  }
  
  static struct omap_dss_device omap3_evm_lcd_device = {
        .driver_name            = "sharp_ls_panel",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .phy.dpi.data_lines     = 18,
 -      .platform_enable        = omap3_evm_enable_lcd,
 -      .platform_disable       = omap3_evm_disable_lcd,
 +      .data                   = &omap3_evm_lcd_data,
  };
  
 -static int omap3_evm_enable_tv(struct omap_dss_device *dssdev)
 -{
 -      return 0;
 -}
 -
 -static void omap3_evm_disable_tv(struct omap_dss_device *dssdev)
 -{
 -}
 -
  static struct omap_dss_device omap3_evm_tv_device = {
        .name                   = "tv",
        .driver_name            = "venc",
        .type                   = OMAP_DISPLAY_TYPE_VENC,
        .phy.venc.type          = OMAP_DSS_VENC_TYPE_SVIDEO,
 -      .platform_enable        = omap3_evm_enable_tv,
 -      .platform_disable       = omap3_evm_disable_tv,
  };
  
  static struct tfp410_platform_data dvi_panel = {
@@@ -466,7 -496,7 +466,7 @@@ struct wl12xx_platform_data omap3evm_wl
  static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
        REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"),    /* OMAP ISP */
        REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"),    /* OMAP ISP */
-       REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+       REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"),     /* hsusb port 2 */
        REGULATOR_SUPPLY("vaux2", NULL),
  };
  
@@@ -509,17 -539,16 +509,16 @@@ static int __init omap3_evm_i2c_init(vo
        return 0;
  }
  
- static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 2,
+               .reset_gpio = -1,       /* set at runtime */
+               .vcc_gpio = -EINVAL,
+       },
+ };
  
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+ static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       /* PHY reset GPIO will be runtime programmed based on EVM version */
-       .reset_gpio_port[0]  = -EINVAL,
-       .reset_gpio_port[1]  = -EINVAL,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -695,7 -724,7 +694,7 @@@ static void __init omap3_evm_init(void
  
                /* setup EHCI phy reset config */
                omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
-               usbhs_bdata.reset_gpio_port[1] = 21;
+               phy_data[0].reset_gpio = 21;
  
                /* EVM REV >= E can supply 500mA with EXTVBUS programming */
                musb_board_data.power = 500;
        } else {
                /* setup EHCI phy reset on MDC */
                omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
-               usbhs_bdata.reset_gpio_port[1] = 135;
+               phy_data[0].reset_gpio = 135;
        }
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(&musb_board_data);
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
        board_nand_init(omap3evm_nand_partitions,
                        ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS,
@@@ -44,7 -44,6 +44,7 @@@
  
  #include "common.h"
  #include <video/omapdss.h>
 +#include <video/omap-panel-data.h>
  #include <linux/platform_data/mtd-nand-omap2.h>
  
  #include "mux.h"
@@@ -231,16 -230,12 +231,16 @@@ static struct twl4030_keypad_data pando
        .rep            = 1,
  };
  
 +static struct panel_tpo_td043_data lcd_data = {
 +      .nreset_gpio            = 157,
 +};
 +
  static struct omap_dss_device pandora_lcd_device = {
        .name                   = "lcd",
        .driver_name            = "tpo_td043mtea1_panel",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .phy.dpi.data_lines     = 24,
 -      .reset_gpio             = 157,
 +      .data                   = &lcd_data,
  };
  
  static struct omap_dss_device pandora_tv_device = {
@@@ -351,7 -346,7 +351,7 @@@ static struct regulator_consumer_suppl
  };
  
  static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
-       REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+       REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"),     /* hsusb port 2 */
  };
  
  /* ads7846 on SPI and 2 nub controllers on I2C */
@@@ -566,6 -561,14 +566,14 @@@ fail
        printk(KERN_ERR "wl1251 board initialisation failed\n");
  }
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 2,
+               .reset_gpio = 16,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct platform_device *omap3pandora_devices[] __initdata = {
        &pandora_leds_gpio,
        &pandora_keys_gpio,
  };
  
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = -EINVAL,
-       .reset_gpio_port[1]  = 16,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -606,7 -601,10 +606,10 @@@ static void __init omap3pandora_init(vo
        spi_register_board_info(omap3pandora_spi_board_info,
                        ARRAY_SIZE(omap3pandora_spi_board_info));
        omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        gpmc_nand_init(&pandora_nand_data, NULL);
@@@ -44,7 -44,8 +44,7 @@@
  #include "gpmc.h"
  #include <linux/platform_data/mtd-nand-omap2.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include <linux/platform_data/spi-omap2-mcspi.h>
  
@@@ -94,6 -95,15 +94,6 @@@ static void __init omap3_stalker_displa
        return;
  }
  
 -static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
 -{
 -      return 0;
 -}
 -
 -static void omap3_stalker_disable_tv(struct omap_dss_device *dssdev)
 -{
 -}
 -
  static struct omap_dss_device omap3_stalker_tv_device = {
        .name                   = "tv",
        .driver_name            = "venc",
  #elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
        .u.venc.type            = OMAP_DSS_VENC_TYPE_COMPOSITE,
  #endif
 -      .platform_enable        = omap3_stalker_enable_tv,
 -      .platform_disable       = omap3_stalker_disable_tv,
  };
  
  static struct tfp410_platform_data dvi_panel = {
@@@ -346,19 -358,20 +346,20 @@@ static int __init omap3_stalker_i2c_ini
  
  #define OMAP3_STALKER_TS_GPIO 175
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 2,
+               .reset_gpio = 21,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct platform_device *omap3_stalker_devices[] __initdata = {
        &keys_gpio,
  };
  
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset = true,
-       .reset_gpio_port[0] = -EINVAL,
-       .reset_gpio_port[1] = 21,
-       .reset_gpio_port[2] = -EINVAL,
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -395,6 -408,8 +396,8 @@@ static void __init omap3_stalker_init(v
        omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
        omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
  
@@@ -47,7 -47,8 +47,7 @@@
  #include <asm/mach/map.h>
  
  #include <video/omapdss.h>
 -#include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-tfp410.h>
 +#include <video/omap-panel-data.h>
  
  #include "common.h"
  #include "mux.h"
@@@ -145,9 -146,28 +145,9 @@@ static inline void __init overo_init_sm
  #endif
  
  /* DSS */
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
  #define OVERO_GPIO_LCD_EN 144
  #define OVERO_GPIO_LCD_BL 145
  
 -static struct gpio overo_dss_gpios[] __initdata = {
 -      { OVERO_GPIO_LCD_EN, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_EN" },
 -      { OVERO_GPIO_LCD_BL, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_BL" },
 -};
 -
 -static void __init overo_display_init(void)
 -{
 -      if (gpio_request_array(overo_dss_gpios, ARRAY_SIZE(overo_dss_gpios))) {
 -              printk(KERN_ERR "could not obtain DSS control GPIOs\n");
 -              return;
 -      }
 -
 -      gpio_export(OVERO_GPIO_LCD_EN, 0);
 -      gpio_export(OVERO_GPIO_LCD_BL, 0);
 -}
 -
  static struct tfp410_platform_data dvi_panel = {
        .i2c_bus_num            = 3,
        .power_down_gpio        = -1,
@@@ -168,13 -188,30 +168,13 @@@ static struct omap_dss_device overo_tv_
        .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
  };
  
 -static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
 -{
 -      if (dvi_enabled) {
 -              printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
 -              return -EINVAL;
 -      }
 -
 -      gpio_set_value(OVERO_GPIO_LCD_EN, 1);
 -      gpio_set_value(OVERO_GPIO_LCD_BL, 1);
 -      lcd_enabled = 1;
 -      return 0;
 -}
 -
 -static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(OVERO_GPIO_LCD_EN, 0);
 -      gpio_set_value(OVERO_GPIO_LCD_BL, 0);
 -      lcd_enabled = 0;
 -}
 -
  static struct panel_generic_dpi_data lcd43_panel = {
        .name                   = "samsung_lte430wq_f0c",
 -      .platform_enable        = overo_panel_enable_lcd,
 -      .platform_disable       = overo_panel_disable_lcd,
 +      .num_gpios              = 2,
 +      .gpios                  = {
 +              OVERO_GPIO_LCD_EN,
 +              OVERO_GPIO_LCD_BL
 +      },
  };
  
  static struct omap_dss_device overo_lcd43_device = {
  
  #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
        defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
 +static struct panel_generic_dpi_data lcd35_panel = {
 +      .num_gpios              = 2,
 +      .gpios                  = {
 +              OVERO_GPIO_LCD_EN,
 +              OVERO_GPIO_LCD_BL
 +      },
 +};
 +
  static struct omap_dss_device overo_lcd35_device = {
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .name                   = "lcd35",
        .driver_name            = "lgphilips_lb035q02_panel",
        .phy.dpi.data_lines     = 24,
 -      .platform_enable        = overo_panel_enable_lcd,
 -      .platform_disable       = overo_panel_disable_lcd,
 +      .data                   = &lcd35_panel,
  };
  #endif
  
@@@ -428,14 -458,16 +428,16 @@@ static int __init overo_spi_init(void
        return 0;
  }
  
+ static struct usbhs_phy_data phy_data[] __initdata = {
+       {
+               .port = 2,
+               .reset_gpio = OVERO_GPIO_USBH_NRESET,
+               .vcc_gpio = -EINVAL,
+       },
+ };
  static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-       .phy_reset  = true,
-       .reset_gpio_port[0]  = -EINVAL,
-       .reset_gpio_port[1]  = OVERO_GPIO_USBH_NRESET,
-       .reset_gpio_port[2]  = -EINVAL
  };
  
  #ifdef CONFIG_OMAP_MUX
@@@ -472,9 -504,12 +474,11 @@@ static void __init overo_init(void
                        ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
+       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
        usbhs_init(&usbhs_bdata);
        overo_spi_init();
        overo_init_smsc911x();
 -      overo_display_init();
        overo_init_led();
        overo_init_keys();
        omap_twl4030_audio_init("overo", NULL);
@@@ -82,8 -82,7 +82,7 @@@ extern void omap2_init_common_infrastru
  extern void omap2_sync32k_timer_init(void);
  extern void omap3_sync32k_timer_init(void);
  extern void omap3_secure_sync32k_timer_init(void);
- extern void omap3_gp_gptimer_timer_init(void);
- extern void omap3_am33xx_gptimer_timer_init(void);
+ extern void omap3_gptimer_timer_init(void);
  extern void omap4_local_timer_init(void);
  extern void omap5_realtime_timer_init(void);
  
@@@ -293,8 -292,5 +292,8 @@@ extern void omap_reserve(void)
  struct omap_hwmod;
  extern int omap_dss_reset(struct omap_hwmod *);
  
 +/* SoC specific clock initializer */
 +extern int (*omap_clk_init)(void);
 +
  #endif /* __ASSEMBLER__ */
  #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
@@@ -1364,9 -1364,7 +1364,9 @@@ static void _enable_sysc(struct omap_hw
        }
  
        if (sf & SYSC_HAS_MIDLEMODE) {
 -              if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
 +              if (oh->flags & HWMOD_FORCE_MSTANDBY) {
 +                      idlemode = HWMOD_IDLEMODE_FORCE;
 +              } else if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
                        idlemode = HWMOD_IDLEMODE_NO;
                } else {
                        if (sf & SYSC_HAS_ENAWAKEUP)
@@@ -1438,8 -1436,7 +1438,8 @@@ static void _idle_sysc(struct omap_hwmo
        }
  
        if (sf & SYSC_HAS_MIDLEMODE) {
 -              if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
 +              if ((oh->flags & HWMOD_SWSUP_MSTANDBY) ||
 +                  (oh->flags & HWMOD_FORCE_MSTANDBY)) {
                        idlemode = HWMOD_IDLEMODE_FORCE;
                } else {
                        if (sf & SYSC_HAS_ENAWAKEUP)
@@@ -1662,7 -1659,7 +1662,7 @@@ static int _deassert_hardreset(struct o
                return -ENOSYS;
  
        ret = _lookup_hardreset(oh, name, &ohri);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
  
        if (oh->clkdm) {
@@@ -2412,7 -2409,7 +2412,7 @@@ static int __init _init(struct omap_hwm
        _init_mpu_rt_base(oh, NULL);
  
        r = _init_clocks(oh, NULL);
-       if (IS_ERR_VALUE(r)) {
+       if (r < 0) {
                WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
                return -EINVAL;
        }
@@@ -46,7 -46,6 +46,6 @@@
  #include <asm/smp_twd.h>
  #include <asm/sched_clock.h>
  
- #include <asm/arch_timer.h>
  #include "omap_hwmod.h"
  #include "omap_device.h"
  #include <plat/counter-32k.h>
  #include "common.h"
  #include "powerdomain.h"
  
- /* Parent clocks, eventually these will come from the clock framework */
- #define OMAP2_MPU_SOURCE      "sys_ck"
- #define OMAP3_MPU_SOURCE      OMAP2_MPU_SOURCE
- #define OMAP4_MPU_SOURCE      "sys_clkin_ck"
- #define OMAP5_MPU_SOURCE      "sys_clkin"
- #define OMAP2_32K_SOURCE      "func_32k_ck"
- #define OMAP3_32K_SOURCE      "omap_32k_fck"
- #define OMAP4_32K_SOURCE      "sys_32k_ck"
  #define REALTIME_COUNTER_BASE                         0x48243200
  #define INCREMENTER_NUMERATOR_OFFSET                  0x10
  #define INCREMENTER_DENUMERATOR_RELOAD_OFFSET         0x14
@@@ -130,7 -119,6 +119,6 @@@ static void omap2_gp_timer_set_mode(enu
  }
  
  static struct clock_event_device clockevent_gpt = {
-       .name           = "gp_timer",
        .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
        .rating         = 300,
        .set_next_event = omap2_gp_timer_set_next_event,
@@@ -171,6 -159,12 +159,12 @@@ static struct device_node * __init omap
                if (property && !of_get_property(np, property, NULL))
                        continue;
  
+               if (!property && (of_get_property(np, "ti,timer-alwon", NULL) ||
+                                 of_get_property(np, "ti,timer-dsp", NULL) ||
+                                 of_get_property(np, "ti,timer-pwm", NULL) ||
+                                 of_get_property(np, "ti,timer-secure", NULL)))
+                       continue;
                of_add_property(np, &device_disabled);
                return np;
        }
@@@ -215,16 -209,17 +209,17 @@@ static u32 __init omap_dm_timer_get_err
  }
  
  static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
-                                               int gptimer_id,
-                                               const char *fck_source,
-                                               const char *property,
-                                               int posted)
+                                        const char *fck_source,
+                                        const char *property,
+                                        const char **timer_name,
+                                        int posted)
  {
        char name[10]; /* 10 = sizeof("gptXX_Xck0") */
        const char *oh_name;
        struct device_node *np;
        struct omap_hwmod *oh;
        struct resource irq, mem;
+       struct clk *src;
        int r = 0;
  
        if (of_have_populated_dt()) {
  
                of_node_put(np);
        } else {
-               if (omap_dm_timer_reserve_systimer(gptimer_id))
+               if (omap_dm_timer_reserve_systimer(timer->id))
                        return -ENODEV;
  
-               sprintf(name, "timer%d", gptimer_id);
+               sprintf(name, "timer%d", timer->id);
                oh_name = name;
        }
  
        if (!oh)
                return -ENODEV;
  
+       *timer_name = oh->name;
        if (!of_have_populated_dt()) {
                r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
                                                   &irq);
        /* After the dmtimer is using hwmod these clocks won't be needed */
        timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
        if (IS_ERR(timer->fclk))
-               return -ENODEV;
+               return PTR_ERR(timer->fclk);
  
-       /* FIXME: Need to remove hard-coded test on timer ID */
-       if (gptimer_id != 12) {
-               struct clk *src;
-               src = clk_get(NULL, fck_source);
-               if (IS_ERR(src)) {
-                       r = -EINVAL;
-               } else {
-                       r = clk_set_parent(timer->fclk, src);
-                       if (IS_ERR_VALUE(r))
-                               pr_warn("%s: %s cannot set source\n",
-                                       __func__, oh->name);
+       src = clk_get(NULL, fck_source);
+       if (IS_ERR(src))
+               return PTR_ERR(src);
+       if (clk_get_parent(timer->fclk) != src) {
+               r = clk_set_parent(timer->fclk, src);
+               if (r < 0) {
+                       pr_warn("%s: %s cannot set source\n", __func__,
+                               oh->name);
                        clk_put(src);
+                       return r;
                }
        }
  
+       clk_put(src);
        omap_hwmod_setup_one(oh_name);
        omap_hwmod_enable(oh);
        __omap_dm_timer_init_regs(timer);
@@@ -318,6 -315,7 +315,7 @@@ static void __init omap2_gp_clockevent_
  {
        int res;
  
+       clkev.id = gptimer_id;
        clkev.errata = omap_dm_timer_get_errata();
  
        /*
         */
        __omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);
  
-       res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source, property,
-                                    OMAP_TIMER_POSTED);
+       res = omap_dm_timer_init_one(&clkev, fck_source, property,
+                                    &clockevent_gpt.name, OMAP_TIMER_POSTED);
        BUG_ON(res);
  
        omap2_gp_timer_irq.dev_id = &clkev;
                                        3, /* Timer internal resynch latency */
                                        0xffffffff);
  
-       pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
-               gptimer_id, clkev.rate);
+       pr_info("OMAP clockevent source: %s at %lu Hz\n", clockevent_gpt.name,
+               clkev.rate);
  }
  
  /* Clocksource code */
@@@ -360,7 -358,6 +358,6 @@@ static cycle_t clocksource_read_cycles(
  }
  
  static struct clocksource clocksource_gpt = {
-       .name           = "gp_timer",
        .rating         = 300,
        .read           = clocksource_read_cycles,
        .mask           = CLOCKSOURCE_MASK(32),
@@@ -443,13 -440,16 +440,16 @@@ static int __init __maybe_unused omap2_
  }
  
  static void __init omap2_gptimer_clocksource_init(int gptimer_id,
-                                               const char *fck_source)
+                                                 const char *fck_source,
+                                                 const char *property)
  {
        int res;
  
+       clksrc.id = gptimer_id;
        clksrc.errata = omap_dm_timer_get_errata();
  
-       res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source, NULL,
+       res = omap_dm_timer_init_one(&clksrc, fck_source, property,
+                                    &clocksource_gpt.name,
                                     OMAP_TIMER_NONPOSTED);
        BUG_ON(res);
  
                pr_err("Could not register clocksource %s\n",
                        clocksource_gpt.name);
        else
-               pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
-                       gptimer_id, clksrc.rate);
+               pr_info("OMAP clocksource: %s at %lu Hz\n",
+                       clocksource_gpt.name, clksrc.rate);
  }
  
  #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
@@@ -488,7 -488,7 +488,7 @@@ static void __init realtime_counter_ini
                pr_err("%s: ioremap failed\n", __func__);
                return;
        }
-       sys_clk = clk_get(NULL, OMAP5_MPU_SOURCE);
+       sys_clk = clk_get(NULL, "sys_clkin");
        if (IS_ERR(sys_clk)) {
                pr_err("%s: failed to get system clock handle\n", __func__);
                iounmap(base);
@@@ -545,53 -545,52 +545,56 @@@ static inline void __init realtime_coun
  #endif
  
  #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
-                              clksrc_nr, clksrc_src)                   \
+                              clksrc_nr, clksrc_src, clksrc_prop)      \
  void __init omap##name##_gptimer_timer_init(void)                     \
  {                                                                     \
 +      if (omap_clk_init)                                              \
 +              omap_clk_init();                                        \
        omap_dmtimer_init();                                            \
        omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop);    \
-       omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src);        \
+       omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src,         \
+                                       clksrc_prop);                   \
  }
  
  #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop,        \
-                               clksrc_nr, clksrc_src)                  \
+                               clksrc_nr, clksrc_src, clksrc_prop)     \
  void __init omap##name##_sync32k_timer_init(void)             \
  {                                                                     \
 +      if (omap_clk_init)                                              \
 +              omap_clk_init();                                        \
        omap_dmtimer_init();                                            \
        omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop);    \
        /* Enable the use of clocksource="gp_timer" kernel parameter */ \
        if (use_gptimer_clksrc)                                         \
-               omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src);\
+               omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src, \
+                                               clksrc_prop);           \
        else                                                            \
                omap2_sync32k_clocksource_init();                       \
  }
  
  #ifdef CONFIG_ARCH_OMAP2
- OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP2_MPU_SOURCE);
+ OMAP_SYS_32K_TIMER_INIT(2, 1, "timer_32k_ck", "ti,timer-alwon",
+                       2, "timer_sys_ck", NULL);
  #endif /* CONFIG_ARCH_OMAP2 */
  
  #ifdef CONFIG_ARCH_OMAP3
- OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP3_MPU_SOURCE);
- OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure",
-                       2, OMAP3_MPU_SOURCE);
- OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon",
-                      2, OMAP3_MPU_SOURCE);
+ OMAP_SYS_32K_TIMER_INIT(3, 1, "timer_32k_ck", "ti,timer-alwon",
+                       2, "timer_sys_ck", NULL);
+ OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
+                       2, "timer_sys_ck", NULL);
  #endif /* CONFIG_ARCH_OMAP3 */
  
- #ifdef CONFIG_SOC_AM33XX
- OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon",
-                      2, OMAP4_MPU_SOURCE);
- #endif /* CONFIG_SOC_AM33XX */
+ #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+ OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
+                      1, "timer_sys_ck", "ti,timer-alwon");
+ #endif
+ #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
+                              2, "sys_clkin_ck", NULL);
+ #endif
  
  #ifdef CONFIG_ARCH_OMAP4
- OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP4_MPU_SOURCE);
  #ifdef CONFIG_LOCAL_TIMERS
  static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
  void __init omap4_local_timer_init(void)
                int err;
  
                if (of_have_populated_dt()) {
-                       twd_local_timer_of_register();
+                       clocksource_of_init();
                        return;
                }
  
@@@ -620,18 -619,12 +623,12 @@@ void __init omap4_local_timer_init(void
  #endif /* CONFIG_ARCH_OMAP4 */
  
  #ifdef CONFIG_SOC_OMAP5
- OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP5_MPU_SOURCE);
  void __init omap5_realtime_timer_init(void)
  {
-       int err;
-       omap5_sync32k_timer_init();
+       omap4_sync32k_timer_init();
        realtime_counter_init();
  
-       err = arch_timer_of_register();
-       if (err)
-               pr_err("%s: arch_timer_register failed %d\n", __func__, err);
+       clocksource_of_init();
  }
  #endif /* CONFIG_SOC_OMAP5 */
  
  
  #include <linux/amba/pl022.h>
  #include <linux/clk.h>
 -#include <linux/dw_dmac.h>
+ #include <linux/clocksource.h>
  #include <linux/err.h>
  #include <linux/of.h>
  #include <asm/hardware/cache-l2x0.h>
  #include <asm/mach/map.h>
- #include <asm/smp_twd.h>
- #include "generic.h"
 -#include <mach/dma.h>
 -#include <mach/generic.h>
  #include <mach/spear.h>
 -
 -/* common dw_dma filter routine to be used by peripherals */
 -bool dw_dma_filter(struct dma_chan *chan, void *slave)
 -{
 -      struct dw_dma_slave *dws = (struct dw_dma_slave *)slave;
 -
 -      if (chan->device->dev == dws->dma_dev) {
 -              chan->private = slave;
 -              return true;
 -      } else {
 -              return false;
 -      }
 -}
 -
 -/* ssp device registration */
 -static struct dw_dma_slave ssp_dma_param[] = {
 -      {
 -              /* Tx */
 -              .cfg_hi = DWC_CFGH_DST_PER(DMA_REQ_SSP0_TX),
 -              .cfg_lo = 0,
 -              .src_master = DMA_MASTER_MEMORY,
 -              .dst_master = DMA_MASTER_SSP0,
 -      }, {
 -              /* Rx */
 -              .cfg_hi = DWC_CFGH_SRC_PER(DMA_REQ_SSP0_RX),
 -              .cfg_lo = 0,
 -              .src_master = DMA_MASTER_SSP0,
 -              .dst_master = DMA_MASTER_MEMORY,
 -      }
 -};
 -
 -struct pl022_ssp_controller pl022_plat_data = {
 -      .enable_dma = 1,
 -      .dma_filter = dw_dma_filter,
 -      .dma_rx_param = &ssp_dma_param[1],
 -      .dma_tx_param = &ssp_dma_param[0],
 -};
 -
 -/* CF device registration */
 -struct dw_dma_slave cf_dma_priv = {
 -      .cfg_hi = 0,
 -      .cfg_lo = 0,
 -      .src_master = 0,
 -      .dst_master = 0,
 -};
 -
 -/* dmac device registeration */
 -struct dw_dma_platform_data dmac_plat_data = {
 -      .nr_channels = 8,
 -      .chan_allocation_order = CHAN_ALLOCATION_DESCENDING,
 -      .chan_priority = CHAN_PRIORITY_DESCENDING,
 -      .block_size = 4095U,
 -      .nr_masters = 2,
 -      .data_width = { 3, 3, 0, 0 },
 -};
++#include "generic.h"
  
  void __init spear13xx_l2x0_init(void)
  {
@@@ -88,9 -145,9 +88,9 @@@ void __init spear13xx_map_io(void
  static void __init spear13xx_clk_init(void)
  {
        if (of_machine_is_compatible("st,spear1310"))
 -              spear1310_clk_init();
 +              spear1310_clk_init(VA_MISC_BASE, VA_SPEAR1310_RAS_BASE);
        else if (of_machine_is_compatible("st,spear1340"))
 -              spear1340_clk_init();
 +              spear1340_clk_init(VA_MISC_BASE);
        else
                pr_err("%s: Unknown machine\n", __func__);
  }
@@@ -122,5 -179,5 +122,5 @@@ void __init spear13xx_timer_init(void
        clk_put(pclk);
  
        spear_setup_of_timer();
-       twd_local_timer_of_register();
+       clocksource_of_init();
  }
  #include <linux/io.h>
  #include <linux/of_platform.h>
  #include <linux/spinlock_types.h>
 -#include <mach/spear.h>
  #include "clk.h"
  
  /* Clock Configuration Registers */
 -#define SPEAR1340_SYS_CLK_CTRL                        (VA_MISC_BASE + 0x200)
 +#define SPEAR1340_SYS_CLK_CTRL                        (misc_base + 0x200)
        #define SPEAR1340_HCLK_SRC_SEL_SHIFT    27
        #define SPEAR1340_HCLK_SRC_SEL_MASK     1
        #define SPEAR1340_SCLK_SRC_SEL_SHIFT    23
        #define SPEAR1340_SCLK_SRC_SEL_MASK     3
  
  /* PLL related registers and bit values */
 -#define SPEAR1340_PLL_CFG                     (VA_MISC_BASE + 0x210)
 +#define SPEAR1340_PLL_CFG                     (misc_base + 0x210)
        /* PLL_CFG bit values */
        #define SPEAR1340_CLCD_SYNT_CLK_MASK            1
        #define SPEAR1340_CLCD_SYNT_CLK_SHIFT           31
        #define SPEAR1340_PLL2_CLK_SHIFT                22
        #define SPEAR1340_PLL1_CLK_SHIFT                20
  
 -#define SPEAR1340_PLL1_CTR                    (VA_MISC_BASE + 0x214)
 -#define SPEAR1340_PLL1_FRQ                    (VA_MISC_BASE + 0x218)
 -#define SPEAR1340_PLL2_CTR                    (VA_MISC_BASE + 0x220)
 -#define SPEAR1340_PLL2_FRQ                    (VA_MISC_BASE + 0x224)
 -#define SPEAR1340_PLL3_CTR                    (VA_MISC_BASE + 0x22C)
 -#define SPEAR1340_PLL3_FRQ                    (VA_MISC_BASE + 0x230)
 -#define SPEAR1340_PLL4_CTR                    (VA_MISC_BASE + 0x238)
 -#define SPEAR1340_PLL4_FRQ                    (VA_MISC_BASE + 0x23C)
 -#define SPEAR1340_PERIP_CLK_CFG                       (VA_MISC_BASE + 0x244)
 +#define SPEAR1340_PLL1_CTR                    (misc_base + 0x214)
 +#define SPEAR1340_PLL1_FRQ                    (misc_base + 0x218)
 +#define SPEAR1340_PLL2_CTR                    (misc_base + 0x220)
 +#define SPEAR1340_PLL2_FRQ                    (misc_base + 0x224)
 +#define SPEAR1340_PLL3_CTR                    (misc_base + 0x22C)
 +#define SPEAR1340_PLL3_FRQ                    (misc_base + 0x230)
 +#define SPEAR1340_PLL4_CTR                    (misc_base + 0x238)
 +#define SPEAR1340_PLL4_FRQ                    (misc_base + 0x23C)
 +#define SPEAR1340_PERIP_CLK_CFG                       (misc_base + 0x244)
        /* PERIP_CLK_CFG bit values */
        #define SPEAR1340_SPDIF_CLK_MASK                1
        #define SPEAR1340_SPDIF_OUT_CLK_SHIFT           15
        #define SPEAR1340_C3_CLK_MASK                   1
        #define SPEAR1340_C3_CLK_SHIFT                  1
  
 -#define SPEAR1340_GMAC_CLK_CFG                        (VA_MISC_BASE + 0x248)
 +#define SPEAR1340_GMAC_CLK_CFG                        (misc_base + 0x248)
        #define SPEAR1340_GMAC_PHY_CLK_MASK             1
        #define SPEAR1340_GMAC_PHY_CLK_SHIFT            2
        #define SPEAR1340_GMAC_PHY_INPUT_CLK_MASK       2
        #define SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT      0
  
 -#define SPEAR1340_I2S_CLK_CFG                 (VA_MISC_BASE + 0x24C)
 +#define SPEAR1340_I2S_CLK_CFG                 (misc_base + 0x24C)
        /* I2S_CLK_CFG register mask */
        #define SPEAR1340_I2S_SCLK_X_MASK               0x1F
        #define SPEAR1340_I2S_SCLK_X_SHIFT              27
        #define SPEAR1340_I2S_SRC_CLK_MASK              2
        #define SPEAR1340_I2S_SRC_CLK_SHIFT             0
  
 -#define SPEAR1340_C3_CLK_SYNT                 (VA_MISC_BASE + 0x250)
 -#define SPEAR1340_UART0_CLK_SYNT              (VA_MISC_BASE + 0x254)
 -#define SPEAR1340_UART1_CLK_SYNT              (VA_MISC_BASE + 0x258)
 -#define SPEAR1340_GMAC_CLK_SYNT                       (VA_MISC_BASE + 0x25C)
 -#define SPEAR1340_SDHCI_CLK_SYNT              (VA_MISC_BASE + 0x260)
 -#define SPEAR1340_CFXD_CLK_SYNT                       (VA_MISC_BASE + 0x264)
 -#define SPEAR1340_ADC_CLK_SYNT                        (VA_MISC_BASE + 0x270)
 -#define SPEAR1340_AMBA_CLK_SYNT                       (VA_MISC_BASE + 0x274)
 -#define SPEAR1340_CLCD_CLK_SYNT                       (VA_MISC_BASE + 0x27C)
 -#define SPEAR1340_SYS_CLK_SYNT                        (VA_MISC_BASE + 0x284)
 -#define SPEAR1340_GEN_CLK_SYNT0                       (VA_MISC_BASE + 0x28C)
 -#define SPEAR1340_GEN_CLK_SYNT1                       (VA_MISC_BASE + 0x294)
 -#define SPEAR1340_GEN_CLK_SYNT2                       (VA_MISC_BASE + 0x29C)
 -#define SPEAR1340_GEN_CLK_SYNT3                       (VA_MISC_BASE + 0x304)
 -#define SPEAR1340_PERIP1_CLK_ENB              (VA_MISC_BASE + 0x30C)
 +#define SPEAR1340_C3_CLK_SYNT                 (misc_base + 0x250)
 +#define SPEAR1340_UART0_CLK_SYNT              (misc_base + 0x254)
 +#define SPEAR1340_UART1_CLK_SYNT              (misc_base + 0x258)
 +#define SPEAR1340_GMAC_CLK_SYNT                       (misc_base + 0x25C)
 +#define SPEAR1340_SDHCI_CLK_SYNT              (misc_base + 0x260)
 +#define SPEAR1340_CFXD_CLK_SYNT                       (misc_base + 0x264)
 +#define SPEAR1340_ADC_CLK_SYNT                        (misc_base + 0x270)
 +#define SPEAR1340_AMBA_CLK_SYNT                       (misc_base + 0x274)
 +#define SPEAR1340_CLCD_CLK_SYNT                       (misc_base + 0x27C)
 +#define SPEAR1340_SYS_CLK_SYNT                        (misc_base + 0x284)
 +#define SPEAR1340_GEN_CLK_SYNT0                       (misc_base + 0x28C)
 +#define SPEAR1340_GEN_CLK_SYNT1                       (misc_base + 0x294)
 +#define SPEAR1340_GEN_CLK_SYNT2                       (misc_base + 0x29C)
 +#define SPEAR1340_GEN_CLK_SYNT3                       (misc_base + 0x304)
 +#define SPEAR1340_PERIP1_CLK_ENB              (misc_base + 0x30C)
        #define SPEAR1340_RTC_CLK_ENB                   31
        #define SPEAR1340_ADC_CLK_ENB                   30
        #define SPEAR1340_C3_CLK_ENB                    29
        #define SPEAR1340_SYSROM_CLK_ENB                1
        #define SPEAR1340_BUS_CLK_ENB                   0
  
 -#define SPEAR1340_PERIP2_CLK_ENB              (VA_MISC_BASE + 0x310)
 +#define SPEAR1340_PERIP2_CLK_ENB              (misc_base + 0x310)
        #define SPEAR1340_THSENS_CLK_ENB                8
        #define SPEAR1340_I2S_REF_PAD_CLK_ENB           7
        #define SPEAR1340_ACP_CLK_ENB                   6
        #define SPEAR1340_DDR_CORE_CLK_ENB              1
        #define SPEAR1340_DDR_CTRL_CLK_ENB              0
  
 -#define SPEAR1340_PERIP3_CLK_ENB              (VA_MISC_BASE + 0x314)
 +#define SPEAR1340_PERIP3_CLK_ENB              (misc_base + 0x314)
        #define SPEAR1340_PLGPIO_CLK_ENB                18
        #define SPEAR1340_VIDEO_DEC_CLK_ENB             16
        #define SPEAR1340_VIDEO_ENC_CLK_ENB             15
@@@ -440,7 -441,7 +440,7 @@@ static const char *gen_synth0_1_parents
  static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco2div2_clk",
        "pll2_clk", };
  
 -void __init spear1340_clk_init(void)
 +void __init spear1340_clk_init(void __iomem *misc_base)
  {
        struct clk *clk, *clk1;
  
                        SPEAR1340_SPDIF_IN_CLK_ENB, 0, &_lock);
        clk_register_clkdev(clk, NULL, "d0100000.spdif-in");
  
-       clk = clk_register_gate(NULL, "acp_clk", "acp_mclk", 0,
+       clk = clk_register_gate(NULL, "acp_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_ACP_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "acp_clk");
  
-       clk = clk_register_gate(NULL, "plgpio_clk", "plgpio_mclk", 0,
+       clk = clk_register_gate(NULL, "plgpio_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_PLGPIO_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "e2800000.gpio");
  
-       clk = clk_register_gate(NULL, "video_dec_clk", "video_dec_mclk", 0,
+       clk = clk_register_gate(NULL, "video_dec_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_DEC_CLK_ENB,
                        0, &_lock);
        clk_register_clkdev(clk, NULL, "video_dec");
  
-       clk = clk_register_gate(NULL, "video_enc_clk", "video_enc_mclk", 0,
+       clk = clk_register_gate(NULL, "video_enc_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_ENC_CLK_ENB,
                        0, &_lock);
        clk_register_clkdev(clk, NULL, "video_enc");
  
-       clk = clk_register_gate(NULL, "video_in_clk", "video_in_mclk", 0,
+       clk = clk_register_gate(NULL, "video_in_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_IN_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "spear_vip");
  
-       clk = clk_register_gate(NULL, "cam0_clk", "cam0_mclk", 0,
+       clk = clk_register_gate(NULL, "cam0_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM0_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "d0200000.cam0");
  
-       clk = clk_register_gate(NULL, "cam1_clk", "cam1_mclk", 0,
+       clk = clk_register_gate(NULL, "cam1_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM1_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "d0300000.cam1");
  
-       clk = clk_register_gate(NULL, "cam2_clk", "cam2_mclk", 0,
+       clk = clk_register_gate(NULL, "cam2_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM2_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "d0400000.cam2");
  
-       clk = clk_register_gate(NULL, "cam3_clk", "cam3_mclk", 0,
+       clk = clk_register_gate(NULL, "cam3_clk", "ahb_clk", 0,
                        SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM3_CLK_ENB, 0,
                        &_lock);
        clk_register_clkdev(clk, NULL, "d0500000.cam3");
@@@ -86,8 -86,8 +86,8 @@@
  #define PLLE_BASE 0xe8
  #define PLLE_MISC 0xec
  
- #define PLL_BASE_LOCK 27
- #define PLLE_MISC_LOCK 11
+ #define PLL_BASE_LOCK BIT(27)
+ #define PLLE_MISC_LOCK BIT(11)
  
  #define PLL_MISC_LOCK_ENABLE 18
  #define PLLDU_MISC_LOCK_ENABLE 22
@@@ -236,7 -236,7 +236,7 @@@ enum tegra20_clk 
        dvc, dsi, mipi = 50, hdmi, csi, tvdac, i2c2, uartc, emc = 57, usb2,
        usb3, mpe, vde, bsea, bsev, speedo, uartd, uarte, i2c3, sbc4, sdmmc3,
        pex, owr, afi, csite, pcie_xclk, avpucq = 75, la, irama = 84, iramb,
-       iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev1, cdev2,
+       iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev2, cdev1,
        uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve,
        osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0,
        pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1,
@@@ -248,125 -248,125 +248,125 @@@ static struct clk *clks[clk_max]
  static struct clk_onecell_data clk_data;
  
  static struct tegra_clk_pll_freq_table pll_c_freq_table[] = {
-       { 12000000, 600000000, 600, 12, 1, 8 },
-       { 13000000, 600000000, 600, 13, 1, 8 },
-       { 19200000, 600000000, 500, 16, 1, 6 },
-       { 26000000, 600000000, 600, 26, 1, 8 },
+       { 12000000, 600000000, 600, 12, 0, 8 },
+       { 13000000, 600000000, 600, 13, 0, 8 },
+       { 19200000, 600000000, 500, 16, 0, 6 },
+       { 26000000, 600000000, 600, 26, 0, 8 },
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_m_freq_table[] = {
-       { 12000000, 666000000, 666, 12, 1, 8},
-       { 13000000, 666000000, 666, 13, 1, 8},
-       { 19200000, 666000000, 555, 16, 1, 8},
-       { 26000000, 666000000, 666, 26, 1, 8},
-       { 12000000, 600000000, 600, 12, 1, 8},
-       { 13000000, 600000000, 600, 13, 1, 8},
-       { 19200000, 600000000, 375, 12, 1, 6},
-       { 26000000, 600000000, 600, 26, 1, 8},
+       { 12000000, 666000000, 666, 12, 0, 8},
+       { 13000000, 666000000, 666, 13, 0, 8},
+       { 19200000, 666000000, 555, 16, 0, 8},
+       { 26000000, 666000000, 666, 26, 0, 8},
+       { 12000000, 600000000, 600, 12, 0, 8},
+       { 13000000, 600000000, 600, 13, 0, 8},
+       { 19200000, 600000000, 375, 12, 0, 6},
+       { 26000000, 600000000, 600, 26, 0, 8},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_p_freq_table[] = {
-       { 12000000, 216000000, 432, 12, 2, 8},
-       { 13000000, 216000000, 432, 13, 2, 8},
-       { 19200000, 216000000, 90,   4, 2, 1},
-       { 26000000, 216000000, 432, 26, 2, 8},
-       { 12000000, 432000000, 432, 12, 1, 8},
-       { 13000000, 432000000, 432, 13, 1, 8},
-       { 19200000, 432000000, 90,   4, 1, 1},
-       { 26000000, 432000000, 432, 26, 1, 8},
+       { 12000000, 216000000, 432, 12, 1, 8},
+       { 13000000, 216000000, 432, 13, 1, 8},
+       { 19200000, 216000000, 90,   4, 1, 1},
+       { 26000000, 216000000, 432, 26, 1, 8},
+       { 12000000, 432000000, 432, 12, 0, 8},
+       { 13000000, 432000000, 432, 13, 0, 8},
+       { 19200000, 432000000, 90,   4, 0, 1},
+       { 26000000, 432000000, 432, 26, 0, 8},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_a_freq_table[] = {
-       { 28800000, 56448000, 49, 25, 1, 1},
-       { 28800000, 73728000, 64, 25, 1, 1},
-       { 28800000, 24000000,  5,  6, 1, 1},
+       { 28800000, 56448000, 49, 25, 0, 1},
+       { 28800000, 73728000, 64, 25, 0, 1},
+       { 28800000, 24000000,  5,  6, 0, 1},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_d_freq_table[] = {
-       { 12000000, 216000000, 216, 12, 1, 4},
-       { 13000000, 216000000, 216, 13, 1, 4},
-       { 19200000, 216000000, 135, 12, 1, 3},
-       { 26000000, 216000000, 216, 26, 1, 4},
+       { 12000000, 216000000, 216, 12, 0, 4},
+       { 13000000, 216000000, 216, 13, 0, 4},
+       { 19200000, 216000000, 135, 12, 0, 3},
+       { 26000000, 216000000, 216, 26, 0, 4},
  
-       { 12000000, 594000000, 594, 12, 1, 8},
-       { 13000000, 594000000, 594, 13, 1, 8},
-       { 19200000, 594000000, 495, 16, 1, 8},
-       { 26000000, 594000000, 594, 26, 1, 8},
+       { 12000000, 594000000, 594, 12, 0, 8},
+       { 13000000, 594000000, 594, 13, 0, 8},
+       { 19200000, 594000000, 495, 16, 0, 8},
+       { 26000000, 594000000, 594, 26, 0, 8},
  
-       { 12000000, 1000000000, 1000, 12, 1, 12},
-       { 13000000, 1000000000, 1000, 13, 1, 12},
-       { 19200000, 1000000000, 625,  12, 1, 8},
-       { 26000000, 1000000000, 1000, 26, 1, 12},
+       { 12000000, 1000000000, 1000, 12, 0, 12},
+       { 13000000, 1000000000, 1000, 13, 0, 12},
+       { 19200000, 1000000000, 625,  12, 0, 8},
+       { 26000000, 1000000000, 1000, 26, 0, 12},
  
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_u_freq_table[] = {
-       { 12000000, 480000000, 960, 12, 2, 0},
-       { 13000000, 480000000, 960, 13, 2, 0},
-       { 19200000, 480000000, 200, 4,  2, 0},
-       { 26000000, 480000000, 960, 26, 2, 0},
+       { 12000000, 480000000, 960, 12, 0, 0},
+       { 13000000, 480000000, 960, 13, 0, 0},
+       { 19200000, 480000000, 200, 4,  0, 0},
+       { 26000000, 480000000, 960, 26, 0, 0},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_x_freq_table[] = {
        /* 1 GHz */
-       { 12000000, 1000000000, 1000, 12, 1, 12},
-       { 13000000, 1000000000, 1000, 13, 1, 12},
-       { 19200000, 1000000000, 625,  12, 1, 8},
-       { 26000000, 1000000000, 1000, 26, 1, 12},
+       { 12000000, 1000000000, 1000, 12, 0, 12},
+       { 13000000, 1000000000, 1000, 13, 0, 12},
+       { 19200000, 1000000000, 625,  12, 0, 8},
+       { 26000000, 1000000000, 1000, 26, 0, 12},
  
        /* 912 MHz */
-       { 12000000, 912000000,  912,  12, 1, 12},
-       { 13000000, 912000000,  912,  13, 1, 12},
-       { 19200000, 912000000,  760,  16, 1, 8},
-       { 26000000, 912000000,  912,  26, 1, 12},
+       { 12000000, 912000000,  912,  12, 0, 12},
+       { 13000000, 912000000,  912,  13, 0, 12},
+       { 19200000, 912000000,  760,  16, 0, 8},
+       { 26000000, 912000000,  912,  26, 0, 12},
  
        /* 816 MHz */
-       { 12000000, 816000000,  816,  12, 1, 12},
-       { 13000000, 816000000,  816,  13, 1, 12},
-       { 19200000, 816000000,  680,  16, 1, 8},
-       { 26000000, 816000000,  816,  26, 1, 12},
+       { 12000000, 816000000,  816,  12, 0, 12},
+       { 13000000, 816000000,  816,  13, 0, 12},
+       { 19200000, 816000000,  680,  16, 0, 8},
+       { 26000000, 816000000,  816,  26, 0, 12},
  
        /* 760 MHz */
-       { 12000000, 760000000,  760,  12, 1, 12},
-       { 13000000, 760000000,  760,  13, 1, 12},
-       { 19200000, 760000000,  950,  24, 1, 8},
-       { 26000000, 760000000,  760,  26, 1, 12},
+       { 12000000, 760000000,  760,  12, 0, 12},
+       { 13000000, 760000000,  760,  13, 0, 12},
+       { 19200000, 760000000,  950,  24, 0, 8},
+       { 26000000, 760000000,  760,  26, 0, 12},
  
        /* 750 MHz */
-       { 12000000, 750000000,  750,  12, 1, 12},
-       { 13000000, 750000000,  750,  13, 1, 12},
-       { 19200000, 750000000,  625,  16, 1, 8},
-       { 26000000, 750000000,  750,  26, 1, 12},
+       { 12000000, 750000000,  750,  12, 0, 12},
+       { 13000000, 750000000,  750,  13, 0, 12},
+       { 19200000, 750000000,  625,  16, 0, 8},
+       { 26000000, 750000000,  750,  26, 0, 12},
  
        /* 608 MHz */
-       { 12000000, 608000000,  608,  12, 1, 12},
-       { 13000000, 608000000,  608,  13, 1, 12},
-       { 19200000, 608000000,  380,  12, 1, 8},
-       { 26000000, 608000000,  608,  26, 1, 12},
+       { 12000000, 608000000,  608,  12, 0, 12},
+       { 13000000, 608000000,  608,  13, 0, 12},
+       { 19200000, 608000000,  380,  12, 0, 8},
+       { 26000000, 608000000,  608,  26, 0, 12},
  
        /* 456 MHz */
-       { 12000000, 456000000,  456,  12, 1, 12},
-       { 13000000, 456000000,  456,  13, 1, 12},
-       { 19200000, 456000000,  380,  16, 1, 8},
-       { 26000000, 456000000,  456,  26, 1, 12},
+       { 12000000, 456000000,  456,  12, 0, 12},
+       { 13000000, 456000000,  456,  13, 0, 12},
+       { 19200000, 456000000,  380,  16, 0, 8},
+       { 26000000, 456000000,  456,  26, 0, 12},
  
        /* 312 MHz */
-       { 12000000, 312000000,  312,  12, 1, 12},
-       { 13000000, 312000000,  312,  13, 1, 12},
-       { 19200000, 312000000,  260,  16, 1, 8},
-       { 26000000, 312000000,  312,  26, 1, 12},
+       { 12000000, 312000000,  312,  12, 0, 12},
+       { 13000000, 312000000,  312,  13, 0, 12},
+       { 19200000, 312000000,  260,  16, 0, 8},
+       { 26000000, 312000000,  312,  26, 0, 12},
  
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_e_freq_table[] = {
-       { 12000000, 100000000,  200,  24, 1, 0 },
+       { 12000000, 100000000,  200,  24, 0, 0 },
        { 0, 0, 0, 0, 0, 0 },
  };
  
@@@ -380,7 -380,7 +380,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLC_BASE,
        .misc_reg = PLLC_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -394,7 -394,7 +394,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1200000000,
        .base_reg = PLLM_BASE,
        .misc_reg = PLLM_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -408,7 -408,7 +408,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLP_BASE,
        .misc_reg = PLLP_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -422,7 -422,7 +422,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLA_BASE,
        .misc_reg = PLLA_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -436,11 -436,17 +436,17 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1000000000,
        .base_reg = PLLD_BASE,
        .misc_reg = PLLD_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
        .lock_delay = 1000,
  };
  
+ static struct pdiv_map pllu_p[] = {
+       { .pdiv = 1, .hw_val = 1 },
+       { .pdiv = 2, .hw_val = 0 },
+       { .pdiv = 0, .hw_val = 0 },
+ };
  static struct tegra_clk_pll_params pll_u_params = {
        .input_min = 2000000,
        .input_max = 40000000,
        .vco_max = 960000000,
        .base_reg = PLLU_BASE,
        .misc_reg = PLLU_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
        .lock_delay = 1000,
+       .pdiv_tohw = pllu_p,
  };
  
  static struct tegra_clk_pll_params pll_x_params = {
        .vco_max = 1200000000,
        .base_reg = PLLX_BASE,
        .misc_reg = PLLX_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -478,7 -485,7 +485,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 0,
        .base_reg = PLLE_BASE,
        .misc_reg = PLLE_MISC,
-       .lock_bit_idx = PLLE_MISC_LOCK,
+       .lock_mask = PLLE_MISC_LOCK,
        .lock_enable_bit_idx = PLLE_MISC_LOCK_ENABLE,
        .lock_delay = 0,
  };
@@@ -703,7 -710,7 +710,7 @@@ static void tegra20_pll_init(void
        clks[pll_a_out0] = clk;
  
        /* PLLE */
 -      clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, NULL,
 +      clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, pmc_base,
                             0, 100000000, &pll_e_params,
                             0, pll_e_freq_table, NULL);
        clk_register_clkdev(clk, "pll_e", NULL);
  }
  
  static const char *cclk_parents[] = { "clk_m", "pll_c", "clk_32k", "pll_m",
-                                     "pll_p_cclk", "pll_p_out4_cclk",
-                                     "pll_p_out3_cclk", "clk_d", "pll_x" };
+                                     "pll_p", "pll_p_out4",
+                                     "pll_p_out3", "clk_d", "pll_x" };
  static const char *sclk_parents[] = { "clk_m", "pll_c_out1", "pll_p_out4",
                                      "pll_p_out3", "pll_p_out2", "clk_d",
                                      "clk_32k", "pll_m_out1" };
@@@ -721,38 -728,6 +728,6 @@@ static void tegra20_super_clk_init(void
  {
        struct clk *clk;
  
-       /*
-        * DIV_U71 dividers for CCLK, these dividers are used only
-        * if parent clock is fixed rate.
-        */
-       /*
-        * Clock input to cclk divided from pll_p using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_cclk", "pll_p",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out3 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out3_cclk", "pll_p_out3",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out3_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out4 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out4_cclk", "pll_p_out4",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out4_cclk", NULL);
        /* CCLK */
        clk = tegra_clk_register_super_mux("cclk", cclk_parents,
                              ARRAY_SIZE(cclk_parents), CLK_SET_RATE_PARENT,
@@@ -1044,7 -1019,7 +1019,7 @@@ static void __init tegra20_periph_clk_i
                data = &tegra_periph_clk_list[i];
                clk = tegra_clk_register_periph(data->name, data->parent_names,
                                data->num_parents, &data->periph,
-                               clk_base, data->offset);
+                               clk_base, data->offset, data->flags);
                clk_register_clkdev(clk, data->con_id, data->dev_id);
                clks[data->clk_id] = clk;
        }
@@@ -1279,9 -1254,16 +1254,16 @@@ static __initdata struct tegra_clk_init
        {host1x, pll_c, 150000000, 0},
        {disp1, pll_p, 600000000, 0},
        {disp2, pll_p, 600000000, 0},
+       {gr2d, pll_c, 300000000, 0},
+       {gr3d, pll_c, 300000000, 0},
        {clk_max, clk_max, 0, 0}, /* This MUST be the last entry */
  };
  
+ static void __init tegra20_clock_apply_init_table(void)
+ {
+       tegra_init_from_table(init_table, clks, clk_max);
+ }
  /*
   * Some clocks may be used by different drivers depending on the board
   * configuration.  List those here to register them twice in the clock lookup
@@@ -1348,7 -1330,7 +1330,7 @@@ void __init tegra20_clock_init(struct d
        clk_data.clk_num = ARRAY_SIZE(clks);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
  
-       tegra_init_from_table(init_table, clks, clk_max);
+       tegra_clk_apply_init_table = tegra20_clock_apply_init_table;
  
        tegra_cpu_car_ops = &tegra20_cpu_car_ops;
  }
diff --combined drivers/irqchip/Makefile
@@@ -2,11 -2,13 +2,14 @@@ obj-$(CONFIG_IRQCHIP)                 += irqchip.
  
  obj-$(CONFIG_ARCH_BCM2835)            += irq-bcm2835.o
  obj-$(CONFIG_ARCH_EXYNOS)             += exynos-combiner.o
 +obj-$(CONFIG_ARCH_MVEBU)              += irq-armada-370-xp.o
+ obj-$(CONFIG_ARCH_S3C24XX)            += irq-s3c24xx.o
  obj-$(CONFIG_METAG)                   += irq-metag-ext.o
  obj-$(CONFIG_METAG_PERFCOUNTER_IRQS)  += irq-metag.o
  obj-$(CONFIG_ARCH_SUNXI)              += irq-sunxi.o
  obj-$(CONFIG_ARCH_SPEAR3XX)           += spear-shirq.o
  obj-$(CONFIG_ARM_GIC)                 += irq-gic.o
  obj-$(CONFIG_ARM_VIC)                 += irq-vic.o
+ obj-$(CONFIG_RENESAS_INTC_IRQPIN)     += irq-renesas-intc-irqpin.o
+ obj-$(CONFIG_RENESAS_IRQC)            += irq-renesas-irqc.o
  obj-$(CONFIG_VERSATILE_FPGA_IRQ)      += irq-versatile-fpga.o