]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'depends/rmk/memory_h' into next/cleanup2
authorArnd Bergmann <arnd@arndb.de>
Tue, 1 Nov 2011 03:58:59 +0000 (04:58 +0100)
committerArnd Bergmann <arnd@arndb.de>
Tue, 1 Nov 2011 03:58:59 +0000 (04:58 +0100)
There are lots of conflicts between the omap and exynos cleanups
and the memory.h remove series.

Conflicts:
arch/arm/mach-exynos4/mach-smdkc210.c
arch/arm/mach-exynos4/mach-smdkv310.c
arch/arm/mach-imx/mach-cpuimx27.c
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/io.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/io.c
arch/arm/plat-omap/io.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
84 files changed:
1  2 
arch/arm/Kconfig
arch/arm/kernel/setup.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/sleep.S
arch/arm/mach-exynos4/mach-nuri.c
arch/arm/mach-exynos4/mach-universal_c210.c
arch/arm/mach-imx/mach-cpuimx27.c
arch/arm/mach-imx/mach-cpuimx35.c
arch/arm/mach-imx/mach-eukrea_cpuimx25.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/io.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.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-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-n8x0.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-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-omap2/board-zoom.c
arch/arm/mach-omap2/io.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2410/mach-qt2410.c
arch/arm/mach-s3c2440/mach-rx1950.c
arch/arm/mach-s3c64xx/cpu.c
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-hmt.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-ncp.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/mach-smartq5.c
arch/arm/mach-s3c64xx/mach-smartq7.c
arch/arm/mach-s3c64xx/mach-smdk6400.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s5p64x0/cpu.c
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pv210/cpu.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-vexpress/v2m.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/init.c
arch/arm/plat-omap/include/plat/io.h
arch/arm/plat-omap/io.c

diff --combined arch/arm/Kconfig
index 52f1027d9cb130c34362c60920419a557661ac94,b7f7510658d6e08ee88edda0bb0aeb172077a263..70b3943a5754b18566ef313c79557f7f8b43fe62
@@@ -195,7 -195,8 +195,8 @@@ config VECTORS_BAS
          The base address of exception vectors.
  
  config ARM_PATCH_PHYS_VIRT
-       bool "Patch physical to virtual translations at runtime"
+       bool "Patch physical to virtual translations at runtime" if EMBEDDED
+       default y
        depends on !XIP_KERNEL && MMU
        depends on !ARCH_REALVIEW || !SPARSEMEM
        help
          kernel in system memory.
  
          This can only be used with non-XIP MMU kernels where the base
-         of physical memory is at a 16MB boundary, or theoretically 64K
-         for the MSM machine class.
+         of physical memory is at a 16MB boundary.
+         Only disable this option if you know that you do not require
+         this feature (eg, building a kernel for a single machine) and
+         you need to shrink the kernel to the minimal size.
+ config NEED_MACH_MEMORY_H
+       bool
+       help
+         Select this when mach/memory.h is required to provide special
+         definitions for this platform.  The need for mach/memory.h should
+         be avoided when possible.
  
- config ARM_PATCH_PHYS_VIRT_16BIT
-       def_bool y
-       depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
+ config PHYS_OFFSET
+       hex "Physical address of main memory"
+       depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
        help
-         This option extends the physical to virtual translation patching
-         to allow physical memory down to a theoretical minimum of 64K
-         boundaries.
+         Please provide the physical address corresponding to the
+         location of main memory in your system.
  
  source "init/Kconfig"
  
@@@ -246,6 -256,7 +256,7 @@@ config ARCH_INTEGRATO
        select GENERIC_CLOCKEVENTS
        select PLAT_VERSATILE
        select PLAT_VERSATILE_FPGA_IRQ
+       select NEED_MACH_MEMORY_H
        help
          Support for ARM's Integrator platform.
  
@@@ -261,6 -272,7 +272,7 @@@ config ARCH_REALVIE
        select PLAT_VERSATILE_CLCD
        select ARM_TIMER_SP804
        select GPIO_PL061 if GPIOLIB
+       select NEED_MACH_MEMORY_H
        help
          This enables support for ARM Ltd RealView boards.
  
@@@ -301,7 -313,6 +313,6 @@@ config ARCH_AT9
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_CLK
        select CLKDEV_LOOKUP
-       select ARM_PATCH_PHYS_VIRT if MMU
        help
          This enables support for systems based on the Atmel AT91RM9200,
          AT91SAM9 and AT91CAP9 processors.
@@@ -322,6 -333,7 +333,7 @@@ config ARCH_CLPS711
        bool "Cirrus Logic CLPS711x/EP721x-based"
        select CPU_ARM720T
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          Support for Cirrus Logic 711x/721x based boards.
  
@@@ -362,6 -374,7 +374,7 @@@ config ARCH_EBSA11
        select ISA
        select NO_IOPORT
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          This is an evaluation board for the StrongARM processor available
          from Digital. It has limited hardware on-board, including an
@@@ -377,6 -390,7 +390,7 @@@ config ARCH_EP93X
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_HAS_HOLES_MEMORYMODEL
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MEMORY_H
        help
          This enables support for the Cirrus EP93xx series of CPUs.
  
@@@ -385,6 -399,7 +399,7 @@@ config ARCH_FOOTBRIDG
        select CPU_SA110
        select FOOTBRIDGE
        select GENERIC_CLOCKEVENTS
+       select NEED_MACH_MEMORY_H
        help
          Support for systems based on the DC21285 companion chip
          ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
@@@ -434,6 -449,7 +449,7 @@@ config ARCH_IOP13X
        select PCI
        select ARCH_SUPPORTS_MSI
        select VMSPLIT_1G
+       select NEED_MACH_MEMORY_H
        help
          Support for Intel's IOP13XX (XScale) family of processors.
  
@@@ -464,6 -480,7 +480,7 @@@ config ARCH_IXP23X
        select CPU_XSC3
        select PCI
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          Support for Intel's IXP23xx (XScale) family of processors.
  
@@@ -473,6 -490,7 +490,7 @@@ config ARCH_IXP200
        select CPU_XSCALE
        select PCI
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          Support for Intel's IXP2400/2800 (XScale) family of processors.
  
@@@ -566,6 -584,7 +584,7 @@@ config ARCH_KS869
        select CPU_ARM922T
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
          System-on-Chip devices.
@@@ -657,6 -676,7 +676,7 @@@ config ARCH_SHMOBIL
        select SPARSE_IRQ
        select MULTI_IRQ_HANDLER
        select PM_GENERIC_DOMAINS if PM
+       select NEED_MACH_MEMORY_H
        help
          Support for Renesas's SH-Mobile and R-Mobile ARM platforms.
  
@@@ -671,6 -691,7 +691,7 @@@ config ARCH_RP
        select NO_IOPORT
        select ARCH_SPARSEMEM_ENABLE
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@@ -689,6 -710,7 +710,7 @@@ config ARCH_SA110
        select HAVE_SCHED_CLOCK
        select TICK_ONESHOT
        select ARCH_REQUIRE_GPIOLIB
+       select NEED_MACH_MEMORY_H
        help
          Support for StrongARM 11x0 based boards.
  
@@@ -724,6 -746,9 +746,6 @@@ config ARCH_S3C64X
        select SAMSUNG_IRQ_VIC_TIMER
        select SAMSUNG_IRQ_UART
        select S3C_GPIO_TRACK
 -      select S3C_GPIO_PULL_UPDOWN
 -      select S3C_GPIO_CFG_S3C24XX
 -      select S3C_GPIO_CFG_S3C64XX
        select S3C_DEV_NAND
        select USB_ARCH_HAS_OHCI
        select SAMSUNG_GPIOLIB_4BIT
@@@ -778,6 -803,7 +800,7 @@@ config ARCH_S5PV21
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
+       select NEED_MACH_MEMORY_H
        help
          Samsung S5PV210/S5PC110 series based systems
  
@@@ -794,6 -820,7 +817,7 @@@ config ARCH_EXYNOS
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
+       select NEED_MACH_MEMORY_H
        help
          Samsung EXYNOS4 series based systems
  
@@@ -805,6 -832,7 +829,7 @@@ config ARCH_SHAR
        select ZONE_DMA
        select PCI
        select ARCH_USES_GETTIMEOFFSET
+       select NEED_MACH_MEMORY_H
        help
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
@@@ -832,6 -860,7 +857,7 @@@ config ARCH_U30
        select CLKDEV_LOOKUP
        select HAVE_MACH_CLKDEV
        select GENERIC_GPIO
+       select NEED_MACH_MEMORY_H
        help
          Support for ST-Ericsson U300 series mobile platforms.
  
@@@ -1268,32 -1297,6 +1294,32 @@@ config ARM_ERRATA_75432
          This workaround defines cpu_relax() as smp_mb(), preventing correctly
          written polling loops from denying visibility of updates to memory.
  
 +config ARM_ERRATA_364296
 +      bool "ARM errata: Possible cache data corruption with hit-under-miss enabled"
 +      depends on CPU_V6 && !SMP
 +      help
 +        This options enables the workaround for the 364296 ARM1136
 +        r0p2 erratum (possible cache data corruption with
 +        hit-under-miss enabled). It sets the undocumented bit 31 in
 +        the auxiliary control register and the FI bit in the control
 +        register, thus disabling hit-under-miss without putting the
 +        processor into full low interrupt latency mode. ARM11MPCore
 +        is not affected.
 +
 +config ARM_ERRATA_764369
 +      bool "ARM errata: Data cache line maintenance operation by MVA may not succeed"
 +      depends on CPU_V7 && SMP
 +      help
 +        This option enables the workaround for erratum 764369
 +        affecting Cortex-A9 MPCore with two or more processors (all
 +        current revisions). Under certain timing circumstances, a data
 +        cache line maintenance operation by MVA targeting an Inner
 +        Shareable memory region may fail to proceed up to either the
 +        Point of Coherency or to the Point of Unification of the
 +        system. This workaround adds a DSB instruction before the
 +        relevant cache maintenance functions and sets a specific bit
 +        in the diagnostic control register of the SCU.
 +
  endmenu
  
  source "arch/arm/common/Kconfig"
@@@ -2093,7 -2096,7 +2119,7 @@@ menu "Power management options
  source "kernel/power/Kconfig"
  
  config ARCH_SUSPEND_POSSIBLE
 -      depends on !ARCH_S5P64X0 && !ARCH_S5PC100
 +      depends on !ARCH_S5PC100
        depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
                CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
        def_bool y
diff --combined arch/arm/kernel/setup.c
index e514c76043b4d2f5af4638f44b889bb2737dc5ad,78d197d6ec344bd4b5a3ac73a485045c35a3842d..6136144f8f8dc867d41c98b2318495f06a68a78c
@@@ -280,19 -280,18 +280,19 @@@ static void __init cacheid_init(void
        if (arch >= CPU_ARCH_ARMv6) {
                if ((cachetype & (7 << 29)) == 4 << 29) {
                        /* ARMv7 register format */
 +                      arch = CPU_ARCH_ARMv7;
                        cacheid = CACHEID_VIPT_NONALIASING;
                        if ((cachetype & (3 << 14)) == 1 << 14)
                                cacheid |= CACHEID_ASID_TAGGED;
 -                      else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7))
 -                              cacheid |= CACHEID_VIPT_I_ALIASING;
 -              } else if (cachetype & (1 << 23)) {
 -                      cacheid = CACHEID_VIPT_ALIASING;
                } else {
 -                      cacheid = CACHEID_VIPT_NONALIASING;
 -                      if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6))
 -                              cacheid |= CACHEID_VIPT_I_ALIASING;
 +                      arch = CPU_ARCH_ARMv6;
 +                      if (cachetype & (1 << 23))
 +                              cacheid = CACHEID_VIPT_ALIASING;
 +                      else
 +                              cacheid = CACHEID_VIPT_NONALIASING;
                }
 +              if (cpu_has_aliasing_icache(arch))
 +                      cacheid |= CACHEID_VIPT_I_ALIASING;
        } else {
                cacheid = CACHEID_VIVT;
        }
@@@ -820,25 -819,8 +820,8 @@@ static struct machine_desc * __init set
  
        if (__atags_pointer)
                tags = phys_to_virt(__atags_pointer);
-       else if (mdesc->boot_params) {
- #ifdef CONFIG_MMU
-               /*
-                * We still are executing with a minimal MMU mapping created
-                * with the presumption that the machine default for this
-                * is located in the first MB of RAM.  Anything else will
-                * fault and silently hang the kernel at this point.
-                */
-               if (mdesc->boot_params < PHYS_OFFSET ||
-                   mdesc->boot_params >= PHYS_OFFSET + SZ_1M) {
-                       printk(KERN_WARNING
-                              "Default boot params at physical 0x%08lx out of reach\n",
-                              mdesc->boot_params);
-               } else
- #endif
-               {
-                       tags = phys_to_virt(mdesc->boot_params);
-               }
-       }
+       else if (mdesc->atag_offset)
+               tags = (void *)(PAGE_OFFSET + mdesc->atag_offset);
  
  #if defined(CONFIG_DEPRECATED_PARAM_STRUCT)
        /*
index 008d51407cd71dbe5d3ad5c8cce4d3f27a85aa76,85a2c7e1e6846a15107cca5895467e3756ca416e..6e41cb5baeb4ee178fb37ca34e2f6da836138264
@@@ -115,32 -115,6 +115,32 @@@ static struct spi_board_info da850evm_s
        },
  };
  
 +#ifdef CONFIG_MTD
 +static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
 +{
 +      char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
 +      size_t retlen;
 +
 +      if (!strcmp(mtd->name, "MAC-Address")) {
 +              mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
 +              if (retlen == ETH_ALEN)
 +                      pr_info("Read MAC addr from SPI Flash: %pM\n",
 +                              mac_addr);
 +      }
 +}
 +
 +static struct mtd_notifier da850evm_spi_notifier = {
 +      .add    = da850_evm_m25p80_notify_add,
 +};
 +
 +static void da850_evm_setup_mac_addr(void)
 +{
 +      register_mtd_user(&da850evm_spi_notifier);
 +}
 +#else
 +static void da850_evm_setup_mac_addr(void) { }
 +#endif
 +
  static struct mtd_partition da850_evm_norflash_partition[] = {
        {
                .name           = "bootloaders + env",
@@@ -1270,8 -1244,6 +1270,8 @@@ static __init void da850_evm_init(void
        if (ret)
                pr_warning("da850_evm_init: sata registration failed: %d\n",
                                ret);
 +
 +      da850_evm_setup_mac_addr();
  }
  
  #ifdef CONFIG_SERIAL_8250_CONSOLE
@@@ -1291,7 -1263,7 +1291,7 @@@ static void __init da850_evm_map_io(voi
  }
  
  MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
-       .boot_params    = (DA8XX_DDR_BASE + 0x100),
+       .atag_offset    = 0x100,
        .map_io         = da850_evm_map_io,
        .init_irq       = cp_intc_init,
        .timer          = &davinci_timer,
index 5f1e045a3ad1a6e6ffc05d23fb95ff835e97f1b6,574028995545e90cce8b564f1794c8fa2f5935ae..d4e9316ecacbdca92c627b9e706b10f5a520b24a
@@@ -22,7 -22,7 +22,7 @@@
  #include <linux/linkage.h>
  #include <asm/assembler.h>
  #include <mach/psc.h>
- #include <mach/memory.h>
+ #include <mach/ddr2.h>
  
  #include "clock.h"
  
@@@ -217,11 -217,7 +217,11 @@@ ddr2clk_stop_done
  ENDPROC(davinci_ddr_psc_config)
  
  CACHE_FLUSH:
 -      .word   arm926_flush_kern_cache_all
 +#ifdef CONFIG_CPU_V6
 +      .word   v6_flush_kern_cache_all
 +#else
 +      .word   arm926_flush_kern_cache_all
 +#endif
  
  ENTRY(davinci_cpu_suspend_sz)
        .word   . - davinci_cpu_suspend
index bbd13f454151bcee0bbbd1a732df19693cafedf2,6e0536818bf5844f500e902d40783d67f61c7bc0..2204911a24e97241fd73d4ba2c3cdf707f429054
  #include <asm/mach-types.h>
  
  #include <plat/adc.h>
 +#include <plat/regs-fb-v4.h>
  #include <plat/regs-serial.h>
  #include <plat/exynos4.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
 +#include <plat/fb.h>
  #include <plat/sdhci.h>
  #include <plat/ehci.h>
  #include <plat/clock.h>
@@@ -201,33 -199,6 +201,33 @@@ static struct platform_device nuri_gpio
        },
  };
  
 +/* Frame Buffer */
 +static struct s3c_fb_pd_win nuri_fb_win0 = {
 +      .win_mode = {
 +              .left_margin    = 64,
 +              .right_margin   = 16,
 +              .upper_margin   = 64,
 +              .lower_margin   = 1,
 +              .hsync_len      = 48,
 +              .vsync_len      = 3,
 +              .xres           = 1280,
 +              .yres           = 800,
 +              .refresh        = 60,
 +      },
 +      .max_bpp        = 24,
 +      .default_bpp    = 16,
 +      .virtual_x      = 1280,
 +      .virtual_y      = 800,
 +};
 +
 +static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
 +      .win[0]         = &nuri_fb_win0,
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
 +                        VIDCON0_CLKSEL_LCD,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
 +};
 +
  static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
  {
        int gpio = EXYNOS4_GPE1(5);
@@@ -1121,7 -1092,6 +1121,7 @@@ static struct platform_device *nuri_dev
        /* Samsung Platform Devices */
        &s3c_device_i2c5, /* PMIC should initialize first */
        &emmc_fixed_voltage,
 +      &s5p_device_fimd0,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc2,
        &s3c_device_hsmmc3,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_pd[PD_MFC],
 +      &exynos4_device_pd[PD_LCD0],
  
        /* NURI Devices */
        &nuri_gpio_keys,
@@@ -1173,20 -1142,17 +1173,20 @@@ static void __init nuri_machine_init(vo
        i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
        i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
  
 +      s5p_fimd0_set_platdata(&nuri_fb_pdata);
 +
        nuri_ehci_init();
        clk_xusbxti.rate = 24000000;
  
        /* Last */
        platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
        s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 +      s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
  }
  
  MACHINE_START(NURI, "NURI")
        /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
-       .boot_params    = S5P_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = exynos4_init_irq,
        .map_io         = nuri_map_io,
        .init_machine   = nuri_machine_init,
index 2096c8bf0377b7fb52b093435f8c6e8448eb82f2,d7ec84d586f24af1989bd5274b6758bd9f6c9393..a2a177ff4b44fa324f948e61eafbaf7225cb0570
@@@ -13,7 -13,6 +13,7 @@@
  #include <linux/i2c.h>
  #include <linux/gpio_keys.h>
  #include <linux/gpio.h>
 +#include <linux/fb.h>
  #include <linux/mfd/max8998.h>
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
  #include <plat/devs.h>
  #include <plat/iic.h>
  #include <plat/gpio-cfg.h>
 +#include <plat/fb.h>
  #include <plat/mfc.h>
  #include <plat/sdhci.h>
  #include <plat/pd.h>
 +#include <plat/regs-fb-v4.h>
 +#include <plat/fimc-core.h>
 +#include <plat/camport.h>
 +#include <plat/mipi_csis.h>
  
  #include <mach/map.h>
  
 +#include <media/v4l2-mediabus.h>
 +#include <media/s5p_fimc.h>
 +#include <media/m5mols.h>
 +
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define UNIVERSAL_UCON_DEFAULT        (S3C2410_UCON_TXILEVEL |        \
                                 S3C2410_UCON_RXILEVEL |        \
@@@ -89,7 -79,7 +89,7 @@@ static struct s3c2410_uartcfg universal
  };
  
  static struct regulator_consumer_supply max8952_consumer =
 -      REGULATOR_SUPPLY("vddarm", NULL);
 +      REGULATOR_SUPPLY("vdd_arm", NULL);
  
  static struct max8952_platform_data universal_max8952_pdata __initdata = {
        .gpio_vid0      = EXYNOS4_GPX0(3),
  };
  
  static struct regulator_consumer_supply lp3974_buck1_consumer =
 -      REGULATOR_SUPPLY("vddint", NULL);
 +      REGULATOR_SUPPLY("vdd_int", NULL);
  
  static struct regulator_consumer_supply lp3974_buck2_consumer =
        REGULATOR_SUPPLY("vddg3d", NULL);
  
 +static struct regulator_consumer_supply lp3974_buck3_consumer =
 +      REGULATOR_SUPPLY("vdet", "s5p-sdo");
 +
  static struct regulator_init_data lp3974_buck1_data = {
        .constraints    = {
                .name           = "VINT_1.1V",
@@@ -166,8 -153,6 +166,8 @@@ static struct regulator_init_data lp397
                        .enabled        = 1,
                },
        },
 +      .num_consumer_supplies = 1,
 +      .consumer_supplies = &lp3974_buck3_consumer,
  };
  
  static struct regulator_init_data lp3974_buck4_data = {
@@@ -196,12 -181,6 +196,12 @@@ static struct regulator_init_data lp397
        },
  };
  
 +static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
 +      REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
 +      REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
 +      REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
 +};
 +
  static struct regulator_init_data lp3974_ldo3_data = {
        .constraints    = {
                .name           = "VUSB+MIPI_1.1V",
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo3_consumer),
 +      .consumer_supplies = lp3974_ldo3_consumer,
 +};
 +
 +static struct regulator_consumer_supply lp3974_ldo4_consumer[] = {
 +      REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"),
  };
  
  static struct regulator_init_data lp3974_ldo4_data = {
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo4_consumer),
 +      .consumer_supplies = lp3974_ldo4_consumer,
  };
  
  static struct regulator_init_data lp3974_ldo5_data = {
@@@ -262,10 -233,6 +262,10 @@@ static struct regulator_init_data lp397
        },
  };
  
 +static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
 +      REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
 +};
 +
  static struct regulator_init_data lp3974_ldo7_data = {
        .constraints    = {
                .name           = "VLCD+VMIPI_1.8V",
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies  = ARRAY_SIZE(lp3974_ldo7_consumer),
 +      .consumer_supplies      = lp3974_ldo7_consumer,
 +};
 +
 +static struct regulator_consumer_supply lp3974_ldo8_consumer[] = {
 +      REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
  };
  
  static struct regulator_init_data lp3974_ldo8_data = {
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo8_consumer),
 +      .consumer_supplies = lp3974_ldo8_consumer,
  };
  
  static struct regulator_init_data lp3974_ldo9_data = {
@@@ -327,9 -286,6 +327,9 @@@ static struct regulator_init_data lp397
        },
  };
  
 +static struct regulator_consumer_supply lp3974_ldo11_consumer =
 +      REGULATOR_SUPPLY("dig_28", "0-001f");
 +
  static struct regulator_init_data lp3974_ldo11_data = {
        .constraints    = {
                .name           = "CAM_AF_3.3V",
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies  = 1,
 +      .consumer_supplies      = &lp3974_ldo11_consumer,
  };
  
  static struct regulator_init_data lp3974_ldo12_data = {
@@@ -371,9 -325,6 +371,9 @@@ static struct regulator_init_data lp397
        },
  };
  
 +static struct regulator_consumer_supply lp3974_ldo14_consumer =
 +      REGULATOR_SUPPLY("dig_18", "0-001f");
 +
  static struct regulator_init_data lp3974_ldo14_data = {
        .constraints    = {
                .name           = "CAM_I_HOST_1.8V",
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies  = 1,
 +      .consumer_supplies      = &lp3974_ldo14_consumer,
  };
  
 +
 +static struct regulator_consumer_supply lp3974_ldo15_consumer =
 +      REGULATOR_SUPPLY("dig_12", "0-001f");
 +
  static struct regulator_init_data lp3974_ldo15_data = {
        .constraints    = {
                .name           = "CAM_S_DIG+FM33_CORE_1.2V",
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies  = 1,
 +      .consumer_supplies      = &lp3974_ldo15_consumer,
 +};
 +
 +static struct regulator_consumer_supply lp3974_ldo16_consumer[] = {
 +      REGULATOR_SUPPLY("a_sensor", "0-001f"),
  };
  
  static struct regulator_init_data lp3974_ldo16_data = {
                        .disabled       = 1,
                },
        },
 +      .num_consumer_supplies  = ARRAY_SIZE(lp3974_ldo16_consumer),
 +      .consumer_supplies      = lp3974_ldo16_consumer,
  };
  
  static struct regulator_init_data lp3974_ldo17_data = {
@@@ -535,43 -472,6 +535,43 @@@ static struct max8998_platform_data uni
        .wakeup                 = true,
  };
  
 +
 +enum fixed_regulator_id {
 +      FIXED_REG_ID_MMC0,
 +      FIXED_REG_ID_HDMI_5V,
 +      FIXED_REG_ID_CAM_S_IF,
 +      FIXED_REG_ID_CAM_I_CORE,
 +      FIXED_REG_ID_CAM_VT_DIO,
 +};
 +
 +static struct regulator_consumer_supply hdmi_fixed_consumer =
 +      REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi");
 +
 +static struct regulator_init_data hdmi_fixed_voltage_init_data = {
 +      .constraints            = {
 +              .name           = "HDMI_5V",
 +              .valid_ops_mask = REGULATOR_CHANGE_STATUS,
 +      },
 +      .num_consumer_supplies  = 1,
 +      .consumer_supplies      = &hdmi_fixed_consumer,
 +};
 +
 +static struct fixed_voltage_config hdmi_fixed_voltage_config = {
 +      .supply_name            = "HDMI_EN1",
 +      .microvolts             = 5000000,
 +      .gpio                   = EXYNOS4_GPE0(1),
 +      .enable_high            = true,
 +      .init_data              = &hdmi_fixed_voltage_init_data,
 +};
 +
 +static struct platform_device hdmi_fixed_voltage = {
 +      .name                   = "reg-fixed-voltage",
 +      .id                     = FIXED_REG_ID_HDMI_5V,
 +      .dev                    = {
 +              .platform_data  = &hdmi_fixed_voltage_config,
 +      },
 +};
 +
  /* GPIO I2C 5 (PMIC) */
  static struct i2c_board_info i2c5_devs[] __initdata = {
        {
@@@ -673,11 -573,6 +673,11 @@@ static void __init universal_touchkey_i
        gpio_direction_output(gpio, 1);
  }
  
 +static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = {
 +      .frequency      = 300 * 1000,
 +      .sda_delay      = 200,
 +};
 +
  /* GPIO KEYS */
  static struct gpio_keys_button universal_gpio_keys_tables[] = {
        {
@@@ -763,7 -658,7 +763,7 @@@ static struct fixed_voltage_config mmc0
  
  static struct platform_device mmc0_fixed_voltage = {
        .name                   = "reg-fixed-voltage",
 -      .id                     = 0,
 +      .id                     = FIXED_REG_ID_MMC0,
        .dev                    = {
                .platform_data  = &mmc0_fixed_voltage_config,
        },
@@@ -797,165 -692,18 +797,165 @@@ static void __init universal_sdhci_init
        s3c_sdhci3_set_platdata(&universal_hsmmc3_data);
  }
  
 -/* I2C0 */
 -static struct i2c_board_info i2c0_devs[] __initdata = {
 -      /* Camera, To be updated */
 -};
 -
  /* I2C1 */
  static struct i2c_board_info i2c1_devs[] __initdata = {
        /* Gyro, To be updated */
  };
  
 +/* Frame Buffer */
 +static struct s3c_fb_pd_win universal_fb_win0 = {
 +      .win_mode = {
 +              .left_margin    = 16,
 +              .right_margin   = 16,
 +              .upper_margin   = 2,
 +              .lower_margin   = 28,
 +              .hsync_len      = 2,
 +              .vsync_len      = 1,
 +              .xres           = 480,
 +              .yres           = 800,
 +              .refresh        = 55,
 +      },
 +      .max_bpp        = 32,
 +      .default_bpp    = 16,
 +};
 +
 +static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
 +      .win[0]         = &universal_fb_win0,
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
 +                        VIDCON0_CLKSEL_LCD,
 +      .vidcon1        = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
 +                        | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
 +};
 +
 +static struct regulator_consumer_supply cam_i_core_supply =
 +      REGULATOR_SUPPLY("core", "0-001f");
 +
 +static struct regulator_init_data cam_i_core_reg_init_data = {
 +      .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
 +      .num_consumer_supplies = 1,
 +      .consumer_supplies = &cam_i_core_supply,
 +};
 +
 +static struct fixed_voltage_config cam_i_core_fixed_voltage_cfg = {
 +      .supply_name    = "CAM_I_CORE_1.2V",
 +      .microvolts     = 1200000,
 +      .gpio           = EXYNOS4_GPE2(2),      /* CAM_8M_CORE_EN */
 +      .enable_high    = 1,
 +      .init_data      = &cam_i_core_reg_init_data,
 +};
 +
 +static struct platform_device cam_i_core_fixed_reg_dev = {
 +      .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_I_CORE,
 +      .dev = { .platform_data = &cam_i_core_fixed_voltage_cfg },
 +};
 +
 +static struct regulator_consumer_supply cam_s_if_supply =
 +      REGULATOR_SUPPLY("d_sensor", "0-001f");
 +
 +static struct regulator_init_data cam_s_if_reg_init_data = {
 +      .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
 +      .num_consumer_supplies = 1,
 +      .consumer_supplies = &cam_s_if_supply,
 +};
 +
 +static struct fixed_voltage_config cam_s_if_fixed_voltage_cfg = {
 +      .supply_name    = "CAM_S_IF_1.8V",
 +      .microvolts     = 1800000,
 +      .gpio           = EXYNOS4_GPE3(0),      /* CAM_PWR_EN1 */
 +      .enable_high    = 1,
 +      .init_data      = &cam_s_if_reg_init_data,
 +};
 +
 +static struct platform_device cam_s_if_fixed_reg_dev = {
 +      .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_S_IF,
 +      .dev = { .platform_data = &cam_s_if_fixed_voltage_cfg },
 +};
 +
 +static struct s5p_platform_mipi_csis mipi_csis_platdata = {
 +      .clk_rate       = 166000000UL,
 +      .lanes          = 2,
 +      .alignment      = 32,
 +      .hs_settle      = 12,
 +      .phy_enable     = s5p_csis_phy_enable,
 +};
 +
 +#define GPIO_CAM_LEVEL_EN(n)  EXYNOS4_GPE4(n + 3)
 +#define GPIO_CAM_8M_ISP_INT   EXYNOS4_GPX1(5) /* XEINT_13 */
 +#define GPIO_CAM_MEGA_nRST    EXYNOS4_GPE2(5)
 +
 +static int m5mols_set_power(struct device *dev, int on)
 +{
 +      gpio_set_value(GPIO_CAM_LEVEL_EN(1), !on);
 +      gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
 +      return 0;
 +}
 +
 +static struct m5mols_platform_data m5mols_platdata = {
 +      .gpio_reset     = GPIO_CAM_MEGA_nRST,
 +      .reset_polarity = 0,
 +      .set_power      = m5mols_set_power,
 +};
 +
 +static struct i2c_board_info m5mols_board_info = {
 +      I2C_BOARD_INFO("M5MOLS", 0x1F),
 +      .platform_data = &m5mols_platdata,
 +};
 +
 +static struct s5p_fimc_isp_info universal_camera_sensors[] = {
 +      {
 +              .mux_id         = 0,
 +              .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
 +                                V4L2_MBUS_VSYNC_ACTIVE_LOW,
 +              .bus_type       = FIMC_MIPI_CSI2,
 +              .board_info     = &m5mols_board_info,
 +              .i2c_bus_num    = 0,
 +              .clk_frequency  = 21600000UL,
 +              .csi_data_align = 32,
 +      },
 +};
 +
 +static struct s5p_platform_fimc fimc_md_platdata = {
 +      .isp_info       = universal_camera_sensors,
 +      .num_clients    = ARRAY_SIZE(universal_camera_sensors),
 +};
 +
 +static struct gpio universal_camera_gpios[] = {
 +      { GPIO_CAM_LEVEL_EN(1), GPIOF_OUT_INIT_HIGH, "CAM_LVL_EN1" },
 +      { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW,  "CAM_LVL_EN2" },
 +      { GPIO_CAM_8M_ISP_INT,  GPIOF_IN,            "8M_ISP_INT"  },
 +      { GPIO_CAM_MEGA_nRST,   GPIOF_OUT_INIT_LOW,  "CAM_8M_NRST" },
 +};
 +
 +static void universal_camera_init(void)
 +{
 +      s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
 +                       &s5p_device_mipi_csis0);
 +      s3c_set_platdata(&fimc_md_platdata,  sizeof(fimc_md_platdata),
 +                       &s5p_device_fimc_md);
 +
 +      if (gpio_request_array(universal_camera_gpios,
 +                             ARRAY_SIZE(universal_camera_gpios))) {
 +              pr_err("%s: GPIO request failed\n", __func__);
 +              return;
 +      }
 +
 +      if (!s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xf)))
 +              m5mols_board_info.irq = gpio_to_irq(GPIO_CAM_8M_ISP_INT);
 +      else
 +              pr_err("Failed to configure 8M_ISP_INT GPIO\n");
 +
 +      /* Free GPIOs controlled directly by the sensor drivers. */
 +      gpio_free(GPIO_CAM_MEGA_nRST);
 +      gpio_free(GPIO_CAM_8M_ISP_INT);
 +
 +      if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A))
 +              pr_err("Camera port A setup failed\n");
 +}
 +
  static struct platform_device *universal_devices[] __initdata = {
        /* Samsung Platform Devices */
 +      &s5p_device_mipi_csis0,
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc2,
        &s3c_device_hsmmc3,
 +      &s3c_device_i2c0,
        &s3c_device_i2c3,
        &s3c_device_i2c5,
 +      &s5p_device_i2c_hdmiphy,
 +      &hdmi_fixed_voltage,
 +      &exynos4_device_pd[PD_TV],
 +      &s5p_device_hdmi,
 +      &s5p_device_sdo,
 +      &s5p_device_mixer,
  
        /* Universal Devices */
        &i2c_gpio12,
        &universal_gpio_keys,
        &s5p_device_onenand,
 +      &s5p_device_fimd0,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_pd[PD_MFC],
 +      &exynos4_device_pd[PD_LCD0],
 +      &exynos4_device_pd[PD_CAM],
 +      &cam_i_core_fixed_reg_dev,
 +      &cam_s_if_fixed_reg_dev,
 +      &s5p_device_fimc_md,
  };
  
  static void __init universal_map_io(void)
        s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
  }
  
 +void s5p_tv_setup(void)
 +{
 +      /* direct HPD to HDMI chip */
 +      gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
 +
 +      gpio_direction_input(EXYNOS4_GPX3(7));
 +      s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
 +      s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
 +
 +      /* setup dependencies between TV devices */
 +      s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
 +      s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
 +}
 +
  static void __init universal_reserve(void)
  {
        s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
  static void __init universal_machine_init(void)
  {
        universal_sdhci_init();
 +      s5p_tv_setup();
  
 -      i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
 +      s3c_i2c0_set_platdata(&universal_i2c0_platdata);
        i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
  
        universal_tsp_init();
        i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
  
        s3c_i2c5_set_platdata(NULL);
 +      s5p_i2c_hdmiphy_set_platdata(NULL);
        i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
  
 +      s5p_fimd0_set_platdata(&universal_lcd_pdata);
 +
        universal_touchkey_init();
        i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
                        ARRAY_SIZE(i2c_gpio12_devs));
  
 +      universal_camera_init();
 +
        /* Last */
        platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
 +
        s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 +      s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
 +
 +      s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 +      s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 +      s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 +      s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 +      s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
  }
  
  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
        /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
-       .boot_params    = S5P_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = exynos4_init_irq,
        .map_io         = universal_map_io,
        .init_machine   = universal_machine_init,
index f851fe903687dc09c45c51228dcb06d3606679a0,881add0fbe5bb33adc96f8fee03c516346020086..b1ec2cf53bb0df1696e09c32f125ede230fc7021
@@@ -310,8 -310,8 +310,8 @@@ static struct sys_timer eukrea_cpuimx27
        .init = eukrea_cpuimx27_timer_init,
  };
  
 -MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
 +MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
-       .boot_params = MX27_PHYS_OFFSET + 0x100,
+       .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
index 4bd083ba9af218077aae1381b5fbef716aa625e6,10b89139da4853961a745ede3f0f48f47d5ea034..470b654b0e6eef12cba24b29d34faf112e3fa5c9
@@@ -192,9 -192,9 +192,9 @@@ struct sys_timer eukrea_cpuimx35_timer 
        .init   = eukrea_cpuimx35_timer_init,
  };
  
 -MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
 +MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
        /* Maintainer: Eukrea Electromatique */
-       .boot_params = MX3x_PHYS_OFFSET + 0x100,
+       .atag_offset = 0x100,
        .map_io = mx35_map_io,
        .init_early = imx35_init_early,
        .init_irq = mx35_init_irq,
index 2442d5da883d075259d8add3e927c9ad270b9314,d8699b54268d9f5aaf520e570a0ac01837feb212..9163318e95a2bb24862c2bab29f2434dfc03a3d7
@@@ -161,9 -161,9 +161,9 @@@ static struct sys_timer eukrea_cpuimx25
        .init   = eukrea_cpuimx25_timer_init,
  };
  
 -MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25")
 +MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
        /* Maintainer: Eukrea Electromatique */
-       .boot_params = MX25_PHYS_OFFSET + 0x100,
+       .atag_offset = 0x100,
        .map_io = mx25_map_io,
        .init_early = imx25_init_early,
        .init_irq = mx25_init_irq,
index 8cdc730dcb3a1bc273da69cc036c974f6cf34ca6,eaa95bdadcacbe14a53e44a9221a3e61ea82b8a9..a20fb3f2bc45802f6d728ef162305d8cfd2727d6
@@@ -32,7 -32,6 +32,7 @@@
  #include <linux/interrupt.h>
  #include <linux/io.h>
  #include <linux/mtd/physmap.h>
 +#include <video/vga.h>
  
  #include <mach/hardware.h>
  #include <mach/platform.h>
@@@ -155,7 -154,6 +155,7 @@@ static struct map_desc ap_io_desc[] __i
  static void __init ap_map_io(void)
  {
        iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc));
 +      vga_base = PCI_MEMORY_VADDR;
  }
  
  #define INTEGRATOR_SC_VALID_INT       0x003fffff
@@@ -339,15 -337,15 +339,15 @@@ static unsigned long timer_reload
  static void integrator_clocksource_init(u32 khz)
  {
        void __iomem *base = (void __iomem *)TIMER2_VA_BASE;
 -      u32 ctrl = TIMER_CTRL_ENABLE;
 +      u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
  
        if (khz >= 1500) {
                khz /= 16;
 -              ctrl = TIMER_CTRL_DIV16;
 +              ctrl |= TIMER_CTRL_DIV16;
        }
  
 -      writel(ctrl, base + TIMER_CTRL);
        writel(0xffff, base + TIMER_LOAD);
 +      writel(ctrl, base + TIMER_CTRL);
  
        clocksource_mmio_init(base + TIMER_VALUE, "timer2",
                khz * 1000, 200, 16, clocksource_mmio_readl_down);
@@@ -459,7 -457,7 +459,7 @@@ static struct sys_timer ap_timer = 
  
  MACHINE_START(INTEGRATOR, "ARM-Integrator")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = 0x00000100,
+       .atag_offset    = 0x100,
        .reserve        = integrator_reserve,
        .map_io         = ap_map_io,
        .init_early     = integrator_init_early,
index 44277370806e0bac1cf7a1ee3cf40a15a031771d,eb36b25450a0b6ec147db925c7d861f81542bf63..8987b3fe2eb72223f94b3acec71fdfede4f1f925
@@@ -135,6 -135,12 +135,6 @@@ void ams_delta_latch2_write(u16 mask, u
        *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
  }
  
 -static void __init ams_delta_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static struct map_desc ams_delta_io_desc[] __initdata = {
        /* AMS_DELTA_LATCH1 */
        {
@@@ -373,13 -379,17 +373,13 @@@ static int __init ams_delta_modem_init(
  }
  arch_initcall(ams_delta_modem_init);
  
 -static void __init ams_delta_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
        /* Maintainer: Jonathan McDowell <noodles@earth.li> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = ams_delta_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = ams_delta_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = ams_delta_init,
        .timer          = &omap1_timer,
  MACHINE_END
index b09dfe6d6e8d8d8c191ac85436c40acdf04f2ada,999789c4811daea150041d6becdff308940846b9..c92fd164b05dc8f9a09947894b76f4ed5ae7255d
@@@ -297,39 -297,6 +297,39 @@@ static struct omap_board_config_kernel 
  
  static void __init omap_fsample_init(void)
  {
 +      /* Early, board-dependent init */
 +
 +      /*
 +       * Hold GSM Reset until needed
 +       */
 +      omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
 +
 +      /*
 +       * UARTs -> done automagically by 8250 driver
 +       */
 +
 +      /*
 +       * CSx timings, GPIO Mux ... setup
 +       */
 +
 +      /* Flash: CS0 timings setup */
 +      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
 +      omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
 +
 +      /*
 +       * Ethernet support through the debug board
 +       * CS1 timings setup
 +       */
 +      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
 +      omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
 +
 +      /*
 +       * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
 +       * It is used as the Ethernet controller interrupt
 +       */
 +      omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF,
 +                      OMAP7XX_IO_CONF_9);
 +
        fsample_init_smc91x();
  
        if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
        omap_register_i2c_bus(1, 100, NULL, 0);
  }
  
 -static void __init omap_fsample_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  /* Only FPGA needs to be mapped here. All others are done with ioremap */
  static struct map_desc omap_fsample_io_desc[] __initdata = {
        {
  
  static void __init omap_fsample_map_io(void)
  {
 -      omap1_map_common_io();
 +      omap15xx_map_io();
        iotable_init(omap_fsample_io_desc,
                     ARRAY_SIZE(omap_fsample_io_desc));
 -
 -      /* Early, board-dependent init */
 -
 -      /*
 -       * Hold GSM Reset until needed
 -       */
 -      omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
 -
 -      /*
 -       * UARTs -> done automagically by 8250 driver
 -       */
 -
 -      /*
 -       * CSx timings, GPIO Mux ... setup
 -       */
 -
 -      /* Flash: CS0 timings setup */
 -      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
 -      omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
 -
 -      /*
 -       * Ethernet support through the debug board
 -       * CS1 timings setup
 -       */
 -      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
 -      omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
 -
 -      /*
 -       * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
 -       * It is used as the Ethernet controller interrupt
 -       */
 -      omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9);
  }
  
  MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
  /* Maintainer: Brian Swetland <swetland@google.com> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
        .map_io         = omap_fsample_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_fsample_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_fsample_init,
        .timer          = &omap1_timer,
  MACHINE_END
index cc0cca7ee1996d6d5da94cc94a77a9e59ff012d3,23cc9e4ad50d539d17f2d35a898643373783ac18..5a9a54de41fab6f0d005272d30b744a6625efa3d
  #include <plat/board.h>
  #include <plat/common.h>
  
 -static void __init omap_generic_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  /* assume no Mini-AB port */
  
  #ifdef CONFIG_ARCH_OMAP15XX
@@@ -81,13 -87,17 +81,13 @@@ static void __init omap_generic_init(vo
        omap_register_i2c_bus(1, 100, NULL, 0);
  }
  
 -static void __init omap_generic_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
        /* Maintainer: Tony Lindgren <tony@atomide.com> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_generic_map_io,
 +      .map_io         = omap16xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_generic_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_generic_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 248a5b8e2865dabe17716c4dc493df934f92caf0,6c70c28d055cf966ae0c19d9ec595fc8ff8f894f..c8e1d4f6eeda48b9ed5d18c1fb2cca4a37fe0f8f
@@@ -373,6 -373,12 +373,6 @@@ static struct i2c_board_info __initdat
        },
  };
  
 -static void __init h2_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static struct omap_usb_config h2_usb_config __initdata = {
        /* usb1 has a Mini-AB port and external isp1301 transceiver */
        .otg            = 2,
@@@ -448,13 -454,17 +448,13 @@@ static void __init h2_init(void
        h2_mmc_init();
  }
  
 -static void __init h2_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_H2, "TI-H2")
        /* Maintainer: Imre Deak <imre.deak@nokia.com> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = h2_map_io,
 +      .map_io         = omap16xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = h2_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = h2_init,
        .timer          = &omap1_timer,
  MACHINE_END
index f28f05fe76766944e839e8758c530d68958244e9,8e2b64a46929bfc49f9a1a585d6c5341fcedca64..c88e1317620b1975aac4d81d94909e7022b4a75d
@@@ -436,13 -436,23 +436,13 @@@ static void __init h3_init(void
        h3_mmc_init();
  }
  
 -static void __init h3_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
 -static void __init h3_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
        /* Maintainer: Texas Instruments, Inc. */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = h3_map_io,
 +      .map_io         = omap16xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = h3_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = h3_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 67798dfc4f8da6dbd2d9b8a077faa731a8e19f04,e81ead1c89eadc7de583720b3541a33852c5eb96..e8eedd77fa67f3476bc323a90f4349b73bb8cfa5
@@@ -500,7 -500,7 +500,7 @@@ static void __init htcherald_lcd_init(v
  
  static void __init htcherald_map_io(void)
  {
 -      omap1_map_common_io();
 +      omap7xx_map_io();
  
        /*
         * The LCD panel must be disabled and DMA turned off here, as doing
@@@ -601,14 -601,20 +601,14 @@@ static void __init htcherald_init(void
  #endif
  }
  
 -static void __init htcherald_init_irq(void)
 -{
 -      printk(KERN_INFO "htcherald_init_irq.\n");
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  MACHINE_START(HERALD, "HTC Herald")
        /* Maintainer: Cory Maccarrone <darkstar6262@gmail.com> */
        /* Maintainer: wing-linux.sourceforge.net */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
        .map_io         = htcherald_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = htcherald_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = htcherald_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 3e349d0ce32ce281af965685d201ee8c79f131cf,8b034594fbc748e445294e1107eee9630f2cd788..88cf8baf9e78c7155288986f2f64f3f605f750bb
@@@ -289,6 -289,12 +289,6 @@@ static void __init innovator_init_smc91
        }
  }
  
 -static void __init innovator_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  #ifdef CONFIG_ARCH_OMAP15XX
  static struct omap_usb_config innovator1510_usb_config __initdata = {
        /* for bundled non-standard host and peripheral cables */
@@@ -433,32 -439,30 +433,32 @@@ static void __init innovator_init(void
        innovator_mmc_init();
  }
  
 +/*
 + * REVISIT: Assume 15xx for now, we don't want to do revision check
 + * until later on. The right way to fix this is to set up a different
 + * machine_id for 16xx Innovator, or use device tree.
 + */
  static void __init innovator_map_io(void)
  {
 -      omap1_map_common_io();
 +      omap15xx_map_io();
  
 -#ifdef CONFIG_ARCH_OMAP15XX
 -      if (cpu_is_omap1510()) {
 -              iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
 -              udelay(10);     /* Delay needed for FPGA */
 -
 -              /* Dump the Innovator FPGA rev early - useful info for support. */
 -              printk("Innovator FPGA Rev %d.%d Board Rev %d\n",
 -                     fpga_read(OMAP1510_FPGA_REV_HIGH),
 -                     fpga_read(OMAP1510_FPGA_REV_LOW),
 -                     fpga_read(OMAP1510_FPGA_BOARD_REV));
 -      }
 -#endif
 +      iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
 +      udelay(10);     /* Delay needed for FPGA */
 +
 +      /* Dump the Innovator FPGA rev early - useful info for support. */
 +      pr_debug("Innovator FPGA Rev %d.%d Board Rev %d\n",
 +                      fpga_read(OMAP1510_FPGA_REV_HIGH),
 +                      fpga_read(OMAP1510_FPGA_REV_LOW),
 +                      fpga_read(OMAP1510_FPGA_BOARD_REV));
  }
  
  MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
        /* Maintainer: MontaVista Software, Inc. */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
        .map_io         = innovator_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = innovator_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = innovator_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 9b348b6ee3eeba85456a5030fe06147b6025fcb0,6825635ac681980b678c3b3e38d4ea45242614a6..8990b5d78656111b7456f17861f597b02a537d17
  
  #define ADS7846_PENDOWN_GPIO  15
  
 -static void __init omap_nokia770_init_irq(void)
 -{
 -      /* On Nokia 770, the SleepX signal is masked with an
 -       * MPUIO line by default.  It has to be unmasked for it
 -       * to become functional */
 -
 -      /* SleepX mask direction */
 -      omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008);
 -      /* Unmask SleepX signal */
 -      omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
 -
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static const unsigned int nokia770_keymap[] = {
        KEY(1, 0, GROUP_0 | KEY_UP),
        KEY(2, 0, GROUP_1 | KEY_F5),
@@@ -231,15 -246,6 +231,15 @@@ static inline void nokia770_mmc_init(vo
  
  static void __init omap_nokia770_init(void)
  {
 +      /* On Nokia 770, the SleepX signal is masked with an
 +       * MPUIO line by default.  It has to be unmasked for it
 +       * to become functional */
 +
 +      /* SleepX mask direction */
 +      omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008);
 +      /* Unmask SleepX signal */
 +      omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
 +
        platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
        spi_register_board_info(nokia770_spi_board_info,
                                ARRAY_SIZE(nokia770_spi_board_info));
        nokia770_mmc_init();
  }
  
 -static void __init omap_nokia770_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(NOKIA770, "Nokia 770")
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_nokia770_map_io,
 +      .map_io         = omap16xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_nokia770_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_nokia770_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 562986e1874ff39b3ab94ef3834062d14b3fa870,44b8e9362bf4f7f2498ac83f1341c3d738a5c51d..3e12a697fa21c29284c1faf96e492913e20cd516
@@@ -279,6 -279,12 +279,6 @@@ static void __init osk_init_cf(void
        irq_set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_FALLING);
  }
  
 -static void __init osk_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static struct omap_usb_config osk_usb_config __initdata = {
        /* has usb host connector (A) ... for development it can also
         * be used, with a NONSTANDARD gender-bending cable/dongle, as
@@@ -570,13 -576,17 +570,13 @@@ static void __init osk_init(void
        osk_mistral_init();
  }
  
 -static void __init osk_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_OSK, "TI-OSK")
        /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = osk_map_io,
 +      .map_io         = omap16xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = osk_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = osk_init,
        .timer          = &omap1_timer,
  MACHINE_END
index fc9edd8595e9acd05376268efb10ced6168ff65c,3d8cd90b1dbb0fc5c1dd6593874708312eda6f87..4aa2d0efbc460e3472c4ffc1772de92765116838
  #define PALMTE_MMC2_GPIO      OMAP_MPUIO(7)
  #define PALMTE_MMC3_GPIO      OMAP_MPUIO(11)
  
 -static void __init omap_palmte_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static const unsigned int palmte_keymap[] = {
        KEY(0, 0, KEY_F1),              /* Calendar */
        KEY(1, 0, KEY_F2),              /* Contacts */
@@@ -263,12 -269,16 +263,12 @@@ static void __init omap_palmte_init(voi
        omap_register_i2c_bus(1, 100, NULL, 0);
  }
  
 -static void __init omap_palmte_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_palmte_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_palmte_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmte_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 5ff3def49a85ea5702f756f29ed64fd9b6b23867,d0eefe81cd1b0fe3f9e1bdbf5d111238f416b8c6..32254bdd00fd144ac8657515fb71aaebc04ced35
@@@ -263,6 -263,12 +263,6 @@@ static struct spi_board_info __initdat
        }
  };
  
 -static void __init omap_palmtt_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static struct omap_usb_config palmtt_usb_config __initdata = {
        .register_dev   = 1,
        .hmc_mode       = 0,
@@@ -309,12 -315,16 +309,12 @@@ static void __init omap_palmtt_init(voi
        omap_register_i2c_bus(1, 100, NULL, 0);
  }
  
 -static void __init omap_palmtt_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_palmtt_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_palmtt_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmtt_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 8e0887375f7eb5f830b56e22cbfc2459b9de9d0e,98e79bc0921386b79e00bceb998670d775639611..d41478d7e97bb068f09240b30c4075d5b9c5cae7
  #define PALMZ71_SLIDER_GPIO   OMAP_MPUIO(3)
  #define PALMZ71_MMC_IN_GPIO   OMAP_MPUIO(4)
  
 -static void __init
 -omap_palmz71_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
  static const unsigned int palmz71_keymap[] = {
        KEY(0, 0, KEY_F1),
        KEY(1, 0, KEY_F2),
@@@ -327,12 -334,17 +327,12 @@@ omap_palmz71_init(void
        palmz71_gpio_setup(0);
  }
  
 -static void __init
 -omap_palmz71_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_palmz71_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_palmz71_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmz71_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 6ed649b8b8d3579e255060b3941186ae36ca6e61,ad3a1567604e0496a83736604405d3a94547ec30..7506f349939a97792e2841a098a00b7a90bef10f
@@@ -265,39 -265,6 +265,39 @@@ static void __init perseus2_init_smc91x
  
  static void __init omap_perseus2_init(void)
  {
 +      /* Early, board-dependent init */
 +
 +      /*
 +       * Hold GSM Reset until needed
 +       */
 +      omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
 +
 +      /*
 +       * UARTs -> done automagically by 8250 driver
 +       */
 +
 +      /*
 +       * CSx timings, GPIO Mux ... setup
 +       */
 +
 +      /* Flash: CS0 timings setup */
 +      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
 +      omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
 +
 +      /*
 +       * Ethernet support through the debug board
 +       * CS1 timings setup
 +       */
 +      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
 +      omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
 +
 +      /*
 +       * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
 +       * It is used as the Ethernet controller interrupt
 +       */
 +      omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF,
 +                              OMAP7XX_IO_CONF_9);
 +
        perseus2_init_smc91x();
  
        if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
        omap_register_i2c_bus(1, 100, NULL, 0);
  }
  
 -static void __init omap_perseus2_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
  /* Only FPGA needs to be mapped here. All others are done with ioremap */
  static struct map_desc omap_perseus2_io_desc[] __initdata = {
        {
  
  static void __init omap_perseus2_map_io(void)
  {
 -      omap1_map_common_io();
 +      omap7xx_map_io();
        iotable_init(omap_perseus2_io_desc,
                     ARRAY_SIZE(omap_perseus2_io_desc));
 -
 -      /* Early, board-dependent init */
 -
 -      /*
 -       * Hold GSM Reset until needed
 -       */
 -      omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
 -
 -      /*
 -       * UARTs -> done automagically by 8250 driver
 -       */
 -
 -      /*
 -       * CSx timings, GPIO Mux ... setup
 -       */
 -
 -      /* Flash: CS0 timings setup */
 -      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
 -      omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
 -
 -      /*
 -       * Ethernet support through the debug board
 -       * CS1 timings setup
 -       */
 -      omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
 -      omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
 -
 -      /*
 -       * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
 -       * It is used as the Ethernet controller interrupt
 -       */
 -      omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9);
  }
  
  MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
        /* Maintainer: Kevin Hilman <kjh@hilman.org> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
        .map_io         = omap_perseus2_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_perseus2_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_perseus2_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 23326e04d6b90ab9eaeaf7f6ba79c8a19f79fd96,602b55c39d3d0ef566a23ec69e6bbd5b6e176bae..bdf3b85142bfffc005d51788adbf390abaf65c75
@@@ -407,13 -407,24 +407,13 @@@ static void __init omap_sx1_init(void
        gpio_direction_output(11, 0);   /*A_SWITCH = 0 */
        gpio_direction_output(15, 0);   /*A_USB_ON = 0 */
  }
 -/*----------------------------------------*/
 -static void __init omap_sx1_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -/*----------------------------------------*/
 -
 -static void __init omap_sx1_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
  
  MACHINE_START(SX1, "OMAP310 based Siemens SX1")
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = omap_sx1_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = omap_sx1_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = omap_sx1_init,
        .timer          = &omap1_timer,
  MACHINE_END
index 1444ce846ab7a4126b97139ad6bcea7aa53aa89e,80165154617a853585ae58abcc84bd941290cf37..42e5151c40a92ee82944b2b69603a99250db3149
@@@ -159,6 -159,17 +159,6 @@@ static struct omap_usb_config voiceblue
  static struct omap_board_config_kernel voiceblue_config[] = {
  };
  
 -static void __init voiceblue_init_irq(void)
 -{
 -      omap1_init_common_hw();
 -      omap1_init_irq();
 -}
 -
 -static void __init voiceblue_map_io(void)
 -{
 -      omap1_map_common_io();
 -}
 -
  #define MACHINE_PANICED               1
  #define MACHINE_REBOOTING     2
  #define MACHINE_REBOOT                4
@@@ -290,11 -301,10 +290,11 @@@ static void __init voiceblue_init(void
  
  MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
        /* Maintainer: Ladislav Michl <michl@2n.cz> */
-       .boot_params    = 0x10000100,
+       .atag_offset    = 0x100,
 -      .map_io         = voiceblue_map_io,
 +      .map_io         = omap15xx_map_io,
 +      .init_early     = omap1_init_early,
        .reserve        = omap_reserve,
 -      .init_irq       = voiceblue_init_irq,
 +      .init_irq       = omap1_init_irq,
        .init_machine   = voiceblue_init,
        .timer          = &omap1_timer,
  MACHINE_END
diff --combined arch/arm/mach-omap1/io.c
index fd9eb0984121892e7f447ecc28bcf54076cd7ece,1cfa1b6bb62b58de6aaaa2f7b1efc949dfc3ef68..7969cfda4454eca89bfdd350145fdc644b39e099
@@@ -21,6 -21,7 +21,6 @@@
  #include "clock.h"
  
  extern void omap_check_revision(void);
 -extern void omap_sram_init(void);
  
  /*
   * The machine specific code may provide the extra mapping besides the
@@@ -84,45 -85,51 +84,45 @@@ static struct map_desc omap16xx_io_desc
  #endif
  
  /*
 - * Maps common IO regions for omap1. This should only get called from
 - * board specific init.
 + * Maps common IO regions for omap1
   */
 -void __init omap1_map_common_io(void)
 +static void __init omap1_map_common_io(void)
  {
        iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
 -
 -      /* Normally devicemaps_init() would flush caches and tlb after
 -       * mdesc->map_io(), but we must also do it here because of the CPU
 -       * revision check below.
 -       */
 -      local_flush_tlb_all();
 -      flush_cache_all();
 -
 -      /* We want to check CPU revision early for cpu_is_omapxxxx() macros.
 -       * IO space mapping must be initialized before we can do that.
 -       */
 -      omap_check_revision();
 +}
  
  #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
 -      if (cpu_is_omap7xx()) {
 -              iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
 -      }
 +void __init omap7xx_map_io(void)
 +{
 +      omap1_map_common_io();
 +      iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
 +}
  #endif
 +
  #ifdef CONFIG_ARCH_OMAP15XX
 -      if (cpu_is_omap15xx()) {
 -              iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
 -      }
 -#endif
 -#if defined(CONFIG_ARCH_OMAP16XX)
 -      if (cpu_is_omap16xx()) {
 -              iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
 -      }
 +void __init omap15xx_map_io(void)
 +{
 +      omap1_map_common_io();
 +      iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
 +}
  #endif
  
 -      omap_sram_init();
 -      omap_init_consistent_dma_size();
 +#if defined(CONFIG_ARCH_OMAP16XX)
 +void __init omap16xx_map_io(void)
 +{
 +      omap1_map_common_io();
 +      iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
  }
 +#endif
  
  /*
 - * Common low-level hardware init for omap1. This should only get called from
 - * board specific init.
 + * Common low-level hardware init for omap1.
   */
 -void __init omap1_init_common_hw(void)
 +void omap1_init_early(void)
  {
 +      omap_check_revision();
 +      omap_ioremap_init();
 +
        /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
         * on a Posted Write in the TIPB Bridge".
         */
        /* Must init clocks early to assure that timer interrupt works
         */
        omap1_clk_init();
 -
        omap1_mux_init();
++      omap_init_consistent_dma_size();
  }
  
  /*
index d934169d655373e63a71a7aa21d48d61ea4c5e63,195157da21e6d51bd414a4a848955977e50b4aa4..638cecb9ea1acf8586641352ada1363230e36f63
@@@ -141,6 -141,12 +141,6 @@@ static struct omap_board_config_kernel 
        {OMAP_TAG_LCD, &sdp2430_lcd_config},
  };
  
 -static void __init omap_2430sdp_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
  };
@@@ -187,8 -193,7 +187,8 @@@ static int __init omap2430_i2c_init(voi
  {
        omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
                        ARRAY_SIZE(sdp2430_i2c1_boardinfo));
 -      omap2_pmic_init("twl4030", &sdp2430_twldata);
 +      omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ,
 +                      &sdp2430_twldata);
        return 0;
  }
  
@@@ -230,7 -235,6 +230,7 @@@ static void __init omap_2430sdp_init(vo
  
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        omap2_hsmmc_init(mmc);
        omap2_usbfs_init(&sdp2430_usb_config);
  
                         "Secondary LCD backlight");
  }
  
 -static void __init omap_2430sdp_map_io(void)
 -{
 -      omap2_set_globals_243x();
 -      omap243x_map_common_io();
 -}
 -
  MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap_2430sdp_map_io,
 -      .init_early     = omap_2430sdp_init_early,
 +      .map_io         = omap243x_map_io,
 +      .init_early     = omap2430_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_2430sdp_init,
        .timer          = &omap2_timer,
index 9bb48eaa4381651acf5f11381248ca43e4c83692,2430531b2239d6c9b369301833683558b4d53180..5b5999caf71d1ed84090dff3ea51f798d5062416
@@@ -225,6 -225,12 +225,6 @@@ static struct omap_dss_board_info sdp34
  static struct omap_board_config_kernel sdp3430_config[] __initdata = {
  };
  
 -static void __init omap_3430sdp_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
 -}
 -
  static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 1,
@@@ -713,7 -719,6 +713,7 @@@ static void __init omap_3430sdp_init(vo
                gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV1;
        omap_ads7846_init(1, gpio_pendown, 310, NULL);
        board_serial_init();
 +      omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
        usb_musb_init(NULL);
        board_smc91x_init();
        board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
  
  MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap_3430sdp_init_early,
 +      .init_early     = omap3430_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_3430sdp_init,
        .timer          = &omap3_timer,
index 94febc85d80520cd86d3a4356d750546691c43bf,8b5b5aa751ed07c7b08a6c1c5a809c624ac073dc..f552305162fc59f87ecd93d2b26bec5da1f75846
@@@ -70,6 -70,13 +70,6 @@@ static const struct usbhs_omap_board_da
  static struct omap_board_config_kernel sdp_config[] __initdata = {
  };
  
 -static void __init omap_sdp_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
 -                                h8mbx00u0mer0em_sdrc_params);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
@@@ -200,8 -207,6 +200,8 @@@ static void __init omap_sdp_init(void
        omap_board_config = sdp_config;
        omap_board_config_size = ARRAY_SIZE(sdp_config);
        zoom_peripherals_init();
 +      omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
 +                                h8mbx00u0mer0em_sdrc_params);
        zoom_display_init();
        board_smc91x_init();
        board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
  }
  
  MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap_sdp_init_early,
 +      .init_early     = omap3630_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_sdp_init,
        .timer          = &omap3_timer,
index a97c29a73edd547dcea13ccb7ab7bf0e2d173a67,be931105d681e27a413df624b92a9d403d572cfe..6d2b61409c1bd3301551b6c9eec4bfe57edb0488
@@@ -129,7 -129,7 +129,7 @@@ static const int sdp4430_keymap[] = 
        KEY(7, 6, KEY_OK),
        KEY(7, 7, KEY_DOWN),
  };
 -static struct omap_device_pad keypad_pads[] __initdata = {
 +static struct omap_device_pad keypad_pads[] = {
        {       .name   = "kpd_col1.kpd_col1",
                .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
        },
@@@ -389,6 -389,12 +389,6 @@@ static struct omap_board_config_kernel 
        { OMAP_TAG_LCD,         &sdp4430_lcd_config },
  };
  
 -static void __init omap_4430sdp_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static struct omap_musb_board_data musb_board_data = {
        .interface_type         = MUSB_INTERFACE_UTMI,
        .mode                   = MUSB_OTG,
@@@ -803,7 -809,6 +803,7 @@@ static void __init omap_4430sdp_init(vo
        omap_sfh7741prox_init();
        platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
        board_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        omap4_sdp4430_wifi_init();
        omap4_twl6030_hsmmc_init(mmc);
  
        omap_4430sdp_display_init();
  }
  
 -static void __init omap_4430sdp_map_io(void)
 -{
 -      omap2_set_globals_443x();
 -      omap44xx_map_common_io();
 -}
 -
  MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
        /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap_4430sdp_map_io,
 -      .init_early     = omap_4430sdp_init_early,
 +      .map_io         = omap4_map_io,
 +      .init_early     = omap4430_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap_4430sdp_init,
        .timer          = &omap4_timer,
index 9e1b2c248328d564f0952d7565db249a86751297,db110fdb8b2c4b3af81f2a1f4b9835afe5162b42..7834536ab41666ca2b2ff720a068023f3a48f765
@@@ -47,6 -47,12 +47,6 @@@ static struct omap_board_mux board_mux[
  };
  #endif
  
 -static void __init am3517_crane_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static struct usbhs_omap_board_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -64,7 -70,6 +64,7 @@@ static void __init am3517_crane_init(vo
  
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
  
        omap_board_config = am3517_crane_config;
        omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
  }
  
  MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = am3517_crane_init_early,
 +      .init_early     = am35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = am3517_crane_init,
        .timer          = &omap3_timer,
index 7d842940c252fd474661d5e7b125161e35d393e5,1325085e453d8ab62a31255f9bf2aaf1c32a0b7f..65a5912278ac49c04cc6d46b5fc00bbc19754a23
@@@ -362,6 -362,11 +362,6 @@@ static struct omap_dss_board_info am351
  /*
   * Board initialization
   */
 -static void __init am3517_evm_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
  
  static struct omap_musb_board_data musb_board_data = {
        .interface_type         = MUSB_INTERFACE_ULPI,
@@@ -464,7 -469,6 +464,7 @@@ static void __init am3517_evm_init(void
        am3517_evm_i2c_init();
        omap_display_init(&am3517_evm_dss_data);
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
  
        /* Configure GPIO for EHCI port */
        omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
  }
  
  MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = am3517_evm_init_early,
 +      .init_early     = am35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = am3517_evm_init,
        .timer          = &omap3_timer,
index 852843638fa966d1746c0efe0b0c60ed2ebff326,67800e647d7a888799316bb2a68f3340cbe155da..29c409b68b5255eaaed1a07730fff50f135dd6c7
@@@ -273,6 -273,12 +273,6 @@@ static struct omap_board_config_kernel 
        { OMAP_TAG_LCD,         &apollon_lcd_config },
  };
  
 -static void __init omap_apollon_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static struct gpio apollon_gpio_leds[] __initdata = {
        { LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */
        { LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6  */
@@@ -334,15 -340,20 +334,15 @@@ static void __init omap_apollon_init(vo
         */
        platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
        omap_serial_init();
 -}
 -
 -static void __init omap_apollon_map_io(void)
 -{
 -      omap2_set_globals_242x();
 -      omap242x_map_common_io();
 +      omap_sdrc_init(NULL, NULL);
  }
  
  MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
        /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap_apollon_map_io,
 -      .init_early     = omap_apollon_init_early,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_apollon_init,
        .timer          = &omap2_timer,
index e15d39bffe79e478ad7a4d6e670de29171ab12b3,38179c17550359133b21f72c62af985c2d1b7113..5665e688bd26bb65d8fcaf9422f43c347a1cbb7a
@@@ -471,6 -471,13 +471,6 @@@ static void __init cm_t35_init_i2c(void
        omap3_pmic_init("tps65930", &cm_t35_twldata);
  }
  
 -static void __init cm_t35_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                           mt46h32m32lf6_sdrc_params);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        /* nCS and IRQ for CM-T35 ethernet */
@@@ -603,8 -610,6 +603,8 @@@ static void __init cm_t3x_common_init(v
        omap_board_config_size = ARRAY_SIZE(cm_t35_config);
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                           mt46h32m32lf6_sdrc_params);
        cm_t35_init_i2c();
        omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
        cm_t35_init_ethernet();
@@@ -629,20 -634,20 +629,20 @@@ static void __init cm_t3730_init(void
  }
  
  MACHINE_START(CM_T35, "Compulab CM-T35")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = cm_t35_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = cm_t35_init,
        .timer          = &omap3_timer,
  MACHINE_END
  
  MACHINE_START(CM_T3730, "Compulab CM-T3730")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = cm_t35_init_early,
 +      .init_early     = omap3630_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = cm_t3730_init,
        .timer          = &omap3_timer,
index 867bf671719c6d82bc016b3079e5438381f201a3,aed9c29f9faea7c31b60bc01e588ffa1edb7cfb9..3f4dc6626845db9069a7193823de24025a93864c
@@@ -251,6 -251,12 +251,6 @@@ static inline void cm_t3517_init_nand(v
  static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
  };
  
 -static void __init cm_t3517_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        /* GPIO186 - Green LED */
@@@ -283,7 -289,6 +283,7 @@@ static void __init cm_t3517_init(void
  {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        omap_board_config = cm_t3517_config;
        omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
        cm_t3517_init_leds();
  }
  
  MACHINE_START(CM_T3517, "Compulab CM-T3517")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = cm_t3517_init_early,
 +      .init_early     = am35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = cm_t3517_init,
        .timer          = &omap3_timer,
index 059b74dd9289f4ae7a187763a08a912d70b820ef,99a42432ac93526a2b054f4fa31381037a149a7b..556df32d88eafdc5168c7fdbdf4a04a5112b1dc8
@@@ -397,6 -397,19 +397,6 @@@ static struct platform_device keys_gpi
        },
  };
  
 -
 -static void __init devkit8000_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                mt46h32m32lf6_sdrc_params);
 -}
 -
 -static void __init devkit8000_init_irq(void)
 -{
 -      omap3_init_irq();
 -}
 -
  #define OMAP_DM9000_BASE      0x2c000000
  
  static struct resource omap_dm9000_resources[] = {
@@@ -632,8 -645,6 +632,8 @@@ static void __init devkit8000_init(void
  {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                mt46h32m32lf6_sdrc_params);
  
        omap_dm9000_init();
  
  }
  
  MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = devkit8000_init_early,
 -      .init_irq       = devkit8000_init_irq,
 +      .init_early     = omap35xx_init_early,
 +      .init_irq       = omap3_init_irq,
        .init_machine   = devkit8000_init,
        .timer          = &omap3_secure_timer,
  MACHINE_END
index d9ccb9d98e15c2a70579b7b9548209f88877c78c,25642697281b6d21ddf68fee8ef681524980eaaa..0c427976d62f98f4bee49e837c62264ec3279ac8
  /*
 - * linux/arch/arm/mach-omap2/board-generic.c
 - *
   * Copyright (C) 2005 Nokia Corporation
   * Author: Paul Mundt <paul.mundt@nokia.com>
   *
 - * Modified from mach-omap/omap1/board-generic.c
 + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
   *
 - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
 - * the bootloader passes the board-specific data to the kernel.
 - * Do not put any board specific code to this file; create a new machine
 - * type if you need custom low-level initializations.
 + * Modified from the original mach-omap/omap2/board-generic.c did by Paul
 + * to support the OMAP2+ device tree boards with an unique board file.
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
  
 -#include <linux/kernel.h>
 -#include <linux/init.h>
 -#include <linux/device.h>
 +#include <linux/io.h>
 +#include <linux/of_platform.h>
 +#include <linux/irqdomain.h>
 +#include <linux/i2c/twl.h>
  
  #include <mach/hardware.h>
 -#include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 -#include <asm/mach/map.h>
  
 -#include <mach/gpio.h>
 -#include <plat/usb.h>
  #include <plat/board.h>
  #include <plat/common.h>
 +#include <mach/omap4-common.h>
 +#include "common-board-devices.h"
 +
 +/*
 + * XXX: Still needed to boot until the i2c & twl driver is adapted to
 + * device-tree
 + */
 +static struct twl4030_platform_data sdp4430_twldata = {
 +      .irq_base       = TWL6030_IRQ_BASE,
 +      .irq_end        = TWL6030_IRQ_END,
 +};
  
 -static struct omap_board_config_kernel generic_config[] = {
 +static void __init omap4_i2c_init(void)
 +{
 +      omap4_pmic_init("twl6030", &sdp4430_twldata);
 +}
 +
 +static struct twl4030_platform_data beagle_twldata = {
 +      .irq_base       = TWL4030_IRQ_BASE,
 +      .irq_end        = TWL4030_IRQ_END,
  };
  
 -static void __init omap_generic_init_early(void)
 +static void __init omap3_i2c_init(void)
  {
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 +      omap3_pmic_init("twl4030", &beagle_twldata);
  }
  
 +static struct of_device_id omap_dt_match_table[] __initdata = {
 +      { .compatible = "simple-bus", },
 +      { .compatible = "ti,omap-infra", },
 +      { }
 +};
 +
 +static struct of_device_id intc_match[] __initdata = {
 +      { .compatible = "ti,omap3-intc", },
 +      { .compatible = "arm,cortex-a9-gic", },
 +      { }
 +};
 +
  static void __init omap_generic_init(void)
  {
 +      struct device_node *node = of_find_matching_node(NULL, intc_match);
 +      if (node)
 +              irq_domain_add_simple(node, 0);
 +
        omap_serial_init();
 -      omap_board_config = generic_config;
 -      omap_board_config_size = ARRAY_SIZE(generic_config);
 +      omap_sdrc_init(NULL, NULL);
 +
 +      of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 +}
 +
 +static void __init omap4_init(void)
 +{
 +      omap4_i2c_init();
 +      omap_generic_init();
  }
  
 -static void __init omap_generic_map_io(void)
 +static void __init omap3_init(void)
  {
 -      if (cpu_is_omap242x()) {
 -              omap2_set_globals_242x();
 -              omap242x_map_common_io();
 -      } else if (cpu_is_omap243x()) {
 -              omap2_set_globals_243x();
 -              omap243x_map_common_io();
 -      } else if (cpu_is_omap34xx()) {
 -              omap2_set_globals_3xxx();
 -              omap34xx_map_common_io();
 -      } else if (cpu_is_omap44xx()) {
 -              omap2_set_globals_443x();
 -              omap44xx_map_common_io();
 -      }
 +      omap3_i2c_init();
 +      omap_generic_init();
  }
  
 -/* XXX This machine entry name should be updated */
 -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
 -      /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
 +#if defined(CONFIG_SOC_OMAP2420)
 +static const char *omap242x_boards_compat[] __initdata = {
 +      "ti,omap2420",
 +      NULL,
 +};
 +
 +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
++      .atag_offset    = 0x100,
 +      .reserve        = omap_reserve,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
 +      .init_irq       = omap2_init_irq,
 +      .init_machine   = omap_generic_init,
 +      .timer          = &omap2_timer,
 +      .dt_compat      = omap242x_boards_compat,
 +MACHINE_END
 +#endif
 +
 +#if defined(CONFIG_SOC_OMAP2430)
 +static const char *omap243x_boards_compat[] __initdata = {
 +      "ti,omap2430",
 +      NULL,
 +};
 +
 +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap_generic_map_io,
 -      .init_early     = omap_generic_init_early,
 +      .map_io         = omap243x_map_io,
 +      .init_early     = omap2430_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_generic_init,
        .timer          = &omap2_timer,
 +      .dt_compat      = omap243x_boards_compat,
 +MACHINE_END
 +#endif
 +
 +#if defined(CONFIG_ARCH_OMAP3)
 +static const char *omap3_boards_compat[] __initdata = {
 +      "ti,omap3",
 +      NULL,
 +};
 +
 +DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
++      .atag_offset    = 0x100,
 +      .reserve        = omap_reserve,
 +      .map_io         = omap3_map_io,
 +      .init_early     = omap3430_init_early,
 +      .init_irq       = omap3_init_irq,
 +      .init_machine   = omap3_init,
 +      .timer          = &omap3_timer,
 +      .dt_compat      = omap3_boards_compat,
 +MACHINE_END
 +#endif
 +
 +#if defined(CONFIG_ARCH_OMAP4)
 +static const char *omap4_boards_compat[] __initdata = {
 +      "ti,omap4",
 +      NULL,
 +};
 +
 +DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
++      .atag_offset    = 0x100,
 +      .reserve        = omap_reserve,
 +      .map_io         = omap4_map_io,
 +      .init_early     = omap4430_init_early,
 +      .init_irq       = gic_init_irq,
 +      .init_machine   = omap4_init,
 +      .timer          = &omap4_timer,
 +      .dt_compat      = omap4_boards_compat,
  MACHINE_END
 +#endif
index 8486142dcae73183fad0f3227c5e95233377ef16,a58c6ba06f7f87ed189f6b16d1c35f7cb5d26ddb..fe75c195f69fdb8d636c95b2748bdb2aaed81fae
@@@ -290,6 -290,17 +290,6 @@@ static struct omap_board_config_kernel 
        { OMAP_TAG_LCD,         &h4_lcd_config },
  };
  
 -static void __init omap_h4_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
 -static void __init omap_h4_init_irq(void)
 -{
 -      omap2_init_irq();
 -}
 -
  static struct at24_platform_data m24c01 = {
        .byte_len       = SZ_1K / 8,
        .page_size      = 16,
@@@ -360,17 -371,22 +360,17 @@@ static void __init omap_h4_init(void
        platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
        omap2_usbfs_init(&h4_usb_config);
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        h4_init_flash();
  }
  
 -static void __init omap_h4_map_io(void)
 -{
 -      omap2_set_globals_242x();
 -      omap242x_map_common_io();
 -}
 -
  MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
        /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap_h4_map_io,
 -      .init_early     = omap_h4_init_early,
 -      .init_irq       = omap_h4_init_irq,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
 +      .init_irq       = omap2_init_irq,
        .init_machine   = omap_h4_init,
        .timer          = &omap2_timer,
  MACHINE_END
index 7b66338e451bcfc94a60e240a8852ed08ebe2820,7040352b16b4dc3b5b7655cf1cbf279b8dba4136..e20cad6a0835a72179823b09c095e3e1fc84ef55
@@@ -491,6 -491,13 +491,6 @@@ static struct platform_device *igep_dev
        &igep_vwlan_device,
  };
  
 -static void __init igep_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(m65kxxxxam_sdrc_params,
 -                                m65kxxxxam_sdrc_params);
 -}
 -
  static int igep2_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
@@@ -643,8 -650,6 +643,8 @@@ static void __init igep_init(void
        igep_i2c_init();
        platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
        omap_serial_init();
 +      omap_sdrc_init(m65kxxxxam_sdrc_params,
 +                                m65kxxxxam_sdrc_params);
        usb_musb_init(NULL);
  
        igep_flash_init();
  }
  
  MACHINE_START(IGEP0020, "IGEP v2 board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = igep_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
        .timer          = &omap3_timer,
  MACHINE_END
  
  MACHINE_START(IGEP0030, "IGEP OMAP3 module")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = igep_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
        .timer          = &omap3_timer,
index 401b9449f722175b9a220d4f07a9b50830f2f3ce,edf752bb24b1f153598a9a6cef813a041d85a85a..0fa28be2cfdaedb8b7a46b0d0b9215d67fed1aa0
@@@ -193,6 -193,12 +193,6 @@@ static struct omap_board_config_kernel 
        { OMAP_TAG_LCD,         &ldp_lcd_config },
  };
  
 -static void __init omap_ldp_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static struct twl4030_gpio_platform_data ldp_gpio_data = {
        .gpio_base      = OMAP_MAX_GPIO_LINES,
        .irq_base       = TWL4030_GPIO_IRQ_BASE,
@@@ -319,7 -325,6 +319,7 @@@ static void __init omap_ldp_init(void
        platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
        omap_ads7846_init(1, 54, 310, NULL);
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        usb_musb_init(NULL);
        board_nand_init(ldp_nand_partitions,
                ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
  }
  
  MACHINE_START(OMAP_LDP, "OMAP LDP board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap_ldp_init_early,
 +      .init_early     = omap3430_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_ldp_init,
        .timer          = &omap3_timer,
index d1f4a0292c42db1337f03c3a1a2b9d108581736d,6ce748154f244e1500e8823beb482bc0095cd1a1..e9d5f4a3d0642dd0b553da23987136e9864e3d70
@@@ -616,6 -616,18 +616,6 @@@ static struct i2c_board_info n810_i2c_b
        },
  };
  
 -static void __init n8x0_map_io(void)
 -{
 -      omap2_set_globals_242x();
 -      omap242x_map_common_io();
 -}
 -
 -static void __init n8x0_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        /* I2S codec port pins for McBSP block */
@@@ -677,37 -689,36 +677,37 @@@ static void __init n8x0_init_machine(vo
                i2c_register_board_info(2, n810_i2c_board_info_2,
                                        ARRAY_SIZE(n810_i2c_board_info_2));
        board_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        gpmc_onenand_init(board_onenand_data);
        n8x0_mmc_init();
        n8x0_usb_init();
  }
  
  MACHINE_START(NOKIA_N800, "Nokia N800")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = n8x0_map_io,
 -      .init_early     = n8x0_init_early,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap2_timer,
  MACHINE_END
  
  MACHINE_START(NOKIA_N810, "Nokia N810")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = n8x0_map_io,
 -      .init_early     = n8x0_init_early,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap2_timer,
  MACHINE_END
  
  MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = n8x0_map_io,
 -      .init_early     = n8x0_init_early,
 +      .map_io         = omap242x_map_io,
 +      .init_early     = omap2420_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap2_timer,
index 4c25742ebf6dc126f0f721bd043f73450f143b36,1fde8a0474bbb077877697164026f330252a7dbf..22e84eabdbea3dd5783e5a36de5e5ce8406d56c1
@@@ -444,6 -444,18 +444,6 @@@ static struct platform_device keys_gpi
        },
  };
  
 -static void __init omap3_beagle_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                mt46h32m32lf6_sdrc_params);
 -}
 -
 -static void __init omap3_beagle_init_irq(void)
 -{
 -      omap3_init_irq();
 -}
 -
  static struct platform_device *omap3_beagle_devices[] __initdata = {
        &leds_gpio,
        &keys_gpio,
@@@ -481,8 -493,8 +481,8 @@@ static void __init beagle_opp_init(void
        if (cpu_is_omap3630()) {
                struct device *mpu_dev, *iva_dev;
  
 -              mpu_dev = omap2_get_mpuss_device();
 -              iva_dev = omap2_get_iva_device();
 +              mpu_dev = omap_device_get_by_hwmod_name("mpu");
 +              iva_dev = omap_device_get_by_hwmod_name("iva");
  
                if (!mpu_dev || !iva_dev) {
                        pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
@@@ -522,8 -534,6 +522,8 @@@ static void __init omap3_beagle_init(vo
                        ARRAY_SIZE(omap3_beagle_devices));
        omap_display_init(&beagle_dss_data);
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                mt46h32m32lf6_sdrc_params);
  
        omap_mux_init_gpio(170, OMAP_PIN_INPUT);
        /* REVISIT leave DVI powered down until it's needed ... */
  
  MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3_beagle_init_early,
 -      .init_irq       = omap3_beagle_init_irq,
 +      .init_early     = omap3_init_early,
 +      .init_irq       = omap3_init_irq,
        .init_machine   = omap3_beagle_init,
        .timer          = &omap3_secure_timer,
  MACHINE_END
index a1184b347aebe7d4aa64d19bf2bfc74ca907ab45,15c69a0c1ce5050e20883ed124b262d3652ed4fd..aa6a9351ce48a036a5e68c70bf0a95e282dcacd7
@@@ -520,6 -520,12 +520,6 @@@ static int __init omap3_evm_i2c_init(vo
  static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
  };
  
 -static void __init omap3_evm_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
 -}
 -
  static struct usbhs_omap_board_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -634,7 -640,6 +634,7 @@@ static void __init omap3_evm_init(void
        omap_display_init(&omap3_evm_dss_data);
  
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
  
        /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
        usb_nop_xceiv_register();
  
  MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3_evm_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3_evm_init,
        .timer          = &omap3_timer,
index 3a1dd84faca0b6b50f216ed28dfedecb63dd23d2,01354a214cafcd3da4283bd7c8943dda4539a475..7c0f193f246dd58e5bc008cfb939c610b73ed65c
@@@ -182,6 -182,12 +182,6 @@@ static inline void __init board_smsc911
        gpmc_smsc911x_init(&board_smsc911x_data);
  }
  
 -static void __init omap3logic_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
@@@ -194,7 -200,6 +194,7 @@@ static void __init omap3logic_init(void
        omap3torpedo_fix_pbias_voltage();
        omap3logic_i2c_init();
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        board_mmc_init();
        board_smsc911x_init();
  
  }
  
  MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3logic_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap3_timer,
  MACHINE_END
  
  MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3logic_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap3_timer,
index e46bf524955964adfddedcabc22fdec5dfd2da0d,ace56938dd3b2816f6782264ddb3e2eb541e09cd..fed2f7dfdf8b71131d7be3a987916135d7685c0f
@@@ -525,6 -525,13 +525,6 @@@ static struct spi_board_info omap3pando
        }
  };
  
 -static void __init omap3pandora_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                mt46h32m32lf6_sdrc_params);
 -}
 -
  static void __init pandora_wl1251_init(void)
  {
        struct wl12xx_platform_data pandora_wl1251_pdata;
@@@ -586,8 -593,6 +586,8 @@@ static void __init omap3pandora_init(vo
                        ARRAY_SIZE(omap3pandora_devices));
        omap_display_init(&pandora_dss_data);
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                mt46h32m32lf6_sdrc_params);
        spi_register_board_info(omap3pandora_spi_board_info,
                        ARRAY_SIZE(omap3pandora_spi_board_info));
        omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
  }
  
  MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3pandora_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3pandora_init,
        .timer          = &omap3_timer,
index fa58a0f1584a7e3fe2c061d0df90603a71ae625b,ba13e1d5d0abecb251066987bd30a79094b11bf2..170e1ebd6e6247095c414bc2607593d1bfa8b176
@@@ -428,6 -428,17 +428,6 @@@ static int __init omap3_stalker_i2c_ini
  static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
  };
  
 -static void __init omap3_stalker_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
 -}
 -
 -static void __init omap3_stalker_init_irq(void)
 -{
 -      omap3_init_irq();
 -}
 -
  static struct platform_device *omap3_stalker_devices[] __initdata = {
        &keys_gpio,
  };
@@@ -467,7 -478,6 +467,7 @@@ static void __init omap3_stalker_init(v
        omap_display_init(&omap3_stalker_dss_data);
  
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
  
  MACHINE_START(SBC3530, "OMAP3 STALKER")
        /* Maintainer: Jason Lam -lzg@ema-tech.com */
-       .boot_params            = 0x80000100,
+       .atag_offset            = 0x100,
        .map_io                 = omap3_map_io,
 -      .init_early             = omap3_stalker_init_early,
 -      .init_irq               = omap3_stalker_init_irq,
 +      .init_early             = omap35xx_init_early,
 +      .init_irq               = omap3_init_irq,
        .init_machine           = omap3_stalker_init,
        .timer                  = &omap3_secure_timer,
  MACHINE_END
index 05488fbc20d5d3abe0c3864980d2306d0695bc1c,49e4bd207cb6924285c051f80b1b8c7d4b9fea78..c2d5348f54225a35c5ea7b15fa5ff19974bdf852
@@@ -326,6 -326,18 +326,6 @@@ static struct omap_board_mux board_mux[
  };
  #endif
  
 -static void __init omap3_touchbook_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                mt46h32m32lf6_sdrc_params);
 -}
 -
 -static void __init omap3_touchbook_init_irq(void)
 -{
 -      omap3_init_irq();
 -}
 -
  static struct platform_device *omap3_touchbook_devices[] __initdata = {
        &omap3_touchbook_lcd_device,
        &leds_gpio,
@@@ -373,8 -385,6 +373,8 @@@ static void __init omap3_touchbook_init
        platform_add_devices(omap3_touchbook_devices,
                        ARRAY_SIZE(omap3_touchbook_devices));
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                mt46h32m32lf6_sdrc_params);
  
        omap_mux_init_gpio(170, OMAP_PIN_INPUT);
        /* REVISIT leave DVI powered down until it's needed ... */
  
  MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
        /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap3_touchbook_init_early,
 -      .init_irq       = omap3_touchbook_init_irq,
 +      .init_early     = omap3430_init_early,
 +      .init_irq       = omap3_init_irq,
        .init_machine   = omap3_touchbook_init,
        .timer          = &omap3_secure_timer,
  MACHINE_END
index e26929049a4d827181816689fa91fc7aa75d25d8,683bede73d540a060761850e60867f166db325e2..2141894eb9f379096bd277c573d1cd1f581f8611
@@@ -95,6 -95,12 +95,6 @@@ static struct platform_device *panda_de
        &wl1271_device,
  };
  
 -static void __init omap4_panda_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -563,19 -569,24 +563,19 @@@ static void __init omap4_panda_init(voi
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
        platform_device_register(&omap_vwlan_device);
        board_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        omap4_twl6030_hsmmc_init(mmc);
        omap4_ehci_init();
        usb_musb_init(&musb_board_data);
        omap4_panda_display_init();
  }
  
 -static void __init omap4_panda_map_io(void)
 -{
 -      omap2_set_globals_443x();
 -      omap44xx_map_common_io();
 -}
 -
  MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
        /* Maintainer: David Anders - Texas Instruments Inc */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = omap4_panda_map_io,
 -      .init_early     = omap4_panda_init_early,
 +      .map_io         = omap4_map_io,
 +      .init_early     = omap4430_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap4_panda_init,
        .timer          = &omap4_timer,
index 7228ae50802d5a0495fde63ad6746fee0f61b4e4,e592fb134c4e8708798b33f61f9a88f747e4944d..9f13dc22df778842e9488964fdc004c104c20427
@@@ -478,6 -478,13 +478,6 @@@ static int __init overo_spi_init(void
        return 0;
  }
  
 -static void __init overo_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                mt46h32m32lf6_sdrc_params);
 -}
 -
  static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
@@@ -507,8 -514,6 +507,8 @@@ static void __init overo_init(void
        overo_i2c_init();
        omap_display_init(&overo_dss_data);
        omap_serial_init();
 +      omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                mt46h32m32lf6_sdrc_params);
        omap_nand_flash_init(0, overo_nand_partitions,
                             ARRAY_SIZE(overo_nand_partitions));
        usb_musb_init(NULL);
  }
  
  MACHINE_START(OVERO, "Gumstix Overo")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = overo_init_early,
 +      .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = overo_init,
        .timer          = &omap3_timer,
index a98db616e0d4d717c8c515f3d62e8b4d2fabce6c,9a8ce239ba9ecafa72f2b13366a436a54ad07549..616fb39763b0f4b82d9885a7057a0c0a6bdc6cde
@@@ -123,6 -123,15 +123,6 @@@ static void __init rm680_peripherals_in
        omap2_hsmmc_init(mmc);
  }
  
 -static void __init rm680_init_early(void)
 -{
 -      struct omap_sdrc_params *sdrc_params;
 -
 -      omap2_init_common_infrastructure();
 -      sdrc_params = nokia_get_sdram_timings();
 -      omap2_init_common_devices(sdrc_params, sdrc_params);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
  
  static void __init rm680_init(void)
  {
 +      struct omap_sdrc_params *sdrc_params;
 +
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
 +
 +      sdrc_params = nokia_get_sdram_timings();
 +      omap_sdrc_init(sdrc_params, sdrc_params);
 +
        usb_musb_init(NULL);
        rm680_peripherals_init();
  }
  
 -static void __init rm680_map_io(void)
 -{
 -      omap2_set_globals_3xxx();
 -      omap34xx_map_common_io();
 -}
 -
  MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
 -      .map_io         = rm680_map_io,
 -      .init_early     = rm680_init_early,
 +      .map_io         = omap3_map_io,
 +      .init_early     = omap3630_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = rm680_init,
        .timer          = &omap3_timer,
index 8677a06aa4a7e0303e233501771a33a1b12e3fe0,a6c473bbb3d6392d7b6cc2c03d42d2d1176c17a9..74c8aadc0a19927f0de86247c544658a84a192a5
@@@ -102,6 -102,15 +102,6 @@@ static struct omap_board_config_kernel 
        { OMAP_TAG_LCD,         &rx51_lcd_config },
  };
  
 -static void __init rx51_init_early(void)
 -{
 -      struct omap_sdrc_params *sdrc_params;
 -
 -      omap2_init_common_infrastructure();
 -      sdrc_params = nokia_get_sdram_timings();
 -      omap2_init_common_devices(sdrc_params, sdrc_params);
 -}
 -
  extern void __init rx51_peripherals_init(void);
  
  #ifdef CONFIG_OMAP_MUX
@@@ -118,17 -127,11 +118,17 @@@ static struct omap_musb_board_data musb
  
  static void __init rx51_init(void)
  {
 +      struct omap_sdrc_params *sdrc_params;
 +
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_board_config = rx51_config;
        omap_board_config_size = ARRAY_SIZE(rx51_config);
        omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap_serial_init();
 +
 +      sdrc_params = nokia_get_sdram_timings();
 +      omap_sdrc_init(sdrc_params, sdrc_params);
 +
        usb_musb_init(&musb_board_data);
        rx51_peripherals_init();
  
        platform_device_register(&leds_gpio);
  }
  
 -static void __init rx51_map_io(void)
 -{
 -      omap2_set_globals_3xxx();
 -      omap34xx_map_common_io();
 -}
 -
  static void __init rx51_reserve(void)
  {
        rx51_video_mem_init();
  
  MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = rx51_reserve,
 -      .map_io         = rx51_map_io,
 -      .init_early     = rx51_init_early,
 +      .map_io         = omap3_map_io,
 +      .init_early     = omap3430_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = rx51_init,
        .timer          = &omap3_timer,
index b0a16d2f238837ca3932c7873e846c73edc1c787,e41958acb6b63ba240493632c4674408cc867093..e6ee8842285c00f9915e85f6b9b4d02ed00fb601
  static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
  };
  
 -static void __init ti8168_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      omap2_init_common_devices(NULL, NULL);
 -}
 -
  static void __init ti8168_evm_init(void)
  {
        omap_serial_init();
 +      omap_sdrc_init(NULL, NULL);
        omap_board_config = ti8168_evm_config;
        omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
  }
  
  static void __init ti8168_evm_map_io(void)
  {
 -      omap2_set_globals_ti816x();
        omapti816x_map_common_io();
  }
  
  MACHINE_START(TI8168EVM, "ti8168evm")
        /* Maintainer: Texas Instruments */
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .map_io         = ti8168_evm_map_io,
 -      .init_early     = ti8168_init_early,
 +      .init_early     = ti816x_init_early,
        .init_irq       = ti816x_init_irq,
        .timer          = &omap3_timer,
        .init_machine   = ti8168_evm_init,
index d56c79661038fed7c56340aab3a870743001a1ed,72f1db4863e598cfa775440da83419f85935a308..be6684dc4f55d6a0c33ada72fc5f15f25b807f60
  
  #define ZOOM3_EHCI_RESET_GPIO         64
  
 -static void __init omap_zoom_init_early(void)
 -{
 -      omap2_init_common_infrastructure();
 -      if (machine_is_omap_zoom2())
 -              omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
 -                                        mt46h32m32lf6_sdrc_params);
 -      else if (machine_is_omap_zoom3())
 -              omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
 -                                        h8mbx00u0mer0em_sdrc_params);
 -}
 -
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        /* WLAN IRQ - GPIO 162 */
@@@ -118,32 -129,24 +118,32 @@@ static void __init omap_zoom_init(void
                                                ZOOM_NAND_CS, NAND_BUSWIDTH_16);
        zoom_debugboard_init();
        zoom_peripherals_init();
 +
 +      if (machine_is_omap_zoom2())
 +              omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 +                                        mt46h32m32lf6_sdrc_params);
 +      else if (machine_is_omap_zoom3())
 +              omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
 +                                        h8mbx00u0mer0em_sdrc_params);
 +
        zoom_display_init();
  }
  
  MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap_zoom_init_early,
 +      .init_early     = omap3430_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap3_timer,
  MACHINE_END
  
  MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
-       .boot_params    = 0x80000100,
+       .atag_offset    = 0x100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
 -      .init_early     = omap_zoom_init_early,
 +      .init_early     = omap3630_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap3_timer,
diff --combined arch/arm/mach-omap2/io.c
index aa96538f3fee17845a90e6b858f28c91b3266426,d6d01cb7f28a63b2a7bc3ac060cb059a030bf584..a5d8dce2a70b507507221b262d6bc3469bbd06dd
@@@ -16,7 -16,6 +16,6 @@@
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
  #include <linux/module.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include "clock2xxx.h"
  #include "clock3xxx.h"
  #include "clock44xx.h"
 -#include "io.h"
  
 +#include <plat/common.h>
  #include <plat/omap-pm.h>
 +#include "voltage.h"
  #include "powerdomain.h"
  
  #include "clockdomain.h"
  #include <plat/omap_hwmod.h>
  #include <plat/multi.h>
 +#include <plat/common.h>
  
  /*
   * The machine specific code may provide the extra mapping besides the
@@@ -241,11 -238,26 +240,11 @@@ static struct map_desc omap44xx_io_desc
  };
  #endif
  
 -static void __init _omap2_map_common_io(void)
 -{
 -      /* Normally devicemaps_init() would flush caches and tlb after
 -       * mdesc->map_io(), but we must also do it here because of the CPU
 -       * revision check below.
 -       */
 -      local_flush_tlb_all();
 -      flush_cache_all();
 -
 -      omap2_check_revision();
 -      omap_sram_init();
 -      omap_init_consistent_dma_size();
 -}
 -
  #ifdef CONFIG_SOC_OMAP2420
  void __init omap242x_map_common_io(void)
  {
        iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
        iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
 -      _omap2_map_common_io();
  }
  #endif
  
@@@ -254,6 -266,7 +253,6 @@@ void __init omap243x_map_common_io(void
  {
        iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
        iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
 -      _omap2_map_common_io();
  }
  #endif
  
  void __init omap34xx_map_common_io(void)
  {
        iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
 -      _omap2_map_common_io();
  }
  #endif
  
  void __init omapti816x_map_common_io(void)
  {
        iotable_init(omapti816x_io_desc, ARRAY_SIZE(omapti816x_io_desc));
 -      _omap2_map_common_io();
  }
  #endif
  
  void __init omap44xx_map_common_io(void)
  {
        iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
 -      _omap2_map_common_io();
  }
  #endif
  
@@@ -320,15 -336,29 +319,16 @@@ static int _set_hwmod_postsetup_state(s
  /* See irq.c, omap4-common.c and entry-macro.S */
  void __iomem *omap_irq_base;
  
 -void __init omap2_init_common_infrastructure(void)
 +static void __init omap_common_init_early(void)
  {
 -      u8 postsetup_state;
 +      omap2_check_revision();
 +      omap_ioremap_init();
++      omap_init_consistent_dma_size();
 +}
  
 -      if (cpu_is_omap242x()) {
 -              omap2xxx_powerdomains_init();
 -              omap2xxx_clockdomains_init();
 -              omap2420_hwmod_init();
 -      } else if (cpu_is_omap243x()) {
 -              omap2xxx_powerdomains_init();
 -              omap2xxx_clockdomains_init();
 -              omap2430_hwmod_init();
 -      } else if (cpu_is_omap34xx()) {
 -              omap3xxx_powerdomains_init();
 -              omap3xxx_clockdomains_init();
 -              omap3xxx_hwmod_init();
 -      } else if (cpu_is_omap44xx()) {
 -              omap44xx_powerdomains_init();
 -              omap44xx_clockdomains_init();
 -              omap44xx_hwmod_init();
 -      } else {
 -              pr_err("Could not init hwmod data - unknown SoC\n");
 -        }
 +static void __init omap_hwmod_init_postsetup(void)
 +{
 +      u8 postsetup_state;
  
        /* Set the default postsetup state for all hwmods */
  #ifdef CONFIG_PM_RUNTIME
         * 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 omap2_init_common_devices().
 +       * 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);
  
        omap_pm_if_early_init();
 +}
  
 -      if (cpu_is_omap2420())
 -              omap2420_clk_init();
 -      else if (cpu_is_omap2430())
 -              omap2430_clk_init();
 -      else if (cpu_is_omap34xx())
 -              omap3xxx_clk_init();
 -      else if (cpu_is_omap44xx())
 -              omap4xxx_clk_init();
 -      else
 -              pr_err("Could not init clock framework - unknown SoC\n");
 +void __init omap2420_init_early(void)
 +{
 +      omap2_set_globals_242x();
 +      omap_common_init_early();
 +      omap2xxx_voltagedomains_init();
 +      omap242x_powerdomains_init();
 +      omap242x_clockdomains_init();
 +      omap2420_hwmod_init();
 +      omap_hwmod_init_postsetup();
 +      omap2420_clk_init();
  }
  
 -void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
 +void __init omap2430_init_early(void)
 +{
 +      omap2_set_globals_243x();
 +      omap_common_init_early();
 +      omap2xxx_voltagedomains_init();
 +      omap243x_powerdomains_init();
 +      omap243x_clockdomains_init();
 +      omap2430_hwmod_init();
 +      omap_hwmod_init_postsetup();
 +      omap2430_clk_init();
 +}
 +
 +/*
 + * Currently only board-omap3beagle.c should call this because of the
 + * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT.
 + */
 +void __init omap3_init_early(void)
 +{
 +      omap2_set_globals_3xxx();
 +      omap_common_init_early();
 +      omap3xxx_voltagedomains_init();
 +      omap3xxx_powerdomains_init();
 +      omap3xxx_clockdomains_init();
 +      omap3xxx_hwmod_init();
 +      omap_hwmod_init_postsetup();
 +      omap3xxx_clk_init();
 +}
 +
 +void __init omap3430_init_early(void)
 +{
 +      omap3_init_early();
 +}
 +
 +void __init omap35xx_init_early(void)
 +{
 +      omap3_init_early();
 +}
 +
 +void __init omap3630_init_early(void)
 +{
 +      omap3_init_early();
 +}
 +
 +void __init am35xx_init_early(void)
 +{
 +      omap3_init_early();
 +}
 +
 +void __init ti816x_init_early(void)
 +{
 +      omap2_set_globals_ti816x();
 +      omap_common_init_early();
 +      omap3xxx_voltagedomains_init();
 +      omap3xxx_powerdomains_init();
 +      omap3xxx_clockdomains_init();
 +      omap3xxx_hwmod_init();
 +      omap_hwmod_init_postsetup();
 +      omap3xxx_clk_init();
 +}
 +
 +void __init omap4430_init_early(void)
 +{
 +      omap2_set_globals_443x();
 +      omap_common_init_early();
 +      omap44xx_voltagedomains_init();
 +      omap44xx_powerdomains_init();
 +      omap44xx_clockdomains_init();
 +      omap44xx_hwmod_init();
 +      omap_hwmod_init_postsetup();
 +      omap4xxx_clk_init();
 +}
 +
 +void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
                                      struct omap_sdrc_params *sdrc_cs1)
  {
 +      omap_sram_init();
 +
        if (cpu_is_omap24xx() || omap3_has_sdrc()) {
                omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
                _omap2_init_reprogram_sdrc();
        }
 -
  }
  
  /*
index c105556a0ee1a9ab158742e8d3b417eae7a8646b,e25f60f5db8f603fadd765388f9f00e6187935f1..9e5c1663fc4f0b003df76a21db800d01be892a99
@@@ -77,7 -77,7 +77,7 @@@ static int __init dns323_pci_map_irq(co
        /*
         * Check for devices with hard-wired IRQs.
         */
 -      irq = orion5x_pci_map_irq(const dev, slot, pin);
 +      irq = orion5x_pci_map_irq(dev, slot, pin);
        if (irq != -1)
                return irq;
  
@@@ -730,7 -730,7 +730,7 @@@ static void __init dns323_init(void
  /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
  MACHINE_START(DNS323, "D-Link DNS-323")
        /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
-       .boot_params    = 0x00000100,
+       .atag_offset    = 0x100,
        .init_machine   = dns323_init,
        .map_io         = orion5x_map_io,
        .init_early     = orion5x_init_early,
index a9201eaeb0f1abf9de8cff345ebe036812be46e0,556c535829f02c7f7286d3d4f3a6a5dc146d8c38..caa4ae29ec79518025bc105ee0d731c0c5335a9f
@@@ -696,9 -696,9 +696,9 @@@ static void __init h1940_init(void
                              S3C2410_MISCCR_USBSUSPND0 |
                              S3C2410_MISCCR_USBSUSPND1, 0x0);
  
 -      tmp =   (0x78 << S3C24XX_PLLCON_MDIVSHIFT)
 -            | (0x02 << S3C24XX_PLLCON_PDIVSHIFT)
 -            | (0x03 << S3C24XX_PLLCON_SDIVSHIFT);
 +      tmp =   (0x78 << S3C24XX_PLL_MDIV_SHIFT)
 +            | (0x02 << S3C24XX_PLL_PDIV_SHIFT)
 +            | (0x03 << S3C24XX_PLL_SDIV_SHIFT);
        writel(tmp, S3C2410_UPLLCON);
  
        gpio_request(S3C2410_GPC(0), "LCD power");
  
  MACHINE_START(H1940, "IPAQ-H1940")
        /* Maintainer: Ben Dooks <ben-linux@fluff.org> */
-       .boot_params    = S3C2410_SDRAM_PA + 0x100,
+       .atag_offset    = 0x100,
        .map_io         = h1940_map_io,
        .reserve        = h1940_reserve,
        .init_irq       = h1940_init_irq,
index 8ee6f43b40eb43c1a186ecd5f717b1d9460a549d,367d376deb96ec2ea80c9b5029ac0f2c32a4066a..45185215625415f0040c8b211d5b11e57a468144
@@@ -49,7 -49,6 +49,7 @@@
  
  #include <mach/regs-gpio.h>
  #include <mach/leds-gpio.h>
 +#include <mach/regs-lcd.h>
  #include <plat/regs-serial.h>
  #include <mach/fb.h>
  #include <plat/nand.h>
@@@ -345,7 -344,7 +345,7 @@@ static void __init qt2410_machine_init(
  }
  
  MACHINE_START(QT2410, "QT2410")
-       .boot_params    = S3C2410_SDRAM_PA + 0x100,
+       .atag_offset    = 0x100,
        .map_io         = qt2410_map_io,
        .init_irq       = s3c24xx_init_irq,
        .init_machine   = qt2410_machine_init,
index 32102999628da35b16035f981a0d1b9401ed5f16,684dbb3567f5a251001d81f0e8df0241d9d76dbb..0d3453bf567c29e85290774973bd19e0a59b5d89
@@@ -43,7 -43,6 +43,7 @@@
  
  #include <mach/regs-gpio.h>
  #include <mach/regs-gpioj.h>
 +#include <mach/regs-lcd.h>
  #include <mach/h1940.h>
  #include <mach/fb.h>
  
@@@ -826,7 -825,7 +826,7 @@@ static void __init rx1950_reserve(void
  
  MACHINE_START(RX1950, "HP iPAQ RX1950")
      /* Maintainers: Vasily Khoruzhick */
-       .boot_params = S3C2410_SDRAM_PA + 0x100,
+       .atag_offset = 0x100,
        .map_io = rx1950_map_io,
        .reserve        = rx1950_reserve,
        .init_irq = s3c24xx_init_irq,
index cefd7f6dd4f3052567b8620eefdb149dc0341064,8dc05763a7ebe97d5d085d8624fa8f09bd1c8991..de085b798aa47572ba6827dff79dd82b5d395809
@@@ -20,6 -20,7 +20,7 @@@
  #include <linux/serial_core.h>
  #include <linux/platform_device.h>
  #include <linux/io.h>
+ #include <linux/dma-mapping.h>
  
  #include <mach/hardware.h>
  #include <mach/map.h>
@@@ -33,8 -34,8 +34,8 @@@
  #include <plat/devs.h>
  #include <plat/clock.h>
  
 -#include <mach/s3c6400.h>
 -#include <mach/s3c6410.h>
 +#include <plat/s3c6400.h>
 +#include <plat/s3c6410.h>
  
  /* table of supported CPUs */
  
@@@ -43,16 -44,16 +44,16 @@@ static const char name_s3c6410[] = "S3C
  
  static struct cpu_table cpu_ids[] __initdata = {
        {
 -              .idcode         = 0x36400000,
 -              .idmask         = 0xfffff000,
 +              .idcode         = S3C6400_CPU_ID,
 +              .idmask         = S3C64XX_CPU_MASK,
                .map_io         = s3c6400_map_io,
                .init_clocks    = s3c6400_init_clocks,
                .init_uarts     = s3c6400_init_uarts,
                .init           = s3c6400_init,
                .name           = name_s3c6400,
        }, {
 -              .idcode         = 0x36410100,
 -              .idmask         = 0xffffff00,
 +              .idcode         = S3C6410_CPU_ID,
 +              .idmask         = S3C64XX_CPU_MASK,
                .map_io         = s3c6410_map_io,
                .init_clocks    = s3c6410_init_clocks,
                .init_uarts     = s3c6410_init_uarts,
@@@ -140,14 -141,23 +141,15 @@@ void __init s3c6400_common_init_uarts(s
  
  void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
  {
 -      unsigned long idcode;
 -
        /* initialise the io descriptors we need for initialisation */
        iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
        iotable_init(mach_desc, size);
+       init_consistent_dma_size(SZ_8M);
  
 -      idcode = __raw_readl(S3C_VA_SYS + 0x118);
 -      if (!idcode) {
 -              /* S3C6400 has the ID register in a different place,
 -               * and needs a write before it can be read. */
 -
 -              __raw_writel(0x0, S3C_VA_SYS + 0xA1C);
 -              idcode = __raw_readl(S3C_VA_SYS + 0xA1C);
 -      }
 +      /* detect cpu id */
 +      s3c64xx_init_cpu();
  
 -      s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
 +      s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
  }
  
  static __init int s3c64xx_sysdev_init(void)
index d2a68d22eda93b5ae1f5f0295af1bab01e3949b2,d164a282bfb4808483818e5fa8d6c4b7dead4b44..8eba88e7209e123df3eaede76cb08f9833f5db5f
@@@ -45,7 -45,7 +45,7 @@@
  #include <plat/fb.h>
  #include <plat/regs-fb-v4.h>
  
 -#include <mach/s3c6410.h>
 +#include <plat/s3c6410.h>
  #include <plat/clock.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
@@@ -233,7 -233,7 +233,7 @@@ static void __init anw6410_machine_init
  
  MACHINE_START(ANW6410, "A&W6410")
        /* Maintainer: Kwangwoo Lee <kwangwoo.lee@gmail.com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s3c6410_init_irq,
        .map_io         = anw6410_map_io,
index fb3d9cd1815665eb1e6b0ba3b4a5d7d02a2c8259,4c76e08423fbab0ad2c82221aa2f0ddba76b158f..d04b6544851031bf2800ebea7768e00e803fb67c
  #include <mach/hardware.h>
  #include <mach/map.h>
  
 -#include <mach/s3c6410.h>
  #include <mach/regs-sys.h>
  #include <mach/regs-gpio.h>
  #include <mach/regs-modem.h>
 +#include <mach/crag6410.h>
  
  #include <mach/regs-gpio-memport.h>
  
 +#include <plat/s3c6410.h>
  #include <plat/regs-serial.h>
  #include <plat/regs-fb-v4.h>
  #include <plat/fb.h>
  #include <plat/iic.h>
  #include <plat/pm.h>
  
 -#include <sound/wm8996.h>
 -#include <sound/wm8962.h>
 -#include <sound/wm9081.h>
 -
 -#define BANFF_PMIC_IRQ_BASE           IRQ_BOARD_START
 -#define GLENFARCLAS_PMIC_IRQ_BASE     (IRQ_BOARD_START + 64)
 -
 -#define PCA935X_GPIO_BASE             GPIO_BOARD_START
 -#define CODEC_GPIO_BASE               (GPIO_BOARD_START + 8)
 -#define GLENFARCLAS_PMIC_GPIO_BASE    (GPIO_BOARD_START + 16)
 -
  /* serial port setup */
  
  #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
@@@ -277,11 -287,6 +277,11 @@@ static struct platform_device speyside_
        .id             = -1,
  };
  
 +static struct platform_device lowland_device = {
 +      .name           = "lowland",
 +      .id             = -1,
 +};
 +
  static struct platform_device speyside_wm8962_device = {
        .name           = "speyside-wm8962",
        .id             = -1,
  static struct regulator_consumer_supply wallvdd_consumers[] = {
        REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
        REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
 +      REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
 +      REGULATOR_SUPPLY("SPKVDDR", "1-001a"),
  };
  
  static struct regulator_init_data wallvdd_data = {
@@@ -326,6 -329,9 +326,6 @@@ static struct platform_device *crag6410
        &s3c_device_fb,
        &s3c_device_ohci,
        &s3c_device_usb_hsotg,
 -      &s3c_device_adc,
 -      &s3c_device_rtc,
 -      &s3c_device_ts,
        &s3c_device_timer[0],
        &s3c64xx_device_iis0,
        &s3c64xx_device_iis1,
        &crag6410_backlight_device,
        &speyside_device,
        &speyside_wm8962_device,
 +      &lowland_device,
        &wallvdd_device,
  };
  
@@@ -348,12 -353,6 +348,12 @@@ static struct pca953x_platform_data cra
        .irq_base       = 0,
  };
  
 +/* VDDARM is controlled by DVS1 connected to GPK(0) */
 +static struct wm831x_buckv_pdata vddarm_pdata = {
 +      .dvs_control_src = 1,
 +      .dvs_gpio = S3C64XX_GPK(0),
 +};
 +
  static struct regulator_consumer_supply vddarm_consumers[] __initdata = {
        REGULATOR_SUPPLY("vddarm", NULL),
  };
@@@ -369,7 -368,6 +369,7 @@@ static struct regulator_init_data vddar
        .num_consumer_supplies = ARRAY_SIZE(vddarm_consumers),
        .consumer_supplies = vddarm_consumers,
        .supply_regulator = "WALLVDD",
 +      .driver_data = &vddarm_pdata,
  };
  
  static struct regulator_init_data vddint __initdata = {
@@@ -505,8 -503,6 +505,8 @@@ static struct wm831x_pdata crag_pmic_pd
        .backup = &banff_backup_pdata,
  
        .gpio_defaults = {
 +              /* GPIO5: DVS1_REQ - CMOS, DBVDD, active high */
 +              [4] = WM831X_GPN_DIR | WM831X_GPN_POL | WM831X_GPN_ENA | 0x8,
                /* GPIO11: Touchscreen data - CMOS, DBVDD, active high*/
                [10] = WM831X_GPN_POL | WM831X_GPN_ENA | 0x6,
                /* GPIO12: Touchscreen pen down - CMOS, DBVDD, active high*/
@@@ -564,12 -560,8 +564,12 @@@ static struct regulator_init_data pvdd_
  };
  
  static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
 +      REGULATOR_SUPPLY("LDOVDD", "1-001a"),
        REGULATOR_SUPPLY("PLLVDD", "1-001a"),
        REGULATOR_SUPPLY("DBVDD", "1-001a"),
 +      REGULATOR_SUPPLY("DBVDD1", "1-001a"),
 +      REGULATOR_SUPPLY("DBVDD2", "1-001a"),
 +      REGULATOR_SUPPLY("DBVDD3", "1-001a"),
        REGULATOR_SUPPLY("CPVDD", "1-001a"),
        REGULATOR_SUPPLY("AVDD2", "1-001a"),
        REGULATOR_SUPPLY("DCVDD", "1-001a"),
@@@ -622,16 -614,81 +622,16 @@@ static struct wm831x_pdata glenfarclas_
        .disable_touch = true,
  };
  
 -static struct wm8996_retune_mobile_config wm8996_retune[] = {
 -      {
 -              .name = "Sub LPF",
 -              .rate = 48000,
 -              .regs = {
 -                      0x6318, 0x6300, 0x1000, 0x0000, 0x0004, 0x2000, 0xF000,
 -                      0x0000, 0x0004, 0x2000, 0xF000, 0x0000, 0x0004, 0x2000,
 -                      0xF000, 0x0000, 0x0004, 0x1000, 0x0800, 0x4000
 -              },
 -      },
 -      {
 -              .name = "Sub HPF",
 -              .rate = 48000,
 -              .regs = {
 -                      0x000A, 0x6300, 0x1000, 0x0000, 0x0004, 0x2000, 0xF000,
 -                      0x0000, 0x0004, 0x2000, 0xF000, 0x0000, 0x0004, 0x2000,
 -                      0xF000, 0x0000, 0x0004, 0x1000, 0x0800, 0x4000
 -              },
 -      },
 -};
 -
 -static struct wm8996_pdata wm8996_pdata __initdata = {
 -      .ldo_ena = S3C64XX_GPN(7),
 -      .gpio_base = CODEC_GPIO_BASE,
 -      .micdet_def = 1,
 -      .inl_mode = WM8996_DIFFERRENTIAL_1,
 -      .inr_mode = WM8996_DIFFERRENTIAL_1,
 -
 -      .irq_flags = IRQF_TRIGGER_RISING,
 -
 -      .gpio_default = {
 -              0x8001, /* GPIO1 == ADCLRCLK1 */
 -              0x8001, /* GPIO2 == ADCLRCLK2, input due to CPU */
 -              0x0141, /* GPIO3 == HP_SEL */
 -              0x0002, /* GPIO4 == IRQ */
 -              0x020e, /* GPIO5 == CLKOUT */
 -      },
 -
 -      .retune_mobile_cfgs = wm8996_retune,
 -      .num_retune_mobile_cfgs = ARRAY_SIZE(wm8996_retune),
 -};
 -
 -static struct wm8962_pdata wm8962_pdata __initdata = {
 -      .gpio_init = {
 -              0,
 -              WM8962_GPIO_FN_OPCLK,
 -              WM8962_GPIO_FN_DMICCLK,
 -              0,
 -              0x8000 | WM8962_GPIO_FN_DMICDAT,
 -              WM8962_GPIO_FN_IRQ,    /* Open drain mode */
 -      },
 -      .irq_active_low = true,
 -};
 -
 -static struct wm9081_pdata wm9081_pdata __initdata = {
 -      .irq_high = false,
 -      .irq_cmos = false,
 -};
 -
  static struct i2c_board_info i2c_devs1[] __initdata = {
        { I2C_BOARD_INFO("wm8311", 0x34),
          .irq = S3C_EINT(0),
          .platform_data = &glenfarclas_pmic_pdata },
  
 +      { I2C_BOARD_INFO("wlf-gf-module", 0x24) },
 +      { I2C_BOARD_INFO("wlf-gf-module", 0x25) },
 +      { I2C_BOARD_INFO("wlf-gf-module", 0x26) },
 +
        { I2C_BOARD_INFO("wm1250-ev1", 0x27) },
 -      { I2C_BOARD_INFO("wm8996", 0x1a),
 -        .platform_data = &wm8996_pdata,
 -        .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
 -      },
 -      { I2C_BOARD_INFO("wm9081", 0x6c),
 -        .platform_data = &wm9081_pdata, },
 -      { I2C_BOARD_INFO("wm8962", 0x1a),
 -        .platform_data = &wm8962_pdata,
 -        .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
 -      },
  };
  
  static void __init crag6410_map_io(void)
@@@ -709,7 -766,7 +709,7 @@@ static void __init crag6410_machine_ini
  
  MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
        /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = crag6410_map_io,
        .init_machine   = crag6410_machine_init,
index 61f4fde088e983e7efdc6060d1c0d9c29ce7f3f7,19a0887e1c1e980c657f193e5ab7f6e7a509b2b2..952f75ff5debaa245e0cac3ac638067a9463958c
@@@ -37,7 -37,7 +37,7 @@@
  #include <plat/fb.h>
  #include <plat/nand.h>
  
 -#include <mach/s3c6410.h>
 +#include <plat/s3c6410.h>
  #include <plat/clock.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
@@@ -265,7 -265,7 +265,7 @@@ static void __init hmt_machine_init(voi
  
  MACHINE_START(HMT, "Airgoo-HMT")
        /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = hmt_map_io,
        .init_machine   = hmt_machine_init,
index 5abb6d442523288eb5f0be1d15f5b1bd6ebef32e,e91f63f7a490f2b87e63786f19859752bb1ec793..1bc85c35949894e7eff7607d572df777c604fcf0
@@@ -32,8 -32,8 +32,8 @@@
  #include <mach/regs-gpio.h>
  #include <mach/regs-modem.h>
  #include <mach/regs-srom.h>
 -#include <mach/s3c6410.h>
  
 +#include <plat/s3c6410.h>
  #include <plat/adc.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
@@@ -205,6 -205,12 +205,6 @@@ static struct platform_device mini6410_
        .dev.platform_data      = &mini6410_lcd_power_data,
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  static struct platform_device *mini6410_devices[] __initdata = {
        &mini6410_device_eth,
        &s3c_device_hsmmc0,
@@@ -313,7 -319,7 +313,7 @@@ static void __init mini6410_machine_ini
  
        s3c_nand_set_platdata(&mini6410_nand_info);
        s3c_fb_set_platdata(&mini6410_lcd_pdata);
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        /* configure nCS1 width to 16 bits */
  
  
  MACHINE_START(MINI6410, "MINI6410")
        /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = mini6410_map_io,
        .init_machine   = mini6410_machine_init,
index 0f4316a2dc0b8103776ae1dcc47e328cf68d80ec,c30f2e5e0d85ba01bf0e98a083dba3458832043a..cb13cba98b3d00fba0c0c7a73795a597288153ce
@@@ -39,7 -39,7 +39,7 @@@
  #include <plat/iic.h>
  #include <plat/fb.h>
  
 -#include <mach/s3c6410.h>
 +#include <plat/s3c6410.h>
  #include <plat/clock.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
@@@ -97,7 -97,7 +97,7 @@@ static void __init ncp_machine_init(voi
  
  MACHINE_START(NCP, "NCP")
        /* Maintainer: Samsung Electronics */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = ncp_map_io,
        .init_machine   = ncp_machine_init,
index 1073d8105bab02a669e2196ee74b264babc57552,10870cb5b39e2eaa25843c475b19dc5b6df4a147..87281e4b847134da27b461c2d05bec07063ee759
@@@ -33,8 -33,8 +33,8 @@@
  #include <mach/regs-gpio.h>
  #include <mach/regs-modem.h>
  #include <mach/regs-srom.h>
 -#include <mach/s3c6410.h>
  
 +#include <plat/s3c6410.h>
  #include <plat/adc.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
@@@ -198,6 -198,12 +198,6 @@@ static struct platform_device *real6410
        &s3c_device_ohci,
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  static void __init real6410_map_io(void)
  {
        u32 tmp;
@@@ -294,7 -300,7 +294,7 @@@ static void __init real6410_machine_ini
  
        s3c_fb_set_platdata(&real6410_lcd_pdata);
        s3c_nand_set_platdata(&real6410_nand_info);
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        /* configure nCS1 width to 16 bits */
  
  
  MACHINE_START(REAL6410, "REAL6410")
        /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s3c6410_init_irq,
        .map_io         = real6410_map_io,
index 30e906b842eabc6b03d268dedb90a43264862b42,cbb57ded3d95b72e4a4bd099a06ea21286ef14bf..94c831d8836502165477cda3c1e3124b318bd37f
@@@ -22,8 -22,8 +22,8 @@@
  
  #include <mach/map.h>
  #include <mach/regs-gpio.h>
 -#include <mach/s3c6410.h>
  
 +#include <plat/s3c6410.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
  #include <plat/fb.h>
@@@ -146,7 -146,7 +146,7 @@@ static void __init smartq5_machine_init
  
  MACHINE_START(SMARTQ5, "SmartQ 5")
        /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = smartq_map_io,
        .init_machine   = smartq5_machine_init,
index 9a71c2bf610dd7465b25c603f22d1c20871cbde8,04f914b85fdffcb7b1cad45550dcecdcd767ddaa..f112547ce80a123fdf9f495624ebe031abf28bd5
@@@ -22,8 -22,8 +22,8 @@@
  
  #include <mach/map.h>
  #include <mach/regs-gpio.h>
 -#include <mach/s3c6410.h>
  
 +#include <plat/s3c6410.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
  #include <plat/fb.h>
@@@ -162,7 -162,7 +162,7 @@@ static void __init smartq7_machine_init
  
  MACHINE_START(SMARTQ7, "SmartQ 7")
        /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s3c6410_init_irq,
        .map_io         = smartq_map_io,
        .init_machine   = smartq7_machine_init,
index fc7cb03e188d65b67150b6574a42a2f5bc8674d9,6fd5e95f8f757cfdd8e66ef27b3532e9ee2794d4..73450c2b530a661b131bf9e9e3824f7423ee94ba
@@@ -31,7 -31,7 +31,7 @@@
  
  #include <plat/regs-serial.h>
  
 -#include <mach/s3c6400.h>
 +#include <plat/s3c6400.h>
  #include <plat/clock.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
@@@ -85,7 -85,7 +85,7 @@@ static void __init smdk6400_machine_ini
  
  MACHINE_START(SMDK6400, "SMDK6400")
        /* Maintainer: Ben Dooks <ben-linux@fluff.org> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s3c6400_init_irq,
        .map_io         = smdk6400_map_io,
index a817d629c0e9d395680b34da887a50b3520efcce,dcf2d73b47837b990907b39e32370e18c5a4bfdf..8bc8edd85e5a33418c6b50438037cc3878f82bca
@@@ -63,7 -63,7 +63,7 @@@
  #include <plat/fb.h>
  #include <plat/gpio-cfg.h>
  
 -#include <mach/s3c6410.h>
 +#include <plat/s3c6410.h>
  #include <plat/clock.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
@@@ -262,6 -262,45 +262,6 @@@ static struct samsung_keypad_platdata s
        .cols           = 8,
  };
  
 -static int smdk6410_backlight_init(struct device *dev)
 -{
 -      int ret;
 -
 -      ret = gpio_request(S3C64XX_GPF(15), "Backlight");
 -      if (ret) {
 -              printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
 -              return ret;
 -      }
 -
 -      /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
 -      s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
 -
 -      return 0;
 -}
 -
 -static void smdk6410_backlight_exit(struct device *dev)
 -{
 -      s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
 -      gpio_free(S3C64XX_GPF(15));
 -}
 -
 -static struct platform_pwm_backlight_data smdk6410_backlight_data = {
 -      .pwm_id         = 1,
 -      .max_brightness = 255,
 -      .dft_brightness = 255,
 -      .pwm_period_ns  = 78770,
 -      .init           = smdk6410_backlight_init,
 -      .exit           = smdk6410_backlight_exit,
 -};
 -
 -static struct platform_device smdk6410_backlight_device = {
 -      .name           = "pwm-backlight",
 -      .dev            = {
 -              .parent         = &s3c_device_timer[1].dev,
 -              .platform_data  = &smdk6410_backlight_data,
 -      },
 -};
 -
  static struct map_desc smdk6410_iodesc[] = {};
  
  static struct platform_device *smdk6410_devices[] __initdata = {
@@@ -619,6 -658,12 +619,6 @@@ static struct i2c_board_info i2c_devs1[
        { I2C_BOARD_INFO("24c128", 0x57), },    /* Samsung S524AD0XD1 */
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  /* LCD Backlight data */
  static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = {
        .no = S3C64XX_GPF(15),
@@@ -660,7 -705,7 +660,7 @@@ static void __init smdk6410_machine_ini
  
        samsung_keypad_set_platdata(&smdk6410_keypad_data);
  
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        /* configure nCS1 width to 16 bits */
  
  
  MACHINE_START(SMDK6410, "SMDK6410")
        /* Maintainer: Ben Dooks <ben-linux@fluff.org> */
-       .boot_params    = S3C64XX_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s3c6410_init_irq,
        .map_io         = smdk6410_map_io,
index 617da3b3bfb716a8d7f8082acaccad28b517296d,8a938542c54d0f8a64ea66250dcb3a901df724ae..ecab40cf19ab15b906576131d3f829f62f52f1a8
@@@ -20,6 -20,7 +20,7 @@@
  #include <linux/serial_core.h>
  #include <linux/platform_device.h>
  #include <linux/sched.h>
+ #include <linux/dma-mapping.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
@@@ -38,7 -39,6 +39,7 @@@
  #include <plat/s5p6440.h>
  #include <plat/s5p6450.h>
  #include <plat/adc-core.h>
 +#include <plat/fb-core.h>
  
  /* Initial IO mappings */
  
@@@ -109,20 -109,20 +110,22 @@@ void __init s5p6440_map_io(void
  {
        /* initialize any device information early */
        s3c_adc_setname("s3c64xx-adc");
 +      s3c_fb_setname("s5p64x0-fb");
  
        iotable_init(s5p64x0_iodesc, ARRAY_SIZE(s5p64x0_iodesc));
        iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc));
+       init_consistent_dma_size(SZ_8M);
  }
  
  void __init s5p6450_map_io(void)
  {
        /* initialize any device information early */
        s3c_adc_setname("s3c64xx-adc");
 +      s3c_fb_setname("s5p64x0-fb");
  
        iotable_init(s5p64x0_iodesc, ARRAY_SIZE(s5p64x0_iodesc));
        iotable_init(s5p6450_iodesc, ARRAY_SIZE(s5p6450_iodesc));
+       init_consistent_dma_size(SZ_8M);
  }
  
  /*
index b0465d4e84e7aac8e358db7541eb55e04ffa6956,3b84e9bfd073e3c81b38a7e7a8ecd0db482cdd68..4a1250cd1356b364c5a4c38160610caadccf3292
@@@ -23,9 -23,6 +23,9 @@@
  #include <linux/clk.h>
  #include <linux/gpio.h>
  #include <linux/pwm_backlight.h>
 +#include <linux/fb.h>
 +
 +#include <video/platform_lcd.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
@@@ -50,8 -47,6 +50,8 @@@
  #include <plat/ts.h>
  #include <plat/s5p-time.h>
  #include <plat/backlight.h>
 +#include <plat/fb.h>
 +#include <plat/regs-fb.h>
  
  #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@@ -97,59 -92,6 +97,59 @@@ static struct s3c2410_uartcfg smdk6440_
        },
  };
  
 +/* Frame Buffer */
 +static struct s3c_fb_pd_win smdk6440_fb_win0 = {
 +      .win_mode = {
 +              .left_margin    = 8,
 +              .right_margin   = 13,
 +              .upper_margin   = 7,
 +              .lower_margin   = 5,
 +              .hsync_len      = 3,
 +              .vsync_len      = 1,
 +              .xres           = 800,
 +              .yres           = 480,
 +      },
 +      .max_bpp        = 32,
 +      .default_bpp    = 24,
 +};
 +
 +static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
 +      .win[0]         = &smdk6440_fb_win0,
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .setup_gpio     = s5p64x0_fb_gpio_setup_24bpp,
 +};
 +
 +/* LCD power controller */
 +static void smdk6440_lte480_reset_power(struct plat_lcd_data *pd,
 +                                       unsigned int power)
 +{
 +      int err;
 +
 +      if (power) {
 +              err = gpio_request(S5P6440_GPN(5), "GPN");
 +              if (err) {
 +                      printk(KERN_ERR "failed to request GPN for lcd reset\n");
 +                      return;
 +              }
 +
 +              gpio_direction_output(S5P6440_GPN(5), 1);
 +              gpio_set_value(S5P6440_GPN(5), 0);
 +              gpio_set_value(S5P6440_GPN(5), 1);
 +              gpio_free(S5P6440_GPN(5));
 +      }
 +}
 +
 +static struct plat_lcd_data smdk6440_lcd_power_data = {
 +      .set_power      = smdk6440_lte480_reset_power,
 +};
 +
 +static struct platform_device smdk6440_lcd_lte480wv = {
 +      .name                   = "platform-lcd",
 +      .dev.parent             = &s3c_device_fb.dev,
 +      .dev.platform_data      = &smdk6440_lcd_power_data,
 +};
 +
  static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6440_device_iis,
 +      &s3c_device_fb,
 +      &smdk6440_lcd_lte480wv,
  };
  
  static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
@@@ -189,6 -129,12 +189,6 @@@ static struct i2c_board_info smdk6440_i
        /* To be populated */
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  /* LCD Backlight data */
  static struct samsung_bl_gpio_info smdk6440_bl_gpio_info = {
        .no = S5P6440_GPF(15),
@@@ -207,20 -153,9 +207,20 @@@ static void __init smdk6440_map_io(void
        s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
  }
  
 +static void s5p6440_set_lcd_interface(void)
 +{
 +      unsigned int cfg;
 +
 +      /* select TFT LCD type (RGB I/F) */
 +      cfg = __raw_readl(S5P64X0_SPCON0);
 +      cfg &= ~S5P64X0_SPCON0_LCD_SEL_MASK;
 +      cfg |= S5P64X0_SPCON0_LCD_SEL_RGB;
 +      __raw_writel(cfg, S5P64X0_SPCON0);
 +}
 +
  static void __init smdk6440_machine_init(void)
  {
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        s3c_i2c0_set_platdata(&s5p6440_i2c0_data);
        s3c_i2c1_set_platdata(&s5p6440_i2c1_data);
  
        samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
  
 +      s5p6440_set_lcd_interface();
 +      s3c_fb_set_platdata(&smdk6440_lcd_pdata);
 +
        platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
  }
  
  MACHINE_START(SMDK6440, "SMDK6440")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
-       .boot_params    = S5P64X0_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s5p6440_init_irq,
        .map_io         = smdk6440_map_io,
index 2a69caa70afd648cd8b82ee035642394725286c5,d99d29b5558e9b45b7777c5a4ae576265b5d2963..0ab129ecf00956decaab6e1b60b55d71e7a841fa
@@@ -23,9 -23,6 +23,9 @@@
  #include <linux/clk.h>
  #include <linux/gpio.h>
  #include <linux/pwm_backlight.h>
 +#include <linux/fb.h>
 +
 +#include <video/platform_lcd.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
@@@ -50,8 -47,6 +50,8 @@@
  #include <plat/ts.h>
  #include <plat/s5p-time.h>
  #include <plat/backlight.h>
 +#include <plat/fb.h>
 +#include <plat/regs-fb.h>
  
  #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@@ -115,59 -110,6 +115,59 @@@ static struct s3c2410_uartcfg smdk6450_
  #endif
  };
  
 +/* Frame Buffer */
 +static struct s3c_fb_pd_win smdk6450_fb_win0 = {
 +      .win_mode       = {
 +              .left_margin    = 8,
 +              .right_margin   = 13,
 +              .upper_margin   = 7,
 +              .lower_margin   = 5,
 +              .hsync_len      = 3,
 +              .vsync_len      = 1,
 +              .xres           = 800,
 +              .yres           = 480,
 +      },
 +      .max_bpp        = 32,
 +      .default_bpp    = 24,
 +};
 +
 +static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
 +      .win[0]         = &smdk6450_fb_win0,
 +      .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
 +      .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 +      .setup_gpio     = s5p64x0_fb_gpio_setup_24bpp,
 +};
 +
 +/* LCD power controller */
 +static void smdk6450_lte480_reset_power(struct plat_lcd_data *pd,
 +                                       unsigned int power)
 +{
 +      int err;
 +
 +      if (power) {
 +              err = gpio_request(S5P6450_GPN(5), "GPN");
 +              if (err) {
 +                      printk(KERN_ERR "failed to request GPN for lcd reset\n");
 +                      return;
 +              }
 +
 +              gpio_direction_output(S5P6450_GPN(5), 1);
 +              gpio_set_value(S5P6450_GPN(5), 0);
 +              gpio_set_value(S5P6450_GPN(5), 1);
 +              gpio_free(S5P6450_GPN(5));
 +      }
 +}
 +
 +static struct plat_lcd_data smdk6450_lcd_power_data = {
 +      .set_power      = smdk6450_lte480_reset_power,
 +};
 +
 +static struct platform_device smdk6450_lcd_lte480wv = {
 +      .name                   = "platform-lcd",
 +      .dev.parent             = &s3c_device_fb.dev,
 +      .dev.platform_data      = &smdk6450_lcd_power_data,
 +};
 +
  static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6450_device_iis0,
 +      &s3c_device_fb,
 +      &smdk6450_lcd_lte480wv,
 +
        /* s5p6450_device_spi0 will be added */
  };
  
@@@ -209,6 -148,12 +209,6 @@@ static struct i2c_board_info smdk6450_i
        { I2C_BOARD_INFO("24c128", 0x57), },/* Samsung S524AD0XD1 EEPROM */
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  /* LCD Backlight data */
  static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = {
        .no = S5P6450_GPF(15),
@@@ -227,20 -172,9 +227,20 @@@ static void __init smdk6450_map_io(void
        s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
  }
  
 +static void s5p6450_set_lcd_interface(void)
 +{
 +      unsigned int cfg;
 +
 +      /* select TFT LCD type (RGB I/F) */
 +      cfg = __raw_readl(S5P64X0_SPCON0);
 +      cfg &= ~S5P64X0_SPCON0_LCD_SEL_MASK;
 +      cfg |= S5P64X0_SPCON0_LCD_SEL_RGB;
 +      __raw_writel(cfg, S5P64X0_SPCON0);
 +}
 +
  static void __init smdk6450_machine_init(void)
  {
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        s3c_i2c0_set_platdata(&s5p6450_i2c0_data);
        s3c_i2c1_set_platdata(&s5p6450_i2c1_data);
  
        samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
  
 +      s5p6450_set_lcd_interface();
 +      s3c_fb_set_platdata(&smdk6450_lcd_pdata);
 +
        platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
  }
  
  MACHINE_START(SMDK6450, "SMDK6450")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
-       .boot_params    = S5P64X0_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
  
        .init_irq       = s5p6450_init_irq,
        .map_io         = smdk6450_map_io,
index 0b70762ebf1a358d45671de4ca9c0f1f873d12ec,688f45b7cd007ba3986ffa93ea9c1a84787dc18a..26f5c91c9427be2c9642858c01f4f7205d165e3b
@@@ -203,6 -203,12 +203,6 @@@ static struct platform_device *smdkc100
        &s5pc100_device_spdif,
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  /* LCD Backlight data */
  static struct samsung_bl_gpio_info smdkc100_bl_gpio_info = {
        .no = S5PC100_GPD(0),
@@@ -222,7 -228,7 +222,7 @@@ static void __init smdkc100_map_io(void
  
  static void __init smdkc100_machine_init(void)
  {
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        /* I2C */
        s3c_i2c0_set_platdata(NULL);
  
  MACHINE_START(SMDKC100, "SMDKC100")
        /* Maintainer: Byungho Min <bhmin@samsung.com> */
-       .boot_params    = S5P_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s5pc100_init_irq,
        .map_io         = smdkc100_map_io,
        .init_machine   = smdkc100_machine_init,
index 6b8cdccbe931002710d359fe98cd15e7cf5bc373,91145720822c09f5f85b3018d4648681f62e1bea..84ec746332328d0cfd5b5f81ed1e338c7399d428
@@@ -20,6 -20,7 +20,7 @@@
  #include <linux/sysdev.h>
  #include <linux/platform_device.h>
  #include <linux/sched.h>
+ #include <linux/dma-mapping.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
@@@ -41,7 -42,6 +42,7 @@@
  #include <plat/keypad-core.h>
  #include <plat/sdhci.h>
  #include <plat/reset.h>
 +#include <plat/tv-core.h>
  
  /* Initial IO mappings */
  
@@@ -120,6 -120,7 +121,7 @@@ static void s5pv210_sw_reset(void
  void __init s5pv210_map_io(void)
  {
        iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc));
+       init_consistent_dma_size(14 << 20);
  
        /* initialise device information early */
        s5pv210_default_sdhci0();
  
        /* Use s5pv210-keypad instead of samsung-keypad */
        samsung_keypad_setname("s5pv210-keypad");
 +
 +      /* setup TV devices */
 +      s5p_hdmi_setname("s5pv210-hdmi");
  }
  
  void __init s5pv210_init_clocks(int xtal)
index 61da2058df963a54cd2550891006ac91fb6faff6,061cc7e4f48c1fcd750bf99315d5d837153821fb..15edcae448b9a81411dda546d48803875eb239b1
  #include <plat/s5p-time.h>
  #include <plat/mfc.h>
  #include <plat/regs-fb-v4.h>
 +#include <plat/camport.h>
 +
 +#include <media/v4l2-mediabus.h>
 +#include <media/s5p_fimc.h>
 +#include <media/noon010pc30.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define GONI_UCON_DEFAULT     (S3C2410_UCON_TXILEVEL |        \
@@@ -277,14 -272,6 +277,14 @@@ static void __init goni_tsp_init(void
        i2c2_devs[0].irq = gpio_to_irq(gpio);
  }
  
 +static void goni_camera_init(void)
 +{
 +      s5pv210_fimc_setup_gpio(S5P_CAMPORT_A);
 +
 +      /* Set max driver strength on CAM_A_CLKOUT pin. */
 +      s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4);
 +}
 +
  /* MAX8998 regulators */
  #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
  
@@@ -298,7 -285,6 +298,7 @@@ static struct regulator_consumer_suppl
  
  static struct regulator_consumer_supply goni_ldo8_consumers[] = {
        REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
 +      REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
  };
  
  static struct regulator_consumer_supply goni_ldo11_consumers[] = {
@@@ -489,10 -475,6 +489,10 @@@ static struct regulator_consumer_suppl
  static struct regulator_consumer_supply buck2_consumer =
        REGULATOR_SUPPLY("vddint", NULL);
  
 +static struct regulator_consumer_supply buck3_consumer =
 +      REGULATOR_SUPPLY("vdet", "s5p-sdo");
 +
 +
  static struct regulator_init_data goni_buck1_data = {
        .constraints    = {
                .name           = "VARM_1.2V",
@@@ -529,8 -511,6 +529,8 @@@ static struct regulator_init_data goni_
                        .enabled = 1,
                },
        },
 +      .num_consumer_supplies  = 1,
 +      .consumer_supplies      = &buck3_consumer,
  };
  
  static struct regulator_init_data goni_buck4_data = {
@@@ -821,34 -801,6 +821,34 @@@ static void goni_setup_sdhci(void
        s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
  };
  
 +static struct noon010pc30_platform_data noon010pc30_pldata = {
 +      .clk_rate       = 16000000UL,
 +      .gpio_nreset    = S5PV210_GPB(2), /* CAM_CIF_NRST */
 +      .gpio_nstby     = S5PV210_GPB(0), /* CAM_CIF_NSTBY */
 +};
 +
 +static struct i2c_board_info noon010pc30_board_info = {
 +      I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
 +      .platform_data = &noon010pc30_pldata,
 +};
 +
 +static struct s5p_fimc_isp_info goni_camera_sensors[] = {
 +      {
 +              .mux_id         = 0,
 +              .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
 +                                V4L2_MBUS_VSYNC_ACTIVE_LOW,
 +              .bus_type       = FIMC_ITU_601,
 +              .board_info     = &noon010pc30_board_info,
 +              .i2c_bus_num    = 0,
 +              .clk_frequency  = 16000000UL,
 +      },
 +};
 +
 +struct s5p_platform_fimc goni_fimc_md_platdata __initdata = {
 +      .isp_info       = goni_camera_sensors,
 +      .num_clients    = ARRAY_SIZE(goni_camera_sensors),
 +};
 +
  static struct platform_device *goni_devices[] __initdata = {
        &s3c_device_fb,
        &s5p_device_onenand,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
 +      &s5p_device_mixer,
 +      &s5p_device_sdo,
        &s3c_device_i2c0,
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
 +      &s5p_device_fimc_md,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc1,
        &s3c_device_hsmmc2,
@@@ -935,12 -884,6 +935,12 @@@ static void __init goni_machine_init(vo
        /* FB */
        s3c_fb_set_platdata(&goni_lcd_pdata);
  
 +      /* FIMC */
 +      s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata),
 +                       &s5p_device_fimc_md);
 +
 +      goni_camera_init();
 +
        /* SPI */
        spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
  
  
  MACHINE_START(GONI, "GONI")
        /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
-       .boot_params    = S5P_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = goni_map_io,
        .init_machine   = goni_machine_init,
index 4b27bcaf676ae912592c105d34cfc70b3e0cbc3a,e73e3b6d41b56db11f9e42ed24ab3afaa083a0a7..a9106c392398c1c61dc16f01914508b7b5a8956c
@@@ -265,6 -265,12 +265,6 @@@ static struct i2c_board_info smdkv210_i
        /* To Be Updated */
  };
  
 -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
 -      .delay                  = 10000,
 -      .presc                  = 49,
 -      .oversampling_shift     = 2,
 -};
 -
  /* LCD Backlight data */
  static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = {
        .no = S5PV210_GPD0(3),
@@@ -290,7 -296,7 +290,7 @@@ static void __init smdkv210_machine_ini
        smdkv210_dm9000_init();
  
        samsung_keypad_set_platdata(&smdkv210_keypad_data);
 -      s3c24xx_ts_set_platdata(&s3c_ts_platform);
 +      s3c24xx_ts_set_platdata(NULL);
  
        s3c_i2c0_set_platdata(NULL);
        s3c_i2c1_set_platdata(NULL);
  
  MACHINE_START(SMDKV210, "SMDKV210")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
-       .boot_params    = S5P_PA_SDRAM + 0x100,
+       .atag_offset    = 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = smdkv210_map_io,
        .init_machine   = smdkv210_machine_init,
index cdfdd624d21dd27719c156639588c06e95be1b9d,167a67c5ca54312f516d0a13f505f67bf347bbe0..5fde49da399a3a09c3d80dde524a833480662079
@@@ -37,6 -37,7 +37,7 @@@
  #include <linux/mmc/sh_mobile_sdhi.h>
  #include <linux/mfd/tmio.h>
  #include <linux/sh_clk.h>
+ #include <linux/dma-mapping.h>
  #include <video/sh_mobile_lcdc.h>
  #include <video/sh_mipi_dsi.h>
  #include <sound/sh_fsi.h>
@@@ -341,7 -342,6 +342,7 @@@ static struct platform_device mipidsi0_
  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_caps      = MMC_CAP_SD_HIGHSPEED,
        .tmio_ocr_mask  = MMC_VDD_27_28 | MMC_VDD_28_29,
  };
@@@ -383,7 -383,7 +384,7 @@@ void ag5evm_sdhi1_set_pwr(struct platfo
  }
  
  static struct sh_mobile_sdhi_info sh_sdhi1_info = {
 -      .tmio_flags     = TMIO_MMC_WRPROTECT_DISABLE,
 +      .tmio_flags     = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
        .tmio_caps      = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
        .tmio_ocr_mask  = MMC_VDD_32_33 | MMC_VDD_33_34,
        .set_pwr        = ag5evm_sdhi1_set_pwr,
@@@ -447,6 -447,8 +448,8 @@@ static struct map_desc ag5evm_io_desc[
  static void __init ag5evm_map_io(void)
  {
        iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
  
        /* setup early devices and console here as well */
        sh73a0_add_early_devices();
index 523f608eb8cf0109609188b4589f56e03bdc4a36,ec8f9d960e27db23689d8013af28714f092a15af..b622d8d3ab7297da7bd1b3d76ec8a89a55d5f00f
@@@ -42,6 -42,7 +42,7 @@@
  #include <linux/leds.h>
  #include <linux/input/sh_keysc.h>
  #include <linux/usb/r8a66597.h>
+ #include <linux/dma-mapping.h>
  
  #include <media/sh_mobile_ceu.h>
  #include <media/sh_mobile_csi2.h>
@@@ -1170,6 -1171,8 +1171,8 @@@ static struct map_desc ap4evb_io_desc[
  static void __init ap4evb_map_io(void)
  {
        iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
  
        /* setup early devices and console here as well */
        sh7372_add_early_devices();
@@@ -1412,7 -1415,6 +1415,7 @@@ static void __init ap4evb_init(void
        fsi_init_pm_clock();
        sh7372_pm_init();
        pm_clk_add(&fsi_device.dev, "spu2");
 +      pm_clk_add(&lcdc1_device.dev, "hdmi");
  }
  
  static void __init ap4evb_timer_init(void)
index 17c19dc2560431b99699e28569f52f68f9202cc8,671925dcf5f987278fd287e8aa41609fadb58a1e..de2253d7f15764197b8eea75abd683a2dffea30b
@@@ -45,6 -45,7 +45,7 @@@
  #include <linux/tca6416_keypad.h>
  #include <linux/usb/r8a66597.h>
  #include <linux/usb/renesas_usbhs.h>
+ #include <linux/dma-mapping.h>
  
  #include <video/sh_mobile_hdmi.h>
  #include <video/sh_mobile_lcdc.h>
@@@ -641,8 -642,6 +642,8 @@@ static struct usbhs_private usbhs0_priv
                },
                .driver_param = {
                        .buswait_bwait  = 4,
 +                      .d0_tx_id       = SHDMA_SLAVE_USB0_TX,
 +                      .d1_rx_id       = SHDMA_SLAVE_USB0_RX,
                },
        },
  };
@@@ -812,8 -811,6 +813,8 @@@ static struct usbhs_private usbhs1_priv
                        .buswait_bwait  = 4,
                        .pipe_type      = usbhs1_pipe_cfg,
                        .pipe_size      = ARRAY_SIZE(usbhs1_pipe_cfg),
 +                      .d0_tx_id       = SHDMA_SLAVE_USB1_TX,
 +                      .d1_rx_id       = SHDMA_SLAVE_USB1_RX,
                },
        },
  };
@@@ -1381,6 -1378,8 +1382,8 @@@ static struct map_desc mackerel_io_desc
  static void __init mackerel_map_io(void)
  {
        iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
  
        /* setup early devices and console here as well */
        sh7372_add_early_devices();
@@@ -1592,7 -1591,6 +1595,7 @@@ static void __init mackerel_init(void
        hdmi_init_pm_clock();
        sh7372_pm_init();
        pm_clk_add(&fsi_device.dev, "spu2");
 +      pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
  }
  
  static void __init mackerel_timer_init(void)
index d0d267a8d3f927dc0af84ebbccde640fa46ebafa,de72058180a6e23c1f4c77a8235a46f65570f75e..1fafc324460743654a46079c87781c99dfe3c10d
@@@ -318,10 -318,6 +318,10 @@@ static struct clk v2m_sp804_clk = 
        .rate   = 1000000,
  };
  
 +static struct clk v2m_ref_clk = {
 +      .rate   = 32768,
 +};
 +
  static struct clk dummy_apb_pclk;
  
  static struct clk_lookup v2m_lookups[] = {
        }, {    /* CLCD */
                .dev_id         = "mb:clcd",
                .clk            = &osc1_clk,
 +      }, {    /* SP805 WDT */
 +              .dev_id         = "mb:wdt",
 +              .clk            = &v2m_ref_clk,
        }, {    /* SP804 timers */
                .dev_id         = "sp804",
                .con_id         = "v2m-timer0",
@@@ -443,7 -436,7 +443,7 @@@ static void __init v2m_init(void
  }
  
  MACHINE_START(VEXPRESS, "ARM-Versatile Express")
-       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
+       .atag_offset    = 0x100,
        .map_io         = v2m_map_io,
        .init_early     = v2m_init_early,
        .init_irq       = v2m_init_irq,
index c3ff82f92d9c812357f99ab7427a7788e718eb13,50be842e89fd06ca43c9dd71a296509ad065bb1b..01f5987eb1ad114aa7786537a0c6834efd2bee32
  #include <linux/device.h>
  #include <linux/dma-mapping.h>
  #include <linux/highmem.h>
+ #include <linux/slab.h>
  
  #include <asm/memory.h>
  #include <asm/highmem.h>
  #include <asm/cacheflush.h>
  #include <asm/tlbflush.h>
  #include <asm/sizes.h>
+ #include <asm/mach/arch.h>
  
  #include "mm.h"
  
@@@ -117,26 -119,37 +119,37 @@@ static void __dma_free_buffer(struct pa
  }
  
  #ifdef CONFIG_MMU
- /* Sanity check size */
- #if (CONSISTENT_DMA_SIZE % SZ_2M)
- #error "CONSISTENT_DMA_SIZE must be multiple of 2MiB"
- #endif
  
- #define CONSISTENT_OFFSET(x)  (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT)
- #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT)
- #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT)
+ #define CONSISTENT_OFFSET(x)  (((unsigned long)(x) - consistent_base) >> PAGE_SHIFT)
+ #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - consistent_base) >> PGDIR_SHIFT)
  
  /*
   * These are the page tables (2MB each) covering uncached, DMA consistent allocations
   */
- static pte_t *consistent_pte[NUM_CONSISTENT_PTES];
+ static pte_t **consistent_pte;
+ #define DEFAULT_CONSISTENT_DMA_SIZE SZ_2M
+ unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE;
+ void __init init_consistent_dma_size(unsigned long size)
+ {
+       unsigned long base = CONSISTENT_END - ALIGN(size, SZ_2M);
+       BUG_ON(consistent_pte); /* Check we're called before DMA region init */
+       BUG_ON(base < VMALLOC_END);
+       /* Grow region to accommodate specified size  */
+       if (base < consistent_base)
+               consistent_base = base;
+ }
  
  #include "vmregion.h"
  
  static struct arm_vmregion_head consistent_head = {
        .vm_lock        = __SPIN_LOCK_UNLOCKED(&consistent_head.vm_lock),
        .vm_list        = LIST_HEAD_INIT(consistent_head.vm_list),
-       .vm_start       = CONSISTENT_BASE,
        .vm_end         = CONSISTENT_END,
  };
  
@@@ -155,7 -168,17 +168,17 @@@ static int __init consistent_init(void
        pmd_t *pmd;
        pte_t *pte;
        int i = 0;
-       u32 base = CONSISTENT_BASE;
+       unsigned long base = consistent_base;
+       unsigned long num_ptes = (CONSISTENT_END - base) >> PGDIR_SHIFT;
+       consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL);
+       if (!consistent_pte) {
+               pr_err("%s: no memory\n", __func__);
+               return -ENOMEM;
+       }
+       pr_debug("DMA memory: 0x%08lx - 0x%08lx:\n", base, CONSISTENT_END);
+       consistent_head.vm_start = base;
  
        do {
                pgd = pgd_offset(&init_mm, base);
@@@ -198,7 -221,7 +221,7 @@@ __dma_alloc_remap(struct page *page, si
        size_t align;
        int bit;
  
-       if (!consistent_pte[0]) {
+       if (!consistent_pte) {
                printk(KERN_ERR "%s: not initialised\n", __func__);
                dump_stack();
                return NULL;
@@@ -324,8 -347,6 +347,8 @@@ __dma_alloc(struct device *dev, size_t 
  
        if (addr)
                *handle = pfn_to_dma(dev, page_to_pfn(page));
 +      else
 +              __dma_free_buffer(page, size);
  
        return addr;
  }
diff --combined arch/arm/mm/init.c
index cc7e2d8be9aa6f55cd1f670c998e1c065acec75e,64ab41348f30818f799daabcc0550f428758025f..34409a08ba0d51d4c08e697db390248492a60fd9
@@@ -298,7 -298,7 +298,7 @@@ static void __init arm_bootmem_free(uns
  #ifdef CONFIG_HAVE_ARCH_PFN_VALID
  int pfn_valid(unsigned long pfn)
  {
 -      return memblock_is_memory(pfn << PAGE_SHIFT);
 +      return memblock_is_memory(__pfn_to_phys(pfn));
  }
  EXPORT_SYMBOL(pfn_valid);
  #endif
@@@ -653,9 -653,6 +653,6 @@@ void __init mem_init(void
                        "    ITCM    : 0x%08lx - 0x%08lx   (%4ld kB)\n"
  #endif
                        "    fixmap  : 0x%08lx - 0x%08lx   (%4ld kB)\n"
- #ifdef CONFIG_MMU
-                       "    DMA     : 0x%08lx - 0x%08lx   (%4ld MB)\n"
- #endif
                        "    vmalloc : 0x%08lx - 0x%08lx   (%4ld MB)\n"
                        "    lowmem  : 0x%08lx - 0x%08lx   (%4ld MB)\n"
  #ifdef CONFIG_HIGHMEM
                        MLK(ITCM_OFFSET, (unsigned long) itcm_end),
  #endif
                        MLK(FIXADDR_START, FIXADDR_TOP),
- #ifdef CONFIG_MMU
-                       MLM(CONSISTENT_BASE, CONSISTENT_END),
- #endif
                        MLM(VMALLOC_START, VMALLOC_END),
                        MLM(PAGE_OFFSET, (unsigned long)high_memory),
  #ifdef CONFIG_HIGHMEM
         * be detected at build time already.
         */
  #ifdef CONFIG_MMU
-       BUILD_BUG_ON(VMALLOC_END                        > CONSISTENT_BASE);
-       BUG_ON(VMALLOC_END                              > CONSISTENT_BASE);
        BUILD_BUG_ON(TASK_SIZE                          > MODULES_VADDR);
        BUG_ON(TASK_SIZE                                > MODULES_VADDR);
  #endif
index 5ffbea60be451e119fa49b0228d7a31541589aaf,ebe67ea8d06876e0d753f4670feba3e73e3cd48c..7f2969eadb857cd09b5797840e5359a343adcfb9
  
  #define OMAP44XX_EMIF2_PHYS   OMAP44XX_EMIF2_BASE
                                                /* 0x4d000000 --> 0xfd200000 */
 -#define OMAP44XX_EMIF2_VIRT   (OMAP44XX_EMIF2_PHYS + OMAP4_L3_PER_IO_OFFSET)
  #define OMAP44XX_EMIF2_SIZE   SZ_1M
 +#define OMAP44XX_EMIF2_VIRT   (OMAP44XX_EMIF1_VIRT + OMAP44XX_EMIF1_SIZE)
  
  #define OMAP44XX_DMM_PHYS     OMAP44XX_DMM_BASE
                                                /* 0x4e000000 --> 0xfd300000 */
 -#define OMAP44XX_DMM_VIRT     (OMAP44XX_DMM_PHYS + OMAP4_L3_PER_IO_OFFSET)
  #define OMAP44XX_DMM_SIZE     SZ_1M
 +#define OMAP44XX_DMM_VIRT     (OMAP44XX_EMIF2_VIRT + OMAP44XX_EMIF2_SIZE)
  /*
   * ----------------------------------------------------------------------------
   * Omap specific register access
   * NOTE: Please use ioremap + __raw_read/write where possible instead of these
   */
  
 +void omap_ioremap_init(void);
 +
  extern u8 omap_readb(u32 pa);
  extern u16 omap_readw(u32 pa);
  extern u32 omap_readl(u32 pa);
@@@ -258,31 -256,8 +258,31 @@@ extern void omap_writel(u32 v, u32 pa)
  
  struct omap_sdrc_params;
  
 -extern void omap1_map_common_io(void);
 -extern void omap1_init_common_hw(void);
 +#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
 +void omap7xx_map_io(void);
 +#else
 +static inline void omap_map_io(void)
 +{
 +}
 +#endif
 +
 +#ifdef CONFIG_ARCH_OMAP15XX
 +void omap15xx_map_io(void);
 +#else
 +static inline void omap15xx_map_io(void)
 +{
 +}
 +#endif
 +
 +#ifdef CONFIG_ARCH_OMAP16XX
 +void omap16xx_map_io(void);
 +#else
 +static inline void omap16xx_map_io(void)
 +{
 +}
 +#endif
 +
 +void omap1_init_early(void);
  
  #ifdef CONFIG_SOC_OMAP2420
  extern void omap242x_map_common_io(void);
@@@ -325,7 -300,7 +325,7 @@@ static inline void omap44xx_map_common_
  #endif
  
  extern void omap2_init_common_infrastructure(void);
 -extern void omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
 +extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
                                      struct omap_sdrc_params *sdrc_cs1);
  
  #define __arch_ioremap        omap_ioremap
  void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type);
  void omap_iounmap(volatile void __iomem *addr);
  
+ extern void __init omap_init_consistent_dma_size(void);
  #endif
  
  #endif
diff --combined arch/arm/plat-omap/io.c
index 1bbcbde76400e30a88abe09d80f35cd96fa6e5e8,e9b0e23edd0a556430a364d2e0aec740420c5d05..333871f599952e9e54eb2fff1e7307242ab9a132
@@@ -12,6 -12,7 +12,7 @@@
  #include <linux/module.h>
  #include <linux/io.h>
  #include <linux/mm.h>
+ #include <linux/dma-mapping.h>
  
  #include <plat/omap7xx.h>
  #include <plat/omap1510.h>
  #define BETWEEN(p,st,sz)      ((p) >= (st) && (p) < ((st) + (sz)))
  #define XLATE(p,pst,vst)      ((void __iomem *)((p) - (pst) + (vst)))
  
 +static int initialized;
 +
  /*
   * Intercept ioremap() requests for addresses in our fixed mapping regions.
   */
  void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
  {
 +
 +      WARN(!initialized, "Do not use ioremap before init_early\n");
 +
  #ifdef CONFIG_ARCH_OMAP1
        if (cpu_class_is_omap1()) {
                if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
@@@ -145,7 -141,9 +146,14 @@@ void omap_iounmap(volatile void __iome
  }
  EXPORT_SYMBOL(omap_iounmap);
  
+ void __init omap_init_consistent_dma_size(void)
+ {
+ #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
+       init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
+ #endif
+ }
++
 +void __init omap_ioremap_init(void)
 +{
 +      initialized++;
 +}