]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'imx/devel' into imx/imx6q
authorArnd Bergmann <arnd@arndb.de>
Mon, 31 Oct 2011 13:24:28 +0000 (14:24 +0100)
committerArnd Bergmann <arnd@arndb.de>
Mon, 31 Oct 2011 13:24:28 +0000 (14:24 +0100)
Conflicts:
arch/arm/plat-mxc/include/mach/memory.h

34 files changed:
1  2 
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/mach-imx/mach-armadillo5x0.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-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-imx/mach-imx27ipcam.c
arch/arm/mach-imx/mach-imx27lite.c
arch/arm/mach-imx/mach-kzm_arm11_01.c
arch/arm/mach-imx/mach-mx1ads.c
arch/arm/mach-imx/mach-mx21ads.c
arch/arm/mach-imx/mach-mx25_3ds.c
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-mx27ads.c
arch/arm/mach-imx/mach-mx31_3ds.c
arch/arm/mach-imx/mach-mx31ads.c
arch/arm/mach-imx/mach-mx31lilly.c
arch/arm/mach-imx/mach-mx31lite.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mach-mx35_3ds.c
arch/arm/mach-imx/mach-mxt_td60.c
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pcm037.c
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mach-pcm043.c
arch/arm/mach-imx/mach-qong.c
arch/arm/mach-imx/mach-scb9328.c
arch/arm/mach-mx5/board-cpuimx51.c
arch/arm/mach-mx5/board-cpuimx51sd.c
arch/arm/mach-mx5/board-mx51_3ds.c
arch/arm/mach-mx5/board-mx51_babbage.c
arch/arm/mach-mx5/board-mx51_efikamx.c
arch/arm/mach-mx5/board-mx51_efikasb.c

diff --combined arch/arm/Kconfig
index 0c5f37f4eddb4c5933bb4c74eb408340e0ff658f,3bf38c84fd23087f53e45982e59a204644246216..a94a09ba356bc29a9a041ccedcf41c88216abd48
@@@ -29,7 -29,6 +29,7 @@@ config AR
        select HAVE_GENERIC_HARDIRQS
        select HAVE_SPARSE_IRQ
        select GENERIC_IRQ_SHOW
 +      select CPU_PM if (SUSPEND || CPU_IDLE)
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@@ -196,8 -195,7 +196,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 ARM_PATCH_PHYS_VIRT_16BIT
 -      def_bool y
 -      depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
 +config NEED_MACH_MEMORY_H
 +      bool
        help
 -        This option extends the physical to virtual translation patching
 -        to allow physical memory down to a theoretical minimum of 64K
 -        boundaries.
 +        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 PHYS_OFFSET
 +      hex "Physical address of main memory"
 +      depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
 +      help
 +        Please provide the physical address corresponding to the
 +        location of main memory in your system.
  
  source "init/Kconfig"
  
@@@ -257,7 -246,6 +257,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.
  
@@@ -273,7 -261,6 +273,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.
  
@@@ -314,6 -301,7 +314,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.
@@@ -334,7 -322,6 +334,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.
  
@@@ -375,7 -362,6 +375,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
@@@ -391,7 -377,6 +391,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.
  
@@@ -400,7 -385,6 +400,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.
@@@ -413,6 -397,7 +413,7 @@@ config ARCH_MX
        select CLKSRC_MMIO
        select GENERIC_IRQ_CHIP
        select HAVE_SCHED_CLOCK
+       select MULTI_IRQ_HANDLER
        help
          Support for Freescale MXC/iMX-based family of processors
  
@@@ -450,7 -435,6 +451,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.
  
@@@ -481,7 -465,6 +482,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.
  
@@@ -491,7 -474,6 +492,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.
  
@@@ -585,7 -567,6 +586,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.
@@@ -677,7 -658,6 +678,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.
  
@@@ -692,7 -672,6 +693,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.
@@@ -711,7 -690,6 +712,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.
  
@@@ -804,7 -782,6 +805,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
  
@@@ -821,7 -798,6 +822,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
  
@@@ -833,7 -809,6 +834,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>).
@@@ -861,7 -836,6 +862,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.
  
@@@ -1434,31 -1408,6 +1435,31 @@@ config SMP_ON_U
  
          If you don't know what to do here, say Y.
  
 +config ARM_CPU_TOPOLOGY
 +      bool "Support cpu topology definition"
 +      depends on SMP && CPU_V7
 +      default y
 +      help
 +        Support ARM cpu topology definition. The MPIDR register defines
 +        affinity between processors which is then used to describe the cpu
 +        topology of an ARM System.
 +
 +config SCHED_MC
 +      bool "Multi-core scheduler support"
 +      depends on ARM_CPU_TOPOLOGY
 +      help
 +        Multi-core scheduler support improves the CPU scheduler's decision
 +        making when dealing with multi-core CPU chips at a cost of slightly
 +        increased overhead in some places. If unsure say N here.
 +
 +config SCHED_SMT
 +      bool "SMT scheduler support"
 +      depends on ARM_CPU_TOPOLOGY
 +      help
 +        Improves the CPU scheduler's decision making when dealing with
 +        MultiThreading at a cost of slightly increased overhead in some
 +        places. If unsure say N here.
 +
  config HAVE_ARM_SCU
        bool
        help
@@@ -1859,38 -1808,6 +1860,38 @@@ config ZBOOT_ROM_SH_MOBILE_SDH
  
  endchoice
  
 +config ARM_APPENDED_DTB
 +      bool "Use appended device tree blob to zImage (EXPERIMENTAL)"
 +      depends on OF && !ZBOOT_ROM && EXPERIMENTAL
 +      help
 +        With this option, the boot code will look for a device tree binary
 +        (DTB) appended to zImage
 +        (e.g. cat zImage <filename>.dtb > zImage_w_dtb).
 +
 +        This is meant as a backward compatibility convenience for those
 +        systems with a bootloader that can't be upgraded to accommodate
 +        the documented boot protocol using a device tree.
 +
 +        Beware that there is very little in terms of protection against
 +        this option being confused by leftover garbage in memory that might
 +        look like a DTB header after a reboot if no actual DTB is appended
 +        to zImage.  Do not leave this option active in a production kernel
 +        if you don't intend to always append a DTB.  Proper passing of the
 +        location into r2 of a bootloader provided DTB is always preferable
 +        to this option.
 +
 +config ARM_ATAG_DTB_COMPAT
 +      bool "Supplement the appended DTB with traditional ATAG information"
 +      depends on ARM_APPENDED_DTB
 +      help
 +        Some old bootloaders can't be updated to a DTB capable one, yet
 +        they provide ATAGs with memory configuration, the ramdisk address,
 +        the kernel cmdline string, etc.  Such information is dynamically
 +        provided by the bootloader and can't always be stored in a static
 +        DTB.  To allow a device tree enabled kernel to be used with such
 +        bootloaders, this option allows zImage to extract the information
 +        from the ATAG list and store it at run time into the appended DTB.
 +
  config CMDLINE
        string "Default kernel command string"
        default ""
diff --combined arch/arm/Makefile
index 5665c2a3b652cccb4e9c66125540fbe08259039f,9260c293405c2ddc6121952a99b2297eb0ceb258..8904caa736cb1a16024bf03ad71e65dcb314afc2
@@@ -128,9 -128,6 +128,9 @@@ textofs-$(CONFIG_PM_H1940)      := 0x00
  ifeq ($(CONFIG_ARCH_SA1100),y)
  textofs-$(CONFIG_SA1111) := 0x00208000
  endif
 +textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
 +textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
 +textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
  
  # Machine directory name.  This list is sorted alphanumerically
  # by CONFIG_* macro name.
@@@ -157,9 -154,7 +157,7 @@@ machine-$(CONFIG_ARCH_LPC32XX)             := lpc3
  machine-$(CONFIG_ARCH_MMP)            := mmp
  machine-$(CONFIG_ARCH_MSM)            := msm
  machine-$(CONFIG_ARCH_MV78XX0)                := mv78xx0
- machine-$(CONFIG_ARCH_MX1)            := imx
- machine-$(CONFIG_ARCH_MX2)            := imx
- machine-$(CONFIG_ARCH_MX25)           := imx
+ machine-$(CONFIG_ARCH_IMX_V4_V5)      := imx
  machine-$(CONFIG_ARCH_MX3)            := imx
  machine-$(CONFIG_ARCH_MX5)            := mx5
  machine-$(CONFIG_ARCH_MXS)            := mxs
index 215259083945dad58cd0c7bad7970a97453597f5,e008554e48bf6c10f5c57e9aad8b6989a32d11d9..c9a9cf67755e7fa3c1666e1aebb81f52dbbcca0b
@@@ -314,25 -314,19 +314,19 @@@ static struct mtd_partition armadillo5x
        },
  };
  
- static struct physmap_flash_data armadillo5x0_nor_flash_pdata = {
+ static const struct physmap_flash_data
+               armadillo5x0_nor_flash_pdata __initconst = {
        .width          = 2,
        .parts          = armadillo5x0_nor_flash_partitions,
        .nr_parts       = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
  };
  
- static struct resource armadillo5x0_nor_flash_resource = {
+ static const struct resource armadillo5x0_nor_flash_resource __initconst = {
        .flags          = IORESOURCE_MEM,
        .start          = MX31_CS0_BASE_ADDR,
        .end            = MX31_CS0_BASE_ADDR + SZ_64M - 1,
  };
  
- static struct platform_device armadillo5x0_nor_flash = {
-       .name                   = "physmap-flash",
-       .id                     = -1,
-       .num_resources          = 1,
-       .resource               = &armadillo5x0_nor_flash_resource,
- };
  /*
   * FB support
   */
@@@ -514,8 -508,10 +508,10 @@@ static void __init armadillo5x0_init(vo
        imx31_add_mx3_sdc_fb(&mx3fb_pdata);
  
        /* Register NOR Flash */
-       mxc_register_device(&armadillo5x0_nor_flash,
-                           &armadillo5x0_nor_flash_pdata);
+       platform_device_register_resndata(NULL, "physmap-flash", -1,
+                       &armadillo5x0_nor_flash_resource, 1,
+                       &armadillo5x0_nor_flash_pdata,
+                       sizeof(armadillo5x0_nor_flash_pdata));
  
        /* Register NAND Flash */
        imx31_add_mxc_nand(&armadillo5x0_nand_board_info);
@@@ -558,10 -554,11 +554,11 @@@ static struct sys_timer armadillo5x0_ti
  
  MACHINE_START(ARMADILLO5X0, "Armadillo-500")
        /* Maintainer: Alberto Panizzo  */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &armadillo5x0_timer,
        .init_machine = armadillo5x0_init,
  MACHINE_END
index b1ec2cf53bb0df1696e09c32f125ede230fc7021,a8364cc52b4df2d9029ce55cebb158e618622920..edb373052576a86e7a3301a26f09536a771530b6
@@@ -311,10 -311,11 +311,11 @@@ static struct sys_timer 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,
+       .handle_irq = imx27_handle_irq,
        .timer = &eukrea_cpuimx27_timer,
        .init_machine = eukrea_cpuimx27_init,
  MACHINE_END
index 470b654b0e6eef12cba24b29d34faf112e3fa5c9,fc4fea1d3fc72fe79db472805a955137bfca67d8..66af2e8f7e576dffd5372862653d397d22811069
@@@ -66,7 -66,7 +66,7 @@@ static struct i2c_board_info eukrea_cpu
                I2C_BOARD_INFO("tsc2007", 0x48),
                .type           = "tsc2007",
                .platform_data  = &tsc2007_info,
-               .irq            = gpio_to_irq(TSC2007_IRQGPIO),
+               .irq            = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
        },
  };
  
@@@ -194,10 -194,11 +194,11 @@@ struct sys_timer eukrea_cpuimx35_timer 
  
  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,
+       .handle_irq = imx35_handle_irq,
        .timer = &eukrea_cpuimx35_timer,
        .init_machine = eukrea_cpuimx35_init,
  MACHINE_END
index 9163318e95a2bb24862c2bab29f2434dfc03a3d7,b05de09b1a6ec0b38402ab19a04081a5c88ae622..ab8fbcc472b5e1e6a1ddb19e6361d96ad3620110
@@@ -163,10 -163,11 +163,11 @@@ static struct sys_timer 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,
+       .handle_irq = imx25_handle_irq,
        .timer = &eukrea_cpuimx25_timer,
        .init_machine = eukrea_cpuimx25_init,
  MACHINE_END
index 22306ce2865859b978569165be2699517dd8acdf,678cf831bc3133cd84ee8100d6294aaa2a2d0838..38eb9e45110b2d3e5bdb8f96f5d89627e17ddbe7
@@@ -275,10 -275,11 +275,11 @@@ static struct sys_timer visstrim_m10_ti
  };
  
  MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &visstrim_m10_timer,
        .init_machine = visstrim_m10_board_init,
  MACHINE_END
index 8da48b33fc532ac015dfcd550c6534652df81efd,f572ce943947100b69d3de5df1b2a6658f3cb1d6..7052155d0557b735fe93982f6ab7bc65a023647c
@@@ -71,10 -71,11 +71,11 @@@ static struct sys_timer mx27ipcam_time
  
  MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
        /* maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &mx27ipcam_timer,
        .init_machine = mx27ipcam_init,
  MACHINE_END
index 21a14a20e2c3fbbe8aa7a8f18c5843eb99b156a0,e7fc4f0449460e02f476e834331b7301fba52b59..8d6a63521f17b9f19f5dbcc956487d081aa70aad
@@@ -77,10 -77,11 +77,11 @@@ static struct sys_timer mx27lite_timer 
  };
  
  MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &mx27lite_timer,
        .init_machine = mx27lite_init,
  MACHINE_END
index 7c20e9e5800655ef6df53a2fac04b56c78e6a881,a65d9104834829b828cce72f3d7cb1d57dae1c77..4288e8f97eea16442dbf640d810a22725a40f760
@@@ -271,10 -271,11 +271,11 @@@ static struct sys_timer kzm_timer = 
  };
  
  MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = kzm_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &kzm_timer,
        .init_machine = kzm_board_init,
  MACHINE_END
index 530ea08dbafd29d2cc32d4768b98f70ae1bfa88e,ebe9a29e30a6cbec147f8c467fdf4b85955e2c13..fc49785e7340a9adb9964794f16114ff96b5c125
@@@ -68,23 -68,16 +68,16 @@@ static const struct imxuart_platform_da
   * Physmap flash
   */
  
- static struct physmap_flash_data mx1ads_flash_data = {
+ static const struct physmap_flash_data mx1ads_flash_data __initconst = {
        .width          = 4,            /* bankwidth in bytes */
  };
  
- static struct resource flash_resource = {
+ static const struct resource flash_resource __initconst = {
        .start  = MX1_CS0_PHYS,
        .end    = MX1_CS0_PHYS + SZ_32M - 1,
        .flags  = IORESOURCE_MEM,
  };
  
- static struct platform_device flash_device = {
-       .name   = "physmap-flash",
-       .id     = 0,
-       .resource = &flash_resource,
-       .num_resources = 1,
- };
  /*
   * I2C
   */
@@@ -125,7 -118,9 +118,9 @@@ static void __init mx1ads_init(void
        imx1_add_imx_uart1(&uart1_pdata);
  
        /* Physmap flash */
-       mxc_register_device(&flash_device, &mx1ads_flash_data);
+       platform_device_register_resndata(NULL, "physmap-flash", 0,
+                       &flash_resource, 1,
+                       &mx1ads_flash_data, sizeof(mx1ads_flash_data));
  
        /* I2C */
        i2c_register_board_info(0, mx1ads_i2c_devices,
@@@ -145,19 -140,21 +140,21 @@@ struct sys_timer mx1ads_timer = 
  
  MACHINE_START(MX1ADS, "Freescale MX1ADS")
        /* Maintainer: Sascha Hauer, Pengutronix */
 -      .boot_params = MX1_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx1_map_io,
        .init_early = imx1_init_early,
        .init_irq = mx1_init_irq,
+       .handle_irq = imx1_handle_irq,
        .timer = &mx1ads_timer,
        .init_machine = mx1ads_init,
  MACHINE_END
  
  MACHINE_START(MXLADS, "Freescale MXLADS")
 -      .boot_params = MX1_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx1_map_io,
        .init_early = imx1_init_early,
        .init_irq = mx1_init_irq,
+       .handle_irq = imx1_handle_irq,
        .timer = &mx1ads_timer,
        .init_machine = mx1ads_init,
  MACHINE_END
index e56828da26b226b7a7cfb2ff81ddba903fcd21d0,43dd22b768e081d9f5abca8202e5834d7584c8b4..25f84028d055078cd284aa48c844b3697e3dab78
@@@ -305,10 -305,11 +305,11 @@@ static struct sys_timer mx21ads_timer 
  
  MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
        /* maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX21_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx21ads_map_io,
        .init_early = imx21_init_early,
        .init_irq = mx21_init_irq,
+       .handle_irq = imx21_handle_irq,
        .timer = &mx21ads_timer,
        .init_machine = mx21ads_board_init,
  MACHINE_END
index dd25ee82e70ab9f73ea31e3be7783b0a9a834f4e,bd735ad6675ec3f7e6d4cf80edcc071475dae816..88dccf1222437ef6959d5d094a512b7ce9294eb2
@@@ -43,6 -43,8 +43,8 @@@
  
  #include "devices-imx25.h"
  
+ #define MX25PDK_CAN_PWDN      IMX_GPIO_NR(4, 6)
  static const struct imxuart_platform_data uart_pdata __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
  };
@@@ -108,6 -110,11 +110,11 @@@ static iomux_v3_cfg_t mx25pdk_pads[] = 
        /* I2C1 */
        MX25_PAD_I2C1_CLK__I2C1_CLK,
        MX25_PAD_I2C1_DAT__I2C1_DAT,
+       /* CAN1 */
+       MX25_PAD_GPIO_A__CAN1_TX,
+       MX25_PAD_GPIO_B__CAN1_RX,
+       MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */
  };
  
  static const struct fec_platform_data mx25_fec_pdata __initconst = {
@@@ -240,6 -247,9 +247,9 @@@ static void __init mx25pdk_init(void
  
        imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
        imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
+       gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
+       imx25_add_flexcan0(NULL);
  }
  
  static void __init mx25pdk_timer_init(void)
@@@ -253,10 -263,11 +263,11 @@@ static struct sys_timer mx25pdk_timer 
  
  MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
        /* Maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX25_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx25_map_io,
        .init_early = imx25_init_early,
        .init_irq = mx25_init_irq,
+       .handle_irq = imx25_handle_irq,
        .timer = &mx25pdk_timer,
        .init_machine = mx25pdk_init,
  MACHINE_END
index 2eafbac2c76356dad02db7bb13a08ec64f1b5726,b2bc10bdf443b433c784aa70da1808c2688b6e6b..71bb45d09ace5357d7519d62360497907d34a63b
@@@ -359,7 -359,7 +359,7 @@@ static struct spi_board_info mx27_3ds_s
                .bus_num        = 1,
                .chip_select    = 0, /* SS0 */
                .platform_data  = &mc13783_pdata,
-               .irq = gpio_to_irq(PMIC_INT),
+               .irq = IMX_GPIO_TO_IRQ(PMIC_INT),
                .mode = SPI_CS_HIGH,
        }, {
                .modalias       = "l4f00242t03",
@@@ -421,10 -421,11 +421,11 @@@ static struct sys_timer mx27pdk_timer 
  
  MACHINE_START(MX27_3DS, "Freescale MX27PDK")
        /* maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &mx27pdk_timer,
        .init_machine = mx27pdk_init,
  MACHINE_END
index efe6109099fdc599ab74d96e6118fbb25d6063cd,e6d132108b2be64b00d52e98caaba53b21606f2d..e75f3914784507b94f4f620f9492b87fce100683
@@@ -345,10 -345,11 +345,11 @@@ static void __init mx27ads_map_io(void
  
  MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
        /* maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27ads_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &mx27ads_timer,
        .init_machine = mx27ads_board_init,
  MACHINE_END
index 589066fb3316ae794dc84ff98e67e37c1a716232,b4aa9c35bb4507b608ef1a0b211568133de96ebc..eb3e3fe20287fa624dd307e8719bdb4ec420ccab
@@@ -764,10 -764,11 +764,11 @@@ static void __init mx31_3ds_reserve(voi
  
  MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
        /* Maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &mx31_3ds_timer,
        .init_machine = mx31_3ds_init,
        .reserve = mx31_3ds_reserve,
index 910c4561d35f14a1433ade0daba265c2b64eec93,13e7347e14d49d8b16c4f2abf78443fcfbbd4f6b..9cc1a49053bb347053fed66d6817b3b2d4f2f32f
@@@ -535,10 -535,11 +535,11 @@@ static struct sys_timer mx31ads_timer 
  
  MACHINE_START(MX31ADS, "Freescale MX31ADS")
        /* Maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31ads_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31ads_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &mx31ads_timer,
        .init_machine = mx31ads_init,
  MACHINE_END
index e92eaf91a7be75f55e84168605b09bcd5610e500,070a8d1f40cc514fa36a4314143c9559c4111146..5defd8e70fc488e4d6c852827fcdb551fcb1e2ac
@@@ -295,10 -295,11 +295,11 @@@ static struct sys_timer mx31lilly_time
  };
  
  MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &mx31lilly_timer,
        .init_machine = mx31lilly_board_init,
  MACHINE_END
index 5242cb78b563ac914856a0fc1903c94bfa17d8ea,4f66ea440742b093e8b0d8278e713a159817f466..c97c26d814ed1640df98300a90dc281380734541
@@@ -280,10 -280,11 +280,11 @@@ struct sys_timer mx31lite_timer = 
  
  MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
        /* Maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31lite_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &mx31lite_timer,
        .init_machine = mx31lite_init,
  MACHINE_END
index 1d01ef28f25ddaa93208f81cfb4e735304d8038b,cd07ebe9b9d87b3d2b1f5ce23e796096c2ed5a53..fff7791b7e7c8731a3575ead8d2eb020d617bccc
@@@ -28,6 -28,9 +28,9 @@@
  #include <linux/spi/spi.h>
  #include <linux/types.h>
  #include <linux/memblock.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
+ #include <linux/err.h>
  
  #include <linux/usb/otg.h>
  #include <linux/usb/ulpi.h>
@@@ -490,6 -493,18 +493,18 @@@ err
  
  }
  
+ static void mx31moboard_poweroff(void)
+ {
+       struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
+       if (!IS_ERR(clk))
+               clk_enable(clk);
+       mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
+       __raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
+ }
  static int mx31moboard_baseboard;
  core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
  
@@@ -528,6 -543,8 +543,8 @@@ static void __init mx31moboard_init(voi
  
        moboard_usbh2_init();
  
+       pm_power_off = mx31moboard_poweroff;
        switch (mx31moboard_baseboard) {
        case MX31NOBOARD:
                break;
@@@ -567,11 -584,12 +584,12 @@@ static void __init mx31moboard_reserve(
  
  MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
        /* Maintainer: Valentin Longchamp, EPFL Mobots group */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .reserve = mx31moboard_reserve,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &mx31moboard_timer,
        .init_machine = mx31moboard_init,
  MACHINE_END
index f2a873dc08ce83e523f60086e07cb400b8656a71,5a5eb3e0f737e8ce42052ff846e0b05ffbaf3453..7a462025a0f75a97db5a1253e7dd9ff5926bb4ef
@@@ -217,10 -217,11 +217,11 @@@ struct sys_timer mx35pdk_timer = 
  
  MACHINE_START(MX35_3DS, "Freescale MX35PDK")
        /* Maintainer: Freescale Semiconductor, Inc */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx35_map_io,
        .init_early = imx35_init_early,
        .init_irq = mx35_init_irq,
+       .handle_irq = imx35_handle_irq,
        .timer = &mx35pdk_timer,
        .init_machine = mx35_3ds_init,
  MACHINE_END
index 5ec3989704fdec6c7c116d5aac7b9b27e6109c88,d01a92f7100664d2a20bb592983db599191ea490..125c19643b0fc9b9d8f3f4d718e882ac7a0c32c8
@@@ -267,10 -267,11 +267,11 @@@ static struct sys_timer mxt_td60_timer 
  
  MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
        /* maintainer: Maxtrack Industrial */
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &mxt_td60_timer,
        .init_machine = mxt_td60_board_init,
  MACHINE_END
index 0f6bd1199038efee03fab660be51cc396e2c4629,100babc71875409500956f7284b43be0afd06bfa..26072f4b02e37cfa0ea3c1315885cdcd892c6541
@@@ -435,10 -435,11 +435,11 @@@ static struct sys_timer pca100_timer = 
  };
  
  MACHINE_START(PCA100, "phyCARD-i.MX27")
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .init_machine = pca100_init,
        .timer = &pca100_timer,
  MACHINE_END
index 186d4eb90796b3b8469d056517ba38390051e0cb,3fb5eaa8248a0d14ce4c02c8d993d5c2871146e9..efd6b536ef6a4187d413aaf167d218718c5e0957
@@@ -688,11 -688,12 +688,12 @@@ static void __init pcm037_reserve(void
  
  MACHINE_START(PCM037, "Phytec Phycore pcm037")
        /* Maintainer: Pengutronix */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .reserve = pcm037_reserve,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &pcm037_timer,
        .init_machine = pcm037_init,
  MACHINE_END
index 091bcf87e1a06cf1f5154793a27274512d17b1fe,dac2b790df062396ab00791fa464dcd2d4ea100d..f0a5282aa0113a9b48e01c3082e6cb685bd32e26
@@@ -349,10 -349,11 +349,11 @@@ static struct sys_timer pcm038_timer = 
  };
  
  MACHINE_START(PCM038, "phyCORE-i.MX27")
 -      .boot_params = MX27_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
+       .handle_irq = imx27_handle_irq,
        .timer = &pcm038_timer,
        .init_machine = pcm038_init,
  MACHINE_END
index 0a4d31de7738534f526c4c5c22d15062c740c190,a27baa493ced33018c17b7d45917c518b4a0b41c..7366c2ae3ea5ccf0c8b74024b96bb135822752ec
@@@ -418,10 -418,11 +418,11 @@@ struct sys_timer pcm043_timer = 
  
  MACHINE_START(PCM043, "Phytec Phycore pcm043")
        /* Maintainer: Pengutronix */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx35_map_io,
        .init_early = imx35_init_early,
        .init_irq = mx35_init_irq,
+       .handle_irq = imx35_handle_irq,
        .timer = &pcm043_timer,
        .init_machine = pcm043_init,
  MACHINE_END
index 9e11359c324ce866597e9453665c2f48ba9b8764,4243d1f548c2d91a2cbad36ae7a629d39c8bbcdd..1c4822bb1bcb7e223301427a395dcced72c827eb
@@@ -249,6 -249,7 +249,7 @@@ static void __init qong_init(void
        mxc_init_imx_uart();
        qong_init_nor_mtd();
        qong_init_fpga();
+       imx31_add_imx2_wdt(NULL);
  }
  
  static void __init qong_timer_init(void)
@@@ -262,10 -263,11 +263,11 @@@ static struct sys_timer qong_timer = 
  
  MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
        /* Maintainer: DENX Software Engineering GmbH */
 -      .boot_params = MX3x_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx31_map_io,
        .init_early = imx31_init_early,
        .init_irq = mx31_init_irq,
+       .handle_irq = imx31_handle_irq,
        .timer = &qong_timer,
        .init_machine = qong_init,
  MACHINE_END
index 85d32845ee1e327c2b988711565a344160f086df,17f15fb57e1c19985d21d4b5900b48bc25c57a95..bb6e5b25d8d07905cf951f5c14ee1ff07ba88594
@@@ -137,10 -137,11 +137,11 @@@ static struct sys_timer scb9328_timer 
  
  MACHINE_START(SCB9328, "Synertronixx scb9328")
        /* Sascha Hauer */
 -      .boot_params = 0x08000100,
 +      .atag_offset = 100,
        .map_io = mx1_map_io,
        .init_early = imx1_init_early,
        .init_irq = mx1_init_irq,
+       .handle_irq = imx1_handle_irq,
        .timer = &scb9328_timer,
        .init_machine = scb9328_init,
  MACHINE_END
index e01af948e043ccfbcb75d7f5cc9347a140e0e911,e28d0e165e5cf313d95d69ec63da9828b978f1a8..1fc110348040b0a94c61b009e3546c686f33596c
  #include <linux/delay.h>
  #include <linux/io.h>
  #include <linux/interrupt.h>
- #include <linux/irq.h>
  
  #include <mach/eukrea-baseboards.h>
  #include <mach/common.h>
  #include <mach/hardware.h>
  #include <mach/iomux-mx51.h>
  
- #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  
  #define CPUIMX51_USBH1_STP    IMX_GPIO_NR(1, 27)
  #define CPUIMX51_QUARTA_GPIO  IMX_GPIO_NR(3, 28)
@@@ -57,7 -54,7 +54,7 @@@
  static struct plat_serial8250_port serial_platform_data[] = {
        {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
-               .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO),
+               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@@ -65,7 -62,7 +62,7 @@@
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
-               .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO),
+               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@@ -73,7 -70,7 +70,7 @@@
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
-               .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO),
+               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@@ -81,7 -78,7 +78,7 @@@
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
-               .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO),
+               .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@@ -167,7 -164,7 +164,7 @@@ static int initialize_otg_port(struct p
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@@@ -190,7 -187,7 +187,7 @@@ static int initialize_usbh1_port(struc
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
                        MXC_EHCI_ITC_NO_THRESHOLD);
  }
  
- static struct mxc_usbh_platform_data dr_utmi_config = {
+ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
        .init           = initialize_otg_port,
        .portsc = MXC_EHCI_UTMI_16BIT,
  };
  
- static struct fsl_usb2_platform_data usb_pdata = {
+ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_UTMI_WIDE,
  };
  
- static struct mxc_usbh_platform_data usbh1_config = {
+ static const struct mxc_usbh_platform_data usbh1_config __initconst = {
        .init           = initialize_usbh1_port,
        .portsc = MXC_EHCI_MODE_ULPI,
  };
@@@ -270,12 -267,12 +267,12 @@@ static void __init eukrea_cpuimx51_init
                                ARRAY_SIZE(eukrea_cpuimx51_i2c_devices));
  
        if (otg_mode_host)
-               mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
+               imx51_add_mxc_ehci_otg(&dr_utmi_config);
        else {
                initialize_otg_port(NULL);
-               mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
+               imx51_add_fsl_usb2_udc(&usb_pdata);
        }
-       mxc_register_device(&mxc_usbh1_device, &usbh1_config);
+       imx51_add_mxc_ehci_hs(1, &usbh1_config);
  
  #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD
        eukrea_mbimx51_baseboard_init();
@@@ -293,10 -290,11 +290,11 @@@ static struct sys_timer mxc_timer = 
  
  MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
        /* Maintainer: Eric BĂ©nard <eric@eukrea.com> */
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .timer = &mxc_timer,
        .init_machine = eukrea_cpuimx51_init,
  MACHINE_END
index b41fc274a425f39c33c232dd22046f1e91669390,5276660041ad01a5c578704c9e83e4371f0575ec..52a11c1898e6aeb31a8f5ca3c81ed9f875a8003d
@@@ -22,7 -22,6 +22,6 @@@
  #include <linux/delay.h>
  #include <linux/io.h>
  #include <linux/interrupt.h>
- #include <linux/irq.h>
  #include <linux/i2c-gpio.h>
  #include <linux/spi/spi.h>
  #include <linux/can/platform/mcp251x.h>
  #include <mach/hardware.h>
  #include <mach/iomux-mx51.h>
  
- #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  #include "cpu_op-mx51.h"
  
  #define USBH1_RST             IMX_GPIO_NR(2, 28)
@@@ -108,7 -105,7 +105,7 @@@ static iomux_v3_cfg_t eukrea_cpuimx51sd
  
        /* Touchscreen */
        /* IRQ */
-       _MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
+       NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
                        PAD_CTL_PKE | PAD_CTL_SRE_FAST |
                        PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
  };
@@@ -129,7 -126,7 +126,7 @@@ static struct i2c_board_info eukrea_cpu
                I2C_BOARD_INFO("tsc2007", 0x49),
                .type           = "tsc2007",
                .platform_data  = &tsc2007_info,
-               .irq            = gpio_to_irq(TSC2007_IRQGPIO),
+               .irq            = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
        },
  };
  
@@@ -149,7 -146,7 +146,7 @@@ static int initialize_otg_port(struct p
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@@@ -172,7 -169,7 +169,7 @@@ static int initialize_usbh1_port(struc
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
                        MXC_EHCI_ITC_NO_THRESHOLD);
  }
  
- static struct mxc_usbh_platform_data dr_utmi_config = {
+ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
        .init           = initialize_otg_port,
        .portsc = MXC_EHCI_UTMI_16BIT,
  };
  
- static struct fsl_usb2_platform_data usb_pdata = {
+ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_UTMI_WIDE,
  };
  
- static struct mxc_usbh_platform_data usbh1_config = {
+ static const struct mxc_usbh_platform_data usbh1_config __initconst = {
        .init           = initialize_usbh1_port,
        .portsc = MXC_EHCI_MODE_ULPI,
  };
@@@ -245,7 -242,7 +242,7 @@@ static struct spi_board_info cpuimx51sd
                .mode           = SPI_MODE_0,
                .chip_select     = 0,
                .platform_data   = &mcp251x_info,
-               .irq             = gpio_to_irq(CAN_IRQGPIO)
+               .irq             = IMX_GPIO_TO_IRQ(CAN_IRQGPIO)
        },
  };
  
@@@ -303,17 -300,17 +300,17 @@@ static void __init eukrea_cpuimx51sd_in
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
  
        if (otg_mode_host)
-               mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
+               imx51_add_mxc_ehci_otg(&dr_utmi_config);
        else {
                initialize_otg_port(NULL);
-               mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
+               imx51_add_fsl_usb2_udc(&usb_pdata);
        }
  
        gpio_request(USBH1_RST, "usb_rst");
        gpio_direction_output(USBH1_RST, 0);
        msleep(20);
        gpio_set_value(USBH1_RST, 1);
-       mxc_register_device(&mxc_usbh1_device, &usbh1_config);
+       imx51_add_mxc_ehci_hs(1, &usbh1_config);
  
  #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD
        eukrea_mbimxsd51_baseboard_init();
@@@ -331,10 -328,11 +328,11 @@@ static struct sys_timer mxc_timer = 
  
  MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
        /* Maintainer: Eric BĂ©nard <eric@eukrea.com> */
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .timer = &mxc_timer,
        .init_machine = eukrea_cpuimx51sd_init,
  MACHINE_END
index a50174e69e2fd1138a0da8a086dd863e88f11c54,067d8c4eb656a30caa2964e28d9230695a5c79a6..05783906db2bd5fdb262b20d100774c03b568c3c
@@@ -25,7 -25,6 +25,6 @@@
  #include <mach/3ds_debugboard.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  
  #define EXPIO_PARENT_INT      gpio_to_irq(IMX_GPIO_NR(1, 6))
  #define MX51_3DS_ECSPI2_CS    (GPIO_PORTC + 28)
@@@ -169,10 -168,11 +168,11 @@@ static struct sys_timer mx51_3ds_timer 
  
  MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
        /* Maintainer: Freescale Semiconductor, Inc. */
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .timer = &mx51_3ds_timer,
        .init_machine = mx51_3ds_init,
  MACHINE_END
index 468926a48fe0051ff62cca423cf57c2213505729,4231d984579c43134e93c7c152e60ad0a1b0fc9f..5993208a8f002e2b731315d38e65e56e714e0ada
  #include <mach/hardware.h>
  #include <mach/iomux-mx51.h>
  
- #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  #include "cpu_op-mx51.h"
  
  #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
@@@ -176,7 -174,7 +174,7 @@@ static const struct imxi2c_platform_dat
        .bitrate = 100000,
  };
  
- static struct imxi2c_platform_data babbage_hsi2c_data = {
+ static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = {
        .bitrate = 400000,
  };
  
@@@ -249,7 -247,7 +247,7 @@@ static int initialize_otg_port(struct p
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@@@ -272,7 -270,7 +270,7 @@@ static int initialize_usbh1_port(struc
        void __iomem *usb_base;
        void __iomem *usbother_base;
  
-       usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
        if (!usb_base)
                return -ENOMEM;
        usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
                        MXC_EHCI_ITC_NO_THRESHOLD);
  }
  
- static struct mxc_usbh_platform_data dr_utmi_config = {
+ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
        .init           = initialize_otg_port,
        .portsc = MXC_EHCI_UTMI_16BIT,
  };
  
- static struct fsl_usb2_platform_data usb_pdata = {
+ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_UTMI_WIDE,
  };
  
- static struct mxc_usbh_platform_data usbh1_config = {
+ static const struct mxc_usbh_platform_data usbh1_config __initconst = {
        .init           = initialize_usbh1_port,
        .portsc = MXC_EHCI_MODE_ULPI,
  };
@@@ -357,8 -355,8 +355,8 @@@ static const struct esdhc_platform_dat
  static void __init mx51_babbage_init(void)
  {
        iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
-       iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
-               MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
+       iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
+               PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
  
        imx51_soc_init();
  
  
        imx51_add_imx_i2c(0, &babbage_i2c_data);
        imx51_add_imx_i2c(1, &babbage_i2c_data);
-       mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data);
+       imx51_add_hsi2c(&babbage_hsi2c_data);
  
        if (otg_mode_host)
-               mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
+               imx51_add_mxc_ehci_otg(&dr_utmi_config);
        else {
                initialize_otg_port(NULL);
-               mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
+               imx51_add_fsl_usb2_udc(&usb_pdata);
        }
  
        gpio_usbh1_active();
-       mxc_register_device(&mxc_usbh1_device, &usbh1_config);
+       imx51_add_mxc_ehci_hs(1, &usbh1_config);
        /* setback USBH1_STP to be function */
        mxc_iomux_v3_setup_pad(usbh1stp);
        babbage_usbhub_reset();
@@@ -416,10 -414,11 +414,11 @@@ static struct sys_timer mx51_babbage_ti
  
  MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
        /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .timer = &mx51_babbage_timer,
        .init_machine = mx51_babbage_init,
  MACHINE_END
index c36880da03f0219f3a2f7334d77400e3970cc37e,90ae903aaee70d60e41eb1c094a725ea88e64bbc..a9e48662cf75e928fe2fe60c040130801a8c44d4
  #include <mach/hardware.h>
  #include <mach/iomux-mx51.h>
  
- #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  #include "efika.h"
  
  #define EFIKAMX_PCBID0                IMX_GPIO_NR(3, 16)
@@@ -163,6 -161,11 +161,11 @@@ static const struct gpio_led_platform_d
        .num_leds = ARRAY_SIZE(mx51_efikamx_leds),
  };
  
+ static struct esdhc_platform_data sd_pdata = {
+       .cd_type = ESDHC_CD_CONTROLLER,
+       .wp_type = ESDHC_WP_CONTROLLER,
+ };
  static struct gpio_keys_button mx51_efikamx_powerkey[] = {
        {
                .code = KEY_POWER,
@@@ -239,9 -242,11 +242,11 @@@ static void __init mx51_efikamx_init(vo
  
        /* on < 1.2 boards both SD controllers are used */
        if (system_rev < 0x12) {
-               imx51_add_sdhci_esdhc_imx(1, NULL);
+               imx51_add_sdhci_esdhc_imx(0, NULL);
+               imx51_add_sdhci_esdhc_imx(1, &sd_pdata);
                mx51_efikamx_leds[2].default_trigger = "mmc1";
-       }
+       } else
+               imx51_add_sdhci_esdhc_imx(0, &sd_pdata);
  
        gpio_led_register_device(-1, &mx51_efikamx_leds_data);
        imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
@@@ -280,10 -285,11 +285,11 @@@ static struct sys_timer mx51_efikamx_ti
  
  MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
        /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .timer = &mx51_efikamx_timer,
        .init_machine = mx51_efikamx_init,
  MACHINE_END
index ba5436a9fb1a6ea4b64f529fd7ef26f9d666c66c,c26508a6708e39b0a490eb2653f801bcdd11155d..38c4a3e28d3cd9c836f3c83d0a346fe6bd119b4d
  #include <mach/hardware.h>
  #include <mach/iomux-mx51.h>
  
- #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
  #include "devices-imx51.h"
- #include "devices.h"
  #include "efika.h"
  
  #define EFIKASB_USBH2_STP     IMX_GPIO_NR(2, 20)
@@@ -56,6 -54,7 +54,7 @@@
  #define EFIKASB_RFKILL                IMX_GPIO_NR(3, 1)
  
  #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0,   0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
+ #define MX51_PAD_SD1_CD       IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL)
  
  static iomux_v3_cfg_t mx51efikasb_pads[] = {
        /* USB HOST2 */
@@@ -97,6 -96,8 +96,8 @@@
  
        /* BT */
        MX51_PAD_EIM_A17__GPIO2_11,
+       MX51_PAD_SD1_CD,
  };
  
  static int initialize_usbh2_port(struct platform_device *pdev)
        return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
  }
  
- static struct mxc_usbh_platform_data usbh2_config = {
+ static struct mxc_usbh_platform_data usbh2_config __initdata = {
        .init   = initialize_usbh2_port,
        .portsc = MXC_EHCI_MODE_ULPI,
  };
@@@ -129,7 -130,7 +130,7 @@@ static void __init mx51_efikasb_usb(voi
        usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
                        ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
        if (usbh2_config.otg)
-               mxc_register_device(&mxc_usbh2_device, &usbh2_config);
+               imx51_add_mxc_ehci_hs(2, &usbh2_config);
  }
  
  static const struct gpio_led mx51_efikasb_leds[] __initconst = {
@@@ -182,6 -183,18 +183,18 @@@ static const struct gpio_keys_platform_
        .nbuttons = ARRAY_SIZE(mx51_efikasb_keys),
  };
  
+ static struct esdhc_platform_data sd0_pdata = {
+ #define EFIKASB_SD1_CD        IMX_GPIO_NR(2, 27)
+       .cd_gpio = EFIKASB_SD1_CD,
+       .cd_type = ESDHC_CD_GPIO,
+       .wp_type = ESDHC_WP_CONTROLLER,
+ };
+ static struct esdhc_platform_data sd1_pdata = {
+       .cd_type = ESDHC_CD_CONTROLLER,
+       .wp_type = ESDHC_WP_CONTROLLER,
+ };
  static struct regulator *pwgt1, *pwgt2;
  
  static void mx51_efikasb_power_off(void)
@@@ -250,7 -263,8 +263,8 @@@ static void __init efikasb_board_init(v
  
        mx51_efikasb_board_id();
        mx51_efikasb_usb();
-       imx51_add_sdhci_esdhc_imx(1, NULL);
+       imx51_add_sdhci_esdhc_imx(0, &sd0_pdata);
+       imx51_add_sdhci_esdhc_imx(1, &sd1_pdata);
  
        gpio_led_register_device(-1, &mx51_efikasb_leds_data);
        imx_add_gpio_keys(&mx51_efikasb_keys_data);
@@@ -266,10 -280,11 +280,11 @@@ static struct sys_timer mx51_efikasb_ti
  };
  
  MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
 -      .boot_params = MX51_PHYS_OFFSET + 0x100,
 +      .atag_offset = 0x100,
        .map_io = mx51_map_io,
        .init_early = imx51_init_early,
        .init_irq = mx51_init_irq,
+       .handle_irq = imx51_handle_irq,
        .init_machine =  efikasb_board_init,
        .timer = &mx51_efikasb_timer,
  MACHINE_END