]> Git Repo - linux.git/commitdiff
Merge tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <[email protected]>
Sat, 26 May 2012 20:14:01 +0000 (13:14 -0700)
committerLinus Torvalds <[email protected]>
Sat, 26 May 2012 20:14:01 +0000 (13:14 -0700)
Pull sweeping late_initcall cleanup for arm-soc from Olof Johansson:
 "This is a patch series from Shawn Guo that moves from individual
  late_initcalls() to using a member in the machine structure to invoke
  a platform's late initcalls.

  This cleanup is a step in the move towards multiplatform kernels since
  it would reduce the need to check for compatible platforms in each and
  every initcall."

Fix up trivial conflicts in arch/arm/mach-{exynos/mach-universal_c210.c,
imx/mach-cpuimx51.c, omap2/board-generic.c} due to changes nearby (and,
in the case of cpuimx51.c the board support being deleted)

* tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: ux500: use machine specific hook for late init
  ARM: tegra: use machine specific hook for late init
  ARM: shmobile: use machine specific hook for late init
  ARM: sa1100: use machine specific hook for late init
  ARM: s3c64xx: use machine specific hook for late init
  ARM: prima2: use machine specific hook for late init
  ARM: pnx4008: use machine specific hook for late init
  ARM: omap2: use machine specific hook for late init
  ARM: omap1: use machine specific hook for late init
  ARM: msm: use machine specific hook for late init
  ARM: imx: use machine specific hook for late init
  ARM: exynos: use machine specific hook for late init
  ARM: ep93xx: use machine specific hook for late init
  ARM: davinci: use machine specific hook for late init
  ARM: provide a late_initcall hook for platform initialization

69 files changed:
1  2 
arch/arm/kernel/setup.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/mach-armlex4210.c
arch/arm/mach-exynos/mach-exynos5-dt.c
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-exynos/mach-origen.c
arch/arm/mach-exynos/mach-smdk4x12.c
arch/arm/mach-exynos/mach-smdkv310.c
arch/arm/mach-exynos/mach-universal_c210.c
arch/arm/mach-imx/imx51-dt.c
arch/arm/mach-imx/mach-cpuimx51sd.c
arch/arm/mach-imx/mach-mx51_babbage.c
arch/arm/mach-imx/mach-mx51_efikamx.c
arch/arm/mach-imx/mach-mx51_efikasb.c
arch/arm/mach-imx/mach-pcm037.c
arch/arm/mach-imx/mm-imx5.c
arch/arm/mach-msm/board-msm7x30.c
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/common.h
arch/arm/mach-omap1/io.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.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-generic.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-omap3logic.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-bonito.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-tegra/board-dt-tegra20.c
arch/arm/mach-tegra/board-dt-tegra30.c
arch/arm/mach-tegra/board-harmony.c
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-seaboard.c
arch/arm/mach-tegra/board-trimslice.c
arch/arm/mach-tegra/common.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/include/mach/setup.h

diff --combined arch/arm/kernel/setup.c
index 1b3096dfb964f8b29554ef966c9371494ccd6596,549f036a5cf8279b7f0a5348c763baf209840c3a..e15d83bb4ea378c1316db6a7d705eab30248a98b
@@@ -81,7 -81,6 +81,7 @@@ __setup("fpe=", fpe_setup)
  extern void paging_init(struct machine_desc *desc);
  extern void sanity_check_meminfo(void);
  extern void reboot_setup(char *str);
 +extern void setup_dma_zone(struct machine_desc *desc);
  
  unsigned int processor_id;
  EXPORT_SYMBOL(processor_id);
@@@ -801,6 -800,14 +801,14 @@@ static int __init customize_machine(voi
  }
  arch_initcall(customize_machine);
  
+ static int __init init_machine_late(void)
+ {
+       if (machine_desc->init_late)
+               machine_desc->init_late();
+       return 0;
+ }
+ late_initcall(init_machine_late);
  #ifdef CONFIG_KEXEC
  static inline unsigned long long get_total_mem(void)
  {
@@@ -940,8 -947,12 +948,8 @@@ void __init setup_arch(char **cmdline_p
        machine_desc = mdesc;
        machine_name = mdesc->name;
  
 -#ifdef CONFIG_ZONE_DMA
 -      if (mdesc->dma_zone_size) {
 -              extern unsigned long arm_dma_zone_size;
 -              arm_dma_zone_size = mdesc->dma_zone_size;
 -      }
 -#endif
 +      setup_dma_zone(mdesc);
 +
        if (mdesc->restart_mode)
                reboot_setup(&mdesc->restart_mode);
  
index 09f61073c8d9993ea0df99fc1c991d5890c4786e,280cbeda708c38c56de0ef9ea20ebc48a77f6ef5..0149fb453be3cd0f83b48cc4290d02d35038925c
@@@ -284,7 -284,7 +284,7 @@@ static struct platform_device da850_evm
        .resource       = da850_evm_nandflash_resource,
  };
  
 -static struct platform_device *da850_evm_devices[] __initdata = {
 +static struct platform_device *da850_evm_devices[] = {
        &da850_evm_nandflash_device,
        &da850_evm_norflash_device,
  };
@@@ -1411,6 -1411,7 +1411,7 @@@ MACHINE_START(DAVINCI_DA850_EVM, "DaVin
        .init_irq       = cp_intc_init,
        .timer          = &davinci_timer,
        .init_machine   = da850_evm_init,
+       .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
        .restart        = da8xx_restart,
  MACHINE_END
index ad1a91ab6acd9978b4418b051c3b68cf90cf1565,365a90b5ce3d6cbdb93aed3602821e0be0a034c0..4dd07a0e3604a19498cf4fa507b544a666e2d8a5
@@@ -241,7 -241,11 +241,7 @@@ unsigned int ep93xx_chip_revision(void
   * EP93xx GPIO
   *************************************************************************/
  static struct resource ep93xx_gpio_resource[] = {
 -      {
 -              .start          = EP93XX_GPIO_PHYS_BASE,
 -              .end            = EP93XX_GPIO_PHYS_BASE + 0xcc - 1,
 -              .flags          = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc),
  };
  
  static struct platform_device ep93xx_gpio_device = {
@@@ -284,7 -288,11 +284,7 @@@ static AMBA_APB_DEVICE(uart3, "apb:uart
        { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
  
  static struct resource ep93xx_rtc_resource[] = {
 -      {
 -              .start          = EP93XX_RTC_PHYS_BASE,
 -              .end            = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
 -              .flags          = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c),
  };
  
  static struct platform_device ep93xx_rtc_device = {
  
  
  static struct resource ep93xx_ohci_resources[] = {
 -      [0] = {
 -              .start  = EP93XX_USB_PHYS_BASE,
 -              .end    = EP93XX_USB_PHYS_BASE + 0x0fff,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = IRQ_EP93XX_USB,
 -              .end    = IRQ_EP93XX_USB,
 -              .flags  = IORESOURCE_IRQ,
 -      },
 +      DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
 +      DEFINE_RES_IRQ(IRQ_EP93XX_USB),
  };
  
  
@@@ -356,8 -372,15 +356,8 @@@ void __init ep93xx_register_flash(unsig
  static struct ep93xx_eth_data ep93xx_eth_data;
  
  static struct resource ep93xx_eth_resource[] = {
 -      {
 -              .start  = EP93XX_ETHERNET_PHYS_BASE,
 -              .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
 -              .flags  = IORESOURCE_MEM,
 -      }, {
 -              .start  = IRQ_EP93XX_ETHERNET,
 -              .end    = IRQ_EP93XX_ETHERNET,
 -              .flags  = IORESOURCE_IRQ,
 -      }
 +      DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000),
 +      DEFINE_RES_IRQ(IRQ_EP93XX_ETHERNET),
  };
  
  static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32);
@@@ -438,8 -461,16 +438,8 @@@ void __init ep93xx_register_i2c(struct 
  static struct ep93xx_spi_info ep93xx_spi_master_data;
  
  static struct resource ep93xx_spi_resources[] = {
 -      {
 -              .start  = EP93XX_SPI_PHYS_BASE,
 -              .end    = EP93XX_SPI_PHYS_BASE + 0x18 - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      {
 -              .start  = IRQ_EP93XX_SSP,
 -              .end    = IRQ_EP93XX_SSP,
 -              .flags  = IORESOURCE_IRQ,
 -      },
 +      DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18),
 +      DEFINE_RES_IRQ(IRQ_EP93XX_SSP),
  };
  
  static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);
@@@ -482,7 -513,7 +482,7 @@@ void __init ep93xx_register_spi(struct 
  /*************************************************************************
   * EP93xx LEDs
   *************************************************************************/
 -static struct gpio_led ep93xx_led_pins[] = {
 +static const struct gpio_led ep93xx_led_pins[] __initconst = {
        {
                .name   = "platform:grled",
                .gpio   = EP93XX_GPIO_LINE_GRLED,
        },
  };
  
 -static struct gpio_led_platform_data ep93xx_led_data = {
 +static const struct gpio_led_platform_data ep93xx_led_data __initconst = {
        .num_leds       = ARRAY_SIZE(ep93xx_led_pins),
        .leds           = ep93xx_led_pins,
  };
  
 -static struct platform_device ep93xx_leds = {
 -      .name           = "leds-gpio",
 -      .id             = -1,
 -      .dev            = {
 -              .platform_data  = &ep93xx_led_data,
 -      },
 -};
 -
 -
  /*************************************************************************
   * EP93xx pwm peripheral handling
   *************************************************************************/
  static struct resource ep93xx_pwm0_resource[] = {
 -      {
 -              .start  = EP93XX_PWM_PHYS_BASE,
 -              .end    = EP93XX_PWM_PHYS_BASE + 0x10 - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10),
  };
  
  static struct platform_device ep93xx_pwm0_device = {
  };
  
  static struct resource ep93xx_pwm1_resource[] = {
 -      {
 -              .start  = EP93XX_PWM_PHYS_BASE + 0x20,
 -              .end    = EP93XX_PWM_PHYS_BASE + 0x30 - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10),
  };
  
  static struct platform_device ep93xx_pwm1_device = {
@@@ -580,7 -628,11 +580,7 @@@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio)
  static struct ep93xxfb_mach_info ep93xxfb_data;
  
  static struct resource ep93xx_fb_resource[] = {
 -      {
 -              .start          = EP93XX_RASTER_PHYS_BASE,
 -              .end            = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
 -              .flags          = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800),
  };
  
  static struct platform_device ep93xx_fb_device = {
@@@ -628,8 -680,15 +628,8 @@@ void __init ep93xx_register_fb(struct e
  static struct ep93xx_keypad_platform_data ep93xx_keypad_data;
  
  static struct resource ep93xx_keypad_resource[] = {
 -      {
 -              .start  = EP93XX_KEY_MATRIX_PHYS_BASE,
 -              .end    = EP93XX_KEY_MATRIX_PHYS_BASE + 0x0c - 1,
 -              .flags  = IORESOURCE_MEM,
 -      }, {
 -              .start  = IRQ_EP93XX_KEY,
 -              .end    = IRQ_EP93XX_KEY,
 -              .flags  = IORESOURCE_IRQ,
 -      },
 +      DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c),
 +      DEFINE_RES_IRQ(IRQ_EP93XX_KEY),
  };
  
  static struct platform_device ep93xx_keypad_device = {
@@@ -675,7 -734,7 +675,7 @@@ int ep93xx_keypad_acquire_gpio(struct p
  fail_gpio_d:
        gpio_free(EP93XX_GPIO_LINE_C(i));
  fail_gpio_c:
 -      for ( ; i >= 0; --i) {
 +      for (--i; i >= 0; --i) {
                gpio_free(EP93XX_GPIO_LINE_C(i));
                gpio_free(EP93XX_GPIO_LINE_D(i));
        }
@@@ -702,7 -761,11 +702,7 @@@ EXPORT_SYMBOL(ep93xx_keypad_release_gpi
   * EP93xx I2S audio peripheral handling
   *************************************************************************/
  static struct resource ep93xx_i2s_resource[] = {
 -      {
 -              .start  = EP93XX_I2S_PHYS_BASE,
 -              .end    = EP93XX_I2S_PHYS_BASE + 0x100 - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 +      DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100),
  };
  
  static struct platform_device ep93xx_i2s_device = {
@@@ -761,8 -824,16 +761,8 @@@ EXPORT_SYMBOL(ep93xx_i2s_release)
   * EP93xx AC97 audio peripheral handling
   *************************************************************************/
  static struct resource ep93xx_ac97_resources[] = {
 -      {
 -              .start  = EP93XX_AAC_PHYS_BASE,
 -              .end    = EP93XX_AAC_PHYS_BASE + 0xac - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      {
 -              .start  = IRQ_EP93XX_AACINTR,
 -              .end    = IRQ_EP93XX_AACINTR,
 -              .flags  = IORESOURCE_IRQ,
 -      },
 +      DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac),
 +      DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR),
  };
  
  static struct platform_device ep93xx_ac97_device = {
@@@ -818,9 -889,8 +818,9 @@@ void __init ep93xx_init_devices(void
  
        platform_device_register(&ep93xx_rtc_device);
        platform_device_register(&ep93xx_ohci_device);
 -      platform_device_register(&ep93xx_leds);
        platform_device_register(&ep93xx_wdt_device);
 +
 +      gpio_led_register_device(-1, &ep93xx_led_data);
  }
  
  void ep93xx_restart(char mode, const char *cmd)
        while (1)
                ;
  }
+ void __init ep93xx_init_late(void)
+ {
+       crunch_init();
+ }
index 49134711f4c6a446a54c432748f5ccece37e2401,e3422f7d8dbf2ab8ace774211dcf748868aa32f4..742edd3bbec34b14f9c6e1817029b9c81f602c03
@@@ -19,9 -19,6 +19,9 @@@
  #include <linux/serial_core.h>
  #include <linux/of.h>
  #include <linux/of_irq.h>
 +#include <linux/export.h>
 +#include <linux/irqdomain.h>
 +#include <linux/of_address.h>
  
  #include <asm/proc-fns.h>
  #include <asm/exception.h>
@@@ -268,12 -265,12 +268,12 @@@ static struct map_desc exynos5_iodesc[
        }, {
                .virtual        = (unsigned long)S5P_VA_GIC_CPU,
                .pfn            = __phys_to_pfn(EXYNOS5_PA_GIC_CPU),
 -              .length         = SZ_64K,
 +              .length         = SZ_8K,
                .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5P_VA_GIC_DIST,
                .pfn            = __phys_to_pfn(EXYNOS5_PA_GIC_DIST),
 -              .length         = SZ_64K,
 +              .length         = SZ_4K,
                .type           = MT_DEVICE,
        },
  };
@@@ -288,6 -285,11 +288,11 @@@ void exynos5_restart(char mode, const c
        __raw_writel(0x1, EXYNOS_SWRESET);
  }
  
+ void __init exynos_init_late(void)
+ {
+       exynos_pm_late_initcall();
+ }
  /*
   * exynos_map_io
   *
@@@ -402,7 -404,6 +407,7 @@@ struct combiner_chip_data 
        void __iomem *base;
  };
  
 +static struct irq_domain *combiner_irq_domain;
  static struct combiner_chip_data combiner_data[MAX_COMBINER_NR];
  
  static inline void __iomem *combiner_base(struct irq_data *data)
  
  static void combiner_mask_irq(struct irq_data *data)
  {
 -      u32 mask = 1 << (data->irq % 32);
 +      u32 mask = 1 << (data->hwirq % 32);
  
        __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_CLEAR);
  }
  
  static void combiner_unmask_irq(struct irq_data *data)
  {
 -      u32 mask = 1 << (data->irq % 32);
 +      u32 mask = 1 << (data->hwirq % 32);
  
        __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET);
  }
@@@ -478,131 -479,49 +483,131 @@@ static void __init combiner_cascade_irq
        irq_set_chained_handler(irq, combiner_handle_cascade_irq);
  }
  
 -static void __init combiner_init(unsigned int combiner_nr, void __iomem *base,
 -                        unsigned int irq_start)
 +static void __init combiner_init_one(unsigned int combiner_nr,
 +                                   void __iomem *base)
  {
 -      unsigned int i;
 -      unsigned int max_nr;
 -
 -      if (soc_is_exynos5250())
 -              max_nr = EXYNOS5_MAX_COMBINER_NR;
 -      else
 -              max_nr = EXYNOS4_MAX_COMBINER_NR;
 -
 -      if (combiner_nr >= max_nr)
 -              BUG();
 -
        combiner_data[combiner_nr].base = base;
 -      combiner_data[combiner_nr].irq_offset = irq_start;
 +      combiner_data[combiner_nr].irq_offset = irq_find_mapping(
 +              combiner_irq_domain, combiner_nr * MAX_IRQ_IN_COMBINER);
        combiner_data[combiner_nr].irq_mask = 0xff << ((combiner_nr % 4) << 3);
  
        /* Disable all interrupts */
 -
        __raw_writel(combiner_data[combiner_nr].irq_mask,
                     base + COMBINER_ENABLE_CLEAR);
 +}
  
 -      /* Setup the Linux IRQ subsystem */
 +#ifdef CONFIG_OF
 +static int combiner_irq_domain_xlate(struct irq_domain *d,
 +                                   struct device_node *controller,
 +                                   const u32 *intspec, unsigned int intsize,
 +                                   unsigned long *out_hwirq,
 +                                   unsigned int *out_type)
 +{
 +      if (d->of_node != controller)
 +              return -EINVAL;
 +
 +      if (intsize < 2)
 +              return -EINVAL;
 +
 +      *out_hwirq = intspec[0] * MAX_IRQ_IN_COMBINER + intspec[1];
 +      *out_type = 0;
 +
 +      return 0;
 +}
 +#else
 +static int combiner_irq_domain_xlate(struct irq_domain *d,
 +                                   struct device_node *controller,
 +                                   const u32 *intspec, unsigned int intsize,
 +                                   unsigned long *out_hwirq,
 +                                   unsigned int *out_type)
 +{
 +      return -EINVAL;
 +}
 +#endif
 +
 +static int combiner_irq_domain_map(struct irq_domain *d, unsigned int irq,
 +                                 irq_hw_number_t hw)
 +{
 +      irq_set_chip_and_handler(irq, &combiner_chip, handle_level_irq);
 +      irq_set_chip_data(irq, &combiner_data[hw >> 3]);
 +      set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 +
 +      return 0;
 +}
 +
 +static struct irq_domain_ops combiner_irq_domain_ops = {
 +      .xlate  = combiner_irq_domain_xlate,
 +      .map    = combiner_irq_domain_map,
 +};
  
 -      for (i = irq_start; i < combiner_data[combiner_nr].irq_offset
 -                              + MAX_IRQ_IN_COMBINER; i++) {
 -              irq_set_chip_and_handler(i, &combiner_chip, handle_level_irq);
 -              irq_set_chip_data(i, &combiner_data[combiner_nr]);
 -              set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
 +void __init combiner_init(void __iomem *combiner_base, struct device_node *np)
 +{
 +      int i, irq, irq_base;
 +      unsigned int max_nr, nr_irq;
 +
 +      if (np) {
 +              if (of_property_read_u32(np, "samsung,combiner-nr", &max_nr)) {
 +                      pr_warning("%s: number of combiners not specified, "
 +                              "setting default as %d.\n",
 +                              __func__, EXYNOS4_MAX_COMBINER_NR);
 +                      max_nr = EXYNOS4_MAX_COMBINER_NR;
 +              }
 +      } else {
 +              max_nr = soc_is_exynos5250() ? EXYNOS5_MAX_COMBINER_NR :
 +                                              EXYNOS4_MAX_COMBINER_NR;
 +      }
 +      nr_irq = max_nr * MAX_IRQ_IN_COMBINER;
 +
 +      irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0);
 +      if (IS_ERR_VALUE(irq_base)) {
 +              irq_base = COMBINER_IRQ(0, 0);
 +              pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
 +      }
 +
 +      combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base, 0,
 +                              &combiner_irq_domain_ops, &combiner_data);
 +      if (WARN_ON(!combiner_irq_domain)) {
 +              pr_warning("%s: irq domain init failed\n", __func__);
 +              return;
 +      }
 +
 +      for (i = 0; i < max_nr; i++) {
 +              combiner_init_one(i, combiner_base + (i >> 2) * 0x10);
 +              irq = IRQ_SPI(i);
 +#ifdef CONFIG_OF
 +              if (np)
 +                      irq = irq_of_parse_and_map(np, i);
 +#endif
 +              combiner_cascade_irq(i, irq);
        }
  }
  
  #ifdef CONFIG_OF
 +int __init combiner_of_init(struct device_node *np, struct device_node *parent)
 +{
 +      void __iomem *combiner_base;
 +
 +      combiner_base = of_iomap(np, 0);
 +      if (!combiner_base) {
 +              pr_err("%s: failed to map combiner registers\n", __func__);
 +              return -ENXIO;
 +      }
 +
 +      combiner_init(combiner_base, np);
 +
 +      return 0;
 +}
 +
  static const struct of_device_id exynos4_dt_irq_match[] = {
        { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
 +      { .compatible = "samsung,exynos4210-combiner",
 +                      .data = combiner_of_init, },
        {},
  };
  #endif
  
  void __init exynos4_init_irq(void)
  {
 -      int irq;
        unsigned int gic_bank_offset;
  
        gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
                of_irq_init(exynos4_dt_irq_match);
  #endif
  
 -      for (irq = 0; irq < EXYNOS4_MAX_COMBINER_NR; irq++) {
 -
 -              combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq),
 -                              COMBINER_IRQ(irq, 0));
 -              combiner_cascade_irq(irq, IRQ_SPI(irq));
 -      }
 +      if (!of_have_populated_dt())
 +              combiner_init(S5P_VA_COMBINER_BASE, NULL);
  
        /*
         * The parameters of s5p_init_irq() are for VIC init.
  
  void __init exynos5_init_irq(void)
  {
 -      int irq;
 -
  #ifdef CONFIG_OF
        of_irq_init(exynos4_dt_irq_match);
  #endif
 -
 -      for (irq = 0; irq < EXYNOS5_MAX_COMBINER_NR; irq++) {
 -              combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq),
 -                              COMBINER_IRQ(irq, 0));
 -              combiner_cascade_irq(irq, IRQ_SPI(irq));
 -      }
 -
        /*
         * The parameters of s5p_init_irq() are for VIC init.
         * Theses parameters should be NULL and 0 because EXYNOS4
        s5p_init_irq(NULL, 0);
  }
  
 -struct bus_type exynos4_subsys = {
 -      .name           = "exynos4-core",
 -      .dev_name       = "exynos4-core",
 -};
 -
 -struct bus_type exynos5_subsys = {
 -      .name           = "exynos5-core",
 -      .dev_name       = "exynos5-core",
 +struct bus_type exynos_subsys = {
 +      .name           = "exynos-core",
 +      .dev_name       = "exynos-core",
  };
  
  static struct device exynos4_dev = {
 -      .bus    = &exynos4_subsys,
 -};
 -
 -static struct device exynos5_dev = {
 -      .bus    = &exynos5_subsys,
 +      .bus    = &exynos_subsys,
  };
  
  static int __init exynos_core_init(void)
  {
 -      if (soc_is_exynos5250())
 -              return subsys_system_register(&exynos5_subsys, NULL);
 -      else
 -              return subsys_system_register(&exynos4_subsys, NULL);
 +      return subsys_system_register(&exynos_subsys, NULL);
  }
  core_initcall(exynos_core_init);
  
@@@ -736,7 -680,10 +741,7 @@@ static int __init exynos_init(void
  {
        printk(KERN_INFO "EXYNOS: Initializing architecture\n");
  
 -      if (soc_is_exynos5250())
 -              return device_register(&exynos5_dev);
 -      else
 -              return device_register(&exynos4_dev);
 +      return device_register(&exynos4_dev);
  }
  
  /* uart registration process */
index 372e33196e8a9444f3cfabc30fe06cb065501c71,40eaa8c5b1310dab1d6fdaff313239f7dc1966a0..5a3daa0168d85450b0aa3777fb965249d79ba735
@@@ -77,6 -77,7 +77,6 @@@ static struct s3c2410_uartcfg armlex421
  
  static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
        .max_width              = 8,
        .host_caps              = MMC_CAP_8_BIT_DATA,
@@@ -87,11 -88,13 +87,11 @@@ static struct s3c_sdhci_platdata armlex
        .cd_type                = S3C_SDHCI_CD_GPIO,
        .ext_cd_gpio            = EXYNOS4_GPX2(5),
        .ext_cd_gpio_invert     = 1,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
        .max_width              = 4,
  };
  
  static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
        .max_width              = 4,
  };
  
@@@ -118,9 -121,16 +118,9 @@@ static void __init armlex4210_wlan_init
  }
  
  static struct resource armlex4210_smsc911x_resources[] = {
 -      [0] = {
 -              .start  = EXYNOS4_PA_SROM_BANK(3),
 -              .end    = EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = IRQ_EINT(27),
 -              .end    = IRQ_EINT(27),
 -              .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
 -      },
 +      [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
 +      [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
 +                                      | IRQF_TRIGGER_HIGH),
  };
  
  static struct smsc911x_platform_config smsc9215_config = {
@@@ -147,6 -157,7 +147,6 @@@ static struct platform_device *armlex42
        &s3c_device_hsmmc3,
        &s3c_device_rtc,
        &s3c_device_wdt,
 -      &exynos4_device_sysmmu,
        &samsung_asoc_dma,
        &armlex4210_smsc911x,
        &exynos4_device_ahci,
@@@ -203,6 -214,7 +203,7 @@@ MACHINE_START(ARMLEX4210, "ARMLEX4210"
        .map_io         = armlex4210_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = armlex4210_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .restart        = exynos4_restart,
  MACHINE_END
index cf5d2228e9985eb3cfdfde1b3b25a78baf8ae5ca,5b1ab975b9e940fbb2ba7545c3f14e6e43796ba6..7b1e11a228cce49776135f140316c83182f4d440
@@@ -43,10 -43,6 +43,10 @@@ static const struct of_dev_auxdata exyn
                                "exynos4210-uart.2", NULL),
        OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3,
                                "exynos4210-uart.3", NULL),
 +      OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(0),
 +                              "s3c2440-i2c.0", NULL),
 +      OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1),
 +                              "s3c2440-i2c.1", NULL),
        OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL),
        OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL),
        OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL),
@@@ -76,6 -72,7 +76,7 @@@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG E
        .map_io         = exynos5250_dt_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = exynos5250_dt_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .dt_compat      = exynos5250_dt_compat,
        .restart        = exynos5_restart,
index 6c31f2ad765df785ed7f2af402fd96c50e217194,d57eb806f270e4657c3a0afe3708a30a3970406e..972983e392bc6d8dd2b34bd07798dcbfc5dfb4b4
@@@ -25,8 -25,6 +25,8 @@@
  #include <linux/mmc/host.h>
  #include <linux/fb.h>
  #include <linux/pwm_backlight.h>
 +#include <linux/platform_data/s3c-hsotg.h>
 +#include <drm/exynos_drm.h>
  
  #include <video/platform_lcd.h>
  #include <media/m5mols.h>
@@@ -116,6 -114,7 +116,6 @@@ static struct s3c_sdhci_platdata nuri_h
                                MMC_CAP_ERASE),
        .host_caps2             = MMC_CAP2_BROKEN_VOLTAGE,
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static struct regulator_consumer_supply emmc_supplies[] = {
@@@ -156,6 -155,7 +156,6 @@@ static struct s3c_sdhci_platdata nuri_h
        .ext_cd_gpio            = EXYNOS4_GPX3(3),      /* XEINT_27 */
        .ext_cd_gpio_invert     = 1,
        .cd_type                = S3C_SDHCI_CD_GPIO,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  /* WLAN */
@@@ -164,6 -164,7 +164,6 @@@ static struct s3c_sdhci_platdata nuri_h
        .host_caps              = MMC_CAP_4_BIT_DATA |
                                MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
        .cd_type                = S3C_SDHCI_CD_EXTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static void __init nuri_sdhci_init(void)
@@@ -212,29 -213,6 +212,29 @@@ static struct platform_device nuri_gpio
        },
  };
  
 +#ifdef CONFIG_DRM_EXYNOS
 +static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 +      .panel = {
 +              .timing = {
 +                      .xres           = 1024,
 +                      .yres           = 600,
 +                      .hsync_len      = 40,
 +                      .left_margin    = 79,
 +                      .right_margin   = 200,
 +                      .vsync_len      = 10,
 +                      .upper_margin   = 10,
 +                      .lower_margin   = 11,
 +                      .refresh        = 60,
 +              },
 +      },
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
 +                        VIDCON0_CLKSEL_LCD,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .default_win    = 3,
 +      .bpp            = 32,
 +};
 +
 +#else
  /* Frame Buffer */
  static struct s3c_fb_pd_win nuri_fb_win0 = {
        .win_mode = {
@@@ -261,7 -239,6 +261,7 @@@ static struct s3c_fb_platdata nuri_fb_p
        .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
  };
 +#endif
  
  static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
  {
@@@ -374,7 -351,6 +374,7 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
 +      REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
        REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
@@@ -390,7 -366,7 +390,7 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo8_[] = {
 -      REGULATOR_SUPPLY("vusb_d", NULL), /* Used by CPU */
 +      REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* USB */
        REGULATOR_SUPPLY("vdac", NULL), /* Used by CPU */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
@@@ -846,7 -822,6 +846,7 @@@ static struct regulator_init_data __ini
        .constraints    = {
                .name           = "SAFEOUT1",
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
 +              .always_on      = 1,
                .state_mem      = {
                        .disabled       = 1,
                },
@@@ -1104,9 -1079,6 +1104,9 @@@ static void __init nuri_ehci_init(void
        s5p_ehci_set_platdata(pdata);
  }
  
 +/* USB OTG */
 +static struct s3c_hsotg_plat nuri_hsotg_pdata;
 +
  /* CAMERA */
  static struct regulator_consumer_supply cam_vt_cam15_supply =
        REGULATOR_SUPPLY("vdd_core", "6-003c");
@@@ -1319,7 -1291,6 +1319,7 @@@ static struct platform_device *nuri_dev
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &s5p_device_fimc_md,
 +      &s3c_device_usb_hsotg,
  
        /* NURI Devices */
        &nuri_gpio_keys,
        &cam_vdda_fixed_rdev,
        &cam_8m_12v_fixed_rdev,
        &exynos4_bus_devfreq,
 +#ifdef CONFIG_DRM_EXYNOS
 +      &exynos_device_drm,
 +#endif
  };
  
  static void __init nuri_map_io(void)
@@@ -1366,17 -1334,11 +1366,17 @@@ static void __init nuri_machine_init(vo
        i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
        s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
  
 +#ifdef CONFIG_DRM_EXYNOS
 +      s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 +      exynos4_fimd0_gpio_setup_24bpp();
 +#else
        s5p_fimd0_set_platdata(&nuri_fb_pdata);
 +#endif
  
        nuri_camera_init();
  
        nuri_ehci_init();
 +      s3c_hsotg_set_platdata(&nuri_hsotg_pdata);
  
        /* Last */
        platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
@@@ -1389,6 -1351,7 +1389,7 @@@ MACHINE_START(NURI, "NURI"
        .map_io         = nuri_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = nuri_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .reserve        = &nuri_reserve,
        .restart        = exynos4_restart,
index 26124a38bcbdfbcf6466cb4b6667bfa20a7c4eec,263ba441386ea4e0d5b262f572f11c7a847d1149..a7f7fd567ddee48b11e2be362c854c9e7f347f18
@@@ -45,7 -45,6 +45,7 @@@
  #include <mach/ohci.h>
  #include <mach/map.h>
  
 +#include <drm/exynos_drm.h>
  #include "common.h"
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
@@@ -473,10 -472,12 +473,10 @@@ static struct i2c_board_info i2c0_devs[
  
  static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  /* USB EHCI */
@@@ -582,27 -583,6 +582,27 @@@ static struct platform_device origen_lc
        .dev.platform_data      = &origen_lcd_hv070wsa_data,
  };
  
 +#ifdef CONFIG_DRM_EXYNOS
 +static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 +      .panel  = {
 +              .timing = {
 +                      .left_margin    = 64,
 +                      .right_margin   = 16,
 +                      .upper_margin   = 64,
 +                      .lower_margin   = 16,
 +                      .hsync_len      = 48,
 +                      .vsync_len      = 3,
 +                      .xres           = 1024,
 +                      .yres           = 600,
 +              },
 +      },
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
 +                              VIDCON1_INV_VCLK,
 +      .default_win    = 0,
 +      .bpp            = 32,
 +};
 +#else
  static struct s3c_fb_pd_win origen_fb_win0 = {
        .win_mode = {
                .left_margin    = 64,
        },
        .max_bpp                = 32,
        .default_bpp            = 24,
 +      .virtual_x              = 1024,
 +      .virtual_y              = 2 * 600,
  };
  
  static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
                                VIDCON1_INV_VCLK,
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
  };
 +#endif
  
  /* Bluetooth rfkill gpio platform data */
 -struct rfkill_gpio_platform_data origen_bt_pdata = {
 +static struct rfkill_gpio_platform_data origen_bt_pdata = {
        .reset_gpio     = EXYNOS4_GPX2(2),
        .shutdown_gpio  = -1,
        .type           = RFKILL_TYPE_BLUETOOTH,
@@@ -667,9 -644,6 +667,9 @@@ static struct platform_device *origen_d
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &s5p_device_mixer,
 +#ifdef CONFIG_DRM_EXYNOS
 +      &exynos_device_drm,
 +#endif
        &exynos4_device_ohci,
        &origen_device_gpiokeys,
        &origen_lcd_hv070wsa,
@@@ -745,12 -719,7 +745,12 @@@ static void __init origen_machine_init(
        s5p_tv_setup();
        s5p_i2c_hdmiphy_set_platdata(NULL);
  
 +#ifdef CONFIG_DRM_EXYNOS
 +      s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 +      exynos4_fimd0_gpio_setup_24bpp();
 +#else
        s5p_fimd0_set_platdata(&origen_lcd_pdata);
 +#endif
  
        platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
  
@@@ -766,6 -735,7 +766,7 @@@ MACHINE_START(ORIGEN, "ORIGEN"
        .map_io         = origen_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = origen_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .reserve        = &origen_reserve,
        .restart        = exynos4_restart,
index fe772d893cc9653ded14e3cd6fdda8c8a0fe8867,763967d71daaf069cbce5fd08e5ec132e2f5856d..fb09c70e195af8a61e3399fb0db0926222905a66
@@@ -31,7 -31,6 +31,7 @@@
  #include <plat/gpio-cfg.h>
  #include <plat/iic.h>
  #include <plat/keypad.h>
 +#include <plat/mfc.h>
  #include <plat/regs-serial.h>
  #include <plat/sdhci.h>
  
@@@ -86,6 -85,7 +86,6 @@@ static struct s3c2410_uartcfg smdk4x12_
  
  static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
        .max_width              = 8,
        .host_caps              = MMC_CAP_8_BIT_DATA,
@@@ -94,6 -94,7 +94,6 @@@
  
  static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static struct regulator_consumer_supply max8997_buck1 =
@@@ -243,14 -244,6 +243,14 @@@ static struct platform_device *smdk4x12
        &s3c_device_i2c7,
        &s3c_device_rtc,
        &s3c_device_wdt,
 +      &s5p_device_fimc0,
 +      &s5p_device_fimc1,
 +      &s5p_device_fimc2,
 +      &s5p_device_fimc3,
 +      &s5p_device_fimc_md,
 +      &s5p_device_mfc,
 +      &s5p_device_mfc_l,
 +      &s5p_device_mfc_r,
        &samsung_device_keypad,
  };
  
@@@ -263,11 -256,6 +263,11 @@@ static void __init smdk4x12_map_io(void
        s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs));
  }
  
 +static void __init smdk4x12_reserve(void)
 +{
 +      s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
 +}
 +
  static void __init smdk4x12_machine_init(void)
  {
        s3c_i2c0_set_platdata(NULL);
@@@ -305,7 -293,6 +305,7 @@@ MACHINE_START(SMDK4212, "SMDK4212"
        .init_machine   = smdk4x12_machine_init,
        .timer          = &exynos4_timer,
        .restart        = exynos4_restart,
 +      .reserve        = &smdk4x12_reserve,
  MACHINE_END
  
  MACHINE_START(SMDK4412, "SMDK4412")
        .map_io         = smdk4x12_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = smdk4x12_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .restart        = exynos4_restart,
 +      .reserve        = &smdk4x12_reserve,
  MACHINE_END
index a8c7656b1fce99a9c979d41363467d925d1bbe3d,f9d2b3107255cb36a357cb5eb26bc38c06939da3..70df1a0c21187034ddea5153c90c55bda9611778
@@@ -44,7 -44,6 +44,7 @@@
  #include <mach/map.h>
  #include <mach/ohci.h>
  
 +#include <drm/exynos_drm.h>
  #include "common.h"
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
@@@ -94,6 -93,7 +94,6 @@@ static struct s3c2410_uartcfg smdkv310_
  
  static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
        .max_width              = 8,
        .host_caps              = MMC_CAP_8_BIT_DATA,
@@@ -104,10 -104,12 +104,10 @@@ static struct s3c_sdhci_platdata smdkv3
        .cd_type                = S3C_SDHCI_CD_GPIO,
        .ext_cd_gpio            = EXYNOS4_GPK0(2),
        .ext_cd_gpio_invert     = 1,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
        .max_width              = 8,
        .host_caps              = MMC_CAP_8_BIT_DATA,
@@@ -118,6 -120,7 +118,6 @@@ static struct s3c_sdhci_platdata smdkv3
        .cd_type                = S3C_SDHCI_CD_GPIO,
        .ext_cd_gpio            = EXYNOS4_GPK2(2),
        .ext_cd_gpio_invert     = 1,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
@@@ -157,26 -160,6 +157,26 @@@ static struct platform_device smdkv310_
        .dev.platform_data      = &smdkv310_lcd_lte480wv_data,
  };
  
 +#ifdef CONFIG_DRM_EXYNOS
 +static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 +      .panel  = {
 +              .timing = {
 +                      .left_margin    = 13,
 +                      .right_margin   = 8,
 +                      .upper_margin   = 7,
 +                      .lower_margin   = 5,
 +                      .hsync_len      = 3,
 +                      .vsync_len      = 1,
 +                      .xres           = 800,
 +                      .yres           = 480,
 +              },
 +      },
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .default_win    = 0,
 +      .bpp            = 32,
 +};
 +#else
  static struct s3c_fb_pd_win smdkv310_fb_win0 = {
        .win_mode = {
                .left_margin    = 13,
@@@ -198,12 -181,18 +198,12 @@@ static struct s3c_fb_platdata smdkv310_
        .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
  };
 +#endif
  
  static struct resource smdkv310_smsc911x_resources[] = {
 -      [0] = {
 -              .start  = EXYNOS4_PA_SROM_BANK(1),
 -              .end    = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = IRQ_EINT(5),
 -              .end    = IRQ_EINT(5),
 -              .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
 -      },
 +      [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K),
 +      [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \
 +                                              | IRQF_TRIGGER_LOW),
  };
  
  static struct smsc911x_platform_config smsc9215_config = {
@@@ -284,9 -273,6 +284,9 @@@ static struct platform_device *smdkv310
        &s5p_device_fimc_md,
        &s5p_device_g2d,
        &s5p_device_jpeg,
 +#ifdef CONFIG_DRM_EXYNOS
 +      &exynos_device_drm,
 +#endif
        &exynos4_device_ac97,
        &exynos4_device_i2s0,
        &exynos4_device_ohci,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_spdif,
 -      &exynos4_device_sysmmu,
        &samsung_asoc_dma,
        &samsung_asoc_idma,
        &s5p_device_fimd0,
@@@ -377,12 -364,7 +377,12 @@@ static void __init smdkv310_machine_ini
        samsung_keypad_set_platdata(&smdkv310_keypad_data);
  
        samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
 +#ifdef CONFIG_DRM_EXYNOS
 +      s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 +      exynos4_fimd0_gpio_setup_24bpp();
 +#else
        s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
 +#endif
  
        smdkv310_ehci_init();
        smdkv310_ohci_init();
@@@ -411,6 -393,7 +411,7 @@@ MACHINE_START(SMDKC210, "SMDKC210"
        .map_io         = smdkv310_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = smdkv310_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .restart        = exynos4_restart,
  MACHINE_END
index 6b731b863275f5cc1d1362d3ccd68ade5db9b8b3,2cd95aa88751ca2c61756dc6b16146f6e346b770..083b44de9c10090dc887149c2ead7bb31858246a
@@@ -23,8 -23,6 +23,8 @@@
  #include <linux/i2c-gpio.h>
  #include <linux/i2c/mcs.h>
  #include <linux/i2c/atmel_mxt_ts.h>
 +#include <linux/platform_data/s3c-hsotg.h>
 +#include <drm/exynos_drm.h>
  
  #include <asm/mach/arch.h>
  #include <asm/hardware/gic.h>
@@@ -42,7 -40,6 +42,7 @@@
  #include <plat/pd.h>
  #include <plat/regs-fb-v4.h>
  #include <plat/fimc-core.h>
 +#include <plat/s5p-time.h>
  #include <plat/camport.h>
  #include <plat/mipi_csis.h>
  
@@@ -207,7 -204,6 +207,7 @@@ static struct regulator_init_data lp397
  };
  
  static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
 +      REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
        REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
        REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
        REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
@@@ -293,7 -289,6 +293,7 @@@ static struct regulator_init_data lp397
  };
  
  static struct regulator_consumer_supply lp3974_ldo8_consumer[] = {
 +      REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
        REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
  };
  
@@@ -490,10 -485,7 +490,10 @@@ static struct regulator_init_data lp397
  static struct regulator_init_data lp3974_esafeout1_data = {
        .constraints    = {
                .name           = "SAFEOUT1",
 +              .min_uV         = 4800000,
 +              .max_uV         = 4800000,
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
 +              .always_on      = 1,
                .state_mem      = {
                        .enabled        = 1,
                },
@@@ -757,6 -749,7 +757,6 @@@ static struct s3c_sdhci_platdata univer
                                MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
        .host_caps2             = MMC_CAP2_BROKEN_VOLTAGE,
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  static struct regulator_consumer_supply mmc0_supplies[] = {
@@@ -796,6 -789,7 +796,6 @@@ static struct s3c_sdhci_platdata univer
        .ext_cd_gpio            = EXYNOS4_GPX3(4),      /* XEINT_28 */
        .ext_cd_gpio_invert     = 1,
        .cd_type                = S3C_SDHCI_CD_GPIO,
 -      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
  };
  
  /* WiFi */
@@@ -818,29 -812,6 +818,29 @@@ static struct i2c_board_info i2c1_devs[
        /* Gyro, To be updated */
  };
  
 +#ifdef CONFIG_DRM_EXYNOS
 +static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 +      .panel = {
 +              .timing = {
 +                      .left_margin    = 16,
 +                      .right_margin   = 16,
 +                      .upper_margin   = 2,
 +                      .lower_margin   = 28,
 +                      .hsync_len      = 2,
 +                      .vsync_len      = 1,
 +                      .xres           = 480,
 +                      .yres           = 800,
 +                      .refresh        = 55,
 +              },
 +      },
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
 +                        VIDCON0_CLKSEL_LCD,
 +      .vidcon1        = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
 +                        | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .default_win    = 3,
 +      .bpp            = 32,
 +};
 +#else
  /* Frame Buffer */
  static struct s3c_fb_pd_win universal_fb_win0 = {
        .win_mode = {
@@@ -868,7 -839,6 +868,7 @@@ static struct s3c_fb_platdata universal
                          | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
  };
 +#endif
  
  static struct regulator_consumer_supply cam_vt_dio_supply =
        REGULATOR_SUPPLY("vdd_core", "0-003c");
@@@ -1023,9 -993,6 +1023,9 @@@ static struct gpio universal_camera_gpi
        { GPIO_CAM_VGA_NSTBY,   GPIOF_OUT_INIT_LOW,  "CAM_VGA_NSTBY" },
  };
  
 +/* USB OTG */
 +static struct s3c_hsotg_plat universal_hsotg_pdata;
 +
  static void __init universal_camera_init(void)
  {
        s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
@@@ -1081,10 -1048,6 +1081,10 @@@ static struct platform_device *universa
        &s5p_device_onenand,
        &s5p_device_fimd0,
        &s5p_device_jpeg,
 +#ifdef CONFIG_DRM_EXYNOS
 +      &exynos_device_drm,
 +#endif
 +      &s3c_device_usb_hsotg,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
@@@ -1100,7 -1063,6 +1100,7 @@@ static void __init universal_map_io(voi
        exynos_init_io(NULL, 0);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
 +      s5p_set_timer_source(S5P_PWM2, S5P_PWM4);
  }
  
  static void s5p_tv_setup(void)
@@@ -1132,18 -1094,12 +1132,18 @@@ static void __init universal_machine_in
        s5p_i2c_hdmiphy_set_platdata(NULL);
        i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
  
 +#ifdef CONFIG_DRM_EXYNOS
 +      s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 +      exynos4_fimd0_gpio_setup_24bpp();
 +#else
        s5p_fimd0_set_platdata(&universal_lcd_pdata);
 +#endif
  
        universal_touchkey_init();
        i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
                        ARRAY_SIZE(i2c_gpio12_devs));
  
 +      s3c_hsotg_set_platdata(&universal_hsotg_pdata);
        universal_camera_init();
  
        /* Last */
@@@ -1157,7 -1113,8 +1157,8 @@@ MACHINE_START(UNIVERSAL_C210, "UNIVERSA
        .map_io         = universal_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = universal_machine_init,
 -      .timer          = &exynos4_timer,
+       .init_late      = exynos_init_late,
 +      .timer          = &s5p_timer,
        .reserve        = &universal_reserve,
        .restart        = exynos4_restart,
  MACHINE_END
index 5f577fbda2c8621d861c2304fbbc7fc355184fd4,da4f4f5ddd4218e663d1af5cd74d08492af8e2dd..18e78dba4298ad90aebc7f0a86e44e723d413924
@@@ -14,7 -14,6 +14,7 @@@
  #include <linux/irqdomain.h>
  #include <linux/of_irq.h>
  #include <linux/of_platform.h>
 +#include <linux/pinctrl/machine.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  #include <mach/common.h>
@@@ -82,8 -81,6 +82,8 @@@ static void __init imx51_dt_init(void
  
        of_irq_init(imx51_irq_match);
  
 +      pinctrl_provide_dummies();
 +
        node = of_find_matching_node(NULL, imx51_iomuxc_of_match);
        if (node) {
                of_id = of_match_node(imx51_iomuxc_of_match, node);
@@@ -118,6 -115,7 +118,7 @@@ DT_MACHINE_START(IMX51_DT, "Freescale i
        .handle_irq     = imx51_handle_irq,
        .timer          = &imx51_timer,
        .init_machine   = imx51_dt_init,
+       .init_late      = imx51_init_late,
        .dt_compat      = imx51_dt_board_compat,
        .restart        = mxc_restart,
  MACHINE_END
index ce341a6874fc892e867319f43c16aa19f558c9d0,0b8770fe7eaed80cdfd71609aa907f8d84e0a387..ac50f1671e381447d7fda9335d32cac33432b7ca
  
  #define USBH1_RST             IMX_GPIO_NR(2, 28)
  #define ETH_RST                       IMX_GPIO_NR(2, 31)
 -#define TSC2007_IRQGPIO               IMX_GPIO_NR(3, 12)
 +#define TSC2007_IRQGPIO_REV2  IMX_GPIO_NR(3, 12)
 +#define TSC2007_IRQGPIO_REV3  IMX_GPIO_NR(4, 0)
  #define CAN_IRQGPIO           IMX_GPIO_NR(1, 1)
  #define CAN_RST                       IMX_GPIO_NR(4, 15)
  #define CAN_NCS                       IMX_GPIO_NR(4, 24)
 -#define CAN_RXOBF             IMX_GPIO_NR(1, 4)
 +#define CAN_RXOBF_REV2                IMX_GPIO_NR(1, 4)
 +#define CAN_RXOBF_REV3                IMX_GPIO_NR(3, 12)
  #define CAN_RX1BF             IMX_GPIO_NR(1, 6)
  #define CAN_TXORTS            IMX_GPIO_NR(1, 7)
  #define CAN_TX1RTS            IMX_GPIO_NR(1, 8)
@@@ -92,10 -90,6 +92,10 @@@ static iomux_v3_cfg_t eukrea_cpuimx51sd
        MX51_PAD_I2C1_CLK__GPIO4_16,
        MX51_PAD_I2C1_DAT__GPIO4_17,
  
 +      /* I2C1 */
 +      MX51_PAD_SD2_CMD__I2C1_SCL,
 +      MX51_PAD_SD2_CLK__I2C1_SDA,
 +
        /* CAN */
        MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
        MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
        NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
                        PAD_CTL_PKE | PAD_CTL_SRE_FAST |
                        PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
 +      NEW_PAD_CTRL(MX51_PAD_NANDF_D8__GPIO4_0, PAD_CTL_PUS_22K_UP |
 +                      PAD_CTL_PKE | PAD_CTL_SRE_FAST |
 +                      PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
  };
  
  static const struct imxuart_platform_data uart_pdata __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
  };
  
 +static int tsc2007_get_pendown_state(void)
 +{
 +      if (mx51_revision() < IMX_CHIP_REVISION_3_0)
 +              return !gpio_get_value(TSC2007_IRQGPIO_REV2);
 +      else
 +              return !gpio_get_value(TSC2007_IRQGPIO_REV3);
 +}
 +
  static struct tsc2007_platform_data tsc2007_info = {
        .model                  = 2007,
        .x_plate_ohms           = 180,
 +      .get_pendown_state      = tsc2007_get_pendown_state,
  };
  
  static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
                I2C_BOARD_INFO("tsc2007", 0x49),
                .type           = "tsc2007",
                .platform_data  = &tsc2007_info,
 -              .irq            = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
        },
  };
  
@@@ -272,14 -255,10 +272,14 @@@ static const struct spi_imx_master cpui
        .num_chipselect = ARRAY_SIZE(cpuimx51sd_spi1_cs),
  };
  
 -static struct platform_device *platform_devices[] __initdata = {
 +static struct platform_device *rev2_platform_devices[] __initdata = {
        &hsi2c_gpio_device,
  };
  
 +static const struct imxi2c_platform_data cpuimx51sd_i2c_data __initconst = {
 +      .bitrate = 100000,
 +};
 +
  static void __init eukrea_cpuimx51sd_init(void)
  {
        imx51_soc_init();
  
        imx51_add_imx_uart(0, &uart_pdata);
        imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info);
 +      imx51_add_imx2_wdt(0, NULL);
  
        gpio_request(ETH_RST, "eth_rst");
        gpio_set_value(ETH_RST, 1);
        spi_register_board_info(cpuimx51sd_spi_device,
                                ARRAY_SIZE(cpuimx51sd_spi_device));
  
 -      gpio_request(TSC2007_IRQGPIO, "tsc2007_irq");
 -      gpio_direction_input(TSC2007_IRQGPIO);
 -      gpio_free(TSC2007_IRQGPIO);
 +      if (mx51_revision() < IMX_CHIP_REVISION_3_0) {
 +              eukrea_cpuimx51sd_i2c_devices[1].irq =
 +                      gpio_to_irq(TSC2007_IRQGPIO_REV2),
 +              platform_add_devices(rev2_platform_devices,
 +                      ARRAY_SIZE(rev2_platform_devices));
 +              gpio_request(TSC2007_IRQGPIO_REV2, "tsc2007_irq");
 +              gpio_direction_input(TSC2007_IRQGPIO_REV2);
 +              gpio_free(TSC2007_IRQGPIO_REV2);
 +      } else {
 +              eukrea_cpuimx51sd_i2c_devices[1].irq =
 +                      gpio_to_irq(TSC2007_IRQGPIO_REV3),
 +              imx51_add_imx_i2c(0, &cpuimx51sd_i2c_data);
 +              gpio_request(TSC2007_IRQGPIO_REV3, "tsc2007_irq");
 +              gpio_direction_input(TSC2007_IRQGPIO_REV3);
 +              gpio_free(TSC2007_IRQGPIO_REV3);
 +      }
  
        i2c_register_board_info(0, eukrea_cpuimx51sd_i2c_devices,
                        ARRAY_SIZE(eukrea_cpuimx51sd_i2c_devices));
 -      platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
  
        if (otg_mode_host)
                imx51_add_mxc_ehci_otg(&dr_utmi_config);
@@@ -369,5 -335,6 +369,6 @@@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukre
        .handle_irq = imx51_handle_irq,
        .timer = &mxc_timer,
        .init_machine = eukrea_cpuimx51sd_init,
+       .init_late      = imx51_init_late,
        .restart        = mxc_restart,
  MACHINE_END
index 517672ebcbc5a1f6c642e26e43d6c2241d705b0d,f3b01157108def8e54df4f1c3edfd07ada3b576e..dde397014d4b709d2cd2026d8ea879676f3b35b8
@@@ -163,12 -163,6 +163,12 @@@ static iomux_v3_cfg_t mx51babbage_pads[
        MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
        MX51_PAD_CSPI1_SS0__GPIO4_24,
        MX51_PAD_CSPI1_SS1__GPIO4_25,
 +
 +      /* Audio */
 +      MX51_PAD_AUD3_BB_TXD__AUD3_TXD,
 +      MX51_PAD_AUD3_BB_RXD__AUD3_RXD,
 +      MX51_PAD_AUD3_BB_CK__AUD3_TXC,
 +      MX51_PAD_AUD3_BB_FS__AUD3_TXFS,
  };
  
  /* Serial ports */
@@@ -432,5 -426,6 +432,6 @@@ MACHINE_START(MX51_BABBAGE, "Freescale 
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_babbage_timer,
        .init_machine = mx51_babbage_init,
+       .init_late      = imx51_init_late,
        .restart        = mxc_restart,
  MACHINE_END
index 86e96ef11f9d554ef926b35b344d1d70441bfa55,a9f3c7c5a1e0e04893915973a030b60f9244d486..8d09c0126cabeb505a269f79c1131e9ffb5debd5
@@@ -207,29 -207,32 +207,32 @@@ static void mx51_efikamx_power_off(void
  
  static int __init mx51_efikamx_power_init(void)
  {
-       if (machine_is_mx51_efikamx()) {
-               pwgt1 = regulator_get(NULL, "pwgt1");
-               pwgt2 = regulator_get(NULL, "pwgt2");
-               if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
-                       regulator_enable(pwgt1);
-                       regulator_enable(pwgt2);
-               }
-               gpio_request(EFIKAMX_POWEROFF, "poweroff");
-               pm_power_off = mx51_efikamx_power_off;
-               /* enable coincell charger. maybe need a small power driver ? */
-               coincell = regulator_get(NULL, "coincell");
-               if (!IS_ERR(coincell)) {
-                       regulator_set_voltage(coincell, 3000000, 3000000);
-                       regulator_enable(coincell);
-               }
-               regulator_has_full_constraints();
+       pwgt1 = regulator_get(NULL, "pwgt1");
+       pwgt2 = regulator_get(NULL, "pwgt2");
+       if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
+               regulator_enable(pwgt1);
+               regulator_enable(pwgt2);
+       }
+       gpio_request(EFIKAMX_POWEROFF, "poweroff");
+       pm_power_off = mx51_efikamx_power_off;
+       /* enable coincell charger. maybe need a small power driver ? */
+       coincell = regulator_get(NULL, "coincell");
+       if (!IS_ERR(coincell)) {
+               regulator_set_voltage(coincell, 3000000, 3000000);
+               regulator_enable(coincell);
        }
  
+       regulator_has_full_constraints();
        return 0;
  }
- late_initcall(mx51_efikamx_power_init);
+ static void __init mx51_efikamx_init_late(void)
+ {
+       imx51_init_late();
+       mx51_efikamx_power_init();
+ }
  
  static void __init mx51_efikamx_init(void)
  {
@@@ -284,7 -287,8 +287,7 @@@ static struct sys_timer mx51_efikamx_ti
        .init = mx51_efikamx_timer_init,
  };
  
 -MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
 -      /* Maintainer: Amit Kucheria <[email protected]> */
 +MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
        .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_efikamx_timer,
        .init_machine = mx51_efikamx_init,
+       .init_late = mx51_efikamx_init_late,
        .restart = mx51_efikamx_restart,
  MACHINE_END
index 88f837a6cc76d44c841dfcc23de37b735d878953,e73db383c3c1a8167e8aac525d8d272bce12370e..fdbd181b97efaf015378a3b35c44bd80197404e6
@@@ -211,22 -211,25 +211,25 @@@ static void mx51_efikasb_power_off(void
  
  static int __init mx51_efikasb_power_init(void)
  {
-       if (machine_is_mx51_efikasb()) {
-               pwgt1 = regulator_get(NULL, "pwgt1");
-               pwgt2 = regulator_get(NULL, "pwgt2");
-               if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
-                       regulator_enable(pwgt1);
-                       regulator_enable(pwgt2);
-               }
-               gpio_request(EFIKASB_POWEROFF, "poweroff");
-               pm_power_off = mx51_efikasb_power_off;
-               regulator_has_full_constraints();
+       pwgt1 = regulator_get(NULL, "pwgt1");
+       pwgt2 = regulator_get(NULL, "pwgt2");
+       if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
+               regulator_enable(pwgt1);
+               regulator_enable(pwgt2);
        }
+       gpio_request(EFIKASB_POWEROFF, "poweroff");
+       pm_power_off = mx51_efikasb_power_off;
+       regulator_has_full_constraints();
  
        return 0;
  }
- late_initcall(mx51_efikasb_power_init);
+ static void __init mx51_efikasb_init_late(void)
+ {
+       imx51_init_late();
+       mx51_efikasb_power_init();
+ }
  
  /* 01     R1.3 board
     10     R2.0 board */
@@@ -280,13 -283,14 +283,14 @@@ static struct sys_timer mx51_efikasb_ti
        .init   = mx51_efikasb_timer_init,
  };
  
 -MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
 +MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)")
        .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
        .handle_irq = imx51_handle_irq,
        .init_machine =  efikasb_board_init,
+       .init_late = mx51_efikasb_init_late,
        .timer = &mx51_efikasb_timer,
        .restart        = mxc_restart,
  MACHINE_END
index 10c9795934a3c87673b9c3434dec4d4de40bc3d9,3aba3a924d5f53b2bb94217e60e734c45476fa36..0a40004154f234e4afba7f20477a902509bb6637
@@@ -683,7 -683,7 +683,7 @@@ static void __init pcm037_timer_init(vo
        mx31_clocks_init(26000000);
  }
  
 -struct sys_timer pcm037_timer = {
 +static struct sys_timer pcm037_timer = {
        .init   = pcm037_timer_init,
  };
  
@@@ -694,6 -694,11 +694,11 @@@ static void __init pcm037_reserve(void
                        MX3_CAMERA_BUF_SIZE);
  }
  
+ static void __init pcm037_init_late(void)
+ {
+       pcm037_eet_init_devices();
+ }
  MACHINE_START(PCM037, "Phytec Phycore pcm037")
        /* Maintainer: Pengutronix */
        .atag_offset = 0x100,
        .handle_irq = imx31_handle_irq,
        .timer = &pcm037_timer,
        .init_machine = pcm037_init,
+       .init_late = pcm037_init_late,
        .restart        = mxc_restart,
  MACHINE_END
index 8b4dc20c7c53ba49eb3120ae7e6d12b0191e1655,d6b7e9fb0f891df4424665882e3ee707731251a6..feeee17da96b227b769c1748c6175b6071b8bd59
@@@ -14,7 -14,6 +14,7 @@@
  #include <linux/mm.h>
  #include <linux/init.h>
  #include <linux/clk.h>
 +#include <linux/pinctrl/machine.h>
  
  #include <asm/system_misc.h>
  #include <asm/mach/map.h>
@@@ -33,7 -32,6 +33,7 @@@ static void imx5_idle(void
                gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
                if (IS_ERR(gpc_dvfs_clk))
                        return;
 +              clk_prepare(gpc_dvfs_clk);
        }
        clk_enable(gpc_dvfs_clk);
        mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
@@@ -225,7 -223,6 +225,7 @@@ void __init imx53_soc_init(void
        mxc_register_gpio("imx31-gpio", 5, MX53_GPIO6_BASE_ADDR, SZ_16K, MX53_INT_GPIO6_LOW, MX53_INT_GPIO6_HIGH);
        mxc_register_gpio("imx31-gpio", 6, MX53_GPIO7_BASE_ADDR, SZ_16K, MX53_INT_GPIO7_LOW, MX53_INT_GPIO7_HIGH);
  
 +      pinctrl_provide_dummies();
        /* i.mx53 has the i.mx35 type sdma */
        imx_add_imx_sdma("imx35-sdma", MX53_SDMA_BASE_ADDR, MX53_INT_SDMA, &imx53_sdma_pdata);
  
        platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res,
                                        ARRAY_SIZE(imx53_audmux_res));
  }
+ void __init imx51_init_late(void)
+ {
+       mx51_neon_fixup();
+ }
index 75b3cfcada6d06586aff8ec0b627db092e408e75,6095d355f514172e159cda59ef3f27d219d649dd..a5001378135d4d3ec8615022370457a293cd14f7
@@@ -17,6 -17,7 +17,6 @@@
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/irq.h>
 -#include <linux/gpio.h>
  #include <linux/platform_device.h>
  #include <linux/delay.h>
  #include <linux/io.h>
@@@ -119,6 -120,11 +119,11 @@@ static void __init msm7x30_map_io(void
        msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
  }
  
+ static void __init msm7x30_init_late(void)
+ {
+       smd_debugfs_init();
+ }
  MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
        .atag_offset = 0x100,
        .fixup = msm7x30_fixup,
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
+       .init_late = msm7x30_init_late,
        .timer = &msm_timer,
  MACHINE_END
  
@@@ -136,6 -143,7 +142,7 @@@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X3
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
+       .init_late = msm7x30_init_late,
        .timer = &msm_timer,
  MACHINE_END
  
@@@ -146,5 -154,6 +153,6 @@@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
+       .init_late = msm7x30_init_late,
        .timer = &msm_timer,
  MACHINE_END
index fbaa4ed95a3cf9dc578b53fb7ea511e06b2187ee,dd625aaa39d597f6b13dfdf49938923868114423..c8fe0edb9761961f877378601dad5c3c0a810be4
@@@ -17,6 -17,7 +17,6 @@@
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/irq.h>
 -#include <linux/gpio.h>
  #include <linux/platform_device.h>
  #include <linux/delay.h>
  #include <linux/usb/msm_hsusb.h>
@@@ -190,11 -191,17 +190,17 @@@ static void __init qsd8x50_init(void
        qsd8x50_init_mmc();
  }
  
+ static void __init qsd8x50_init_late(void)
+ {
+       smd_debugfs_init();
+ }
  MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
        .atag_offset = 0x100,
        .map_io = qsd8x50_map_io,
        .init_irq = qsd8x50_init_irq,
        .init_machine = qsd8x50_init,
+       .init_late = qsd8x50_init_late,
        .timer = &msm_timer,
  MACHINE_END
  
@@@ -203,5 -210,6 +209,6 @@@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8
        .map_io = qsd8x50_map_io,
        .init_irq = qsd8x50_init_irq,
        .init_machine = qsd8x50_init,
+       .init_late = qsd8x50_init_late,
        .timer = &msm_timer,
  MACHINE_END
index 4a4afb371022e0898d78a1cc673f02d392b5b957,a77ee57f840d4510b5f526571ed4fef162b37431..c7364fdbda05370f05a84277cbcf3b494daf897d
@@@ -185,6 -185,20 +185,6 @@@ static struct platform_device nor_devic
        .resource       = &nor_resource,
  };
  
 -static void nand_cmd_ctl(struct mtd_info *mtd, int cmd,       unsigned int ctrl)
 -{
 -      struct nand_chip *this = mtd->priv;
 -      unsigned long mask;
 -
 -      if (cmd == NAND_CMD_NONE)
 -              return;
 -
 -      mask = (ctrl & NAND_CLE) ? 0x02 : 0;
 -      if (ctrl & NAND_ALE)
 -              mask |= 0x04;
 -      writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
 -}
 -
  #define FSAMPLE_NAND_RB_GPIO_PIN      62
  
  static int nand_dev_ready(struct mtd_info *mtd)
@@@ -202,7 -216,7 +202,7 @@@ static struct platform_nand_data nand_d
                .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
        },
  };
@@@ -369,6 -383,7 +369,7 @@@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_fsample_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
  MACHINE_END
index 057ec13f06490bfbdcc5c425fd36f54aa8b1863b,04cf9945575822e623f2791b9d9544f585511ed4..7e503686f7af2b2635698c112f350ffd6ce72dd8
@@@ -179,6 -179,20 +179,6 @@@ static struct mtd_partition h2_nand_par
        },
  };
  
 -static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 -{
 -      struct nand_chip *this = mtd->priv;
 -      unsigned long mask;
 -
 -      if (cmd == NAND_CMD_NONE)
 -              return;
 -
 -      mask = (ctrl & NAND_CLE) ? 0x02 : 0;
 -      if (ctrl & NAND_ALE)
 -              mask |= 0x04;
 -      writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
 -}
 -
  #define H2_NAND_RB_GPIO_PIN   62
  
  static int h2_nand_dev_ready(struct mtd_info *mtd)
@@@ -198,8 -212,9 +198,8 @@@ static struct platform_nand_data h2_nan
                .part_probe_types       = h2_part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = h2_nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = h2_nand_dev_ready,
 -
        },
  };
  
@@@ -431,6 -446,7 +431,7 @@@ MACHINE_START(OMAP_H2, "TI-H2"
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = h2_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
  MACHINE_END
index f6ddf875965712ebcf05698e589b2ddc3fddae5c,a11ef0a7c025a4ab2a7b6a96324e03cafe4d3b96..9fb03f189d934bce14ce17f37cf53f99b3551472
@@@ -181,6 -181,20 +181,6 @@@ static struct mtd_partition nand_partit
        },
  };
  
 -static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 -{
 -      struct nand_chip *this = mtd->priv;
 -      unsigned long mask;
 -
 -      if (cmd == NAND_CMD_NONE)
 -              return;
 -
 -      mask = (ctrl & NAND_CLE) ? 0x02 : 0;
 -      if (ctrl & NAND_ALE)
 -              mask |= 0x04;
 -      writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
 -}
 -
  #define H3_NAND_RB_GPIO_PIN   10
  
  static int nand_dev_ready(struct mtd_info *mtd)
@@@ -200,7 -214,7 +200,7 @@@ static struct platform_nand_data nand_p
                .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
  
        },
@@@ -425,6 -439,7 +425,7 @@@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = h3_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
  MACHINE_END
index 61ed4f0247ce37567e8fb0046f4d1cf503e4181b,0711685f89a598a88d0afa9cbb90dcfe1516e2a5..3c71c6bace2cd09489b358d6569c2652471040aa
@@@ -289,10 -289,10 +289,10 @@@ palmz71_gpio_setup(int early
                gpio_direction_input(PALMZ71_USBDETECT_GPIO);
                if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
                                palmz71_powercable, IRQF_SAMPLE_RANDOM,
 -                              "palmz71-cable", 0))
 +                              "palmz71-cable", NULL))
                        printk(KERN_ERR
                                        "IRQ request for power cable failed!\n");
 -              palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0);
 +              palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
        }
  }
  
@@@ -330,6 -330,7 +330,7 @@@ MACHINE_START(OMAP_PALMZ71, "OMAP310 ba
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmz71_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
  MACHINE_END
index a2c88890e767e369488c4b5eb16f87f524e0f51a,512989bb15c001240977dc6240f69c9fd275a4ce..f2cb24387c229d059a4a3af3dcffef386540f7d6
@@@ -143,6 -143,20 +143,6 @@@ static struct platform_device nor_devic
        .resource       = &nor_resource,
  };
  
 -static void nand_cmd_ctl(struct mtd_info *mtd, int cmd,       unsigned int ctrl)
 -{
 -      struct nand_chip *this = mtd->priv;
 -      unsigned long mask;
 -
 -      if (cmd == NAND_CMD_NONE)
 -              return;
 -
 -      mask = (ctrl & NAND_CLE) ? 0x02 : 0;
 -      if (ctrl & NAND_ALE)
 -              mask |= 0x04;
 -      writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
 -}
 -
  #define P2_NAND_RB_GPIO_PIN   62
  
  static int nand_dev_ready(struct mtd_info *mtd)
@@@ -160,7 -174,7 +160,7 @@@ static struct platform_nand_data nand_d
                .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
        },
  };
@@@ -331,6 -345,7 +331,7 @@@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 P
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_perseus2_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
  MACHINE_END
index 64ce3bbe22b586ab96765a7fcb824a5af8505c26,0b77e6d68f5f51cdf03a3e2a9efd7344ca5cbdd3..c2552b24f9f295381b36132cc4d59b850ade8d3f
@@@ -27,7 -27,6 +27,7 @@@
  #define __ARCH_ARM_MACH_OMAP1_COMMON_H
  
  #include <plat/common.h>
 +#include <linux/mtd/mtd.h>
  
  #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
  void omap7xx_map_io(void);
@@@ -53,31 -52,22 +53,41 @@@ static inline void omap16xx_map_io(void
  }
  #endif
  
+ #ifdef CONFIG_OMAP_SERIAL_WAKE
+ int omap_serial_wakeup_init(void);
+ #else
+ static inline int omap_serial_wakeup_init(void)
+ {
+       return 0;
+ }
+ #endif
  void omap1_init_early(void);
  void omap1_init_irq(void);
+ void omap1_init_late(void);
  void omap1_restart(char, const char *);
  
 +extern void __init omap_check_revision(void);
 +
 +extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
 +                             unsigned int ctrl);
 +
  extern struct sys_timer omap1_timer;
 -extern bool omap_32k_timer_init(void);
 -extern void __init omap_init_consistent_dma_size(void);
 +#ifdef CONFIG_OMAP_32K_TIMER
 +extern int omap_32k_timer_init(void);
 +#else
 +static inline int __init omap_32k_timer_init(void)
 +{
 +      return -ENODEV;
 +}
 +#endif
 +
 +extern u32 omap_irq_flags;
 +
 +#ifdef CONFIG_ARCH_OMAP16XX
 +extern int ocpi_enable(void);
 +#else
 +static inline int ocpi_enable(void) { return 0; }
 +#endif
  
  #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
diff --combined arch/arm/mach-omap1/io.c
index 71ce017bf5d8a895c9ddb8f2b4c1a12dba4ef7d4,cf811f2bc7fc288491a2b468c537c24961387a7f..6c95a59f0f1648275f2b75db41b11493096ce2d0
  
  #include <plat/mux.h>
  #include <plat/tc.h>
 +#include <plat/dma.h>
  
  #include "iomap.h"
  #include "common.h"
  #include "clock.h"
  
 -extern void omap_check_revision(void);
 -
  /*
   * The machine specific code may provide the extra mapping besides the
   * default mapping provided here.
@@@ -137,6 -138,11 +137,11 @@@ void __init omap1_init_early(void
        omap_init_consistent_dma_size();
  }
  
+ void __init omap1_init_late(void)
+ {
+       omap_serial_wakeup_init();
+ }
  /*
   * NOTE: Please use ioremap + __raw_read/write where possible instead of these
   */
index 37abb0d49b5178efca0a682bb9abcc25a9d861fa,8ceb480996e020d28c90fd57198de49e46ac2b24..a98c688058a92e8cb9251e289567515631b6443e
@@@ -37,7 -37,7 +37,7 @@@
  #include <plat/dma.h>
  #include <plat/gpmc.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include <plat/gpmc-smc91x.h>
  
@@@ -113,6 -113,9 +113,6 @@@ static struct gpio sdp3430_dss_gpios[] 
        {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
  };
  
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
  static void __init sdp3430_display_init(void)
  {
        int r;
  
  static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
  {
 -      if (dvi_enabled) {
 -              printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
 -              return -EINVAL;
 -      }
 -
        gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
        gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
  
 -      lcd_enabled = 1;
 -
        return 0;
  }
  
  static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
  {
 -      lcd_enabled = 0;
 -
        gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
        gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
  }
  
 -static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -
 -      dvi_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      dvi_enabled = 0;
 -}
 -
  static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
  {
        return 0;
@@@ -157,14 -186,15 +157,14 @@@ static struct omap_dss_device sdp3430_l
        .platform_disable       = sdp3430_panel_disable_lcd,
  };
  
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = sdp3430_panel_enable_dvi,
 -      .platform_disable       = sdp3430_panel_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = -1,
  };
  
  static struct omap_dss_device sdp3430_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -605,6 -635,7 +605,7 @@@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap_3430sdp_init,
+       .init_late      = omap3430_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 94af6cde2e36d4868a338ce46644689945bf2f81,3f6cf228e0b0caa3fca0f777ae30c9e6117be981..8e17284a803ff0cae6ae473aced0a9793418c059
@@@ -384,11 -384,6 +384,11 @@@ static struct platform_device sdp4430_d
        .id     = -1,
  };
  
 +static struct platform_device sdp4430_hdmi_audio_codec = {
 +      .name   = "hdmi-audio-codec",
 +      .id     = -1,
 +};
 +
  static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
        .card_name = "SDP4430",
        .has_hs         = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
@@@ -423,7 -418,6 +423,7 @@@ static struct platform_device *sdp4430_
        &sdp4430_vbat,
        &sdp4430_dmic_codec,
        &sdp4430_abe_audio,
 +      &sdp4430_hdmi_audio_codec,
  };
  
  static struct omap_musb_board_data musb_board_data = {
@@@ -495,6 -489,50 +495,6 @@@ static struct platform_device omap_vwla
        },
  };
  
 -static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 -{
 -      int irq = 0;
 -      struct platform_device *pdev = container_of(dev,
 -                              struct platform_device, dev);
 -      struct omap_mmc_platform_data *pdata = dev->platform_data;
 -
 -      /* Setting MMC1 Card detect Irq */
 -      if (pdev->id == 0) {
 -              irq = twl6030_mmc_card_detect_config();
 -              if (irq < 0) {
 -                      pr_err("Failed configuring MMC1 card detect\n");
 -                      return irq;
 -              }
 -              pdata->slots[0].card_detect_irq = irq;
 -              pdata->slots[0].card_detect = twl6030_mmc_card_detect;
 -      }
 -      return 0;
 -}
 -
 -static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 -{
 -      struct omap_mmc_platform_data *pdata;
 -
 -      /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
 -      if (!dev) {
 -              pr_err("Failed %s\n", __func__);
 -              return;
 -      }
 -      pdata = dev->platform_data;
 -      pdata->init =   omap4_twl6030_hsmmc_late_init;
 -}
 -
 -static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
 -{
 -      struct omap2_hsmmc_info *c;
 -
 -      omap_hsmmc_init(controllers);
 -      for (c = controllers; c->mmc; c++)
 -              omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
 -
 -      return 0;
 -}
 -
  static struct regulator_init_data sdp4430_vaux1 = {
        .constraints = {
                .min_uV                 = 1000000,
@@@ -577,9 -615,7 +577,9 @@@ static int __init omap4_i2c_init(void
                        TWL_COMMON_REGULATOR_VANA |
                        TWL_COMMON_REGULATOR_VCXIO |
                        TWL_COMMON_REGULATOR_VUSB |
 -                      TWL_COMMON_REGULATOR_CLK32KG);
 +                      TWL_COMMON_REGULATOR_CLK32KG |
 +                      TWL_COMMON_REGULATOR_V1V8 |
 +                      TWL_COMMON_REGULATOR_V2V1);
        omap4_pmic_init("twl6030", &sdp4430_twldata,
                        &twl6040_data, OMAP44XX_IRQ_SYS_2N);
        omap_register_i2c_bus(2, 400, NULL, 0);
@@@ -630,10 -666,6 +630,10 @@@ static struct nokia_dsi_panel_data dsi1
                .use_ext_te     = false,
                .ext_te_gpio    = 101,
                .esd_interval   = 0,
 +              .pin_config = {
 +                      .num_pins       = 6,
 +                      .pins           = { 0, 1, 2, 3, 4, 5 },
 +              },
  };
  
  static struct omap_dss_device sdp4430_lcd_device = {
        .type                   = OMAP_DISPLAY_TYPE_DSI,
        .data                   = &dsi1_panel,
        .phy.dsi                = {
 -              .clk_lane       = 1,
 -              .clk_pol        = 0,
 -              .data1_lane     = 2,
 -              .data1_pol      = 0,
 -              .data2_lane     = 3,
 -              .data2_pol      = 0,
 -
                .module         = 0,
        },
  
@@@ -676,10 -715,6 +676,10 @@@ static struct nokia_dsi_panel_data dsi2
                .use_ext_te     = false,
                .ext_te_gpio    = 103,
                .esd_interval   = 0,
 +              .pin_config = {
 +                      .num_pins       = 6,
 +                      .pins           = { 0, 1, 2, 3, 4, 5 },
 +              },
  };
  
  static struct omap_dss_device sdp4430_lcd2_device = {
        .type                   = OMAP_DISPLAY_TYPE_DSI,
        .data                   = &dsi2_panel,
        .phy.dsi                = {
 -              .clk_lane       = 1,
 -              .clk_pol        = 0,
 -              .data1_lane     = 2,
 -              .data1_pol      = 0,
 -              .data2_lane     = 3,
 -              .data2_pol      = 0,
  
                .module         = 1,
        },
        .channel                = OMAP_DSS_CHANNEL_LCD2,
  };
  
 -static void sdp4430_lcd_init(void)
 -{
 -      int r;
 -
 -      r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
 -              "lcd1_reset_gpio");
 -      if (r)
 -              pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
 -
 -      r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
 -              "lcd2_reset_gpio");
 -      if (r)
 -              pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
 -}
 -
  static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
        .hpd_gpio = HDMI_GPIO_HPD,
  };
@@@ -802,6 -858,7 +802,6 @@@ static void __init omap_4430sdp_display
        if (r)
                pr_err("%s: Could not get display_sel GPIO\n", __func__);
  
 -      sdp4430_lcd_init();
        sdp4430_picodlp_init();
        omap_display_init(&sdp4430_dss_data);
        /*
@@@ -912,6 -969,7 +912,7 @@@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4
        .init_irq       = gic_init_irq,
        .handle_irq     = gic_handle_irq,
        .init_machine   = omap_4430sdp_init,
+       .init_late      = omap4430_init_late,
        .timer          = &omap4_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 3b8a53c1f2a897a21e24d510849459709459bc96,7231020d9af85ccedc7650585134bacc9dcf85d3..92432c28673dfe9a17971bcc8f86b477c4f7cb03
@@@ -30,7 -30,6 +30,7 @@@
  #include "common.h"
  #include <plat/usb.h>
  
 +#include "am35xx-emac.h"
  #include "mux.h"
  #include "control.h"
  
@@@ -91,7 -90,6 +91,7 @@@ static void __init am3517_crane_init(vo
        }
  
        usbhs_init(&usbhs_bdata);
 +      am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
  }
  
  MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = am3517_crane_init,
+       .init_late      = am35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 99790eb646e848c8ddd47d72a62554c36b669b45,ae50e11a2559db74a098db81c56ab61cd810328e..18f601096ce1807aaf9ba2fa8712f707a7c3bba3
@@@ -37,7 -37,7 +37,7 @@@
  #include <plat/usb.h>
  #include <video/omapdss.h>
  #include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include "am35xx-emac.h"
  #include "mux.h"
@@@ -207,14 -207,31 +207,14 @@@ static struct omap_dss_device am3517_ev
        .platform_disable       = am3517_evm_panel_disable_tv,
  };
  
 -static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -      dvi_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      dvi_enabled = 0;
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = am3517_evm_panel_enable_dvi,
 -      .platform_disable       = am3517_evm_panel_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = -1,
  };
  
  static struct omap_dss_device am3517_evm_dvi_device = {
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .name                   = "dvi",
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -385,6 -402,7 +385,7 @@@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = am3517_evm_init,
+       .init_late      = am35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index c03df142ea672ea11c4470a983be031bbef5bffb,f9750613686c0cf8d855fb5ed33f5b4721334528..ded100c80a91cb55f50245a924efcca310cee621
@@@ -44,7 -44,7 +44,7 @@@
  #include <plat/usb.h>
  #include <video/omapdss.h>
  #include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  #include <plat/mcspi.h>
  
  #include <mach/hardware.h>
@@@ -218,6 -218,25 +218,6 @@@ static void cm_t35_panel_disable_lcd(st
        gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
  }
  
 -static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -
 -      gpio_set_value(CM_T35_DVI_EN_GPIO, 0);
 -      dvi_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(CM_T35_DVI_EN_GPIO, 1);
 -      dvi_enabled = 0;
 -}
 -
  static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
  {
        return 0;
@@@ -241,14 -260,15 +241,14 @@@ static struct omap_dss_device cm_t35_lc
        .phy.dpi.data_lines     = 18,
  };
  
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = cm_t35_panel_enable_dvi,
 -      .platform_disable       = cm_t35_panel_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = CM_T35_DVI_EN_GPIO,
  };
  
  static struct omap_dss_device cm_t35_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -296,6 -316,7 +296,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" },
 -      { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable"    },
  };
  
  static void __init cm_t35_init_display(void)
  
        gpio_export(CM_T35_LCD_EN_GPIO, 0);
        gpio_export(CM_T35_LCD_BL_GPIO, 0);
 -      gpio_export(CM_T35_DVI_EN_GPIO, 0);
  
        msleep(50);
        gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
@@@ -476,10 -498,6 +476,10 @@@ static struct twl4030_gpio_platform_dat
        .setup          = cm_t35_twl_gpio_setup,
  };
  
 +static struct twl4030_power_data cm_t35_power_data = {
 +      .use_poweroff   = true,
 +};
 +
  static struct twl4030_platform_data cm_t35_twldata = {
        /* platform_data for children goes here */
        .keypad         = &cm_t35_kp_data,
        .vmmc1          = &cm_t35_vmmc1,
        .vsim           = &cm_t35_vsim,
        .vio            = &cm_t35_vio,
 +      .power          = &cm_t35_power_data,
  };
  
  static void __init cm_t35_init_i2c(void)
@@@ -669,6 -686,7 +669,7 @@@ MACHINE_START(CM_T35, "Compulab CM-T35"
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = cm_t35_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
@@@ -681,6 -699,7 +682,7 @@@ MACHINE_START(CM_T3730, "Compulab CM-T3
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = cm_t3730_init,
+       .init_late     = omap3630_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index b063f0d2faa6811a6aaab8376e17e5e8fe4a319b,f616c8c8bc8004c13026616c72b8e086f6da8912..6567c1cd55729ce167cf90a48ab18d700ebe545f
@@@ -47,7 -47,7 +47,7 @@@
  #include <plat/usb.h>
  #include <video/omapdss.h>
  #include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include <plat/mcspi.h>
  #include <linux/input/matrix_keypad.h>
@@@ -118,6 -118,19 +118,6 @@@ static void devkit8000_panel_disable_lc
                gpio_set_value_cansleep(dssdev->reset_gpio, 0);
  }
  
 -static int devkit8000_panel_enable_dvi(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_dvi(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"),
  };
@@@ -141,14 -154,15 +141,14 @@@ static struct omap_dss_device devkit800
        .phy.dpi.data_lines     = 24,
  };
  
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = devkit8000_panel_enable_dvi,
 -      .platform_disable       = devkit8000_panel_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = -1,
  };
  
  static struct omap_dss_device devkit8000_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -230,7 -244,13 +230,7 @@@ static int devkit8000_twl_gpio_setup(st
        }
  
        /* gpio + 7 is "DVI_PD" (out, active low) */
 -      devkit8000_dvi_device.reset_gpio = gpio + 7;
 -      ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
 -                             GPIOF_OUT_INIT_LOW, "DVI PowerDown");
 -      if (ret < 0) {
 -              devkit8000_dvi_device.reset_gpio = -EINVAL;
 -              printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
 -      }
 +      dvi_panel.power_down_gpio = gpio + 7;
  
        return 0;
  }
@@@ -644,6 -664,7 +644,7 @@@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = devkit8000_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_secure_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 7302ba7ff1b9007f0952566f8588571dfdd53b91,56ffcc9f2b2bf0ccf6b8277853618e10bee1da57..20293465786701f8650e1377ea070c6eee536673
@@@ -15,6 -15,7 +15,6 @@@
  #include <linux/of_irq.h>
  #include <linux/of_platform.h>
  #include <linux/irqdomain.h>
 -#include <linux/i2c/twl.h>
  
  #include <mach/hardware.h>
  #include <asm/hardware/gic.h>
@@@ -94,6 -95,22 +94,6 @@@ MACHINE_EN
  #endif
  
  #ifdef CONFIG_ARCH_OMAP3
 -static struct twl4030_platform_data beagle_twldata = {
 -      .irq_base       = TWL4030_IRQ_BASE,
 -      .irq_end        = TWL4030_IRQ_END,
 -};
 -
 -static void __init omap3_i2c_init(void)
 -{
 -      omap3_pmic_init("twl4030", &beagle_twldata);
 -}
 -
 -static void __init omap3_init(void)
 -{
 -      omap3_i2c_init();
 -      omap_generic_init();
 -}
 -
  static const char *omap3_boards_compat[] __initdata = {
        "ti,omap3",
        NULL,
@@@ -105,7 -122,7 +105,7 @@@ DT_MACHINE_START(OMAP3_DT, "Generic OMA
        .init_early     = omap3430_init_early,
        .init_irq       = omap_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
 -      .init_machine   = omap3_init,
 +      .init_machine   = omap_generic_init,
        .timer          = &omap3_timer,
        .dt_compat      = omap3_boards_compat,
        .restart        = omap_prcm_restart,
@@@ -113,6 -130,22 +113,6 @@@ MACHINE_EN
  #endif
  
  #ifdef CONFIG_ARCH_OMAP4
 -static struct twl4030_platform_data sdp4430_twldata = {
 -      .irq_base       = TWL6030_IRQ_BASE,
 -      .irq_end        = TWL6030_IRQ_END,
 -};
 -
 -static void __init omap4_i2c_init(void)
 -{
 -      omap4_pmic_init("twl6030", &sdp4430_twldata, NULL, 0);
 -}
 -
 -static void __init omap4_init(void)
 -{
 -      omap4_i2c_init();
 -      omap_generic_init();
 -}
 -
  static const char *omap4_boards_compat[] __initdata = {
        "ti,omap4",
        NULL,
@@@ -124,7 -157,8 +124,8 @@@ DT_MACHINE_START(OMAP4_DT, "Generic OMA
        .init_early     = omap4430_init_early,
        .init_irq       = omap_init_irq,
        .handle_irq     = gic_handle_irq,
 -      .init_machine   = omap4_init,
 +      .init_machine   = omap_generic_init,
+       .init_late      = omap4430_init_late,
        .timer          = &omap4_timer,
        .dt_compat      = omap4_boards_compat,
        .restart        = omap_prcm_restart,
index 7a274098f67bf5d5946e4d3becc4343ed6c5a9a2,21df74e835b7e15afd37a7804ab2027d8e600e31..74915295482ec849e0d0fefe5fc9a22703ee1f2c
@@@ -24,8 -24,6 +24,8 @@@
  #include <linux/i2c/twl.h>
  #include <linux/mmc/host.h>
  
 +#include <linux/mtd/nand.h>
 +
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  
  #include <plat/gpmc.h>
  #include <plat/usb.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  #include <plat/onenand.h>
  
  #include "mux.h"
  #include "hsmmc.h"
  #include "sdram-numonyx-m65kxxxxam.h"
  #include "common-board-devices.h"
 +#include "board-flash.h"
 +#include "control.h"
  
  #define IGEP2_SMSC911X_CS       5
  #define IGEP2_SMSC911X_GPIO     176
  #define IGEP3_GPIO_LED1_RED   16
  #define IGEP3_GPIO_USBH_NRESET  183
  
 +#define IGEP_SYSBOOT_MASK           0x1f
 +#define IGEP_SYSBOOT_NAND           0x0f
 +#define IGEP_SYSBOOT_ONENAND        0x10
 +
  /*
   * IGEP2 Hardware Revision Table
   *
@@@ -118,10 -110,8 +118,10 @@@ static void __init igep2_get_revision(v
        gpio_free(IGEP2_GPIO_LED1_RED);
  }
  
 -#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
 -      defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 +#if defined(CONFIG_MTD_ONENAND_OMAP2) ||              \
 +      defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) ||     \
 +      defined(CONFIG_MTD_NAND_OMAP2) ||               \
 +      defined(CONFIG_MTD_NAND_OMAP2_MODULE)
  
  #define ONENAND_MAP             0x20000000
  
   * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
   */
  
 -static struct mtd_partition igep_onenand_partitions[] = {
 +static struct mtd_partition igep_flash_partitions[] = {
        {
                .name           = "X-Loader",
                .offset         = 0,
        },
  };
  
 -static struct omap_onenand_platform_data igep_onenand_data = {
 -      .parts = igep_onenand_partitions,
 -      .nr_parts = ARRAY_SIZE(igep_onenand_partitions),
 -      .dma_channel    = -1,   /* disable DMA in OMAP OneNAND driver */
 -};
 -
 -static struct platform_device igep_onenand_device = {
 -      .name           = "omap2-onenand",
 -      .id             = -1,
 -      .dev = {
 -              .platform_data = &igep_onenand_data,
 -      },
 -};
 +static inline u32 igep_get_sysboot_value(void)
 +{
 +      return omap_ctrl_readl(OMAP343X_CONTROL_STATUS) & IGEP_SYSBOOT_MASK;
 +}
  
  static void __init igep_flash_init(void)
  {
 -      u8 cs = 0;
 -      u8 onenandcs = GPMC_CS_NUM + 1;
 -
 -      for (cs = 0; cs < GPMC_CS_NUM; cs++) {
 -              u32 ret;
 -              ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
 -
 -              /* Check if NAND/oneNAND is configured */
 -              if ((ret & 0xC00) == 0x800)
 -                      /* NAND found */
 -                      pr_err("IGEP: Unsupported NAND found\n");
 -              else {
 -                      ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
 -                      if ((ret & 0x3F) == (ONENAND_MAP >> 24))
 -                              /* ONENAND found */
 -                              onenandcs = cs;
 -              }
 -      }
 -
 -      if (onenandcs > GPMC_CS_NUM) {
 -              pr_err("IGEP: Unable to find configuration in GPMC\n");
 -              return;
 +      u32 mux;
 +      mux = igep_get_sysboot_value();
 +
 +      if (mux == IGEP_SYSBOOT_NAND) {
 +              pr_info("IGEP: initializing NAND memory device\n");
 +              board_nand_init(igep_flash_partitions,
 +                              ARRAY_SIZE(igep_flash_partitions),
 +                              0, NAND_BUSWIDTH_16);
 +      } else if (mux == IGEP_SYSBOOT_ONENAND) {
 +              pr_info("IGEP: initializing OneNAND memory device\n");
 +              board_onenand_init(igep_flash_partitions,
 +                                 ARRAY_SIZE(igep_flash_partitions), 0);
 +      } else {
 +              pr_err("IGEP: Flash: unsupported sysboot sequence found\n");
        }
 -
 -      igep_onenand_data.cs = onenandcs;
 -
 -      if (platform_device_register(&igep_onenand_device) < 0)
 -              pr_err("IGEP: Unable to register OneNAND device\n");
  }
  
  #else
@@@ -432,15 -444,28 +432,15 @@@ static struct twl4030_gpio_platform_dat
        .setup          = igep_twl_gpio_setup,
  };
  
 -static int igep2_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
 -
 -      return 0;
 -}
 -
 -static void igep2_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = igep2_enable_dvi,
 -      .platform_disable       = igep2_disable_dvi,
 -      .i2c_bus_num = 3,
 +static struct tfp410_platform_data dvi_panel = {
 +      .i2c_bus_num            = 3,
 +      .power_down_gpio        = IGEP2_GPIO_DVI_PUP,
  };
  
  static struct omap_dss_device igep2_dvi_device = {
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .name                   = "dvi",
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -455,6 -480,14 +455,6 @@@ static struct omap_dss_board_info igep2
        .default_device = &igep2_dvi_device,
  };
  
 -static void __init igep2_display_init(void)
 -{
 -      int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
 -                                 "GPIO_DVI_PUP");
 -      if (err)
 -              pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
 -}
 -
  static struct platform_device *igep_devices[] __initdata = {
        &igep_vwlan_device,
  };
@@@ -507,10 -540,7 +507,10 @@@ static void __init igep_i2c_init(void
  {
        int ret;
  
 -      omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0);
 +      omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB,
 +                            TWL_COMMON_REGULATOR_VPLL2);
 +      igep_twldata.vpll2->constraints.apply_uV = true;
 +      igep_twldata.vpll2->constraints.name = "VDVI";
  
        if (machine_is_igep0020()) {
                /*
  
                igep_twldata.keypad     = &igep2_keypad_pdata;
                /* Get common pmic data */
 -              omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
 -                                    TWL_COMMON_REGULATOR_VPLL2);
 -              igep_twldata.vpll2->constraints.apply_uV = true;
 -              igep_twldata.vpll2->constraints.name = "VDVI";
 +              omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0);
        }
  
        omap3_pmic_init("twl4030", &igep_twldata);
@@@ -608,7 -641,7 +608,7 @@@ static struct regulator_consumer_suppl
  
  static void __init igep_init(void)
  {
 -      regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 +      regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  
        /* Get IGEP2 hardware revision */
  
        if (machine_is_igep0020()) {
                omap_display_init(&igep2_dss_data);
 -              igep2_display_init();
                igep2_init_smsc911x();
                usbhs_init(&igep2_usbhs_bdata);
        } else {
@@@ -650,6 -684,7 +650,7 @@@ MACHINE_START(IGEP0020, "IGEP v2 board"
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = igep_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
@@@ -662,6 -697,7 +663,7 @@@ MACHINE_START(IGEP0030, "IGEP OMAP3 mod
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = igep_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 2a7b9a9da1db58081642b6bd700239e7e3d85079,b6cd804e81143021892a29664428523e90658886..79c6909eeb785ef24d71be68f076034c0cd476df
@@@ -42,7 -42,7 +42,7 @@@
  #include <plat/board.h>
  #include "common.h"
  #include <video/omapdss.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  #include <plat/gpmc.h>
  #include <plat/nand.h>
  #include <plat/usb.h>
@@@ -83,13 -83,11 +83,13 @@@ static struct 
        int usb_pwr_level;
        int reset_gpio;
        int usr_button_gpio;
 +      int mmc_caps;
  } beagle_config = {
        .mmc1_gpio_wp = -EINVAL,
        .usb_pwr_level = GPIOF_OUT_INIT_LOW,
        .reset_gpio = 129,
        .usr_button_gpio = 4,
 +      .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
  };
  
  static struct gpio omap3_beagle_rev_gpios[] __initdata = {
@@@ -147,12 -145,10 +147,12 @@@ static void __init omap3_beagle_init_re
                printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
                omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
                beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
 +              beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
                break;
        case 2:
                printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
                omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
 +              beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
                break;
        default:
                printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@@ -193,17 -189,33 +193,17 @@@ static struct mtd_partition omap3beagle
  
  /* DSS */
  
 -static int beagle_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (gpio_is_valid(dssdev->reset_gpio))
 -              gpio_set_value(dssdev->reset_gpio, 1);
 -
 -      return 0;
 -}
 -
 -static void beagle_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (gpio_is_valid(dssdev->reset_gpio))
 -              gpio_set_value(dssdev->reset_gpio, 0);
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable = beagle_enable_dvi,
 -      .platform_disable = beagle_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
        .i2c_bus_num = 3,
 +      .power_down_gpio = -1,
  };
  
  static struct omap_dss_device beagle_dvi_device = {
        .type = OMAP_DISPLAY_TYPE_DPI,
        .name = "dvi",
 -      .driver_name = "dvi",
 +      .driver_name = "tfp410",
        .data = &dvi_panel,
        .phy.dpi.data_lines = 24,
 -      .reset_gpio = -EINVAL,
  };
  
  static struct omap_dss_device beagle_tv_device = {
@@@ -224,12 -236,22 +224,12 @@@ static struct omap_dss_board_info beagl
        .default_device = &beagle_dvi_device,
  };
  
 -static void __init beagle_display_init(void)
 -{
 -      int r;
 -
 -      r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
 -                           "DVI reset");
 -      if (r < 0)
 -              printk(KERN_ERR "Unable to get DVI reset GPIO\n");
 -}
 -
  #include "sdram-micron-mt46h32m32lf-6.h"
  
  static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 1,
 -              .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
 +              .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_wp        = -EINVAL,
                .deferred       = true,
        },
@@@ -287,7 -309,7 +287,7 @@@ static int beagle_twl_gpio_setup(struc
                if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
                        pr_err("%s: unable to configure EHCI_nOC\n", __func__);
        }
 -      beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
 +      dvi_panel.power_down_gpio = beagle_config.reset_gpio;
  
        gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
                        "nEN_USB_PWR");
@@@ -501,7 -523,6 +501,7 @@@ static void __init omap3_beagle_init(vo
  
        if (beagle_config.mmc1_gpio_wp != -EINVAL)
                omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
 +      mmc[0].caps = beagle_config.mmc_caps;
        omap_hsmmc_init(mmc);
  
        omap3_beagle_i2c_init();
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
  
 -      beagle_display_init();
        beagle_opp_init();
  }
  
@@@ -543,6 -565,7 +543,7 @@@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beag
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3_beagle_init,
+       .init_late      = omap3_init_late,
        .timer          = &omap3_secure_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index ace3c675e9c22a15e1712f39a1fd95bdc42c0dc5,e98c230f5f63bc400742f4ee8a5bc067c038c061..639bd07ea38a1cca473ac4c6fa5da29024ad9d77
@@@ -46,7 -46,7 +46,7 @@@
  #include "common.h"
  #include <plat/mcspi.h>
  #include <video/omapdss.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include "mux.h"
  #include "sdram-micron-mt46h32m32lf-6.h"
@@@ -219,14 -219,35 +219,14 @@@ static struct omap_dss_device omap3_evm
        .platform_disable       = omap3_evm_disable_tv,
  };
  
 -static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -
 -      gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
 -
 -      dvi_enabled = 1;
 -      return 0;
 -}
 -
 -static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
 -
 -      dvi_enabled = 0;
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = omap3_evm_enable_dvi,
 -      .platform_disable       = omap3_evm_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = OMAP3EVM_DVI_PANEL_EN_GPIO,
  };
  
  static struct omap_dss_device omap3_evm_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -609,13 -630,13 +609,13 @@@ static struct regulator_consumer_suppl
  
  static void __init omap3_evm_init(void)
  {
 +      struct omap_board_mux *obm;
 +
        omap3_evm_get_revision();
        regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
  
 -      if (cpu_is_omap3630())
 -              omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
 -      else
 -              omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
 +      obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
 +      omap3_mux_init(obm, OMAP_PACKAGE_CBB);
  
        omap_board_config = omap3_evm_config;
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
@@@ -671,6 -692,7 +671,7 @@@ MACHINE_START(OMAP3EVM, "OMAP3 EVM"
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3_evm_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index c008bf8e1c36612c32595a043b24fd39fa7c4950,89279275589849bf4b4a75c7a4043d23c3106cea..932e1778aff94187c4ff2056c11f489747061c27
@@@ -4,9 -4,8 +4,9 @@@
   * Copyright (C) 2010 Li-Pro.Net
   * Stephan Linz <[email protected]>
   *
 - * Copyright (C) 2010 Logic Product Development, Inc.
 + * Copyright (C) 2010-2012 Logic Product Development, Inc.
   * Peter Barada <[email protected]>
 + * Ashwin BIhari <[email protected]>
   *
   * Modified from Beagle, EVM, and RX51
   *
@@@ -46,7 -45,6 +46,7 @@@
  #include <plat/gpmc-smsc911x.h>
  #include <plat/gpmc.h>
  #include <plat/sdrc.h>
 +#include <plat/usb.h>
  
  #define OMAP3LOGIC_SMSC911X_CS                        1
  
@@@ -87,11 -85,6 +87,11 @@@ static struct twl4030_gpio_platform_dat
                        | BIT(13) | BIT(15) | BIT(16) | BIT(17),
  };
  
 +static struct twl4030_usb_data omap3logic_usb_data = {
 +      .usb_mode       = T2_USB_MODE_ULPI,
 +};
 +
 +
  static struct twl4030_platform_data omap3logic_twldata = {
        .irq_base       = TWL4030_IRQ_BASE,
        .irq_end        = TWL4030_IRQ_END,
@@@ -99,7 -92,6 +99,7 @@@
        /* platform_data for children goes here */
        .gpio           = &omap3logic_gpio_data,
        .vmmc1          = &omap3logic_vmmc1,
 +      .usb            = &omap3logic_usb_data,
  };
  
  static int __init omap3logic_i2c_init(void)
@@@ -193,20 -185,6 +193,20 @@@ static inline void __init board_smsc911
  
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
 +      /* mUSB */
 +      OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 +      OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +      OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 +
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  #endif
@@@ -227,8 -205,6 +227,8 @@@ static void __init omap3logic_init(void
        board_mmc_init();
        board_smsc911x_init();
  
 +      usb_musb_init(NULL);
 +
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
@@@ -242,6 -218,7 +242,7 @@@ MACHINE_START(OMAP3_TORPEDO, "Logic OMA
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3logic_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
@@@ -254,6 -231,7 +255,7 @@@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Lo
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3logic_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 4396bae9167713dbd951abb28dfad4e7cd9cf27e,c05fe3a340dffb8d0e29b36f031ba439841bd471..b318f5602e36ed15ee51f0a0f94d74ea3802dab6
@@@ -42,7 -42,7 +42,7 @@@
  #include <plat/usb.h>
  #include <video/omapdss.h>
  #include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include <plat/mcspi.h>
  #include <linux/input/matrix_keypad.h>
@@@ -92,6 -92,9 +92,6 @@@ static inline void __init omap3stalker_
  #define LCD_PANEL_BKLIGHT_GPIO        210
  #define ENABLE_VPLL2_DEV_GRP  0xE0
  
 -static int lcd_enabled;
 -static int dvi_enabled;
 -
  static void __init omap3_stalker_display_init(void)
  {
        return;
@@@ -119,14 -122,32 +119,14 @@@ static struct omap_dss_device omap3_sta
        .platform_disable       = omap3_stalker_disable_tv,
  };
  
 -static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -      gpio_set_value(DSS_ENABLE_GPIO, 1);
 -      dvi_enabled = 1;
 -      return 0;
 -}
 -
 -static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(DSS_ENABLE_GPIO, 0);
 -      dvi_enabled = 0;
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = omap3_stalker_enable_dvi,
 -      .platform_disable       = omap3_stalker_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
 +      .power_down_gpio        = DSS_ENABLE_GPIO,
  };
  
  static struct omap_dss_device omap3_stalker_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -436,6 -457,7 +436,7 @@@ MACHINE_START(SBC3530, "OMAP3 STALKER"
        .init_irq               = omap3_init_irq,
        .handle_irq             = omap3_intc_handle_irq,
        .init_machine           = omap3_stalker_init,
+       .init_late              = omap35xx_init_late,
        .timer                  = &omap3_secure_timer,
        .restart                = omap_prcm_restart,
  MACHINE_END
index 68b8fc9ff0101d0b3a40633dc106d46b8db6c9fe,7ca817f47cf26eaeb20461769dc3832540946aaa..982fb2622ab83063840b61d867098b8ebf700df5
@@@ -28,7 -28,6 +28,7 @@@
  #include <linux/mfd/twl6040.h>
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
 +#include <linux/ti_wilink_st.h>
  #include <linux/wl12xx.h>
  #include <linux/platform_data/omap-abe-twl6040.h>
  
@@@ -43,7 -42,7 +43,7 @@@
  #include "common.h"
  #include <plat/usb.h>
  #include <plat/mmc.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  
  #include "hsmmc.h"
  #include "control.h"
  #define HDMI_GPIO_HPD  63 /* Hotplug detect */
  
  /* wl127x BT, FM, GPS connectivity chip */
 -static int wl1271_gpios[] = {46, -1, -1};
 +static struct ti_st_plat_data wilink_platform_data = {
 +      .nshutdown_gpio = 46,
 +      .dev_name       = "/dev/ttyO1",
 +      .flow_cntrl     = 1,
 +      .baud_rate      = 3000000,
 +      .chip_enable    = NULL,
 +      .suspend        = NULL,
 +      .resume         = NULL,
 +};
 +
  static struct platform_device wl1271_device = {
        .name   = "kim",
        .id     = -1,
        .dev    = {
 -              .platform_data  = &wl1271_gpios,
 +              .platform_data  = &wilink_platform_data,
        },
  };
  
@@@ -127,11 -117,6 +127,11 @@@ static struct platform_device panda_abe
        },
  };
  
 +static struct platform_device panda_hdmi_audio_codec = {
 +      .name   = "hdmi-audio-codec",
 +      .id     = -1,
 +};
 +
  static struct platform_device btwilink_device = {
        .name   = "btwilink",
        .id     = -1,
@@@ -141,7 -126,6 +141,7 @@@ static struct platform_device *panda_de
        &leds_gpio,
        &wl1271_device,
        &panda_abe_audio,
 +      &panda_hdmi_audio_codec,
        &btwilink_device,
  };
  
@@@ -247,11 -231,60 +247,11 @@@ static struct platform_device omap_vwla
        },
  };
  
 -struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
 +static struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
        /* PANDA ref clock is 38.4 MHz */
        .board_ref_clock = 2,
  };
  
 -static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 -{
 -      int irq = 0;
 -      struct platform_device *pdev = container_of(dev,
 -                              struct platform_device, dev);
 -      struct omap_mmc_platform_data *pdata = dev->platform_data;
 -
 -      if (!pdata) {
 -              dev_err(dev, "%s: NULL platform data\n", __func__);
 -              return -EINVAL;
 -      }
 -      /* Setting MMC1 Card detect Irq */
 -      if (pdev->id == 0) {
 -              irq = twl6030_mmc_card_detect_config();
 -              if (irq < 0) {
 -                      dev_err(dev, "%s: Error card detect config(%d)\n",
 -                              __func__, irq);
 -                      return irq;
 -              }
 -              pdata->slots[0].card_detect = twl6030_mmc_card_detect;
 -      }
 -      return 0;
 -}
 -
 -static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 -{
 -      struct omap_mmc_platform_data *pdata;
 -
 -      /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
 -      if (!dev) {
 -              pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n");
 -              return;
 -      }
 -      pdata = dev->platform_data;
 -
 -      pdata->init =   omap4_twl6030_hsmmc_late_init;
 -}
 -
 -static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
 -{
 -      struct omap2_hsmmc_info *c;
 -
 -      omap_hsmmc_init(controllers);
 -      for (c = controllers; c->mmc; c++)
 -              omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
 -
 -      return 0;
 -}
 -
  static struct twl6040_codec_data twl6040_codec = {
        /* single-step ramp for headset and handsfree */
        .hs_left_step   = 0x0f,
@@@ -290,9 -323,7 +290,9 @@@ static int __init omap4_panda_i2c_init(
                        TWL_COMMON_REGULATOR_VANA |
                        TWL_COMMON_REGULATOR_VCXIO |
                        TWL_COMMON_REGULATOR_VUSB |
 -                      TWL_COMMON_REGULATOR_CLK32KG);
 +                      TWL_COMMON_REGULATOR_CLK32KG |
 +                      TWL_COMMON_REGULATOR_V1V8 |
 +                      TWL_COMMON_REGULATOR_V2V1);
        omap4_pmic_init("twl6030", &omap4_panda_twldata,
                        &twl6040_data, OMAP44XX_IRQ_SYS_2N);
        omap_register_i2c_bus(2, 400, NULL, 0);
@@@ -389,22 -420,47 +389,22 @@@ static struct omap_board_mux board_mux[
  /* Display DVI */
  #define PANDA_DVI_TFP410_POWER_DOWN_GPIO      0
  
 -static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(dssdev->reset_gpio, 1);
 -      return 0;
 -}
 -
 -static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      gpio_set_value(dssdev->reset_gpio, 0);
 -}
 -
  /* Using generic display panel */
 -static struct panel_dvi_platform_data omap4_dvi_panel = {
 -      .platform_enable        = omap4_panda_enable_dvi,
 -      .platform_disable       = omap4_panda_disable_dvi,
 -      .i2c_bus_num = 3,
 +static struct tfp410_platform_data omap4_dvi_panel = {
 +      .i2c_bus_num            = 3,
 +      .power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
  };
  
 -struct omap_dss_device omap4_panda_dvi_device = {
 +static struct omap_dss_device omap4_panda_dvi_device = {
        .type                   = OMAP_DISPLAY_TYPE_DPI,
        .name                   = "dvi",
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &omap4_dvi_panel,
        .phy.dpi.data_lines     = 24,
        .reset_gpio             = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
        .channel                = OMAP_DSS_CHANNEL_LCD2,
  };
  
 -int __init omap4_panda_dvi_init(void)
 -{
 -      int r;
 -
 -      /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
 -      r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
 -                              GPIOF_OUT_INIT_LOW, "DVI PD");
 -      if (r)
 -              pr_err("Failed to get DVI powerdown GPIO\n");
 -
 -      return r;
 -}
 -
  static struct gpio panda_hdmi_gpios[] = {
        { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
        { HDMI_GPIO_LS_OE,      GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@@ -453,8 -509,13 +453,8 @@@ static struct omap_dss_board_info omap4
        .default_device = &omap4_panda_dvi_device,
  };
  
 -void __init omap4_panda_display_init(void)
 +static void __init omap4_panda_display_init(void)
  {
 -      int r;
 -
 -      r = omap4_panda_dvi_init();
 -      if (r)
 -              pr_err("error initializing panda DVI\n");
  
        omap_display_init(&omap4_panda_dss_data);
  
@@@ -521,6 -582,7 +521,7 @@@ MACHINE_START(OMAP4_PANDA, "OMAP4 Pand
        .init_irq       = gic_init_irq,
        .handle_irq     = gic_handle_irq,
        .init_machine   = omap4_panda_init,
+       .init_late      = omap4430_init_late,
        .timer          = &omap4_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 5527c1979a168983a2b0608f5af7229cb4658018,af7ac0ba9888bb144abb6e4ceb65aed3c96ccbfc..8fa2fc3a4c3c51e973eb07c91f3c687c86aca62a
@@@ -46,7 -46,7 +46,7 @@@
  #include "common.h"
  #include <video/omapdss.h>
  #include <video/omap-panel-generic-dpi.h>
 -#include <video/omap-panel-dvi.h>
 +#include <video/omap-panel-tfp410.h>
  #include <plat/gpmc.h>
  #include <mach/hardware.h>
  #include <plat/nand.h>
@@@ -167,15 -167,32 +167,15 @@@ static void __init overo_display_init(v
        gpio_export(OVERO_GPIO_LCD_BL, 0);
  }
  
 -static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
 -{
 -      if (lcd_enabled) {
 -              printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
 -              return -EINVAL;
 -      }
 -      dvi_enabled = 1;
 -
 -      return 0;
 -}
 -
 -static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
 -{
 -      dvi_enabled = 0;
 -}
 -
 -static struct panel_dvi_platform_data dvi_panel = {
 -      .platform_enable        = overo_panel_enable_dvi,
 -      .platform_disable       = overo_panel_disable_dvi,
 +static struct tfp410_platform_data dvi_panel = {
        .i2c_bus_num            = 3,
 +      .power_down_gpio        = -1,
  };
  
  static struct omap_dss_device overo_dvi_device = {
        .name                   = "dvi",
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 -      .driver_name            = "dvi",
 +      .driver_name            = "tfp410",
        .data                   = &dvi_panel,
        .phy.dpi.data_lines     = 24,
  };
@@@ -554,6 -571,7 +554,7 @@@ MACHINE_START(OVERO, "Gumstix Overo"
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = overo_init,
+       .init_late      = omap35xx_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 2da92a6ba40ab0fe8f44311f1200e5c0912d517a,5010f6d27ad7614f35d15abdb7be225e00903fbe..345dd931f76fe86bb7ecf6550412a1acf3afb6f0
@@@ -59,24 -59,25 +59,24 @@@ static struct platform_device leds_gpi
  };
  
  /*
 - * cpuidle C-states definition override from the default values.
 - * The 'exit_latency' field is the sum of sleep and wake-up latencies.
 - */
 -static struct cpuidle_params rx51_cpuidle_params[] = {
 -      /* C1 */
 -      {110 + 162, 5 , 1},
 -      /* C2 */
 -      {106 + 180, 309, 1},
 -      /* C3 */
 -      {107 + 410, 46057, 0},
 -      /* C4 */
 -      {121 + 3374, 46057, 0},
 -      /* C5 */
 -      {855 + 1146, 46057, 1},
 -      /* C6 */
 -      {7580 + 4134, 484329, 0},
 -      /* C7 */
 -      {7505 + 15274, 484329, 1},
 -};
 + * cpuidle C-states definition for rx51.
 + *
 + * The 'exit_latency' field is the sum of sleep
 + * and wake-up latencies.
 +
 +    ---------------------------------------------
 +   | state |  exit_latency  |  target_residency  |
 +    ---------------------------------------------
 +   |  C1   |    110 + 162   |            5       |
 +   |  C2   |    106 + 180   |          309       |
 +   |  C3   |    107 + 410   |        46057       |
 +   |  C4   |    121 + 3374  |        46057       |
 +   |  C5   |    855 + 1146  |        46057       |
 +   |  C6   |   7580 + 4134  |       484329       |
 +   |  C7   |   7505 + 15274 |       484329       |
 +    ---------------------------------------------
 +
 +*/
  
  extern void __init rx51_peripherals_init(void);
  
@@@ -97,6 -98,7 +97,6 @@@ static void __init rx51_init(void
        struct omap_sdrc_params *sdrc_params;
  
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 -      omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap_serial_init();
  
        sdrc_params = nokia_get_sdram_timings();
@@@ -127,6 -129,7 +127,7 @@@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 
        .init_irq       = omap3_init_irq,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = rx51_init,
+       .init_late      = omap3430_init_late,
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
  MACHINE_END
index 4cb1fe666311965aa9a02e3ec43ffad218efa760,58ef29b1c7d7b1f92299ca50e678bf88f2faa037..be9dfd1abe603f247c089f7c0feab81bb3402223
@@@ -27,7 -27,6 +27,7 @@@
  #ifndef __ASSEMBLER__
  
  #include <linux/delay.h>
 +#include <linux/i2c/twl.h>
  #include <plat/common.h>
  #include <asm/proc-fns.h>
  
@@@ -55,7 -54,7 +55,7 @@@ static inline void omap34xx_map_common_
  }
  #endif
  
 -#ifdef CONFIG_SOC_OMAPTI81XX
 +#ifdef CONFIG_SOC_TI81XX
  extern void omapti81xx_map_common_io(void);
  #else
  static inline void omapti81xx_map_common_io(void)
@@@ -63,7 -62,7 +63,7 @@@
  }
  #endif
  
 -#ifdef CONFIG_SOC_OMAPAM33XX
 +#ifdef CONFIG_SOC_AM33XX
  extern void omapam33xx_map_common_io(void);
  #else
  static inline void omapam33xx_map_common_io(void)
@@@ -79,6 -78,42 +79,42 @@@ static inline void omap44xx_map_common_
  }
  #endif
  
+ #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
+ int omap2_pm_init(void);
+ #else
+ static inline int omap2_pm_init(void)
+ {
+       return 0;
+ }
+ #endif
+ #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
+ int omap3_pm_init(void);
+ #else
+ static inline int omap3_pm_init(void)
+ {
+       return 0;
+ }
+ #endif
+ #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4)
+ int omap4_pm_init(void);
+ #else
+ static inline int omap4_pm_init(void)
+ {
+       return 0;
+ }
+ #endif
+ #ifdef CONFIG_OMAP_MUX
+ int omap_mux_late_init(void);
+ #else
+ static inline int omap_mux_late_init(void)
+ {
+       return 0;
+ }
+ #endif
  extern void omap2_init_common_infrastructure(void);
  
  extern struct sys_timer omap2_timer;
@@@ -95,6 -130,17 +131,17 @@@ void omap3_init_early(void);      /* Do not 
  void am35xx_init_early(void);
  void ti81xx_init_early(void);
  void omap4430_init_early(void);
+ void omap3_init_late(void);   /* Do not use this one */
+ void omap4430_init_late(void);
+ void omap2420_init_late(void);
+ void omap2430_init_late(void);
+ void omap3430_init_late(void);
+ void omap35xx_init_late(void);
+ void omap3630_init_late(void);
+ void am35xx_init_late(void);
+ void ti81xx_init_late(void);
+ void omap4430_init_late(void);
+ int omap2_common_pm_late_init(void);
  void omap_prcm_restart(char, const char *);
  
  /*
@@@ -112,7 -158,6 +159,7 @@@ struct omap_globals 
        void __iomem    *prm;            /* Power and Reset Management */
        void __iomem    *cm;             /* Clock Management */
        void __iomem    *cm2;
 +      void __iomem    *prcm_mpu;
  };
  
  void omap2_set_globals_242x(void);
@@@ -136,6 -181,8 +183,6 @@@ void omap4_map_io(void)
  void ti81xx_map_io(void);
  void omap_barriers_init(void);
  
 -extern void __init omap_init_consistent_dma_size(void);
 -
  /**
   * omap_test_timeout - busy-loop, testing a condition
   * @cond: condition to test until it evaluates to true
@@@ -254,8 -301,6 +301,8 @@@ static inline u32 omap4_mpuss_read_prev
  struct omap_sdrc_params;
  extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
                                      struct omap_sdrc_params *sdrc_cs1);
 +struct omap2_hsmmc_info;
 +extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers);
  
  #endif /* __ASSEMBLER__ */
  #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --combined arch/arm/mach-omap2/io.c
index e1f9c6fc0414fb7960409c53daa5b7b5c7e1b40e,cc86e710b10820b649139fef058a305e4285a3b2..8d014ba04abcc7fe0fe0416db50dcb212458bb94
@@@ -31,7 -31,6 +31,7 @@@
  #include <plat/omap-pm.h>
  #include <plat/omap_hwmod.h>
  #include <plat/multi.h>
 +#include <plat/dma.h>
  
  #include "iomap.h"
  #include "voltage.h"
@@@ -173,7 -172,7 +173,7 @@@ static struct map_desc omap34xx_io_desc
  };
  #endif
  
 -#ifdef CONFIG_SOC_OMAPTI81XX
 +#ifdef CONFIG_SOC_TI81XX
  static struct map_desc omapti81xx_io_desc[] __initdata = {
        {
                .virtual        = L4_34XX_VIRT,
  };
  #endif
  
 -#ifdef CONFIG_SOC_OMAPAM33XX
 +#ifdef CONFIG_SOC_AM33XX
  static struct map_desc omapam33xx_io_desc[] __initdata = {
        {
                .virtual        = L4_34XX_VIRT,
@@@ -215,12 -214,42 +215,12 @@@ static struct map_desc omap44xx_io_desc
                .length         = L4_44XX_SIZE,
                .type           = MT_DEVICE,
        },
 -      {
 -              .virtual        = OMAP44XX_GPMC_VIRT,
 -              .pfn            = __phys_to_pfn(OMAP44XX_GPMC_PHYS),
 -              .length         = OMAP44XX_GPMC_SIZE,
 -              .type           = MT_DEVICE,
 -      },
 -      {
 -              .virtual        = OMAP44XX_EMIF1_VIRT,
 -              .pfn            = __phys_to_pfn(OMAP44XX_EMIF1_PHYS),
 -              .length         = OMAP44XX_EMIF1_SIZE,
 -              .type           = MT_DEVICE,
 -      },
 -      {
 -              .virtual        = OMAP44XX_EMIF2_VIRT,
 -              .pfn            = __phys_to_pfn(OMAP44XX_EMIF2_PHYS),
 -              .length         = OMAP44XX_EMIF2_SIZE,
 -              .type           = MT_DEVICE,
 -      },
 -      {
 -              .virtual        = OMAP44XX_DMM_VIRT,
 -              .pfn            = __phys_to_pfn(OMAP44XX_DMM_PHYS),
 -              .length         = OMAP44XX_DMM_SIZE,
 -              .type           = MT_DEVICE,
 -      },
        {
                .virtual        = L4_PER_44XX_VIRT,
                .pfn            = __phys_to_pfn(L4_PER_44XX_PHYS),
                .length         = L4_PER_44XX_SIZE,
                .type           = MT_DEVICE,
        },
 -      {
 -              .virtual        = L4_EMU_44XX_VIRT,
 -              .pfn            = __phys_to_pfn(L4_EMU_44XX_PHYS),
 -              .length         = L4_EMU_44XX_SIZE,
 -              .type           = MT_DEVICE,
 -      },
  #ifdef CONFIG_OMAP4_ERRATA_I688
        {
                .virtual        = OMAP4_SRAM_VA,
@@@ -256,14 -285,14 +256,14 @@@ void __init omap34xx_map_common_io(void
  }
  #endif
  
 -#ifdef CONFIG_SOC_OMAPTI81XX
 +#ifdef CONFIG_SOC_TI81XX
  void __init omapti81xx_map_common_io(void)
  {
        iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc));
  }
  #endif
  
 -#ifdef CONFIG_SOC_OMAPAM33XX
 +#ifdef CONFIG_SOC_AM33XX
  void __init omapam33xx_map_common_io(void)
  {
        iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
@@@ -334,6 -363,24 +334,6 @@@ static void __init omap_hwmod_init_post
  #endif
        omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
  
 -      /*
 -       * Set the default postsetup state for unusual modules (like
 -       * MPU WDT).
 -       *
 -       * The postsetup_state is not actually used until
 -       * omap_hwmod_late_init(), so boards that desire full watchdog
 -       * coverage of kernel initialization can reprogram the
 -       * postsetup_state between the calls to
 -       * omap2_init_common_infra() and omap_sdrc_init().
 -       *
 -       * XXX ideally we could detect whether the MPU WDT was currently
 -       * enabled here and make this conditional
 -       */
 -      postsetup_state = _HWMOD_STATE_DISABLED;
 -      omap_hwmod_for_each_by_class("wd_timer",
 -                                   _set_hwmod_postsetup_state,
 -                                   &postsetup_state);
 -
        omap_pm_if_early_init();
  }
  
@@@ -350,6 -397,13 +350,13 @@@ void __init omap2420_init_early(void
        omap_hwmod_init_postsetup();
        omap2420_clk_init();
  }
+ void __init omap2420_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap2_pm_init();
+ }
  #endif
  
  #ifdef CONFIG_SOC_OMAP2430
@@@ -365,6 -419,13 +372,13 @@@ void __init omap2430_init_early(void
        omap_hwmod_init_postsetup();
        omap2430_clk_init();
  }
+ void __init omap2430_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap2_pm_init();
+ }
  #endif
  
  /*
@@@ -419,6 -480,48 +433,48 @@@ void __init ti81xx_init_early(void
        omap_hwmod_init_postsetup();
        omap3xxx_clk_init();
  }
+ void __init omap3_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
+ void __init omap3430_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
+ void __init omap35xx_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
+ void __init omap3630_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
+ void __init am35xx_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
+ void __init ti81xx_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap3_pm_init();
+ }
  #endif
  
  #ifdef CONFIG_ARCH_OMAP4
@@@ -435,6 -538,13 +491,13 @@@ void __init omap4430_init_early(void
        omap_hwmod_init_postsetup();
        omap4xxx_clk_init();
  }
+ void __init omap4430_init_late(void)
+ {
+       omap_mux_late_init();
+       omap2_common_pm_late_init();
+       omap4_pm_init();
+ }
  #endif
  
  void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
index 3268ee24eada87ee74d24ce90bc9ea918260bfd2,0ede4d6010c3261e1e4f91daca43bd073dcc34fb..80e55c5c99988c2bf63d49a63bf9b562cfaff036
@@@ -247,7 -247,7 +247,7 @@@ int __init omap_mux_init_signal(const c
        int mux_mode;
  
        mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);
 -      if (mux_mode < 0)
 +      if (mux_mode < 0 || !mux)
                return mux_mode;
  
        old_mode = omap_mux_read(partition, mux->reg_offset);
@@@ -788,7 -788,7 +788,7 @@@ static void __init omap_mux_free_names(
  }
  
  /* Free all data except for GPIO pins unless CONFIG_DEBUG_FS is set */
static int __init omap_mux_late_init(void)
+ int __init omap_mux_late_init(void)
  {
        struct omap_mux_partition *partition;
        int ret;
  
        return 0;
  }
- late_initcall(omap_mux_late_init);
  
  static void __init omap_mux_package_fixup(struct omap_mux *p,
                                        struct omap_mux *superset)
index facfffca9eacb33471413136e61bea8fd3c9e6cb,b2758b83a0a687367990ca9e80261eefe7cf37f3..2edeffc923a641d3a996e56e7575ba3543b2af55
@@@ -171,6 -171,8 +171,6 @@@ static int omap2_allow_mpu_retention(vo
  
  static void omap2_enter_mpu_retention(void)
  {
 -      int only_idle = 0;
 -
        /* Putting MPU into the WFI state while a transfer is active
         * seems to cause the I2C block to timeout. Why? Good question. */
        if (omap2_i2c_active())
  
                omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD,
                                                 OMAP2_PM_PWSTCTRL);
 -              only_idle = 1;
        }
  
        omap2_sram_idle();
@@@ -298,13 -301,10 +298,10 @@@ static void __init prcm_setup_regs(void
                                WKUP_MOD, PM_WKEN);
  }
  
static int __init omap2_pm_init(void)
+ int __init omap2_pm_init(void)
  {
        u32 l;
  
-       if (!cpu_is_omap24xx())
-               return -ENODEV;
        printk(KERN_INFO "Power Management for OMAP2 initializing\n");
        l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_REVISION_OFFSET);
        printk(KERN_INFO "PRCM revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
         * These routines need to be in SRAM as that's the only
         * memory the MPU can see when it wakes up.
         */
-       if (cpu_is_omap24xx()) {
-               omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
-                                                omap24xx_idle_loop_suspend_sz);
+       omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
+                                        omap24xx_idle_loop_suspend_sz);
  
-               omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
-                                                   omap24xx_cpu_suspend_sz);
-       }
+       omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
+                                           omap24xx_cpu_suspend_sz);
  
        arm_pm_idle = omap2_pm_idle;
  
        return 0;
  }
- late_initcall(omap2_pm_init);
index 8b43aefba0eae19b85a574f7324ed672d6670677,c769b888e2c85edbfa5791fdb6c7f6ea938cfd80..a34023d0ca7c665627d96ba4109a8a0e17b4ec6e
@@@ -273,7 -273,7 +273,7 @@@ void omap_sram_idle(void
        int per_next_state = PWRDM_POWER_ON;
        int core_next_state = PWRDM_POWER_ON;
        int per_going_off;
 -      int core_prev_state, per_prev_state;
 +      int core_prev_state;
        u32 sdrc_pwr = 0;
  
        mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
        pwrdm_post_transition();
  
        /* PER */
 -      if (per_next_state < PWRDM_POWER_ON) {
 -              per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
 +      if (per_next_state < PWRDM_POWER_ON)
                omap2_gpio_resume_after_idle();
 -      }
  
        /* Disable IO-PAD and IO-CHAIN wakeup */
        if (omap3_has_io_wakeup() &&
@@@ -697,15 -699,12 +697,12 @@@ static void __init pm_errata_configure(
        }
  }
  
static int __init omap3_pm_init(void)
+ int __init omap3_pm_init(void)
  {
        struct power_state *pwrst, *tmp;
 -      struct clockdomain *neon_clkdm, *per_clkdm, *mpu_clkdm, *core_clkdm;
 +      struct clockdomain *neon_clkdm, *mpu_clkdm;
        int ret;
  
-       if (!cpu_is_omap34xx())
-               return -ENODEV;
        if (!omap3_has_io_chain_ctrl())
                pr_warning("PM: no software I/O chain control; some wakeups may be lost\n");
  
  
        neon_clkdm = clkdm_lookup("neon_clkdm");
        mpu_clkdm = clkdm_lookup("mpu_clkdm");
 -      per_clkdm = clkdm_lookup("per_clkdm");
 -      core_clkdm = clkdm_lookup("core_clkdm");
  
  #ifdef CONFIG_SUSPEND
        omap_pm_suspend = omap3_pm_suspend;
@@@ -804,5 -805,3 +801,3 @@@ err2
  err1:
        return ret;
  }
- late_initcall(omap3_pm_init);
index f252691fb209d73fd316882014e12653c56cc2d8,8808aa5e00154929244a513050fa4683b0c69bd0..314df0518afd51acf8c65525d219a0dcb3047e34
@@@ -165,10 -165,21 +165,10 @@@ static void __init anw6410_dm9000_enabl
  }
  
  static struct resource anw6410_dm9000_resource[] = {
 -      [0] = {
 -              .start = ANW6410_PA_DM9000,
 -              .end   = ANW6410_PA_DM9000 + 3,
 -              .flags = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start = ANW6410_PA_DM9000 + 4,
 -              .end   = ANW6410_PA_DM9000 + 4 + 500,
 -              .flags = IORESOURCE_MEM,
 -      },
 -      [2] = {
 -              .start = IRQ_EINT(15),
 -              .end   = IRQ_EINT(15),
 -              .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
 -      },
 +      [0] = DEFINE_RES_MEM(ANW6410_PA_DM9000, 4),
 +      [1] = DEFINE_RES_MEM(ANW6410_PA_DM9000 + 4, 501),
 +      [2] = DEFINE_RES_NAMED(IRQ_EINT(15), 1, NULL, IORESOURCE_IRQ \
 +                                      | IRQF_TRIGGER_HIGH),
  };
  
  static struct dm9000_plat_data anw6410_dm9000_pdata = {
@@@ -230,6 -241,7 +230,7 @@@ MACHINE_START(ANW6410, "A&W6410"
        .handle_irq     = vic_handle_irq,
        .map_io         = anw6410_map_io,
        .init_machine   = anw6410_machine_init,
+       .init_late      = s3c64xx_init_late,
        .timer          = &s3c24xx_timer,
        .restart        = s3c64xx_restart,
  MACHINE_END
index aa1137fb47e616b3a43d569553ca0cd1db9e5a6e,607d3f1bb98eef1ea8336d912ac9c14c992e3343..eda5e027b109aa6a9af206c782cbfba6cd58bb9f
@@@ -31,7 -31,6 +31,7 @@@
  #include <linux/spi/spi.h>
  
  #include <linux/i2c/pca953x.h>
 +#include <linux/platform_data/s3c-hsotg.h>
  
  #include <video/platform_lcd.h>
  
@@@ -62,6 -61,7 +62,6 @@@
  #include <plat/sdhci.h>
  #include <plat/gpio-cfg.h>
  #include <plat/s3c64xx-spi.h>
 -#include <plat/udc-hs.h>
  
  #include <plat/keypad.h>
  #include <plat/clock.h>
@@@ -232,10 -232,21 +232,10 @@@ static struct platform_device crag6410_
  };
  
  static struct resource crag6410_dm9k_resource[] = {
 -      [0] = {
 -              .start  = S3C64XX_PA_XM0CSN5,
 -              .end    = S3C64XX_PA_XM0CSN5 + 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start  = S3C64XX_PA_XM0CSN5 + (1 << 8),
 -              .end    = S3C64XX_PA_XM0CSN5 + (1 << 8) + 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 -      [2] = {
 -              .start  = S3C_EINT(17),
 -              .end    = S3C_EINT(17),
 -              .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
 -      },
 +      [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5, 2),
 +      [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5 + (1 << 8), 2),
 +      [2] = DEFINE_RES_NAMED(S3C_EINT(17), 1, NULL, IORESOURCE_IRQ \
 +                              | IORESOURCE_IRQ_HIGHLEVEL),
  };
  
  static struct dm9000_plat_data mini6410_dm9k_pdata = {
@@@ -251,7 -262,12 +251,7 @@@ static struct platform_device crag6410_
  };
  
  static struct resource crag6410_mmgpio_resource[] = {
 -      [0] = {
 -              .name   = "dat",
 -              .start  = S3C64XX_PA_XM0CSN4 + 1,
 -              .end    = S3C64XX_PA_XM0CSN4 + 1,
 -              .flags  = IORESOURCE_MEM,
 -      },
 +      [0] = DEFINE_RES_MEM_NAMED(S3C64XX_PA_XM0CSN4, 1, "dat"),
  };
  
  static struct platform_device crag6410_mmgpio = {
@@@ -290,24 -306,6 +290,24 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDR", "1-001a"),
 +
 +      REGULATOR_SUPPLY("DC1VDD", "0-0034"),
 +      REGULATOR_SUPPLY("DC2VDD", "0-0034"),
 +      REGULATOR_SUPPLY("DC3VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO1VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO2VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO4VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO5VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO6VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO7VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO8VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO9VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO10VDD", "0-0034"),
 +      REGULATOR_SUPPLY("LDO11VDD", "0-0034"),
 +
 +      REGULATOR_SUPPLY("DC1VDD", "1-0034"),
 +      REGULATOR_SUPPLY("DC2VDD", "1-0034"),
 +      REGULATOR_SUPPLY("DC3VDD", "1-0034"),
  };
  
  static struct regulator_init_data wallvdd_data = {
@@@ -813,6 -811,7 +813,7 @@@ MACHINE_START(WLF_CRAGG_6410, "Wolfson 
        .handle_irq     = vic_handle_irq,
        .map_io         = crag6410_map_io,
        .init_machine   = crag6410_machine_init,
+       .init_late      = s3c64xx_init_late,
        .timer          = &s3c24xx_timer,
        .restart        = s3c64xx_restart,
  MACHINE_END
index b2166d4a5538caa33f0e9acd74b64aaa24a0a2a6,5aef599ed9123904e33e03d6c9a551a0f0b42ad7..f8ea61ea3b33f27b137503d24bbccef1b205ec33
@@@ -85,10 -85,21 +85,10 @@@ static struct s3c2410_uartcfg mini6410_
  /* DM9000AEP 10/100 ethernet controller */
  
  static struct resource mini6410_dm9k_resource[] = {
 -      [0] = {
 -              .start  = S3C64XX_PA_XM0CSN1,
 -              .end    = S3C64XX_PA_XM0CSN1 + 1,
 -              .flags  = IORESOURCE_MEM
 -      },
 -      [1] = {
 -              .start  = S3C64XX_PA_XM0CSN1 + 4,
 -              .end    = S3C64XX_PA_XM0CSN1 + 5,
 -              .flags  = IORESOURCE_MEM
 -      },
 -      [2] = {
 -              .start  = S3C_EINT(7),
 -              .end    = S3C_EINT(7),
 -              .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL
 -      }
 +      [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2),
 +      [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2),
 +      [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \
 +                                      | IORESOURCE_IRQ_HIGHLEVEL),
  };
  
  static struct dm9000_plat_data mini6410_dm9k_pdata = {
@@@ -339,6 -350,7 +339,7 @@@ MACHINE_START(MINI6410, "MINI6410"
        .handle_irq     = vic_handle_irq,
        .map_io         = mini6410_map_io,
        .init_machine   = mini6410_machine_init,
+       .init_late      = s3c64xx_init_late,
        .timer          = &s3c24xx_timer,
        .restart        = s3c64xx_restart,
  MACHINE_END
index 5c08266cea216957aa2b4051f82c4bd47356eb79,a88b60feaba911ded8de42aa79911ad29e82e4e6..b92d8e17d502bebd35b876a2ce2926a4a3dde0f9
@@@ -86,10 -86,21 +86,10 @@@ static struct s3c2410_uartcfg real6410_
  /* DM9000AEP 10/100 ethernet controller */
  
  static struct resource real6410_dm9k_resource[] = {
 -      [0] = {
 -              .start  = S3C64XX_PA_XM0CSN1,
 -              .end    = S3C64XX_PA_XM0CSN1 + 1,
 -              .flags  = IORESOURCE_MEM
 -      },
 -      [1] = {
 -              .start  = S3C64XX_PA_XM0CSN1 + 4,
 -              .end    = S3C64XX_PA_XM0CSN1 + 5,
 -              .flags  = IORESOURCE_MEM
 -      },
 -      [2] = {
 -              .start  = S3C_EINT(7),
 -              .end    = S3C_EINT(7),
 -              .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL
 -      }
 +      [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2),
 +      [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2),
 +      [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \
 +                                      | IORESOURCE_IRQ_HIGHLEVEL),
  };
  
  static struct dm9000_plat_data real6410_dm9k_pdata = {
@@@ -320,6 -331,7 +320,7 @@@ MACHINE_START(REAL6410, "REAL6410"
        .handle_irq     = vic_handle_irq,
        .map_io         = real6410_map_io,
        .init_machine   = real6410_machine_init,
+       .init_late      = s3c64xx_init_late,
        .timer          = &s3c24xx_timer,
        .restart        = s3c64xx_restart,
  MACHINE_END
index 7da044f738acfaa28533f51cfa34a9a42d3500e5,315a8b4834affcb46cb4ba2d7b35f862315977a6..d44319b09412cf572697f2f271543ce6260f6124
@@@ -30,7 -30,6 +30,7 @@@
  #include <linux/regulator/fixed.h>
  #include <linux/regulator/machine.h>
  #include <linux/pwm_backlight.h>
 +#include <linux/platform_data/s3c-hsotg.h>
  
  #ifdef CONFIG_SMDK6410_WM1190_EV1
  #include <linux/mfd/wm8350/core.h>
@@@ -73,6 -72,7 +73,6 @@@
  #include <plat/keypad.h>
  #include <plat/backlight.h>
  #include <plat/regs-fb-v4.h>
 -#include <plat/udc-hs.h>
  
  #include "common.h"
  
@@@ -182,9 -182,16 +182,9 @@@ static struct s3c_fb_platdata smdk6410_
   */
  
  static struct resource smdk6410_smsc911x_resources[] = {
 -      [0] = {
 -              .start = S3C64XX_PA_XM0CSN1,
 -              .end   = S3C64XX_PA_XM0CSN1 + SZ_64K - 1,
 -              .flags = IORESOURCE_MEM,
 -      },
 -      [1] = {
 -              .start = S3C_EINT(10),
 -              .end   = S3C_EINT(10),
 -              .flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_LOW,
 -      },
 +      [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, SZ_64K),
 +      [1] = DEFINE_RES_NAMED(S3C_EINT(10), 1, NULL, IORESOURCE_IRQ \
 +                                      | IRQ_TYPE_LEVEL_LOW),
  };
  
  static struct smsc911x_platform_config smdk6410_smsc911x_pdata = {
@@@ -702,6 -709,7 +702,7 @@@ MACHINE_START(SMDK6410, "SMDK6410"
        .handle_irq     = vic_handle_irq,
        .map_io         = smdk6410_map_io,
        .init_machine   = smdk6410_machine_init,
+       .init_late      = s3c64xx_init_late,
        .timer          = &s3c24xx_timer,
        .restart        = s3c64xx_restart,
  MACHINE_END
index e6b177bc94107683808ac734ebe132a7c951f863,93d62fb215b7259684500c8b46c5d8b37e965d23..8aa1962c22a278dd233022b0886b9a77bba39af4
@@@ -3,7 -3,7 +3,7 @@@
  #
  
  # Common objects
- obj-y                         := timer.o console.o clock.o
+ obj-y                         := timer.o console.o clock.o common.o
  
  # CPU objects
  obj-$(CONFIG_ARCH_SH7367)     += setup-sh7367.o clock-sh7367.o intc-sh7367.o
@@@ -12,14 -12,12 +12,14 @@@ obj-$(CONFIG_ARCH_SH7372)  += setup-sh73
  obj-$(CONFIG_ARCH_SH73A0)     += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o
  obj-$(CONFIG_ARCH_R8A7740)    += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o
  obj-$(CONFIG_ARCH_R8A7779)    += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o
 +obj-$(CONFIG_ARCH_EMEV2)      += setup-emev2.o clock-emev2.o
  
  # SMP objects
  smp-y                         := platsmp.o headsmp.o
  smp-$(CONFIG_HOTPLUG_CPU)     += hotplug.o
  smp-$(CONFIG_ARCH_SH73A0)     += smp-sh73a0.o
  smp-$(CONFIG_ARCH_R8A7779)    += smp-r8a7779.o
 +smp-$(CONFIG_ARCH_EMEV2)      += smp-emev2.o
  
  # Pinmux setup
  pfc-y                         :=
@@@ -51,9 -49,6 +51,9 @@@ obj-$(CONFIG_MACH_MACKEREL)   += board-ma
  obj-$(CONFIG_MACH_KOTA2)      += board-kota2.o
  obj-$(CONFIG_MACH_BONITO)     += board-bonito.o
  obj-$(CONFIG_MACH_MARZEN)     += board-marzen.o
 +obj-$(CONFIG_MACH_ARMADILLO800EVA)    += board-armadillo800eva.o
 +obj-$(CONFIG_MACH_KZM9D)      += board-kzm9d.o
 +obj-$(CONFIG_MACH_KZM9G)      += board-kzm9g.o
  
  # Framework support
  obj-$(CONFIG_SMP)             += $(smp-y)
index 0891ec6e27f502b8fe220a3bff3b97dfbbe44c69,a99e7e6172689fcd5654036d4f0542b61f07e860..5a6f22f05e99bc3a166a92d968f48e3d43c56e5b
@@@ -365,13 -365,23 +365,13 @@@ static struct platform_device mipidsi0_
  };
  
  /* SDHI0 */
 -static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg)
 -{
 -      struct device *dev = arg;
 -      struct sh_mobile_sdhi_info *info = dev->platform_data;
 -      struct tmio_mmc_data *pdata = info->pdata;
 -
 -      tmio_mmc_cd_wakeup(pdata);
 -
 -      return IRQ_HANDLED;
 -}
 -
  static struct sh_mobile_sdhi_info sdhi0_info = {
        .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
        .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
 -      .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
 +      .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
        .tmio_ocr_mask  = MMC_VDD_27_28 | MMC_VDD_28_29,
 +      .cd_gpio        = GPIO_PORT251,
  };
  
  static struct resource sdhi0_resources[] = {
@@@ -547,6 -557,7 +547,6 @@@ static void __init ag5evm_init(void
        lcd_backlight_reset();
  
        /* enable SDHI0 on CN15 [SD I/F] */
 -      gpio_request(GPIO_FN_SDHICD0, NULL);
        gpio_request(GPIO_FN_SDHIWP0, NULL);
        gpio_request(GPIO_FN_SDHICMD0, NULL);
        gpio_request(GPIO_FN_SDHICLK0, NULL);
        gpio_request(GPIO_FN_SDHID0_1, NULL);
        gpio_request(GPIO_FN_SDHID0_0, NULL);
  
 -      if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd,
 -                       IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
 -                       "sdhi0 cd", &sdhi0_device.dev))
 -              sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
 -      else
 -              pr_warn("Unable to setup SDHI0 GPIO IRQ\n");
 -
        /* enable SDHI1 on CN4 [WLAN I/F] */
        gpio_request(GPIO_FN_SDHICLK1, NULL);
        gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
@@@ -580,5 -598,6 +580,6 @@@ MACHINE_START(AG5EVM, "ag5evm"
        .init_irq       = sh73a0_init_irq,
        .handle_irq     = gic_handle_irq,
        .init_machine   = ag5evm_init,
+       .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
  MACHINE_END
index b540b8eb20ca91d860fdf75bab7ce97d4a675434,522866d0cf7ee202062fae3f48c5c388b867bd93..ace60246a5dfd429d3ffd98c778c6910cd839d39
@@@ -50,7 -50,6 +50,7 @@@
  #include <media/soc_camera.h>
  
  #include <sound/sh_fsi.h>
 +#include <sound/simple_card.h>
  
  #include <video/sh_mobile_hdmi.h>
  #include <video/sh_mobile_lcdc.h>
@@@ -786,25 -785,17 +786,25 @@@ static struct platform_device fsi_devic
        },
  };
  
 -static struct fsi_ak4642_info fsi2_ak4643_info = {
 +static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
 +      .fmt            = SND_SOC_DAIFMT_LEFT_J,
 +      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM,
 +      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 +      .sysclk         = 11289600,
 +};
 +
 +static struct asoc_simple_card_info fsi2_ak4643_info = {
        .name           = "AK4643",
        .card           = "FSI2A-AK4643",
        .cpu_dai        = "fsia-dai",
        .codec          = "ak4642-codec.0-0013",
        .platform       = "sh_fsi2",
 -      .id             = FSI_PORT_A,
 +      .codec_dai      = "ak4642-hifi",
 +      .init           = &fsi2_ak4643_init_info,
  };
  
  static struct platform_device fsi_ak4643_device = {
 -      .name   = "fsi-ak4642-audio",
 +      .name   = "asoc-simple-card",
        .dev    = {
                .platform_data  = &fsi2_ak4643_info,
        },
@@@ -909,26 -900,8 +909,26 @@@ static struct platform_device lcdc1_dev
        },
  };
  
 +static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
 +      .cpu_daifmt     = SND_SOC_DAIFMT_CBM_CFM,
 +};
 +
 +static struct asoc_simple_card_info fsi2_hdmi_info = {
 +      .name           = "HDMI",
 +      .card           = "FSI2B-HDMI",
 +      .cpu_dai        = "fsib-dai",
 +      .codec          = "sh-mobile-hdmi",
 +      .platform       = "sh_fsi2",
 +      .codec_dai      = "sh_mobile_hdmi-hifi",
 +      .init           = &fsi2_hdmi_init_info,
 +};
 +
  static struct platform_device fsi_hdmi_device = {
 -      .name           = "sh_fsi2_b_hdmi",
 +      .name   = "asoc-simple-card",
 +      .id     = 1,
 +      .dev    = {
 +              .platform_data  = &fsi2_hdmi_info,
 +      },
  };
  
  static struct gpio_led ap4evb_leds[] = {
@@@ -1024,8 -997,6 +1024,8 @@@ static struct sh_mobile_ceu_companion c
  
  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
        .flags = SH_CEU_FLAG_USE_8BIT_BUS,
 +      .max_width = 8188,
 +      .max_height = 8188,
        .csi2 = &csi2,
  };
  
@@@ -1469,5 -1440,6 +1469,6 @@@ MACHINE_START(AP4EVB, "ap4evb"
        .init_irq       = sh7372_init_irq,
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = ap4evb_init,
+       .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
  MACHINE_END
index 63ab7062bee33746e1ab439cd4475a13e596b7b6,e6b1fd38e72f7867468e383dd786e34387806cf1..e9b32cfbf741061f378fedf05b556553cdd6ceb3
@@@ -486,7 -486,7 +486,7 @@@ static void __init bonito_earlytimer_in
        shmobile_earlytimer_init();
  }
  
 -void __init bonito_add_early_devices(void)
 +static void __init bonito_add_early_devices(void)
  {
        r8a7740_add_early_devices();
  
@@@ -500,5 -500,6 +500,6 @@@ MACHINE_START(BONITO, "bonito"
        .init_irq       = r8a7740_init_irq,
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = bonito_init,
+       .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
  MACHINE_END
index 50c67b22d08749eab3b985da19b6706906127729,4cd438f948a82f4cd3a4a075d1245a26e308ca8a..b577f7c44678ade9a79753742e6606b3eb120600
@@@ -53,7 -53,6 +53,7 @@@
  #include <media/soc_camera.h>
  #include <media/soc_camera_platform.h>
  #include <sound/sh_fsi.h>
 +#include <sound/simple_card.h>
  
  #include <mach/common.h>
  #include <mach/irqs.h>
@@@ -503,26 -502,8 +503,26 @@@ static struct platform_device hdmi_lcdc
        },
  };
  
 +static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
 +      .cpu_daifmt     = SND_SOC_DAIFMT_CBM_CFM,
 +};
 +
 +static struct asoc_simple_card_info fsi2_hdmi_info = {
 +      .name           = "HDMI",
 +      .card           = "FSI2B-HDMI",
 +      .cpu_dai        = "fsib-dai",
 +      .codec          = "sh-mobile-hdmi",
 +      .platform       = "sh_fsi2",
 +      .codec_dai      = "sh_mobile_hdmi-hifi",
 +      .init           = &fsi2_hdmi_init_info,
 +};
 +
  static struct platform_device fsi_hdmi_device = {
 -      .name           = "sh_fsi2_b_hdmi",
 +      .name   = "asoc-simple-card",
 +      .id     = 1,
 +      .dev    = {
 +              .platform_data  = &fsi2_hdmi_info,
 +      },
  };
  
  static void __init hdmi_init_pm_clock(void)
@@@ -927,8 -908,6 +927,8 @@@ fsi_set_rate_end
  static struct sh_fsi_platform_info fsi_info = {
        .port_a = {
                .flags = SH_FSI_BRS_INV,
 +              .tx_id = SHDMA_SLAVE_FSIA_TX,
 +              .rx_id = SHDMA_SLAVE_FSIA_RX,
        },
        .port_b = {
                .flags = SH_FSI_BRS_INV |
  
  static struct resource fsi_resources[] = {
        [0] = {
 +              /* we need 0xFE1F0000 to access DMA
 +               * instead of 0xFE3C0000 */
                .name   = "FSI",
 -              .start  = 0xFE3C0000,
 -              .end    = 0xFE3C0400 - 1,
 +              .start  = 0xFE1F0000,
 +              .end    = 0xFE1F0400 - 1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
@@@ -964,25 -941,17 +964,25 @@@ static struct platform_device fsi_devic
        },
  };
  
 -static struct fsi_ak4642_info fsi2_ak4643_info = {
 +static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
 +      .fmt            = SND_SOC_DAIFMT_LEFT_J,
 +      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM,
 +      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 +      .sysclk         = 11289600,
 +};
 +
 +static struct asoc_simple_card_info fsi2_ak4643_info = {
        .name           = "AK4643",
        .card           = "FSI2A-AK4643",
        .cpu_dai        = "fsia-dai",
        .codec          = "ak4642-codec.0-0013",
        .platform       = "sh_fsi2",
 -      .id             = FSI_PORT_A,
 +      .codec_dai      = "ak4642-hifi",
 +      .init           = &fsi2_ak4643_init_info,
  };
  
  static struct platform_device fsi_ak4643_device = {
 -      .name   = "fsi-ak4642-audio",
 +      .name   = "asoc-simple-card",
        .dev    = {
                .platform_data  = &fsi2_ak4643_info,
        },
@@@ -1042,12 -1011,21 +1042,12 @@@ static int slot_cn7_get_cd(struct platf
  }
  
  /* SDHI0 */
 -static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg)
 -{
 -      struct device *dev = arg;
 -      struct sh_mobile_sdhi_info *info = dev->platform_data;
 -      struct tmio_mmc_data *pdata = info->pdata;
 -
 -      tmio_mmc_cd_wakeup(pdata);
 -
 -      return IRQ_HANDLED;
 -}
 -
  static struct sh_mobile_sdhi_info sdhi0_info = {
        .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
        .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
 +      .tmio_flags     = TMIO_MMC_USE_GPIO_CD,
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 +      .cd_gpio        = GPIO_PORT172,
  };
  
  static struct resource sdhi0_resources[] = {
@@@ -1279,8 -1257,6 +1279,8 @@@ static void mackerel_camera_del(struct 
  
  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
        .flags = SH_CEU_FLAG_USE_8BIT_BUS,
 +      .max_width = 8188,
 +      .max_height = 8188,
  };
  
  static struct resource ceu_resources[] = {
@@@ -1408,6 -1384,7 +1408,6 @@@ static void __init mackerel_init(void
  {
        u32 srcr4;
        struct clk *clk;
 -      int ret;
  
        /* External clock source */
        clk_set_rate(&sh7372_dv_clki_clk, 27000000);
        irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
  
        /* enable SDHI0 */
 -      gpio_request(GPIO_FN_SDHICD0, NULL);
        gpio_request(GPIO_FN_SDHIWP0, NULL);
        gpio_request(GPIO_FN_SDHICMD0, NULL);
        gpio_request(GPIO_FN_SDHICLK0, NULL);
        gpio_request(GPIO_FN_SDHID0_1, NULL);
        gpio_request(GPIO_FN_SDHID0_0, NULL);
  
 -      ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd,
 -                        IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev);
 -      if (!ret)
 -              sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
 -      else
 -              pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret);
 -
  #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
        /* enable SDHI1 */
        gpio_request(GPIO_FN_SDHICMD1, NULL);
@@@ -1638,5 -1623,6 +1638,6 @@@ MACHINE_START(MACKEREL, "mackerel"
        .init_irq       = sh7372_init_irq,
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = mackerel_init,
+       .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
  MACHINE_END
index ff5f12fd742fb737c923eb2210cebcdafed5a537,2a527c4de36c721d1b07d9937b1ed777d9ddbe6f..01e2bc014f1501f41f2f2a9b18a7596bb686ac27
@@@ -3,9 -3,8 +3,9 @@@
  
  extern void shmobile_earlytimer_init(void);
  extern struct sys_timer shmobile_timer;
 +extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
 +                               unsigned int mult, unsigned int div);
  struct twd_local_timer;
 -void shmobile_twd_init(struct twd_local_timer *twd_local_timer);
  extern void shmobile_setup_console(void);
  extern void shmobile_secondary_vector(void);
  extern int shmobile_platform_cpu_kill(unsigned int cpu);
@@@ -83,6 -82,19 +83,20 @@@ extern int r8a7779_platform_cpu_kill(un
  extern void r8a7779_secondary_init(unsigned int cpu);
  extern int r8a7779_boot_secondary(unsigned int cpu);
  extern void r8a7779_smp_prepare_cpus(void);
 +extern void r8a7779_register_twd(void);
  
+ extern void shmobile_init_late(void);
+ #ifdef CONFIG_SUSPEND
+ int shmobile_suspend_init(void);
+ #else
+ static inline int shmobile_suspend_init(void) { return 0; }
+ #endif
+ #ifdef CONFIG_CPU_IDLE
+ int shmobile_cpuidle_init(void);
+ #else
+ static inline int shmobile_cpuidle_init(void) { return 0; }
+ #endif
  #endif /* __ARCH_MACH_COMMON_H */
index fac3eb1af17e0257c043b9cbb91181b35caf1f84,0f0da6c024599fb823d8793728ed75d65ba86754..eb7249db50a59cada041847515313f60cd05eb59
@@@ -37,6 -37,7 +37,6 @@@
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  #include <asm/setup.h>
 -#include <asm/hardware/gic.h>
  
  #include <mach/iomap.h>
  #include <mach/irqs.h>
  #include "clock.h"
  #include "devices.h"
  
 -void harmony_pinmux_init(void);
 -void paz00_pinmux_init(void);
 -void seaboard_pinmux_init(void);
 -void trimslice_pinmux_init(void);
 -void ventana_pinmux_init(void);
 -
  struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 -      OF_DEV_AUXDATA("nvidia,tegra20-pinmux", TEGRA_APB_MISC_BASE + 0x14, "tegra-pinmux", NULL),
 -      OF_DEV_AUXDATA("nvidia,tegra20-gpio", TEGRA_GPIO_BASE, "tegra-gpio", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC3_BASE, "sdhci-tegra.2", NULL),
@@@ -55,9 -64,9 +55,9 @@@
        OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C2_BASE, "tegra-i2c.1", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C3_BASE, "tegra-i2c.2", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-i2c-dvc", TEGRA_DVC_BASE, "tegra-i2c.3", NULL),
 -      OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra-i2s.0", NULL),
 -      OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S2_BASE, "tegra-i2s.1", NULL),
 -      OF_DEV_AUXDATA("nvidia,tegra20-das", TEGRA_APB_MISC_DAS_BASE, "tegra-das", NULL),
 +      OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra20-i2s.0", NULL),
 +      OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S2_BASE, "tegra20-i2s.1", NULL),
 +      OF_DEV_AUXDATA("nvidia,tegra20-das", TEGRA_APB_MISC_DAS_BASE, "tegra20-das", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB_BASE, "tegra-ehci.0",
                       &tegra_ehci1_pdata),
        OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB2_BASE, "tegra-ehci.1",
@@@ -86,10 -95,33 +86,10 @@@ static struct of_device_id tegra_dt_mat
        {}
  };
  
 -static struct {
 -      char *machine;
 -      void (*init)(void);
 -} pinmux_configs[] = {
 -      { "compulab,trimslice", trimslice_pinmux_init },
 -      { "nvidia,harmony", harmony_pinmux_init },
 -      { "compal,paz00", paz00_pinmux_init },
 -      { "nvidia,seaboard", seaboard_pinmux_init },
 -      { "nvidia,ventana", ventana_pinmux_init },
 -};
 -
  static void __init tegra_dt_init(void)
  {
 -      int i;
 -
        tegra_clk_init_from_table(tegra_dt_clk_init_table);
  
 -      for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
 -              if (of_machine_is_compatible(pinmux_configs[i].machine)) {
 -                      pinmux_configs[i].init();
 -                      break;
 -              }
 -      }
 -
 -      WARN(i == ARRAY_SIZE(pinmux_configs),
 -              "Unknown platform! Pinmuxing not initialized\n");
 -
        /*
         * Finished with the static registrations now; fill in the missing
         * devices
@@@ -110,6 -142,7 +110,7 @@@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegr
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_dt_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
        .dt_compat      = tegra20_dt_board_compat,
  MACHINE_END
index d96dae0b4aa7dc04e687733238055ca30af93080,09d21b27bf2fd2d71e7f9caa3a8204782aa97f57..4f76fa7a5da396860f9bf3a5a4d672c037b52a47
@@@ -51,22 -51,12 +51,22 @@@ struct of_dev_auxdata tegra30_auxdata_l
        OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C500, "tegra-i2c.2", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL),
        OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL),
 +      OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL),
        {}
  };
  
  static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
        /* name         parent          rate            enabled */
        { "uarta",      "pll_p",        408000000,      true },
 +      { "pll_a",      "pll_p_out1",   564480000,      true },
 +      { "pll_a_out0", "pll_a",        11289600,       true },
 +      { "extern1",    "pll_a_out0",   0,              true },
 +      { "clk_out_1",  "extern1",      0,              true },
 +      { "i2s0",       "pll_a_out0",   11289600,       false},
 +      { "i2s1",       "pll_a_out0",   11289600,       false},
 +      { "i2s2",       "pll_a_out0",   11289600,       false},
 +      { "i2s3",       "pll_a_out0",   11289600,       false},
 +      { "i2s4",       "pll_a_out0",   11289600,       false},
        { NULL,         NULL,           0,              0},
  };
  
@@@ -90,6 -80,7 +90,7 @@@ DT_MACHINE_START(TEGRA30_DT, "NVIDIA Te
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra30_dt_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
        .dt_compat      = tegra30_dt_board_compat,
  MACHINE_END
index b906b3b6077b97a85a0e058605e4a6ccdfabb89a,987115aa4d962fcb61698d34bbbd8c306aa44ea8..e65e837f40136bba659b5ce2ae3b640fc70e9a0b
@@@ -19,7 -19,6 +19,7 @@@
  #include <linux/init.h>
  #include <linux/platform_device.h>
  #include <linux/serial_8250.h>
 +#include <linux/of_serial.h>
  #include <linux/clk.h>
  #include <linux/dma-mapping.h>
  #include <linux/pda_power.h>
@@@ -53,7 -52,6 +53,7 @@@ static struct plat_serial8250_port debu
                .irq            = INT_UARTD,
                .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
                .type           = PORT_TEGRA,
 +              .handle_break   = tegra_serial_handle_break,
                .iotype         = UPIO_MEM,
                .regshift       = 2,
                .uartclk        = 216000000,
@@@ -124,6 -122,7 +124,6 @@@ static struct platform_device *harmony_
        &tegra_ehci3_device,
        &tegra_i2s_device1,
        &tegra_das_device,
 -      &tegra_pcm_device,
        &harmony_audio_device,
  };
  
@@@ -192,5 -191,6 +192,6 @@@ MACHINE_START(HARMONY, "harmony"
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_harmony_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
index 55a1e6ccf4a274ad365225aa7181adfe77c3216f,2e8a4c61afb22309f8296bbae925af8d12da0054..bbc1907e98a69875144b32e367629a9f8b2739f9
@@@ -21,7 -21,6 +21,7 @@@
  #include <linux/init.h>
  #include <linux/platform_device.h>
  #include <linux/serial_8250.h>
 +#include <linux/of_serial.h>
  #include <linux/clk.h>
  #include <linux/dma-mapping.h>
  #include <linux/gpio_keys.h>
@@@ -56,7 -55,6 +56,7 @@@ static struct plat_serial8250_port debu
                .irq            = INT_UARTA,
                .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
                .type           = PORT_TEGRA,
 +              .handle_break   = tegra_serial_handle_break,
                .iotype         = UPIO_MEM,
                .regshift       = 2,
                .uartclk        = 216000000,
@@@ -67,7 -65,6 +67,7 @@@
                .irq            = INT_UARTC,
                .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
                .type           = PORT_TEGRA,
 +              .handle_break   = tegra_serial_handle_break,
                .iotype         = UPIO_MEM,
                .regshift       = 2,
                .uartclk        = 216000000,
@@@ -162,8 -159,6 +162,8 @@@ static void paz00_i2c_init(void
  
  static void paz00_usb_init(void)
  {
 +      tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_ULPI_RST;
 +
        platform_device_register(&tegra_ehci2_device);
        platform_device_register(&tegra_ehci3_device);
  }
@@@ -181,6 -176,7 +181,6 @@@ static __initdata struct tegra_clk_init
        { "uarta",      "pll_p",        216000000,      true },
        { "uartc",      "pll_p",        216000000,      true },
  
 -      { "pll_p_out4", "pll_p",        24000000,       true },
        { "usbd",       "clk_m",        12000000,       false },
        { "usb2",       "clk_m",        12000000,       false },
        { "usb3",       "clk_m",        12000000,       false },
@@@ -225,5 -221,6 +225,6 @@@ MACHINE_START(PAZ00, "Toshiba AC100 / D
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_paz00_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
index 79064c7a7907023eb1c4ffb82fc84aeddd44ca8c,273eaaaf271a2a918dd352c57d13dfe79ec6c097..71e9f3fc7fba28ffbd893c978342d3c7ad7c53e5
  #include <linux/init.h>
  #include <linux/platform_device.h>
  #include <linux/serial_8250.h>
 +#include <linux/of_serial.h>
  #include <linux/i2c.h>
  #include <linux/delay.h>
  #include <linux/input.h>
  #include <linux/io.h>
  #include <linux/gpio.h>
  #include <linux/gpio_keys.h>
 +#include <linux/platform_data/tegra_usb.h>
  
  #include <sound/wm8903.h>
  
@@@ -49,7 -47,6 +49,7 @@@ static struct plat_serial8250_port debu
                /* Memory and IRQ filled in before registration */
                .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
                .type           = PORT_TEGRA,
 +              .handle_break   = tegra_serial_handle_break,
                .iotype         = UPIO_MEM,
                .regshift       = 2,
                .uartclk        = 216000000,
@@@ -156,6 -153,7 +156,6 @@@ static struct platform_device *seaboard
        &seaboard_gpio_keys_device,
        &tegra_i2s_device1,
        &tegra_das_device,
 -      &tegra_pcm_device,
        &seaboard_audio_device,
  };
  
@@@ -188,10 -186,20 +188,10 @@@ static struct i2c_board_info __initdat
  
  static int seaboard_ehci_init(void)
  {
 -      int gpio_status;
 +      struct tegra_ehci_platform_data *pdata;
  
 -      gpio_status = gpio_request(TEGRA_GPIO_USB1, "VBUS_USB1");
 -      if (gpio_status < 0) {
 -              pr_err("VBUS_USB1 request GPIO FAILED\n");
 -              WARN_ON(1);
 -      }
 -
 -      gpio_status = gpio_direction_output(TEGRA_GPIO_USB1, 1);
 -      if (gpio_status < 0) {
 -              pr_err("VBUS_USB1 request GPIO DIRECTION FAILED\n");
 -              WARN_ON(1);
 -      }
 -      gpio_set_value(TEGRA_GPIO_USB1, 1);
 +      pdata = tegra_ehci1_device.dev.platform_data;
 +      pdata->vbus_gpio = TEGRA_GPIO_USB1;
  
        platform_device_register(&tegra_ehci1_device);
        platform_device_register(&tegra_ehci3_device);
  
  static void __init seaboard_i2c_init(void)
  {
 -      gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018");
 -      gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ);
 -
        isl29018_device.irq = gpio_to_irq(TEGRA_GPIO_ISL29018_IRQ);
        i2c_register_board_info(0, &isl29018_device, 1);
  
@@@ -250,6 -261,7 +250,6 @@@ static void __init tegra_kaen_init(void
        debug_uart_platform_data[0].irq = INT_UARTB;
  
        seaboard_audio_pdata.gpio_hp_mute = TEGRA_GPIO_KAEN_HP_MUTE;
 -      tegra_gpio_enable(TEGRA_GPIO_KAEN_HP_MUTE);
  
        seaboard_common_init();
  
@@@ -277,6 -289,7 +277,7 @@@ MACHINE_START(SEABOARD, "seaboard"
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_seaboard_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
  
@@@ -288,6 -301,7 +289,7 @@@ MACHINE_START(KAEN, "kaen"
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_kaen_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
  
@@@ -299,5 -313,6 +301,6 @@@ MACHINE_START(WARIO, "wario"
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_wario_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
index 832fa931c7100afcb3d07657d8f2fa24f1df6216,0a2a0e5bd39ed1a70aad1688edf0413741d099ca..776aa9564d5d61e3c803f701c2ed0bf87cca8dbc
  #include <linux/init.h>
  #include <linux/platform_device.h>
  #include <linux/serial_8250.h>
 +#include <linux/of_serial.h>
  #include <linux/io.h>
  #include <linux/i2c.h>
  #include <linux/gpio.h>
 +#include <linux/platform_data/tegra_usb.h>
  
  #include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
@@@ -50,7 -48,6 +50,7 @@@ static struct plat_serial8250_port debu
                .irq            = INT_UARTA,
                .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
                .type           = PORT_TEGRA,
 +              .handle_break   = tegra_serial_handle_break,
                .iotype         = UPIO_MEM,
                .regshift       = 2,
                .uartclk        = 216000000,
@@@ -89,6 -86,7 +89,6 @@@ static struct platform_device *trimslic
        &tegra_sdhci_device4,
        &tegra_i2s_device1,
        &tegra_das_device,
 -      &tegra_pcm_device,
        &trimslice_audio_device,
  };
  
@@@ -113,15 -111,19 +113,15 @@@ static void trimslice_i2c_init(void
  
  static void trimslice_usb_init(void)
  {
 -      int err;
 +      struct tegra_ehci_platform_data *pdata;
  
 -      platform_device_register(&tegra_ehci3_device);
 -
 -      platform_device_register(&tegra_ehci2_device);
 +      pdata = tegra_ehci1_device.dev.platform_data;
 +      pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE;
  
 -      err = gpio_request_one(TRIMSLICE_GPIO_USB1_MODE, GPIOF_OUT_INIT_HIGH,
 -                             "usb1mode");
 -      if (err) {
 -              pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err);
 -              return;
 -      }
 +      tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_GPIO_PV0;
  
 +      platform_device_register(&tegra_ehci3_device);
 +      platform_device_register(&tegra_ehci2_device);
        platform_device_register(&tegra_ehci1_device);
  }
  
@@@ -178,5 -180,6 +178,6 @@@ MACHINE_START(TRIMSLICE, "trimslice"
        .handle_irq     = gic_handle_irq,
        .timer          = &tegra_timer,
        .init_machine   = tegra_trimslice_init,
+       .init_late      = tegra_init_late,
        .restart        = tegra_assert_system_reset,
  MACHINE_END
index 2d80566b5383d5a745a62e2a6314f15c02afe796,c90ec9333f96e1e26ee94af691d12c7963755327..204a5c8b0b574bd0cf2b46f5b0d4d1ccde87dd61
@@@ -82,12 -82,10 +82,12 @@@ static __initdata struct tegra_clk_init
        { "pll_p_out1", "pll_p",        28800000,       true },
        { "pll_p_out2", "pll_p",        48000000,       true },
        { "pll_p_out3", "pll_p",        72000000,       true },
 -      { "pll_p_out4", "pll_p",        108000000,      true },
 -      { "sclk",       "pll_p_out4",   108000000,      true },
 -      { "hclk",       "sclk",         108000000,      true },
 -      { "pclk",       "hclk",         54000000,       true },
 +      { "pll_p_out4", "pll_p",        24000000,       true },
 +      { "pll_c",      "clk_m",        600000000,      true },
 +      { "pll_c_out1", "pll_c",        120000000,      true },
 +      { "sclk",       "pll_c_out1",   120000000,      true },
 +      { "hclk",       "sclk",         120000000,      true },
 +      { "pclk",       "hclk",         60000000,       true },
        { "csite",      NULL,           0,              true },
        { "emc",        NULL,           0,              true },
        { "cpu",        NULL,           0,              true },
  };
  #endif
  
 +#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 +static __initdata struct tegra_clk_init_table tegra30_clk_init_table[] = {
 +      /* name         parent          rate            enabled */
 +      { "clk_m",      NULL,           0,              true },
 +      { "pll_p",      "clk_m",        408000000,      true },
 +      { "pll_p_out1", "pll_p",        9600000,        true },
 +      { NULL,         NULL,           0,              0},
 +};
 +#endif
 +
 +
  static void __init tegra_init_cache(u32 tag_latency, u32 data_latency)
  {
  #ifdef CONFIG_CACHE_L2X0
@@@ -140,9 -127,14 +140,15 @@@ void __init tegra30_init_early(void
  {
        tegra_init_fuse();
        tegra30_init_clocks();
 +      tegra_clk_init_from_table(tegra30_clk_init_table);
        tegra_init_cache(0x441, 0x551);
        tegra_pmc_init();
        tegra_powergate_init();
  }
  #endif
+ void __init tegra_init_late(void)
+ {
+       tegra_clk_debugfs_init();
+       tegra_powergate_debugfs_init();
+ }
index f943687acaf0e214d1bebc4ed317976c0b640cb5,348ebd959399fd226cceafab4d5deb92f64c12cb..b23a643f03f4ce62eaddfd9b29b7722c06c5afd8
@@@ -1,4 -1,3 +1,4 @@@
 +
  /*
   * Copyright (C) 2008-2009 ST-Ericsson
   *
  #include <linux/smsc911x.h>
  #include <linux/gpio_keys.h>
  #include <linux/delay.h>
 -
  #include <linux/of.h>
  #include <linux/of_platform.h>
 -
  #include <linux/leds.h>
 +#include <linux/pinctrl/consumer.h>
 +
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/hardware/gic.h>
  
  #include <plat/i2c.h>
  #include <plat/ste_dma40.h>
 -#include <plat/pincfg.h>
  #include <plat/gpio-nomadik.h>
  
  #include <mach/hardware.h>
  #include <mach/setup.h>
  #include <mach/devices.h>
  #include <mach/irqs.h>
 +#include <mach/crypto-ux500.h>
  
 -#include "pins-db8500.h"
  #include "ste-dma40-db8500.h"
  #include "devices-db8500.h"
  #include "board-mop500.h"
  #include "board-mop500-regulators.h"
 +#include "board-mop500-msp.h"
  
  static struct gpio_led snowball_led_array[] = {
        {
@@@ -418,45 -417,6 +418,45 @@@ static void mop500_prox_deactivate(stru
        regulator_put(prox_regulator);
  }
  
 +static struct cryp_platform_data u8500_cryp1_platform_data = {
 +              .mem_to_engine = {
 +                              .dir = STEDMA40_MEM_TO_PERIPH,
 +                              .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
 +                              .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX,
 +                              .src_info.data_width = STEDMA40_WORD_WIDTH,
 +                              .dst_info.data_width = STEDMA40_WORD_WIDTH,
 +                              .mode = STEDMA40_MODE_LOGICAL,
 +                              .src_info.psize = STEDMA40_PSIZE_LOG_4,
 +                              .dst_info.psize = STEDMA40_PSIZE_LOG_4,
 +              },
 +              .engine_to_mem = {
 +                              .dir = STEDMA40_PERIPH_TO_MEM,
 +                              .src_dev_type = DB8500_DMA_DEV48_CAC1_RX,
 +                              .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
 +                              .src_info.data_width = STEDMA40_WORD_WIDTH,
 +                              .dst_info.data_width = STEDMA40_WORD_WIDTH,
 +                              .mode = STEDMA40_MODE_LOGICAL,
 +                              .src_info.psize = STEDMA40_PSIZE_LOG_4,
 +                              .dst_info.psize = STEDMA40_PSIZE_LOG_4,
 +              }
 +};
 +
 +static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
 +              .dir = STEDMA40_MEM_TO_PERIPH,
 +              .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
 +              .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX,
 +              .src_info.data_width = STEDMA40_WORD_WIDTH,
 +              .dst_info.data_width = STEDMA40_WORD_WIDTH,
 +              .mode = STEDMA40_MODE_LOGICAL,
 +              .src_info.psize = STEDMA40_PSIZE_LOG_16,
 +              .dst_info.psize = STEDMA40_PSIZE_LOG_16,
 +};
 +
 +static struct hash_platform_data u8500_hash1_platform_data = {
 +              .mem_to_engine = &u8500_hash_dma_cfg_tx,
 +              .dma_filter = stedma40_filter,
 +};
 +
  /* add any platform devices here - TODO */
  static struct platform_device *mop500_platform_devs[] __initdata = {
        &mop500_gpio_keys_device,
@@@ -560,6 -520,14 +560,6 @@@ static struct stedma40_chan_cfg uart2_d
  };
  #endif
  
 -
 -static pin_cfg_t mop500_pins_uart0[] = {
 -      GPIO0_U0_CTSn   | PIN_INPUT_PULLUP,
 -      GPIO1_U0_RTSn   | PIN_OUTPUT_HIGH,
 -      GPIO2_U0_RXD    | PIN_INPUT_PULLUP,
 -      GPIO3_U0_TXD    | PIN_OUTPUT_HIGH,
 -};
 -
  #define PRCC_K_SOFTRST_SET      0x18
  #define PRCC_K_SOFTRST_CLEAR    0x1C
  static void ux500_uart0_reset(void)
        udelay(1);
  }
  
 +/* This needs to be referenced by callbacks */
 +struct pinctrl *u0_p;
 +struct pinctrl_state *u0_def;
 +struct pinctrl_state *u0_sleep;
 +
  static void ux500_uart0_init(void)
  {
        int ret;
  
 -      ret = nmk_config_pins(mop500_pins_uart0,
 -                      ARRAY_SIZE(mop500_pins_uart0));
 -      if (ret < 0)
 -              pr_err("pl011: uart pins_enable failed\n");
 +      if (IS_ERR(u0_p) || IS_ERR(u0_def))
 +              return;
 +
 +      ret = pinctrl_select_state(u0_p, u0_def);
 +      if (ret)
 +              pr_err("could not set UART0 defstate\n");
  }
  
  static void ux500_uart0_exit(void)
  {
        int ret;
  
 -      ret = nmk_config_pins_sleep(mop500_pins_uart0,
 -                      ARRAY_SIZE(mop500_pins_uart0));
 -      if (ret < 0)
 -              pr_err("pl011: uart pins_disable failed\n");
 +      if (IS_ERR(u0_p) || IS_ERR(u0_sleep))
 +              return;
 +
 +      ret = pinctrl_select_state(u0_p, u0_sleep);
 +      if (ret)
 +              pr_err("could not set UART0 idlestate\n");
  }
  
  static struct amba_pl011_data uart0_plat = {
@@@ -638,41 -597,15 +638,41 @@@ static struct amba_pl011_data uart2_pla
  
  static void __init mop500_uart_init(struct device *parent)
  {
 -      db8500_add_uart0(parent, &uart0_plat);
 +      struct amba_device *uart0_device;
 +
 +      uart0_device = db8500_add_uart0(parent, &uart0_plat);
 +      if (uart0_device) {
 +              u0_p = pinctrl_get(&uart0_device->dev);
 +              if (IS_ERR(u0_p))
 +                      dev_err(&uart0_device->dev,
 +                              "could not get UART0 pinctrl\n");
 +              else {
 +                      u0_def = pinctrl_lookup_state(u0_p,
 +                                                    PINCTRL_STATE_DEFAULT);
 +                      if (IS_ERR(u0_def)) {
 +                              dev_err(&uart0_device->dev,
 +                                      "could not get UART0 defstate\n");
 +                      }
 +                      u0_sleep = pinctrl_lookup_state(u0_p,
 +                                                      PINCTRL_STATE_SLEEP);
 +                      if (IS_ERR(u0_sleep))
 +                              dev_err(&uart0_device->dev,
 +                                      "could not get UART0 idlestate\n");
 +              }
 +      }
        db8500_add_uart1(parent, &uart1_plat);
        db8500_add_uart2(parent, &uart2_plat);
  }
  
 +static void __init u8500_cryp1_hash1_init(struct device *parent)
 +{
 +      db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
 +      db8500_add_hash1(parent, &u8500_hash1_platform_data);
 +}
 +
  static struct platform_device *snowball_platform_devs[] __initdata = {
        &snowball_led_dev,
        &snowball_key_dev,
 -      &snowball_sbnet_dev,
        &ab8500_device,
  };
  
@@@ -684,9 -617,10 +684,9 @@@ static void __init mop500_init_machine(
  
        mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
  
 +      mop500_pinmaps_init();
        parent = u8500_init_devices();
  
 -      mop500_pins_init();
 -
        /* FIXME: parent of ab8500 should be prcmu */
        for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
                mop500_platform_devs[i]->dev.parent = parent;
        mop500_i2c_init(parent);
        mop500_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
 +      u8500_cryp1_hash1_init(parent);
 +
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
  
        i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
  static void __init snowball_init_machine(void)
  {
        struct device *parent = NULL;
 -      int i2c0_devs;
        int i;
  
 +      snowball_pinmaps_init();
        parent = u8500_init_devices();
  
 -      snowball_pins_init();
 -
        for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
                snowball_platform_devs[i]->dev.parent = parent;
  
        mop500_i2c_init(parent);
        snowball_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
 -      i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 -      i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 -      i2c_register_board_info(2, mop500_i2c2_devices,
 -                              ARRAY_SIZE(mop500_i2c2_devices));
 -
        /* This board has full regulator constraints */
        regulator_has_full_constraints();
  }
@@@ -749,9 -686,10 +749,9 @@@ static void __init hrefv60_init_machine
         */
        mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
  
 +      hrefv60_pinmaps_init();
        parent = u8500_init_devices();
  
 -      hrefv60_pins_init();
 -
        for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
                mop500_platform_devs[i]->dev.parent = parent;
  
        mop500_i2c_init(parent);
        hrefv60_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
@@@ -785,6 -722,7 +785,7 @@@ MACHINE_START(U8500, "ST-Ericsson MOP50
        .timer          = &ux500_timer,
        .handle_irq     = gic_handle_irq,
        .init_machine   = mop500_init_machine,
+       .init_late      = ux500_init_late,
  MACHINE_END
  
  MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
        .timer          = &ux500_timer,
        .handle_irq     = gic_handle_irq,
        .init_machine   = hrefv60_init_machine,
+       .init_late      = ux500_init_late,
  MACHINE_END
  
  MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
        .timer          = &ux500_timer,
        .handle_irq     = gic_handle_irq,
        .init_machine   = snowball_init_machine,
+       .init_late      = ux500_init_late,
  MACHINE_END
  
  #ifdef CONFIG_MACH_UX500_DT
  
  struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 +      /* Requires DMA and call-back bindings. */
        OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
        OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
        OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
 +      /* Requires DMA bindings. */
        OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
 +      /* Requires clock name bindings. */
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
 +      OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
        {},
  };
  
 -static const struct of_device_id u8500_soc_node[] = {
 +static const struct of_device_id u8500_local_bus_nodes[] = {
        /* only create devices below soc node */
        { .compatible = "stericsson,db8500", },
 +      { .compatible = "simple-bus"},
        { },
  };
  
@@@ -841,15 -768,8 +844,15 @@@ static void __init u8500_init_machine(v
        int i2c0_devs;
        int i;
  
 +      /* Pinmaps must be in place before devices register */
 +      if (of_machine_is_compatible("st-ericsson,mop500"))
 +              mop500_pinmaps_init();
 +      else if (of_machine_is_compatible("calaosystems,snowball-a9500"))
 +              snowball_pinmaps_init();
 +      else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
 +              hrefv60_pinmaps_init();
 +
        parent = u8500_init_devices();
 -      i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
  
        for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
                mop500_platform_devs[i]->dev.parent = parent;
                snowball_platform_devs[i]->dev.parent = parent;
  
        /* automatically probe child nodes of db8500 device */
 -      of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent);
 +      of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
  
        if (of_machine_is_compatible("st-ericsson,mop500")) {
                mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
 -              mop500_pins_init();
  
                platform_add_devices(mop500_platform_devs,
                                ARRAY_SIZE(mop500_platform_devs));
  
                mop500_sdi_init(parent);
 +
 +              i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 +              i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 +              i2c_register_board_info(2, mop500_i2c2_devices,
 +                                      ARRAY_SIZE(mop500_i2c2_devices));
 +
        } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
 -              snowball_pins_init();
                platform_add_devices(snowball_platform_devs,
                                ARRAY_SIZE(snowball_platform_devs));
  
                 * instead.
                 */
                mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
 -              i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
 -              hrefv60_pins_init();
                platform_add_devices(mop500_platform_devs,
                                ARRAY_SIZE(mop500_platform_devs));
  
                hrefv60_sdi_init(parent);
 +
 +              i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 +              i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
 +
 +              i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 +              i2c_register_board_info(2, mop500_i2c2_devices,
 +                                      ARRAY_SIZE(mop500_i2c2_devices));
        }
        mop500_i2c_init(parent);
  
 -      i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 -      i2c_register_board_info(2, mop500_i2c2_devices,
 -                              ARRAY_SIZE(mop500_i2c2_devices));
 -
        /* This board has full regulator constraints */
        regulator_has_full_constraints();
  }
@@@ -918,6 -833,7 +921,7 @@@ DT_MACHINE_START(U8500_DT, "ST-Ericsso
        .timer          = &ux500_timer,
        .handle_irq     = gic_handle_irq,
        .init_machine   = u8500_init_machine,
+       .init_late      = ux500_init_late,
        .dt_compat      = u8500_dt_board_compat,
  MACHINE_END
  #endif
index 1762c4728f1e24b3dd41881d1d145cbac31c7c49,ce00f5ee14baff459f8dc81b272f750510360eff..8d73b066a18d31dda628af949f7c84c260bd56a7
@@@ -149,7 -149,9 +149,7 @@@ static unsigned long clk_mtu_get_rate(s
        unsigned long mturate;
        unsigned long retclk;
  
 -      if (cpu_is_u5500())
 -              addr = __io_address(U5500_PRCMU_BASE);
 -      else if (cpu_is_u8500())
 +      if (cpu_is_u8500_family())
                addr = __io_address(U8500_PRCMU_BASE);
        else
                ux500_unknown_soc();
@@@ -334,7 -336,6 +334,7 @@@ static DEFINE_PRCMU_CLK(uiccclk,   0x4, 1
   */
  
  /* Peripheral Cluster #1 */
 +static DEFINE_PRCC_CLK(1, msp3,               11, 10, &clk_msp1clk);
  static DEFINE_PRCC_CLK(1, i2c4,               10, 9, &clk_i2cclk);
  static DEFINE_PRCC_CLK(1, gpio0,      9, -1, NULL);
  static DEFINE_PRCC_CLK(1, slimbus0,   8,  8, &clk_slimclk);
@@@ -381,15 -382,14 +381,15 @@@ static DEFINE_PRCC_CLK(5, usb,          0,  0, 
  /* Peripheral Cluster #6 */
  
  /* MTU ID in data */
 -static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 8, -1, NULL, clk_mtu_get_rate, 1);
 -static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 7, -1, NULL, clk_mtu_get_rate, 0);
 -static DEFINE_PRCC_CLK(6, cfgreg,     6,  6, NULL);
 -static DEFINE_PRCC_CLK(6, hash1,      5, -1, NULL);
 -static DEFINE_PRCC_CLK(6, unipro,     4,  1, &clk_uniproclk);
 -static DEFINE_PRCC_CLK(6, pka,                3, -1, NULL);
 -static DEFINE_PRCC_CLK(6, hash0,      2, -1, NULL);
 -static DEFINE_PRCC_CLK(6, cryp0,      1, -1, NULL);
 +static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 9, -1, NULL, clk_mtu_get_rate, 1);
 +static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 8, -1, NULL, clk_mtu_get_rate, 0);
 +static DEFINE_PRCC_CLK(6, cfgreg,     7,  7, NULL);
 +static DEFINE_PRCC_CLK(6, hash1,      6, -1, NULL);
 +static DEFINE_PRCC_CLK(6, unipro,     5,  1, &clk_uniproclk);
 +static DEFINE_PRCC_CLK(6, pka,                4, -1, NULL);
 +static DEFINE_PRCC_CLK(6, hash0,      3, -1, NULL);
 +static DEFINE_PRCC_CLK(6, cryp0,      2, -1, NULL);
 +static DEFINE_PRCC_CLK(6, cryp1,    1, -1, NULL);
  static DEFINE_PRCC_CLK(6, rng,        0,  0, &clk_rngclk);
  
  static struct clk clk_dummy_apb_pclk = {
@@@ -405,7 -405,7 +405,7 @@@ static struct clk_lookup u8500_clks[] 
        CLK(slimbus0,   "slimbus0",     NULL),
        CLK(i2c2,       "nmk-i2c.2",    NULL),
        CLK(sdi0,       "sdi0",         NULL),
 -      CLK(msp0,       "msp0",         NULL),
 +      CLK(msp0,       "ux500-msp-i2s.0",      NULL),
        CLK(i2c1,       "nmk-i2c.1",    NULL),
        CLK(uart1,      "uart1",        NULL),
        CLK(uart0,      "uart0",        NULL),
        CLK(pka,        "pka",          NULL),
        CLK(hash0,      "hash0",        NULL),
        CLK(cryp0,      "cryp0",        NULL),
 +      CLK(cryp1,  "cryp1",    NULL),
  
        /* PRCMU level clock gating */
  
        /* Peripheral Cluster #1 */
        CLK(i2c4,       "nmk-i2c.4",    NULL),
        CLK(spi3,       "spi3",         NULL),
 -      CLK(msp1,       "msp1",         NULL),
 +      CLK(msp1,       "ux500-msp-i2s.1",      NULL),
 +      CLK(msp3,       "ux500-msp-i2s.3",      NULL),
  
        /* Peripheral Cluster #2 */
        CLK(gpio1,      "gpio.6",       NULL),
        CLK(spi0,       "spi0",         NULL),
        CLK(sdi3,       "sdi3",         NULL),
        CLK(sdi1,       "sdi1",         NULL),
 -      CLK(msp2,       "msp2",         NULL),
 +      CLK(msp2,       "ux500-msp-i2s.2",      NULL),
        CLK(sdi4,       "sdi4",         NULL),
        CLK(pwl,        "pwl",          NULL),
        CLK(spi1,       "spi1",         NULL),
@@@ -635,7 -633,7 +635,7 @@@ static int clk_debugfs_register(struct 
        return 0;
  }
  
static int __init clk_debugfs_init(void)
+ int __init clk_debugfs_init(void)
  {
        struct clk *c;
        struct dentry *d;
@@@ -657,7 -655,6 +657,6 @@@ err_out
        return err;
  }
  
- late_initcall(clk_debugfs_init);
  #endif /* defined(CONFIG_DEBUG_FS) */
  
  unsigned long clk_smp_twd_rate = 500000000;
@@@ -696,17 -693,24 +695,16 @@@ static struct notifier_block clk_twd_cp
        .notifier_call = clk_twd_cpufreq_transition,
  };
  
static int clk_init_smp_twd_cpufreq(void)
+ int clk_init_smp_twd_cpufreq(void)
  {
        return cpufreq_register_notifier(&clk_twd_cpufreq_nb,
                                  CPUFREQ_TRANSITION_NOTIFIER);
  }
- late_initcall(clk_init_smp_twd_cpufreq);
  
  #endif
  
  int __init clk_init(void)
  {
 -      if (cpu_is_u5500()) {
 -              /* Clock tree for U5500 not implemented yet */
 -              clk_prcc_ops.enable = clk_prcc_ops.disable = NULL;
 -              clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL;
 -              clk_uartclk.rate = 36360000;
 -              clk_sdmmcclk.rate = 99900000;
 -      }
 -
        clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks));
        clkdev_add(&clk_smp_twd_lookup);
  
index a29a0e3adcf9da3e3aebca1905a3f7764bee4fdd,9856c5788815e083d7899cb5fb25a67eba46c463..e2360e7c770d3a6c99b8abedfc38810503f290a7
@@@ -10,6 -10,7 +10,6 @@@
  #include <linux/io.h>
  #include <linux/clk.h>
  #include <linux/mfd/db8500-prcmu.h>
 -#include <linux/mfd/db5500-prcmu.h>
  #include <linux/clksrc-dbx500-prcmu.h>
  #include <linux/sys_soc.h>
  #include <linux/err.h>
  
  void __iomem *_PRCMU_BASE;
  
 +/*
 + * FIXME: Should we set up the GPIO domain here?
 + *
 + * The problem is that we cannot put the interrupt resources into the platform
 + * device until the irqdomain has been added. Right now, we set the GIC interrupt
 + * domain from init_irq(), then load the gpio driver from
 + * core_initcall(nmk_gpio_init) and add the platform devices from
 + * arch_initcall(customize_machine).
 + *
 + * This feels fragile because it depends on the gpio device getting probed
 + * _before_ any device uses the gpio interrupts.
 +*/
  static const struct of_device_id ux500_dt_irq_match[] = {
        { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
        {},
@@@ -51,7 -40,10 +51,7 @@@ void __init ux500_init_irq(void
        void __iomem *dist_base;
        void __iomem *cpu_base;
  
 -      if (cpu_is_u5500()) {
 -              dist_base = __io_address(U5500_GIC_DIST_BASE);
 -              cpu_base = __io_address(U5500_GIC_CPU_BASE);
 -      } else if (cpu_is_u8500()) {
 +      if (cpu_is_u8500_family()) {
                dist_base = __io_address(U8500_GIC_DIST_BASE);
                cpu_base = __io_address(U8500_GIC_CPU_BASE);
        } else
         * Init clocks here so that they are available for system timer
         * initialization.
         */
 -      if (cpu_is_u5500())
 -              db5500_prcmu_early_init();
 -      if (cpu_is_u8500())
 +      if (cpu_is_u8500_family())
                db8500_prcmu_early_init();
        clk_init();
  }
  
+ void __init ux500_init_late(void)
+ {
+       clk_debugfs_init();
+       clk_init_smp_twd_cpufreq();
+ }
  static const char * __init ux500_get_machine(void)
  {
        return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber());
index 4e369f1645ec9bbbfdc3ee3a28927a7f0e01ff2d,7b5d865ac591ea6b5c93edacc734358dcb320d81..8b7ed82a286665961f04d548a0ab1137027fc7d8
  #include <linux/init.h>
  
  void __init ux500_map_io(void);
 -extern void __init u5500_map_io(void);
  extern void __init u8500_map_io(void);
  
 -extern struct device * __init u5500_init_devices(void);
  extern struct device * __init u8500_init_devices(void);
  
  extern void __init ux500_init_irq(void);
+ extern void __init ux500_init_late(void);
  
 -extern void __init u5500_sdi_init(struct device *parent);
 -
 -extern void __init db5500_dma_init(struct device *parent);
 -
  extern struct device *ux500_soc_device_init(const char *soc_id);
  
  struct amba_device;
This page took 0.310881 seconds and 4 git commands to generate.