Merge tag 'arm-soc-imx-move' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 Jan 2012 22:50:30 +0000 (14:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 Jan 2012 22:50:30 +0000 (14:50 -0800)
Consolidate i.MX 5 platforms to be under the new shared i.MX 3/5/6 tree.

* tag 'arm-soc-imx-move' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM i.MX: Update defconfig
  ARM i.MX: Merge i.MX5 support into mach-imx
  ARM i.MX5: remove unnecessary includes from board files

Fix up fairly trivial conflicts due to various changes nearby in
arch/arm/{mach,plat}-imx/{Kconfig,Makefile}

Pull request had been sent to the wrong email address, but happened
before the merge window closed.  I'm merging the MX 5 consolidation,
since it apparently will help the next development window and will avoid
conflicts later as per Arnd.

22 files changed:
1  2 
arch/arm/Makefile
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/Makefile.boot
arch/arm/mach-imx/clock-mx51-mx53.c
arch/arm/mach-imx/cpu-imx5.c
arch/arm/mach-imx/imx51-dt.c
arch/arm/mach-imx/imx53-dt.c
arch/arm/mach-imx/mach-cpuimx51.c
arch/arm/mach-imx/mach-cpuimx51sd.c
arch/arm/mach-imx/mach-mx50_rdp.c
arch/arm/mach-imx/mach-mx51_3ds.c
arch/arm/mach-imx/mach-mx51_babbage.c
arch/arm/mach-imx/mach-mx51_efikamx.c
arch/arm/mach-imx/mach-mx51_efikasb.c
arch/arm/mach-imx/mach-mx53_ard.c
arch/arm/mach-imx/mach-mx53_evk.c
arch/arm/mach-imx/mach-mx53_loco.c
arch/arm/mach-imx/mach-mx53_smd.c
arch/arm/mach-imx/mm-imx5.c
arch/arm/mach-imx/pm-imx5.c
arch/arm/plat-mxc/Kconfig

diff --combined arch/arm/Makefile
@@@ -160,7 -160,6 +160,6 @@@ machine-$(CONFIG_ARCH_MSM)         := ms
  machine-$(CONFIG_ARCH_MV78XX0)                := mv78xx0
  machine-$(CONFIG_ARCH_IMX_V4_V5)      := imx
  machine-$(CONFIG_ARCH_IMX_V6_V7)      := imx
- machine-$(CONFIG_ARCH_MX5)            := mx5
  machine-$(CONFIG_ARCH_MXS)            := mxs
  machine-$(CONFIG_ARCH_NETX)           := netx
  machine-$(CONFIG_ARCH_NOMADIK)                := nomadik
@@@ -184,6 -183,7 +183,6 @@@ machine-$(CONFIG_ARCH_EXYNOS4)             := exyn
  machine-$(CONFIG_ARCH_SA1100)         := sa1100
  machine-$(CONFIG_ARCH_SHARK)          := shark
  machine-$(CONFIG_ARCH_SHMOBILE)       := shmobile
 -machine-$(CONFIG_ARCH_TCC8K)          := tcc8k
  machine-$(CONFIG_ARCH_TEGRA)          := tegra
  machine-$(CONFIG_ARCH_U300)           := u300
  machine-$(CONFIG_ARCH_U8500)          := ux500
@@@ -203,6 -203,7 +202,6 @@@ machine-$(CONFIG_ARCH_ZYNQ)                := zyn
  plat-$(CONFIG_ARCH_MXC)               := mxc
  plat-$(CONFIG_ARCH_OMAP)      := omap
  plat-$(CONFIG_ARCH_S3C64XX)   := samsung
 -plat-$(CONFIG_ARCH_TCC_926)   := tcc
  plat-$(CONFIG_ARCH_ZYNQ)      := versatile
  plat-$(CONFIG_PLAT_IOP)               := iop
  plat-$(CONFIG_PLAT_NOMADIK)   := nomadik
@@@ -10,6 -10,11 +10,6 @@@ config HAVE_IMX_MMD
  config HAVE_IMX_SRC
        bool
  
 -#
 -# ARCH_MX31 and ARCH_MX35 are left for compatibility
 -# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
 -# To easily distinguish good and reviewed from unreviewed usages new (and IMHO
 -# more sensible) names are used: SOC_IMX31 and SOC_IMX35
  config ARCH_MX1
        bool
  
@@@ -22,6 -27,24 +22,18 @@@ config ARCH_MX2
  config MACH_MX27
        bool
  
 -config ARCH_MX31
 -      bool
 -
 -config ARCH_MX35
 -      bool
 -
+ config ARCH_MX5
+       bool
+ config ARCH_MX50
+       bool
+ config ARCH_MX51
+       bool
+ config ARCH_MX53
+       bool
  config SOC_IMX1
        bool
        select ARCH_MX1
@@@ -61,6 -84,7 +73,6 @@@ config SOC_IMX3
        select CPU_V6
        select IMX_HAVE_PLATFORM_MXC_RNGA
        select ARCH_MXC_AUDMUX_V2
 -      select ARCH_MX31
        select MXC_AVIC
        select SMP_ON_UP if SMP
  
@@@ -70,9 -94,36 +82,35 @@@ config SOC_IMX3
        select ARCH_MXC_IOMUX_V3
        select ARCH_MXC_AUDMUX_V2
        select HAVE_EPIT
 -      select ARCH_MX35
        select MXC_AVIC
        select SMP_ON_UP if SMP
  
+ config SOC_IMX5
+       select CPU_V7
+       select ARM_L1_CACHE_SHIFT_6
+       select MXC_TZIC
+       select ARCH_MXC_IOMUX_V3
+       select ARCH_MXC_AUDMUX_V2
+       select ARCH_HAS_CPUFREQ
+       select ARCH_MX5
+       bool
+ config SOC_IMX50
+       bool
+       select SOC_IMX5
+       select ARCH_MX50
+ config        SOC_IMX51
+       bool
+       select SOC_IMX5
+       select ARCH_MX5
+       select ARCH_MX51
+ config        SOC_IMX53
+       bool
+       select SOC_IMX5
+       select ARCH_MX5
+       select ARCH_MX53
  
  if ARCH_IMX_V4_V5
  
@@@ -98,7 -149,6 +136,7 @@@ config MACH_SCB932
  config MACH_APF9328
        bool "APF9328"
        select SOC_IMX1
 +      select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
        help
          Say Yes here if you are using the Armadeus APF9328 development board
@@@ -133,7 -183,7 +171,7 @@@ config MACH_MX25_3D
        select IMX_HAVE_PLATFORM_MXC_NAND
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
  
 -config MACH_EUKREA_CPUIMX25
 +config MACH_EUKREA_CPUIMX25SD
        bool "Support Eukrea CPUIMX25 Platform"
        select SOC_IMX25
        select IMX_HAVE_PLATFORM_FLEXCAN
  
  choice
        prompt "Baseboard"
 -      depends on MACH_EUKREA_CPUIMX25
 +      depends on MACH_EUKREA_CPUIMX25SD
        default MACH_EUKREA_MBIMXSD25_BASEBOARD
  
  config MACH_EUKREA_MBIMXSD25_BASEBOARD
@@@ -543,7 -593,7 +581,7 @@@ config MACH_MX35_3D
          Include support for MX35PDK platform. This includes specific
          configurations for the board and its peripherals.
  
 -config MACH_EUKREA_CPUIMX35
 +config MACH_EUKREA_CPUIMX35SD
        bool "Support Eukrea CPUIMX35 Platform"
        select SOC_IMX35
        select IMX_HAVE_PLATFORM_FLEXCAN
  
  choice
        prompt "Baseboard"
 -      depends on MACH_EUKREA_CPUIMX35
 +      depends on MACH_EUKREA_CPUIMX35SD
        default MACH_EUKREA_MBIMXSD35_BASEBOARD
  
  config MACH_EUKREA_MBIMXSD35_BASEBOARD
@@@ -592,18 -642,218 +630,219 @@@ config MACH_VPR20
          Include support for VPR200 platform. This includes specific
          configurations for the board and its peripherals.
  
+ comment "i.MX5 platforms:"
+ config MACH_MX50_RDP
+       bool "Support MX50 reference design platform"
+       depends on BROKEN
+       select SOC_IMX50
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       help
+         Include support for MX50 reference design platform (RDP) board. This
+         includes specific configurations for the board and its peripherals.
+ comment "i.MX51 machines:"
+ config MACH_IMX51_DT
+       bool "Support i.MX51 platforms from device tree"
+       select SOC_IMX51
+       select USE_OF
+       select MACH_MX51_BABBAGE
+       help
+         Include support for Freescale i.MX51 based platforms
+         using the device tree for discovery
+ config MACH_MX51_BABBAGE
+       bool "Support MX51 BABBAGE platforms"
+       select SOC_IMX51
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_MXC_EHCI
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       help
+         Include support for MX51 Babbage platform, also known as MX51EVK in
+         u-boot. This includes specific configurations for the board and its
+         peripherals.
+ config MACH_MX51_3DS
+       bool "Support MX51PDK (3DS)"
+       select SOC_IMX51
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_KEYPAD
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       select MXC_DEBUG_BOARD
+       help
+         Include support for MX51PDK (3DS) platform. This includes specific
+         configurations for the board and its peripherals.
+ config MACH_EUKREA_CPUIMX51
+       bool "Support Eukrea CPUIMX51 module"
+       select SOC_IMX51
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_MXC_EHCI
+       select IMX_HAVE_PLATFORM_MXC_NAND
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       help
+         Include support for Eukrea CPUIMX51 platform. This includes
+         specific configurations for the module and its peripherals.
+ choice
+       prompt "Baseboard"
+       depends on MACH_EUKREA_CPUIMX51
+       default MACH_EUKREA_MBIMX51_BASEBOARD
+ config MACH_EUKREA_MBIMX51_BASEBOARD
+       prompt "Eukrea MBIMX51 development board"
+       bool
+       select IMX_HAVE_PLATFORM_IMX_KEYPAD
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select LEDS_GPIO_REGISTER
+       help
+         This adds board specific devices that can be found on Eukrea's
+         MBIMX51 evaluation board.
+ endchoice
+ config MACH_EUKREA_CPUIMX51SD
+       bool "Support Eukrea CPUIMX51SD module"
+       select SOC_IMX51
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_MXC_EHCI
+       select IMX_HAVE_PLATFORM_MXC_NAND
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       help
+         Include support for Eukrea CPUIMX51SD platform. This includes
+         specific configurations for the module and its peripherals.
+ choice
+       prompt "Baseboard"
+       depends on MACH_EUKREA_CPUIMX51SD
+       default MACH_EUKREA_MBIMXSD51_BASEBOARD
+ config MACH_EUKREA_MBIMXSD51_BASEBOARD
+       prompt "Eukrea MBIMXSD development board"
+       bool
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select LEDS_GPIO_REGISTER
+       help
+         This adds board specific devices that can be found on Eukrea's
+         MBIMXSD evaluation board.
+ endchoice
+ config MX51_EFIKA_COMMON
+       bool
+       select SOC_IMX51
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_MXC_EHCI
+       select IMX_HAVE_PLATFORM_PATA_IMX
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       select MXC_ULPI if USB_ULPI
+ config MACH_MX51_EFIKAMX
+       bool "Support MX51 Genesi Efika MX nettop"
+       select LEDS_GPIO_REGISTER
+       select MX51_EFIKA_COMMON
+       help
+         Include support for Genesi Efika MX nettop. This includes specific
+         configurations for the board and its peripherals.
+ config MACH_MX51_EFIKASB
+       bool "Support MX51 Genesi Efika Smartbook"
+       select LEDS_GPIO_REGISTER
+       select MX51_EFIKA_COMMON
+       help
+         Include support for Genesi Efika Smartbook. This includes specific
+         configurations for the board and its peripherals.
+ comment "i.MX53 machines:"
+ config MACH_IMX53_DT
+       bool "Support i.MX53 platforms from device tree"
+       select SOC_IMX53
+       select USE_OF
+       select MACH_MX53_ARD
+       select MACH_MX53_EVK
+       select MACH_MX53_LOCO
+       select MACH_MX53_SMD
+       help
+         Include support for Freescale i.MX53 based platforms
+         using the device tree for discovery
+ config MACH_MX53_EVK
+       bool "Support MX53 EVK platforms"
+       select SOC_IMX53
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_SPI_IMX
+       select LEDS_GPIO_REGISTER
+       help
+         Include support for MX53 EVK platform. This includes specific
+         configurations for the board and its peripherals.
+ config MACH_MX53_SMD
+       bool "Support MX53 SMD platforms"
+       select SOC_IMX53
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       help
+         Include support for MX53 SMD platform. This includes specific
+         configurations for the board and its peripherals.
+ config MACH_MX53_LOCO
+       bool "Support MX53 LOCO platforms"
+       select SOC_IMX53
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_GPIO_KEYS
+       select LEDS_GPIO_REGISTER
+       help
+         Include support for MX53 LOCO platform. This includes specific
+         configurations for the board and its peripherals.
+ config MACH_MX53_ARD
+       bool "Support MX53 ARD platforms"
+       select SOC_IMX53
+       select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_I2C
+       select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select IMX_HAVE_PLATFORM_GPIO_KEYS
+       help
+         Include support for MX53 ARD platform. This includes specific
+         configurations for the board and its peripherals.
  comment "i.MX6 family:"
  
  config SOC_IMX6Q
        bool "i.MX6 Quad support"
 +      select ARM_CPU_SUSPEND if PM
        select ARM_GIC
 -      select CACHE_L2X0
        select CPU_V7
        select HAVE_ARM_SCU
        select HAVE_IMX_GPC
        select HAVE_IMX_MMDC
        select HAVE_IMX_SRC
 +      select HAVE_SMP
        select USE_OF
  
        help
@@@ -11,6 -11,8 +11,8 @@@ obj-$(CONFIG_SOC_IMX27) += clock-imx27.
  obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
  obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o
  
+ obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clock-mx51-mx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o
  # Support for CMOS sensor interface
  obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
  
@@@ -24,7 -26,7 +26,7 @@@ obj-$(CONFIG_MACH_MX21ADS) += mach-mx21
  
  # i.MX25 based machines
  obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o
 -obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o
 +obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o
  obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o
  
  # i.MX27 based machines
@@@ -57,7 -59,7 +59,7 @@@ obj-$(CONFIG_MACH_BUG) += mach-bug.
  # i.MX35 based machines
  obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
  obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
 -obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o
 +obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o
  obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
  obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
  
@@@ -70,8 -72,23 +72,27 @@@ AFLAGS_head-v7.o :=-Wa,-march=armv7-
  obj-$(CONFIG_SMP) += platsmp.o
  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
  obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
 -obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o pm-imx6q.o
 +obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o
 +
 +ifeq ($(CONFIG_PM),y)
 +obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o
 +endif
+ # i.MX5 based machines
+ obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o
+ obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o
+ obj-$(CONFIG_MACH_MX53_EVK) += mach-mx53_evk.o
+ obj-$(CONFIG_MACH_MX53_SMD) += mach-mx53_smd.o
+ obj-$(CONFIG_MACH_MX53_LOCO) += mach-mx53_loco.o
+ obj-$(CONFIG_MACH_MX53_ARD) += mach-mx53_ard.o
+ obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += mach-cpuimx51.o
+ obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
+ obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
+ obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
+ obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o
+ obj-$(CONFIG_MACH_MX51_EFIKAMX) += mach-mx51_efikamx.o
+ obj-$(CONFIG_MACH_MX51_EFIKASB) += mach-mx51_efikasb.o
+ obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
+ obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
+ obj-$(CONFIG_MACH_IMX53_DT) += imx53-dt.o
@@@ -1,30 -1,35 +1,42 @@@
 -zreladdr-$(CONFIG_ARCH_MX1)   += 0x08008000
 -params_phys-$(CONFIG_ARCH_MX1)        := 0x08000100
 -initrd_phys-$(CONFIG_ARCH_MX1)        := 0x08800000
 +zreladdr-$(CONFIG_SOC_IMX1)   += 0x08008000
 +params_phys-$(CONFIG_SOC_IMX1)        := 0x08000100
 +initrd_phys-$(CONFIG_SOC_IMX1)        := 0x08800000
  
 -zreladdr-$(CONFIG_MACH_MX21)  += 0xC0008000
 -params_phys-$(CONFIG_MACH_MX21)       := 0xC0000100
 -initrd_phys-$(CONFIG_MACH_MX21)       := 0xC0800000
 +zreladdr-$(CONFIG_SOC_IMX21)  += 0xC0008000
 +params_phys-$(CONFIG_SOC_IMX21)       := 0xC0000100
 +initrd_phys-$(CONFIG_SOC_IMX21)       := 0xC0800000
  
 -zreladdr-$(CONFIG_ARCH_MX25)  += 0x80008000
 -params_phys-$(CONFIG_ARCH_MX25)       := 0x80000100
 -initrd_phys-$(CONFIG_ARCH_MX25)       := 0x80800000
 +zreladdr-$(CONFIG_SOC_IMX25)  += 0x80008000
 +params_phys-$(CONFIG_SOC_IMX25)       := 0x80000100
 +initrd_phys-$(CONFIG_SOC_IMX25)       := 0x80800000
  
 -zreladdr-$(CONFIG_MACH_MX27)  += 0xA0008000
 -params_phys-$(CONFIG_MACH_MX27)       := 0xA0000100
 -initrd_phys-$(CONFIG_MACH_MX27)       := 0xA0800000
 +zreladdr-$(CONFIG_SOC_IMX27)  += 0xA0008000
 +params_phys-$(CONFIG_SOC_IMX27)       := 0xA0000100
 +initrd_phys-$(CONFIG_SOC_IMX27)       := 0xA0800000
  
 -zreladdr-$(CONFIG_ARCH_MX3)   += 0x80008000
 -params_phys-$(CONFIG_ARCH_MX3)        := 0x80000100
 -initrd_phys-$(CONFIG_ARCH_MX3)        := 0x80800000
 +zreladdr-$(CONFIG_SOC_IMX31)  += 0x80008000
 +params_phys-$(CONFIG_SOC_IMX31)       := 0x80000100
 +initrd_phys-$(CONFIG_SOC_IMX31)       := 0x80800000
 +
 +zreladdr-$(CONFIG_SOC_IMX35)  += 0x80008000
 +params_phys-$(CONFIG_SOC_IMX35)       := 0x80000100
 +initrd_phys-$(CONFIG_SOC_IMX35)       := 0x80800000
  
+ zreladdr-$(CONFIG_SOC_IMX50)  += 0x70008000
+ params_phys-$(CONFIG_SOC_IMX50)       := 0x70000100
+ initrd_phys-$(CONFIG_SOC_IMX50)       := 0x70800000
+ zreladdr-$(CONFIG_SOC_IMX51)  += 0x90008000
+ params_phys-$(CONFIG_SOC_IMX51)       := 0x90000100
+ initrd_phys-$(CONFIG_SOC_IMX51)       := 0x90800000
+ zreladdr-$(CONFIG_SOC_IMX53)  += 0x70008000
+ params_phys-$(CONFIG_SOC_IMX53)       := 0x70000100
+ initrd_phys-$(CONFIG_SOC_IMX53)       := 0x70800000
  zreladdr-$(CONFIG_SOC_IMX6Q)  += 0x10008000
  params_phys-$(CONFIG_SOC_IMX6Q)       := 0x10000100
  initrd_phys-$(CONFIG_SOC_IMX6Q)       := 0x10800000
 +
 +dtb-$(CONFIG_SOC_IMX6Q)       += imx6q-arm2.dtb \
 +                         imx6q-sabrelite.dtb
@@@ -23,7 -23,7 +23,7 @@@
  #include <mach/common.h>
  #include <mach/clock.h>
  
- #include "crm_regs.h"
+ #include "crm-regs-imx5.h"
  
  /* External clock values passed-in by the board code */
  static unsigned long external_high_reference, external_low_reference;
@@@ -1281,9 -1281,9 +1281,9 @@@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2
        NULL,  NULL, &ipg_clk, &gpt_ipg_clk);
  
  DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET,
 -      NULL, NULL, &ipg_clk, NULL);
 +      NULL, NULL, &ipg_perclk, NULL);
  DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET,
 -      NULL, NULL, &ipg_clk, NULL);
 +      NULL, NULL, &ipg_perclk, NULL);
  
  /* I2C */
  DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
@@@ -1634,7 -1634,6 +1634,7 @@@ int __init mx53_clocks_init(unsigned lo
        return 0;
  }
  
 +#ifdef CONFIG_OF
  static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc,
                                   unsigned long *ckih1, unsigned long *ckih2)
  {
@@@ -1672,4 -1671,3 +1672,4 @@@ int __init mx53_clocks_init_dt(void
        clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2);
        return mx53_clocks_init(ckil, osc, ckih1, ckih2);
  }
 +#endif
@@@ -16,7 -16,7 +16,7 @@@
  #include <linux/init.h>
  #include <linux/module.h>
  #include <mach/hardware.h>
 -#include <asm/io.h>
 +#include <linux/io.h>
  
  static int mx5_cpu_rev = -1;
  
@@@ -67,8 -67,7 +67,8 @@@ static int __init mx51_neon_fixup(void
        if (!cpu_is_mx51())
                return 0;
  
 -      if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) {
 +      if (mx51_revision() < IMX_CHIP_REVISION_3_0 &&
 +                      (elf_hwcap & HWCAP_NEON)) {
                elf_hwcap &= ~HWCAP_NEON;
                pr_info("Turning off NEON support, detected broken NEON implementation\n");
        }
@@@ -44,22 -44,20 +44,22 @@@ static const struct of_dev_auxdata imx5
        { /* sentinel */ }
  };
  
 -static void __init imx51_tzic_add_irq_domain(struct device_node *np,
 +static int __init imx51_tzic_add_irq_domain(struct device_node *np,
                                struct device_node *interrupt_parent)
  {
        irq_domain_add_simple(np, 0);
 +      return 0;
  }
  
 -static void __init imx51_gpio_add_irq_domain(struct device_node *np,
 +static int __init imx51_gpio_add_irq_domain(struct device_node *np,
                                struct device_node *interrupt_parent)
  {
 -      static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
 -                                 32 * 4; /* imx51 gets 4 gpio ports */
 +      static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
  
 +      gpio_irq_base -= 32;
        irq_domain_add_simple(np, gpio_irq_base);
 -      gpio_irq_base += 32;
 +
 +      return 0;
  }
  
  static const struct of_device_id imx51_irq_match[] __initconst = {
@@@ -115,5 -113,4 +115,5 @@@ DT_MACHINE_START(IMX51_DT, "Freescale i
        .timer          = &imx51_timer,
        .init_machine   = imx51_dt_init,
        .dt_compat      = imx51_dt_board_compat,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -48,22 -48,20 +48,22 @@@ static const struct of_dev_auxdata imx5
        { /* sentinel */ }
  };
  
 -static void __init imx53_tzic_add_irq_domain(struct device_node *np,
 +static int __init imx53_tzic_add_irq_domain(struct device_node *np,
                                struct device_node *interrupt_parent)
  {
        irq_domain_add_simple(np, 0);
 +      return 0;
  }
  
 -static void __init imx53_gpio_add_irq_domain(struct device_node *np,
 +static int __init imx53_gpio_add_irq_domain(struct device_node *np,
                                struct device_node *interrupt_parent)
  {
 -      static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
 -                                 32 * 7; /* imx53 gets 7 gpio ports */
 +      static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
  
 +      gpio_irq_base -= 32;
        irq_domain_add_simple(np, gpio_irq_base);
 -      gpio_irq_base += 32;
 +
 +      return 0;
  }
  
  static const struct of_device_id imx53_irq_match[] __initconst = {
@@@ -125,5 -123,4 +125,5 @@@ DT_MACHINE_START(IMX53_DT, "Freescale i
        .timer          = &imx53_timer,
        .init_machine   = imx53_dt_init,
        .dt_compat      = imx53_dt_board_compat,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -297,5 -297,4 +297,5 @@@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea 
        .handle_irq = imx51_handle_irq,
        .timer = &mxc_timer,
        .init_machine = eukrea_cpuimx51_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -335,5 -335,4 +335,5 @@@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukre
        .handle_irq = imx51_handle_irq,
        .timer = &mxc_timer,
        .init_machine = eukrea_cpuimx51sd_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -222,5 -222,4 +222,5 @@@ MACHINE_START(MX50_RDP, "Freescale MX5
        .handle_irq = imx50_handle_irq,
        .timer = &mx50_rdp_timer,
        .init_machine = mx50_rdp_board_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -175,5 -175,4 +175,5 @@@ MACHINE_START(MX51_3DS, "Freescale MX5
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_3ds_timer,
        .init_machine = mx51_3ds_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -362,7 -362,7 +362,7 @@@ static void __init mx51_babbage_init(vo
  {
        iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
        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);
 +              PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH);
  
        imx51_soc_init();
  
@@@ -426,5 -426,4 +426,5 @@@ MACHINE_START(MX51_BABBAGE, "Freescale 
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_babbage_timer,
        .init_machine = mx51_babbage_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -182,7 -182,7 +182,7 @@@ static const struct gpio_keys_platform_
        .nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey),
  };
  
 -void mx51_efikamx_reset(void)
 +static void mx51_efikamx_restart(char mode, const char *cmd)
  {
        if (system_rev == 0x11)
                gpio_direction_output(EFIKAMX_RESET1_1, 0);
@@@ -292,5 -292,4 +292,5 @@@ MACHINE_START(MX51_EFIKAMX, "Genesi Efi
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_efikamx_timer,
        .init_machine = mx51_efikamx_init,
 +      .restart = mx51_efikamx_restart,
  MACHINE_END
@@@ -287,5 -287,4 +287,5 @@@ MACHINE_START(MX51_EFIKASB, "Genesi Efi
        .handle_irq = imx51_handle_irq,
        .init_machine =  efikasb_board_init,
        .timer = &mx51_efikasb_timer,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -32,7 -32,6 +32,6 @@@
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
- #include "crm_regs.h"
  #include "devices-imx53.h"
  
  #define ARD_ETHERNET_INT_B    IMX_GPIO_NR(2, 31)
@@@ -257,5 -256,4 +256,5 @@@ MACHINE_START(MX53_ARD, "Freescale MX5
        .handle_irq = imx53_handle_irq,
        .timer = &mx53_ard_timer,
        .init_machine = mx53_ard_board_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -37,7 -37,6 +37,6 @@@
  #define EVK_ECSPI1_CS1                IMX_GPIO_NR(3, 19)
  #define MX53EVK_LED           IMX_GPIO_NR(7, 7)
  
- #include "crm_regs.h"
  #include "devices-imx53.h"
  
  static iomux_v3_cfg_t mx53_evk_pads[] = {
@@@ -106,7 -105,7 +105,7 @@@ static inline void mx53_evk_fec_reset(v
        gpio_set_value(MX53_EVK_FEC_PHY_RST, 1);
  }
  
 -static struct fec_platform_data mx53_evk_fec_pdata = {
 +static const struct fec_platform_data mx53_evk_fec_pdata __initconst = {
        .phy = PHY_INTERFACE_MODE_RMII,
  };
  
@@@ -175,5 -174,4 +174,5 @@@ MACHINE_START(MX53_EVK, "Freescale MX5
        .handle_irq = imx53_handle_irq,
        .timer = &mx53_evk_timer,
        .init_machine = mx53_evk_board_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -32,7 -32,6 +32,6 @@@
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
- #include "crm_regs.h"
  #include "devices-imx53.h"
  
  #define MX53_LOCO_POWER                       IMX_GPIO_NR(1, 8)
@@@ -242,7 -241,7 +241,7 @@@ static inline void mx53_loco_fec_reset(
        gpio_set_value(LOCO_FEC_PHY_RST, 1);
  }
  
 -static struct fec_platform_data mx53_loco_fec_data = {
 +static const struct fec_platform_data mx53_loco_fec_data __initconst = {
        .phy = PHY_INTERFACE_MODE_RMII,
  };
  
@@@ -317,5 -316,4 +316,5 @@@ MACHINE_START(MX53_LOCO, "Freescale MX5
        .handle_irq = imx53_handle_irq,
        .timer = &mx53_loco_timer,
        .init_machine = mx53_loco_board_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -31,7 -31,6 +31,6 @@@
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  
- #include "crm_regs.h"
  #include "devices-imx53.h"
  
  #define SMD_FEC_PHY_RST               IMX_GPIO_NR(7, 6)
@@@ -104,7 -103,7 +103,7 @@@ static inline void mx53_smd_fec_reset(v
        gpio_set_value(SMD_FEC_PHY_RST, 1);
  }
  
 -static struct fec_platform_data mx53_smd_fec_data = {
 +static const struct fec_platform_data mx53_smd_fec_data __initconst = {
        .phy = PHY_INTERFACE_MODE_RMII,
  };
  
@@@ -164,5 -163,4 +163,5 @@@ MACHINE_START(MX53_SMD, "Freescale MX5
        .handle_irq = imx53_handle_irq,
        .timer = &mx53_smd_timer,
        .init_machine = mx53_smd_board_init,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -13,7 -13,6 +13,7 @@@
  
  #include <linux/mm.h>
  #include <linux/init.h>
 +#include <linux/clk.h>
  
  #include <asm/mach/map.h>
  
  #include <mach/devices-common.h>
  #include <mach/iomux-v3.h>
  
 +static struct clk *gpc_dvfs_clk;
 +
  static void imx5_idle(void)
  {
 -      mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
 +      if (!need_resched()) {
 +              /* gpc clock is needed for SRPG */
 +              if (gpc_dvfs_clk == NULL) {
 +                      gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
 +                      if (IS_ERR(gpc_dvfs_clk))
 +                              goto err0;
 +              }
 +              clk_enable(gpc_dvfs_clk);
 +              mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
 +              if (tzic_enable_wake())
 +                      goto err1;
 +              cpu_do_idle();
 +err1:
 +              clk_disable(gpc_dvfs_clk);
 +      }
 +err0:
 +      local_irq_enable();
  }
  
  /*
@@@ -108,7 -89,7 +108,7 @@@ void __init imx51_init_early(void
        mxc_set_cpu_type(MXC_CPU_MX51);
        mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
        mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
 -      imx_idle = imx5_idle;
 +      pm_idle = imx5_idle;
  }
  
  void __init imx53_init_early(void)
@@@ -1,8 -1,6 +1,6 @@@
  /*
-  * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
-  */
- /*
+  *  Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+  *
   * The code contained herein is licensed under the GNU General Public
   * License. You may obtain a copy of the GNU General Public License
   * Version 2 or later at the following locations:
   * http://www.opensource.org/licenses/gpl-license.html
   * http://www.gnu.org/copyleft/gpl.html
   */
- #include <linux/platform_device.h>
+ #include <linux/suspend.h>
+ #include <linux/clk.h>
  #include <linux/io.h>
- #include <mach/hardware.h>
+ #include <linux/err.h>
+ #include <asm/cacheflush.h>
+ #include <asm/tlbflush.h>
  #include <mach/common.h>
- #include "crm_regs.h"
+ #include <mach/hardware.h>
+ #include "crm-regs-imx5.h"
+ static struct clk *gpc_dvfs_clk;
  
- /* set cpu low power mode before WFI instruction. This function is called
-   * mx5 because it can be used for mx50, mx51, and mx53.*/
+ /*
+  * set cpu low power mode before WFI instruction. This function is called
+  * mx5 because it can be used for mx50, mx51, and mx53.
+  */
  void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
  {
        u32 plat_lpc, arm_srpgcr, ccm_clpcr;
@@@ -55,6 -61,9 +61,6 @@@
                        stop_mode = 1;
                }
                arm_srpgcr |= MXC_SRPGCR_PCR;
 -
 -              if (tzic_enable_wake(1) != 0)
 -                      return;
                break;
        case STOP_POWER_ON:
                ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET;
                __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR);
        }
  }
+ static int mx5_suspend_prepare(void)
+ {
+       return clk_enable(gpc_dvfs_clk);
+ }
+ static int mx5_suspend_enter(suspend_state_t state)
+ {
+       switch (state) {
+       case PM_SUSPEND_MEM:
+               mx5_cpu_lp_set(STOP_POWER_OFF);
+               break;
+       case PM_SUSPEND_STANDBY:
+               mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
+               break;
+       default:
+               return -EINVAL;
+       }
+       if (state == PM_SUSPEND_MEM) {
+               local_flush_tlb_all();
+               flush_cache_all();
+               /*clear the EMPGC0/1 bits */
+               __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR);
+               __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR);
+       }
+       cpu_do_idle();
+       return 0;
+ }
+ static void mx5_suspend_finish(void)
+ {
+       clk_disable(gpc_dvfs_clk);
+ }
+ static int mx5_pm_valid(suspend_state_t state)
+ {
+       return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX);
+ }
+ static const struct platform_suspend_ops mx5_suspend_ops = {
+       .valid = mx5_pm_valid,
+       .prepare = mx5_suspend_prepare,
+       .enter = mx5_suspend_enter,
+       .finish = mx5_suspend_finish,
+ };
+ static int __init mx5_pm_init(void)
+ {
+       if (!cpu_is_mx51() && !cpu_is_mx53())
+               return 0;
+       if (gpc_dvfs_clk == NULL)
+               gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
+       if (!IS_ERR(gpc_dvfs_clk)) {
+               if (cpu_is_mx51())
+                       suspend_set_ops(&mx5_suspend_ops);
+       } else
+               return -EPERM;
+       return 0;
+ }
+ device_initcall(mx5_pm_init);
@@@ -10,33 -10,23 +10,24 @@@ choic
  
  config ARCH_IMX_V4_V5
        bool "i.MX1, i.MX21, i.MX25, i.MX27"
 -      select AUTO_ZRELADDR
 +      select AUTO_ZRELADDR if !ZBOOT_ROM
        select ARM_PATCH_PHYS_VIRT
        help
          This enables support for systems based on the Freescale i.MX ARMv4
          and ARMv5 SoCs
  
  config ARCH_IMX_V6_V7
-       bool "i.MX3, i.MX6"
+       bool "i.MX3, i.MX5, i.MX6"
        select AUTO_ZRELADDR if !ZBOOT_ROM
        select ARM_PATCH_PHYS_VIRT
 +      select MIGHT_HAVE_CACHE_L2X0
        help
-         This enables support for systems based on the Freescale i.MX3 and i.MX6
-         family.
- config ARCH_MX5
-       bool "i.MX50, i.MX51, i.MX53"
-       select AUTO_ZRELADDR if !ZBOOT_ROM
-       select ARM_PATCH_PHYS_VIRT
-       help
-         This enables support for machines using Freescale's i.MX50 and i.MX53
-         processors.
+         This enables support for systems based on the Freescale i.MX3, i.MX5
+         and i.MX6 family.
  
  endchoice
  
  source "arch/arm/mach-imx/Kconfig"
- source "arch/arm/mach-mx5/Kconfig"
  
  endmenu