aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/Makefile4
-rw-r--r--arch/arm/configs/imx_v4_v5_defconfig (renamed from arch/arm/configs/mx27_defconfig)68
-rw-r--r--arch/arm/configs/mx1_defconfig91
-rw-r--r--arch/arm/configs/mx21_defconfig97
-rw-r--r--arch/arm/configs/mx5_defconfig (renamed from arch/arm/configs/mx51_defconfig)60
-rw-r--r--arch/arm/mach-imx/Kconfig52
-rw-r--r--arch/arm/mach-imx/Makefile2
-rw-r--r--arch/arm/mach-imx/clock-imx25.c6
-rw-r--r--arch/arm/mach-imx/clock-imx27.c6
-rw-r--r--arch/arm/mach-imx/clock-imx31.c8
-rw-r--r--arch/arm/mach-imx/clock-imx35.c7
-rw-r--r--arch/arm/mach-imx/cpu-imx25.c41
-rw-r--r--arch/arm/mach-imx/cpu-imx27.c28
-rw-r--r--arch/arm/mach-imx/cpu-imx31.c49
-rw-r--r--arch/arm/mach-imx/cpu-imx35.c30
-rw-r--r--arch/arm/mach-imx/devices-imx27.h4
-rw-r--r--arch/arm/mach-imx/devices-imx31.h4
-rw-r--r--arch/arm/mach-imx/devices-imx35.h4
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c1
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c1
-rw-r--r--arch/arm/mach-imx/mach-bug.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c1
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27ipcam.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27lite.c1
-rw-r--r--arch/arm/mach-imx/mach-kzm_arm11_01.c1
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c2
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c1
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c11
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx27ads.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31ads.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31lilly.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c18
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mxt_td60.c1
-rw-r--r--arch/arm/mach-imx/mach-pca100.c1
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c1
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c1
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c1
-rw-r--r--arch/arm/mach-imx/mach-qong.c2
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c1
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c1
-rw-r--r--arch/arm/mach-mx5/Kconfig19
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51.c1
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51sd.c1
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c1
-rw-r--r--arch/arm/mach-mx5/board-mx51_3ds.c1
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c1
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c12
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikasb.c19
-rw-r--r--arch/arm/mach-mx5/board-mx53_ard.c1
-rw-r--r--arch/arm/mach-mx5/board-mx53_evk.c1
-rw-r--r--arch/arm/mach-mx5/board-mx53_loco.c21
-rw-r--r--arch/arm/mach-mx5/board-mx53_smd.c1
-rw-r--r--arch/arm/mach-mx5/clock-mx51-mx53.c12
-rw-r--r--arch/arm/mach-mx5/cpu.c74
-rw-r--r--arch/arm/mach-mx5/devices-imx51.h4
-rw-r--r--arch/arm/mach-mx5/devices-imx53.h4
-rw-r--r--arch/arm/mach-mx5/mx51_efika.c3
-rw-r--r--arch/arm/mach-mxs/Kconfig6
-rw-r--r--arch/arm/mach-mxs/clock-mx28.c8
-rw-r--r--arch/arm/mach-mxs/devices-mx23.h2
-rw-r--r--arch/arm/mach-mxs/devices-mx28.h5
-rw-r--r--arch/arm/mach-mxs/devices/Kconfig6
-rw-r--r--arch/arm/mach-mxs/devices/Makefile2
-rw-r--r--arch/arm/mach-mxs/devices/platform-mxs-saif.c60
-rw-r--r--arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c51
-rw-r--r--arch/arm/mach-mxs/include/mach/devices-common.h12
-rw-r--r--arch/arm/mach-mxs/mach-mx23evk.c1
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c80
-rw-r--r--arch/arm/mach-mxs/mach-stmp378x_devb.c1
-rw-r--r--arch/arm/mach-mxs/mach-tx28.c1
-rw-r--r--arch/arm/plat-mxc/Kconfig39
-rw-r--r--arch/arm/plat-mxc/avic.c91
-rw-r--r--arch/arm/plat-mxc/cpu.c9
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig3
-rw-r--r--arch/arm/plat-mxc/devices/Makefile1
-rw-r--r--arch/arm/plat-mxc/devices/platform-pata_imx.c59
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h15
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h8
-rw-r--r--arch/arm/plat-mxc/include/mach/entry-macro.S58
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx3.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/memory.h16
-rw-r--r--arch/arm/plat-mxc/include/mach/mx25.h5
-rw-r--r--arch/arm/plat-mxc/include/mach/mx35.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx3x.h18
-rw-r--r--arch/arm/plat-mxc/irq-common.c21
-rw-r--r--arch/arm/plat-mxc/irq-common.h3
-rw-r--r--arch/arm/plat-mxc/pwm.c2
-rw-r--r--arch/arm/plat-mxc/tzic.c32
96 files changed, 853 insertions, 561 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ebc5d922ea..975b5ddc60e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -397,6 +397,7 @@ config ARCH_MXC
397 select CLKSRC_MMIO 397 select CLKSRC_MMIO
398 select GENERIC_IRQ_CHIP 398 select GENERIC_IRQ_CHIP
399 select HAVE_SCHED_CLOCK 399 select HAVE_SCHED_CLOCK
400 select MULTI_IRQ_HANDLER
400 help 401 help
401 Support for Freescale MXC/iMX-based family of processors 402 Support for Freescale MXC/iMX-based family of processors
402 403
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 70c424eaf7b..9260c293405 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -154,9 +154,7 @@ machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
154machine-$(CONFIG_ARCH_MMP) := mmp 154machine-$(CONFIG_ARCH_MMP) := mmp
155machine-$(CONFIG_ARCH_MSM) := msm 155machine-$(CONFIG_ARCH_MSM) := msm
156machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 156machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
157machine-$(CONFIG_ARCH_MX1) := imx 157machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
158machine-$(CONFIG_ARCH_MX2) := imx
159machine-$(CONFIG_ARCH_MX25) := imx
160machine-$(CONFIG_ARCH_MX3) := imx 158machine-$(CONFIG_ARCH_MX3) := imx
161machine-$(CONFIG_ARCH_MX5) := mx5 159machine-$(CONFIG_ARCH_MX5) := mx5
162machine-$(CONFIG_ARCH_MXS) := mxs 160machine-$(CONFIG_ARCH_MXS) := mxs
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index 9ad4c656c9b..11a4192197c 100644
--- a/arch/arm/configs/mx27_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -3,9 +3,7 @@ CONFIG_EXPERIMENTAL=y
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_POSIX_MQUEUE=y 4CONFIG_POSIX_MQUEUE=y
5CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
6# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
7CONFIG_EXPERT=y 6CONFIG_EXPERT=y
8CONFIG_KALLSYMS_EXTRA_PASS=y
9# CONFIG_COMPAT_BRK is not set 7# CONFIG_COMPAT_BRK is not set
10CONFIG_SLAB=y 8CONFIG_SLAB=y
11CONFIG_PROFILING=y 9CONFIG_PROFILING=y
@@ -17,8 +15,12 @@ CONFIG_MODULE_UNLOAD=y
17# CONFIG_IOSCHED_DEADLINE is not set 15# CONFIG_IOSCHED_DEADLINE is not set
18# CONFIG_IOSCHED_CFQ is not set 16# CONFIG_IOSCHED_CFQ is not set
19CONFIG_ARCH_MXC=y 17CONFIG_ARCH_MXC=y
20CONFIG_ARCH_MX2=y 18CONFIG_ARCH_IMX_V4_V5=y
21CONFIG_MACH_MX27=y 19CONFIG_ARCH_MX1ADS=y
20CONFIG_MACH_SCB9328=y
21CONFIG_MACH_MX21ADS=y
22CONFIG_MACH_MX25_3DS=y
23CONFIG_MACH_EUKREA_CPUIMX25=y
22CONFIG_MACH_MX27ADS=y 24CONFIG_MACH_MX27ADS=y
23CONFIG_MACH_PCM038=y 25CONFIG_MACH_PCM038=y
24CONFIG_MACH_CPUIMX27=y 26CONFIG_MACH_CPUIMX27=y
@@ -29,6 +31,7 @@ CONFIG_MACH_IMX27_VISSTRIM_M10=y
29CONFIG_MACH_IMX27LITE=y 31CONFIG_MACH_IMX27LITE=y
30CONFIG_MACH_PCA100=y 32CONFIG_MACH_PCA100=y
31CONFIG_MACH_MXT_TD60=y 33CONFIG_MACH_MXT_TD60=y
34CONFIG_MACH_IMX27IPCAM=y
32CONFIG_MXC_IRQ_PRIOR=y 35CONFIG_MXC_IRQ_PRIOR=y
33CONFIG_MXC_PWM=y 36CONFIG_MXC_PWM=y
34CONFIG_NO_HZ=y 37CONFIG_NO_HZ=y
@@ -39,7 +42,6 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
39CONFIG_ZBOOT_ROM_BSS=0x0 42CONFIG_ZBOOT_ROM_BSS=0x0
40CONFIG_FPE_NWFPE=y 43CONFIG_FPE_NWFPE=y
41CONFIG_FPE_NWFPE_XP=y 44CONFIG_FPE_NWFPE_XP=y
42CONFIG_PM=y
43CONFIG_PM_DEBUG=y 45CONFIG_PM_DEBUG=y
44CONFIG_NET=y 46CONFIG_NET=y
45CONFIG_PACKET=y 47CONFIG_PACKET=y
@@ -55,8 +57,9 @@ CONFIG_IP_PNP_DHCP=y
55# CONFIG_INET_DIAG is not set 57# CONFIG_INET_DIAG is not set
56# CONFIG_IPV6 is not set 58# CONFIG_IPV6 is not set
57CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 59CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
60CONFIG_DEVTMPFS=y
61CONFIG_DEVTMPFS_MOUNT=y
58CONFIG_MTD=y 62CONFIG_MTD=y
59CONFIG_MTD_PARTITIONS=y
60CONFIG_MTD_CMDLINE_PARTS=y 63CONFIG_MTD_CMDLINE_PARTS=y
61CONFIG_MTD_CHAR=y 64CONFIG_MTD_CHAR=y
62CONFIG_MTD_BLOCK=y 65CONFIG_MTD_BLOCK=y
@@ -69,12 +72,15 @@ CONFIG_MTD_CFI_GEOMETRY=y
69CONFIG_MTD_CFI_INTELEXT=y 72CONFIG_MTD_CFI_INTELEXT=y
70CONFIG_MTD_PHYSMAP=y 73CONFIG_MTD_PHYSMAP=y
71CONFIG_MTD_NAND=y 74CONFIG_MTD_NAND=y
72CONFIG_MTD_NAND_MXC=y
73CONFIG_MTD_UBI=y 75CONFIG_MTD_UBI=y
76CONFIG_MISC_DEVICES=y
74CONFIG_EEPROM_AT24=y 77CONFIG_EEPROM_AT24=y
78CONFIG_EEPROM_AT25=y
75CONFIG_NETDEVICES=y 79CONFIG_NETDEVICES=y
76CONFIG_NET_ETHERNET=y 80CONFIG_NET_ETHERNET=y
77CONFIG_FEC=y 81CONFIG_SMC91X=y
82CONFIG_DM9000=y
83CONFIG_SMC911X=y
78# CONFIG_NETDEV_1000 is not set 84# CONFIG_NETDEV_1000 is not set
79# CONFIG_NETDEV_10000 is not set 85# CONFIG_NETDEV_10000 is not set
80# CONFIG_INPUT_MOUSEDEV is not set 86# CONFIG_INPUT_MOUSEDEV is not set
@@ -84,10 +90,10 @@ CONFIG_INPUT_EVDEV=y
84CONFIG_INPUT_TOUCHSCREEN=y 90CONFIG_INPUT_TOUCHSCREEN=y
85CONFIG_TOUCHSCREEN_ADS7846=m 91CONFIG_TOUCHSCREEN_ADS7846=m
86# CONFIG_SERIO is not set 92# CONFIG_SERIO is not set
93# CONFIG_LEGACY_PTYS is not set
87CONFIG_SERIAL_8250=m 94CONFIG_SERIAL_8250=m
88CONFIG_SERIAL_IMX=y 95CONFIG_SERIAL_IMX=y
89CONFIG_SERIAL_IMX_CONSOLE=y 96CONFIG_SERIAL_IMX_CONSOLE=y
90# CONFIG_LEGACY_PTYS is not set
91# CONFIG_HW_RANDOM is not set 97# CONFIG_HW_RANDOM is not set
92CONFIG_I2C=y 98CONFIG_I2C=y
93CONFIG_I2C_CHARDEV=y 99CONFIG_I2C_CHARDEV=y
@@ -98,19 +104,56 @@ CONFIG_W1=y
98CONFIG_W1_MASTER_MXC=y 104CONFIG_W1_MASTER_MXC=y
99CONFIG_W1_SLAVE_THERM=y 105CONFIG_W1_SLAVE_THERM=y
100# CONFIG_HWMON is not set 106# CONFIG_HWMON is not set
107CONFIG_WATCHDOG=y
108CONFIG_IMX2_WDT=y
109CONFIG_MFD_MC13XXX=y
110CONFIG_REGULATOR=y
111CONFIG_REGULATOR_MC13783=y
112CONFIG_REGULATOR_MC13892=y
101CONFIG_FB=y 113CONFIG_FB=y
102CONFIG_FB_IMX=y 114CONFIG_FB_IMX=y
115CONFIG_BACKLIGHT_LCD_SUPPORT=y
116CONFIG_LCD_CLASS_DEVICE=y
117CONFIG_BACKLIGHT_CLASS_DEVICE=y
118CONFIG_BACKLIGHT_PWM=y
103CONFIG_FRAMEBUFFER_CONSOLE=y 119CONFIG_FRAMEBUFFER_CONSOLE=y
104CONFIG_FONTS=y 120CONFIG_FONTS=y
105CONFIG_FONT_8x8=y 121CONFIG_FONT_8x8=y
106# CONFIG_HID_SUPPORT is not set 122CONFIG_LOGO=y
107CONFIG_USB=m 123CONFIG_SOUND=y
124CONFIG_SND=y
125# CONFIG_SND_ARM is not set
126# CONFIG_SND_SPI is not set
127CONFIG_SND_SOC=y
128CONFIG_SND_IMX_SOC=y
129CONFIG_SND_SOC_MX27VIS_AIC32X4=y
130CONFIG_SND_SOC_PHYCORE_AC97=y
131CONFIG_SND_SOC_EUKREA_TLV320=y
132CONFIG_USB_HID=m
133CONFIG_USB=y
108# CONFIG_USB_DEVICE_CLASS is not set 134# CONFIG_USB_DEVICE_CLASS is not set
135CONFIG_USB_EHCI_HCD=y
136CONFIG_USB_EHCI_MXC=y
109CONFIG_USB_ULPI=y 137CONFIG_USB_ULPI=y
110CONFIG_MMC=y 138CONFIG_MMC=y
111CONFIG_MMC_MXC=y 139CONFIG_MMC_MXC=y
140CONFIG_NEW_LEDS=y
141CONFIG_LEDS_CLASS=y
142CONFIG_LEDS_MC13783=y
143CONFIG_LEDS_TRIGGERS=y
144CONFIG_LEDS_TRIGGER_TIMER=y
145CONFIG_LEDS_TRIGGER_HEARTBEAT=y
146CONFIG_LEDS_TRIGGER_BACKLIGHT=y
147CONFIG_LEDS_TRIGGER_GPIO=y
148CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
112CONFIG_RTC_CLASS=y 149CONFIG_RTC_CLASS=y
113CONFIG_RTC_DRV_PCF8563=y 150CONFIG_RTC_DRV_PCF8563=y
151CONFIG_RTC_DRV_IMXDI=y
152CONFIG_RTC_MXC=y
153CONFIG_DMADEVICES=y
154CONFIG_IMX_SDMA=y
155CONFIG_IMX_DMA=y
156# CONFIG_IOMMU_SUPPORT is not set
114# CONFIG_DNOTIFY is not set 157# CONFIG_DNOTIFY is not set
115# CONFIG_PROC_PAGE_MONITOR is not set 158# CONFIG_PROC_PAGE_MONITOR is not set
116CONFIG_TMPFS=y 159CONFIG_TMPFS=y
@@ -119,12 +162,9 @@ CONFIG_UBIFS_FS=y
119CONFIG_NFS_FS=y 162CONFIG_NFS_FS=y
120CONFIG_NFS_V3=y 163CONFIG_NFS_V3=y
121CONFIG_ROOT_NFS=y 164CONFIG_ROOT_NFS=y
122CONFIG_NLS=y
123CONFIG_NLS_CODEPAGE_437=m 165CONFIG_NLS_CODEPAGE_437=m
124CONFIG_NLS_CODEPAGE_850=m 166CONFIG_NLS_CODEPAGE_850=m
125CONFIG_NLS_ISO8859_1=y 167CONFIG_NLS_ISO8859_1=y
126CONFIG_NLS_ISO8859_15=m 168CONFIG_NLS_ISO8859_15=m
127CONFIG_DEBUG_FS=y
128# CONFIG_RCU_CPU_STALL_DETECTOR is not set
129CONFIG_SYSCTL_SYSCALL_CHECK=y 169CONFIG_SYSCTL_SYSCALL_CHECK=y
130# CONFIG_CRYPTO_ANSI_CPRNG is not set 170# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/arm/configs/mx1_defconfig b/arch/arm/configs/mx1_defconfig
deleted file mode 100644
index c9436d0bf59..00000000000
--- a/arch/arm/configs/mx1_defconfig
+++ /dev/null
@@ -1,91 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_SYSFS_DEPRECATED_V2=y
7CONFIG_EXPERT=y
8CONFIG_SLAB=y
9CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y
11CONFIG_MODULE_FORCE_UNLOAD=y
12CONFIG_MODVERSIONS=y
13# CONFIG_BLK_DEV_BSG is not set
14CONFIG_ARCH_MXC=y
15CONFIG_ARCH_MX1=y
16CONFIG_ARCH_MX1ADS=y
17CONFIG_MACH_SCB9328=y
18CONFIG_MACH_APF9328=y
19CONFIG_MXC_IRQ_PRIOR=y
20CONFIG_NO_HZ=y
21CONFIG_HIGH_RES_TIMERS=y
22CONFIG_PREEMPT=y
23CONFIG_AEABI=y
24CONFIG_ZBOOT_ROM_TEXT=0x0
25CONFIG_ZBOOT_ROM_BSS=0x0
26CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off"
27CONFIG_PM=y
28CONFIG_PM_DEBUG=y
29CONFIG_NET=y
30CONFIG_PACKET=y
31CONFIG_UNIX=y
32CONFIG_INET=y
33CONFIG_IP_PNP=y
34CONFIG_IP_PNP_DHCP=y
35# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
36# CONFIG_INET_XFRM_MODE_TUNNEL is not set
37# CONFIG_INET_XFRM_MODE_BEET is not set
38# CONFIG_INET_LRO is not set
39# CONFIG_INET_DIAG is not set
40# CONFIG_IPV6 is not set
41CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
42CONFIG_FW_LOADER=m
43CONFIG_MTD=y
44CONFIG_MTD_PARTITIONS=y
45CONFIG_MTD_CMDLINE_PARTS=y
46CONFIG_MTD_CHAR=y
47CONFIG_MTD_BLOCK=y
48CONFIG_MTD_CFI=y
49CONFIG_MTD_PHYSMAP=y
50# CONFIG_BLK_DEV is not set
51# CONFIG_MISC_DEVICES is not set
52CONFIG_NETDEVICES=y
53CONFIG_PHYLIB=y
54CONFIG_SMSC_PHY=y
55CONFIG_NET_ETHERNET=y
56CONFIG_DM9000=y
57# CONFIG_NETDEV_1000 is not set
58# CONFIG_NETDEV_10000 is not set
59# CONFIG_INPUT is not set
60# CONFIG_SERIO is not set
61# CONFIG_VT is not set
62CONFIG_SERIAL_IMX=y
63CONFIG_SERIAL_IMX_CONSOLE=y
64# CONFIG_LEGACY_PTYS is not set
65# CONFIG_HW_RANDOM is not set
66CONFIG_I2C=y
67CONFIG_I2C_CHARDEV=y
68CONFIG_I2C_IMX=y
69CONFIG_W1=y
70CONFIG_W1_MASTER_MXC=y
71CONFIG_W1_SLAVE_THERM=y
72# CONFIG_HWMON is not set
73CONFIG_FB=y
74CONFIG_USB_GADGET=y
75CONFIG_USB_GADGET_IMX=y
76CONFIG_USB_ETH=m
77CONFIG_MMC=y
78CONFIG_MMC_MXC=y
79# CONFIG_DNOTIFY is not set
80CONFIG_INOTIFY=y
81CONFIG_TMPFS=y
82CONFIG_JFFS2_FS=y
83CONFIG_NFS_FS=y
84CONFIG_NFS_V3=y
85CONFIG_NFS_V4=y
86CONFIG_ROOT_NFS=y
87# CONFIG_ENABLE_WARN_DEPRECATED is not set
88# CONFIG_ENABLE_MUST_CHECK is not set
89# CONFIG_RCU_CPU_STALL_DETECTOR is not set
90CONFIG_SYSCTL_SYSCALL_CHECK=y
91# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/arm/configs/mx21_defconfig b/arch/arm/configs/mx21_defconfig
deleted file mode 100644
index 411f88dd440..00000000000
--- a/arch/arm/configs/mx21_defconfig
+++ /dev/null
@@ -1,97 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_SYSFS_DEPRECATED_V2=y
6# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
7CONFIG_EXPERT=y
8CONFIG_KALLSYMS_EXTRA_PASS=y
9CONFIG_SLAB=y
10CONFIG_MODULES=y
11CONFIG_MODULE_UNLOAD=y
12# CONFIG_BLK_DEV_BSG is not set
13# CONFIG_IOSCHED_DEADLINE is not set
14# CONFIG_IOSCHED_CFQ is not set
15CONFIG_ARCH_MXC=y
16CONFIG_ARCH_MX2=y
17CONFIG_MACH_MX21ADS=y
18CONFIG_MXC_PWM=y
19CONFIG_NO_HZ=y
20CONFIG_HIGH_RES_TIMERS=y
21CONFIG_PREEMPT=y
22CONFIG_AEABI=y
23CONFIG_ZBOOT_ROM_TEXT=0x0
24CONFIG_ZBOOT_ROM_BSS=0x0
25CONFIG_NET=y
26CONFIG_INET=y
27CONFIG_IP_PNP=y
28CONFIG_IP_PNP_DHCP=y
29CONFIG_IP_PNP_BOOTP=y
30# CONFIG_INET_XFRM_MODE_TUNNEL is not set
31# CONFIG_INET_XFRM_MODE_BEET is not set
32# CONFIG_INET_LRO is not set
33# CONFIG_INET_DIAG is not set
34# CONFIG_IPV6 is not set
35CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
36# CONFIG_FW_LOADER is not set
37CONFIG_MTD=y
38CONFIG_MTD_DEBUG=y
39CONFIG_MTD_DEBUG_VERBOSE=3
40CONFIG_MTD_PARTITIONS=y
41CONFIG_MTD_REDBOOT_PARTS=y
42CONFIG_MTD_CMDLINE_PARTS=y
43CONFIG_MTD_CHAR=y
44CONFIG_MTD_BLOCK=y
45CONFIG_MTD_CFI=y
46CONFIG_MTD_CFI_ADV_OPTIONS=y
47CONFIG_MTD_CFI_GEOMETRY=y
48# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
49CONFIG_MTD_CFI_AMDSTD=y
50CONFIG_MTD_PHYSMAP=y
51CONFIG_MTD_NAND=y
52CONFIG_MTD_NAND_MXC=y
53CONFIG_NETDEVICES=y
54CONFIG_NET_ETHERNET=y
55CONFIG_MII=y
56# CONFIG_NETDEV_1000 is not set
57# CONFIG_NETDEV_10000 is not set
58# CONFIG_INPUT_MOUSEDEV is not set
59CONFIG_INPUT_EVDEV=y
60# CONFIG_INPUT_KEYBOARD is not set
61# CONFIG_INPUT_MOUSE is not set
62CONFIG_INPUT_TOUCHSCREEN=y
63# CONFIG_SERIO is not set
64# CONFIG_CONSOLE_TRANSLATIONS is not set
65CONFIG_SERIAL_8250=y
66CONFIG_SERIAL_8250_CONSOLE=y
67CONFIG_SERIAL_8250_NR_UARTS=1
68CONFIG_SERIAL_IMX=y
69CONFIG_SERIAL_IMX_CONSOLE=y
70# CONFIG_LEGACY_PTYS is not set
71# CONFIG_HW_RANDOM is not set
72CONFIG_I2C=y
73CONFIG_I2C_CHARDEV=y
74CONFIG_I2C_IMX=y
75CONFIG_SPI=y
76# CONFIG_HWMON is not set
77CONFIG_FB=y
78CONFIG_FB_IMX=y
79# CONFIG_VGA_CONSOLE is not set
80CONFIG_FRAMEBUFFER_CONSOLE=y
81CONFIG_FONTS=y
82CONFIG_FONT_8x8=y
83CONFIG_LOGO=y
84# CONFIG_HID_SUPPORT is not set
85# CONFIG_USB_SUPPORT is not set
86CONFIG_MMC=y
87CONFIG_MMC_MXC=y
88# CONFIG_DNOTIFY is not set
89CONFIG_MSDOS_FS=y
90CONFIG_TMPFS=y
91CONFIG_JFFS2_FS=y
92CONFIG_NFS_FS=y
93CONFIG_NFS_V3=y
94CONFIG_ROOT_NFS=y
95# CONFIG_RCU_CPU_STALL_DETECTOR is not set
96CONFIG_SYSCTL_SYSCALL_CHECK=y
97# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx5_defconfig
index 88c5802a235..d0d8dfece37 100644
--- a/arch/arm/configs/mx51_defconfig
+++ b/arch/arm/configs/mx5_defconfig
@@ -1,5 +1,6 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 2# CONFIG_LOCALVERSION_AUTO is not set
3CONFIG_KERNEL_LZO=y
3CONFIG_SYSVIPC=y 4CONFIG_SYSVIPC=y
4CONFIG_LOG_BUF_SHIFT=18 5CONFIG_LOG_BUF_SHIFT=18
5CONFIG_RELAY=y 6CONFIG_RELAY=y
@@ -13,21 +14,29 @@ CONFIG_MODULE_SRCVERSION_ALL=y
13# CONFIG_LBDAF is not set 14# CONFIG_LBDAF is not set
14# CONFIG_BLK_DEV_BSG is not set 15# CONFIG_BLK_DEV_BSG is not set
15CONFIG_ARCH_MXC=y 16CONFIG_ARCH_MXC=y
16CONFIG_ARCH_MX51=y 17CONFIG_ARCH_MX5=y
17CONFIG_MACH_MX51_BABBAGE=y 18CONFIG_MACH_MX51_BABBAGE=y
18CONFIG_MACH_MX51_3DS=y 19CONFIG_MACH_MX51_3DS=y
19CONFIG_MACH_EUKREA_CPUIMX51=y 20CONFIG_MACH_EUKREA_CPUIMX51=y
21CONFIG_MACH_EUKREA_CPUIMX51SD=y
22CONFIG_MACH_MX51_EFIKAMX=y
23CONFIG_MACH_MX51_EFIKASB=y
24CONFIG_MACH_MX53_EVK=y
25CONFIG_MACH_MX53_SMD=y
26CONFIG_MACH_MX53_LOCO=y
27CONFIG_MACH_MX53_ARD=y
28CONFIG_MXC_PWM=y
20CONFIG_NO_HZ=y 29CONFIG_NO_HZ=y
21CONFIG_HIGH_RES_TIMERS=y 30CONFIG_HIGH_RES_TIMERS=y
31CONFIG_VMSPLIT_2G=y
22CONFIG_PREEMPT_VOLUNTARY=y 32CONFIG_PREEMPT_VOLUNTARY=y
23CONFIG_AEABI=y 33CONFIG_AEABI=y
24# CONFIG_OABI_COMPAT is not set 34# CONFIG_OABI_COMPAT is not set
25CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 35CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
26CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.0.101:/shared/nfs ip=dhcp" 36CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
27CONFIG_VFP=y 37CONFIG_VFP=y
28CONFIG_NEON=y 38CONFIG_NEON=y
29CONFIG_BINFMT_MISC=m 39CONFIG_BINFMT_MISC=m
30CONFIG_PM=y
31CONFIG_PM_DEBUG=y 40CONFIG_PM_DEBUG=y
32CONFIG_PM_TEST_SUSPEND=y 41CONFIG_PM_TEST_SUSPEND=y
33CONFIG_NET=y 42CONFIG_NET=y
@@ -42,13 +51,13 @@ CONFIG_IP_PNP_DHCP=y
42# CONFIG_INET_LRO is not set 51# CONFIG_INET_LRO is not set
43# CONFIG_IPV6 is not set 52# CONFIG_IPV6 is not set
44# CONFIG_WIRELESS is not set 53# CONFIG_WIRELESS is not set
54CONFIG_DEVTMPFS=y
55CONFIG_DEVTMPFS_MOUNT=y
45# CONFIG_STANDALONE is not set 56# CONFIG_STANDALONE is not set
46CONFIG_CONNECTOR=y 57CONFIG_CONNECTOR=y
47CONFIG_BLK_DEV_LOOP=y 58CONFIG_BLK_DEV_LOOP=y
48CONFIG_BLK_DEV_RAM=y 59CONFIG_BLK_DEV_RAM=y
49CONFIG_BLK_DEV_RAM_SIZE=65536 60CONFIG_BLK_DEV_RAM_SIZE=65536
50# CONFIG_MISC_DEVICES is not set
51CONFIG_SCSI=y
52# CONFIG_SCSI_PROC_FS is not set 61# CONFIG_SCSI_PROC_FS is not set
53CONFIG_BLK_DEV_SD=y 62CONFIG_BLK_DEV_SD=y
54CONFIG_SCSI_MULTI_LUN=y 63CONFIG_SCSI_MULTI_LUN=y
@@ -56,8 +65,10 @@ CONFIG_SCSI_CONSTANTS=y
56CONFIG_SCSI_LOGGING=y 65CONFIG_SCSI_LOGGING=y
57CONFIG_SCSI_SCAN_ASYNC=y 66CONFIG_SCSI_SCAN_ASYNC=y
58# CONFIG_SCSI_LOWLEVEL is not set 67# CONFIG_SCSI_LOWLEVEL is not set
59CONFIG_ATA=m 68CONFIG_ATA=y
69CONFIG_PATA_IMX=y
60CONFIG_NETDEVICES=y 70CONFIG_NETDEVICES=y
71CONFIG_MII=m
61CONFIG_MARVELL_PHY=y 72CONFIG_MARVELL_PHY=y
62CONFIG_DAVICOM_PHY=y 73CONFIG_DAVICOM_PHY=y
63CONFIG_QSEMI_PHY=y 74CONFIG_QSEMI_PHY=y
@@ -71,49 +82,57 @@ CONFIG_REALTEK_PHY=y
71CONFIG_NATIONAL_PHY=y 82CONFIG_NATIONAL_PHY=y
72CONFIG_STE10XP=y 83CONFIG_STE10XP=y
73CONFIG_LSI_ET1011C_PHY=y 84CONFIG_LSI_ET1011C_PHY=y
74CONFIG_MDIO_BITBANG=y 85CONFIG_MICREL_PHY=y
75CONFIG_MDIO_GPIO=y
76CONFIG_NET_ETHERNET=y 86CONFIG_NET_ETHERNET=y
77CONFIG_MII=m
78CONFIG_FEC=y
79# CONFIG_NETDEV_1000 is not set 87# CONFIG_NETDEV_1000 is not set
80# CONFIG_NETDEV_10000 is not set 88# CONFIG_NETDEV_10000 is not set
81# CONFIG_WLAN is not set 89# CONFIG_WLAN is not set
82CONFIG_INPUT_FF_MEMLESS=m
83# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 90# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
84CONFIG_INPUT_EVDEV=y 91CONFIG_INPUT_EVDEV=y
85CONFIG_KEYBOARD_GPIO=y
86CONFIG_INPUT_EVBUG=m 92CONFIG_INPUT_EVBUG=m
93CONFIG_KEYBOARD_GPIO=y
87CONFIG_MOUSE_PS2=m 94CONFIG_MOUSE_PS2=m
88CONFIG_MOUSE_PS2_ELANTECH=y 95CONFIG_MOUSE_PS2_ELANTECH=y
96CONFIG_INPUT_MISC=y
97CONFIG_INPUT_MMA8450=y
89CONFIG_SERIO_SERPORT=m 98CONFIG_SERIO_SERPORT=m
90CONFIG_VT_HW_CONSOLE_BINDING=y 99CONFIG_VT_HW_CONSOLE_BINDING=y
100# CONFIG_LEGACY_PTYS is not set
91# CONFIG_DEVKMEM is not set 101# CONFIG_DEVKMEM is not set
92CONFIG_SERIAL_IMX=y 102CONFIG_SERIAL_IMX=y
93CONFIG_SERIAL_IMX_CONSOLE=y 103CONFIG_SERIAL_IMX_CONSOLE=y
94# CONFIG_LEGACY_PTYS is not set
95CONFIG_HW_RANDOM=y 104CONFIG_HW_RANDOM=y
96CONFIG_I2C=y 105CONFIG_I2C=y
97# CONFIG_I2C_COMPAT is not set 106# CONFIG_I2C_COMPAT is not set
98CONFIG_I2C_CHARDEV=m 107CONFIG_I2C_CHARDEV=y
99# CONFIG_I2C_HELPER_AUTO is not set 108# CONFIG_I2C_HELPER_AUTO is not set
100CONFIG_I2C_ALGOBIT=m 109CONFIG_I2C_ALGOBIT=m
101CONFIG_I2C_ALGOPCF=m 110CONFIG_I2C_ALGOPCF=m
102CONFIG_I2C_ALGOPCA=m 111CONFIG_I2C_ALGOPCA=m
112CONFIG_I2C_IMX=y
113CONFIG_SPI=y
114CONFIG_SPI_IMX=y
103CONFIG_GPIO_SYSFS=y 115CONFIG_GPIO_SYSFS=y
104# CONFIG_HWMON is not set 116# CONFIG_HWMON is not set
105# CONFIG_HID_SUPPORT is not set 117CONFIG_WATCHDOG=y
118CONFIG_IMX2_WDT=y
119CONFIG_MFD_MC13XXX=y
120CONFIG_REGULATOR=y
121CONFIG_REGULATOR_MC13892=y
106CONFIG_USB=y 122CONFIG_USB=y
107CONFIG_USB_EHCI_HCD=y 123CONFIG_USB_EHCI_HCD=y
108CONFIG_USB_EHCI_MXC=y 124CONFIG_USB_EHCI_MXC=y
109CONFIG_USB_STORAGE=y 125CONFIG_USB_STORAGE=y
110CONFIG_MMC=y 126CONFIG_MMC=y
111CONFIG_MMC_BLOCK=m 127CONFIG_MMC_BLOCK=m
112CONFIG_MMC_SDHCI=m 128CONFIG_MMC_SDHCI=y
129CONFIG_MMC_SDHCI_PLTFM=y
130CONFIG_MMC_SDHCI_ESDHC_IMX=y
113CONFIG_NEW_LEDS=y 131CONFIG_NEW_LEDS=y
114CONFIG_LEDS_CLASS=y 132CONFIG_LEDS_CLASS=y
115CONFIG_RTC_CLASS=y 133CONFIG_RTC_CLASS=y
116CONFIG_RTC_INTF_DEV_UIE_EMUL=y 134CONFIG_RTC_INTF_DEV_UIE_EMUL=y
135CONFIG_RTC_MXC=y
117CONFIG_EXT2_FS=y 136CONFIG_EXT2_FS=y
118CONFIG_EXT2_FS_XATTR=y 137CONFIG_EXT2_FS_XATTR=y
119CONFIG_EXT2_FS_POSIX_ACL=y 138CONFIG_EXT2_FS_POSIX_ACL=y
@@ -127,7 +146,6 @@ CONFIG_EXT4_FS_SECURITY=y
127CONFIG_QUOTA=y 146CONFIG_QUOTA=y
128CONFIG_QUOTA_NETLINK_INTERFACE=y 147CONFIG_QUOTA_NETLINK_INTERFACE=y
129# CONFIG_PRINT_QUOTA_WARNING is not set 148# CONFIG_PRINT_QUOTA_WARNING is not set
130CONFIG_AUTOFS_FS=y
131CONFIG_AUTOFS4_FS=y 149CONFIG_AUTOFS4_FS=y
132CONFIG_FUSE_FS=y 150CONFIG_FUSE_FS=y
133CONFIG_ISO9660_FS=m 151CONFIG_ISO9660_FS=m
@@ -151,17 +169,13 @@ CONFIG_NLS_ISO8859_15=m
151CONFIG_NLS_UTF8=y 169CONFIG_NLS_UTF8=y
152CONFIG_MAGIC_SYSRQ=y 170CONFIG_MAGIC_SYSRQ=y
153CONFIG_DEBUG_FS=y 171CONFIG_DEBUG_FS=y
154CONFIG_DEBUG_KERNEL=y
155# CONFIG_SCHED_DEBUG is not set 172# CONFIG_SCHED_DEBUG is not set
156# CONFIG_DEBUG_BUGVERBOSE is not set 173# CONFIG_DEBUG_BUGVERBOSE is not set
157# CONFIG_RCU_CPU_STALL_DETECTOR is not set
158# CONFIG_FTRACE is not set 174# CONFIG_FTRACE is not set
159# CONFIG_ARM_UNWIND is not set 175# CONFIG_ARM_UNWIND is not set
160CONFIG_DEBUG_LL=y
161CONFIG_EARLY_PRINTK=y
162CONFIG_SECURITYFS=y 176CONFIG_SECURITYFS=y
163CONFIG_CRYPTO_DEFLATE=y 177CONFIG_CRYPTO_DEFLATE=m
164CONFIG_CRYPTO_LZO=y 178CONFIG_CRYPTO_LZO=m
165# CONFIG_CRYPTO_ANSI_CPRNG is not set 179# CONFIG_CRYPTO_ANSI_CPRNG is not set
166# CONFIG_CRYPTO_HW is not set 180# CONFIG_CRYPTO_HW is not set
167CONFIG_CRC_CCITT=m 181CONFIG_CRC_CCITT=m
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 0519dd7f034..b4e1bf8757c 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -5,6 +5,18 @@ config IMX_HAVE_DMA_V1
5# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. 5# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
6# To easily distinguish good and reviewed from unreviewed usages new (and IMHO 6# To easily distinguish good and reviewed from unreviewed usages new (and IMHO
7# more sensible) names are used: SOC_IMX31 and SOC_IMX35 7# more sensible) names are used: SOC_IMX31 and SOC_IMX35
8config ARCH_MX1
9 bool
10
11config MACH_MX21
12 bool
13
14config ARCH_MX25
15 bool
16
17config MACH_MX27
18 bool
19
8config ARCH_MX31 20config ARCH_MX31
9 bool 21 bool
10 22
@@ -13,6 +25,7 @@ config ARCH_MX35
13 25
14config SOC_IMX1 26config SOC_IMX1
15 bool 27 bool
28 select ARCH_MX1
16 select CPU_ARM920T 29 select CPU_ARM920T
17 select IMX_HAVE_DMA_V1 30 select IMX_HAVE_DMA_V1
18 select IMX_HAVE_IOMUX_V1 31 select IMX_HAVE_IOMUX_V1
@@ -20,6 +33,7 @@ config SOC_IMX1
20 33
21config SOC_IMX21 34config SOC_IMX21
22 bool 35 bool
36 select MACH_MX21
23 select CPU_ARM926T 37 select CPU_ARM926T
24 select ARCH_MXC_AUDMUX_V1 38 select ARCH_MXC_AUDMUX_V1
25 select IMX_HAVE_DMA_V1 39 select IMX_HAVE_DMA_V1
@@ -28,6 +42,7 @@ config SOC_IMX21
28 42
29config SOC_IMX25 43config SOC_IMX25
30 bool 44 bool
45 select ARCH_MX25
31 select CPU_ARM926T 46 select CPU_ARM926T
32 select ARCH_MXC_AUDMUX_V2 47 select ARCH_MXC_AUDMUX_V2
33 select ARCH_MXC_IOMUX_V3 48 select ARCH_MXC_IOMUX_V3
@@ -35,6 +50,7 @@ config SOC_IMX25
35 50
36config SOC_IMX27 51config SOC_IMX27
37 bool 52 bool
53 select MACH_MX27
38 select CPU_ARM926T 54 select CPU_ARM926T
39 select ARCH_MXC_AUDMUX_V1 55 select ARCH_MXC_AUDMUX_V1
40 select IMX_HAVE_DMA_V1 56 select IMX_HAVE_DMA_V1
@@ -59,7 +75,7 @@ config SOC_IMX35
59 select MXC_AVIC 75 select MXC_AVIC
60 76
61 77
62if ARCH_MX1 78if ARCH_IMX_V4_V5
63 79
64comment "MX1 platforms:" 80comment "MX1 platforms:"
65config MACH_MXLADS 81config MACH_MXLADS
@@ -87,30 +103,6 @@ config MACH_APF9328
87 help 103 help
88 Say Yes here if you are using the Armadeus APF9328 development board 104 Say Yes here if you are using the Armadeus APF9328 development board
89 105
90endif
91
92if ARCH_MX2
93
94choice
95 prompt "CPUs:"
96 default MACH_MX21
97
98config MACH_MX21
99 bool "i.MX21 support"
100 help
101 This enables support for Freescale's MX2 based i.MX21 processor.
102
103config MACH_MX27
104 bool "i.MX27 support"
105 help
106 This enables support for Freescale's MX2 based i.MX27 processor.
107
108endchoice
109
110endif
111
112if MACH_MX21
113
114comment "MX21 platforms:" 106comment "MX21 platforms:"
115 107
116config MACH_MX21ADS 108config MACH_MX21ADS
@@ -124,15 +116,12 @@ config MACH_MX21ADS
124 Include support for MX21ADS platform. This includes specific 116 Include support for MX21ADS platform. This includes specific
125 configurations for the board and its peripherals. 117 configurations for the board and its peripherals.
126 118
127endif
128
129if ARCH_MX25
130
131comment "MX25 platforms:" 119comment "MX25 platforms:"
132 120
133config MACH_MX25_3DS 121config MACH_MX25_3DS
134 bool "Support MX25PDK (3DS) Platform" 122 bool "Support MX25PDK (3DS) Platform"
135 select SOC_IMX25 123 select SOC_IMX25
124 select IMX_HAVE_PLATFORM_FLEXCAN
136 select IMX_HAVE_PLATFORM_FSL_USB2_UDC 125 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
137 select IMX_HAVE_PLATFORM_IMX2_WDT 126 select IMX_HAVE_PLATFORM_IMX2_WDT
138 select IMX_HAVE_PLATFORM_IMXDI_RTC 127 select IMX_HAVE_PLATFORM_IMXDI_RTC
@@ -174,10 +163,6 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD
174 163
175endchoice 164endchoice
176 165
177endif
178
179if MACH_MX27
180
181comment "MX27 platforms:" 166comment "MX27 platforms:"
182 167
183config MACH_MX27ADS 168config MACH_MX27ADS
@@ -485,6 +470,7 @@ config MACH_QONG
485 bool "Support Dave/DENX QongEVB-LITE platform" 470 bool "Support Dave/DENX QongEVB-LITE platform"
486 select SOC_IMX31 471 select SOC_IMX31
487 select IMX_HAVE_PLATFORM_IMX_UART 472 select IMX_HAVE_PLATFORM_IMX_UART
473 select IMX_HAVE_PLATFORM_IMX2_WDT
488 help 474 help
489 Include support for Dave/DENX QongEVB-LITE platform. This includes 475 Include support for Dave/DENX QongEVB-LITE platform. This includes
490 specific configurations for the board and its peripherals. 476 specific configurations for the board and its peripherals.
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 6cc821384cc..116d4b2d281 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
3obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o 3obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o
4obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o 4obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o
5 5
6obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o 6obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o
7 7
8obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o 8obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
9obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o 9obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c
index e63e23504fe..b0fec74c8c9 100644
--- a/arch/arm/mach-imx/clock-imx25.c
+++ b/arch/arm/mach-imx/clock-imx25.c
@@ -263,6 +263,7 @@ DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL);
263DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); 263DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk);
264DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); 264DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL);
265DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); 265DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL);
266DEFINE_CLOCK(iim_clk, 0, CCM_CGCR1, 26, NULL, NULL, NULL);
266 267
267#define _REGISTER_CLOCK(d, n, c) \ 268#define _REGISTER_CLOCK(d, n, c) \
268 { \ 269 { \
@@ -310,6 +311,7 @@ static struct clk_lookup lookups[] = {
310 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) 311 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
311 /* i.mx25 has the i.mx35 type sdma */ 312 /* i.mx25 has the i.mx35 type sdma */
312 _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) 313 _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk)
314 _REGISTER_CLOCK(NULL, "iim", iim_clk)
313}; 315};
314 316
315int __init mx25_clocks_init(void) 317int __init mx25_clocks_init(void)
@@ -334,6 +336,10 @@ int __init mx25_clocks_init(void)
334 /* Clock source for gpt is ahb_div */ 336 /* Clock source for gpt is ahb_div */
335 __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); 337 __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64);
336 338
339 clk_enable(&iim_clk);
340 imx_print_silicon_rev("i.MX25", mx25_revision());
341 clk_disable(&iim_clk);
342
337 mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); 343 mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
338 344
339 return 0; 345 return 0;
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
index 6912b821b37..88fe00a146e 100644
--- a/arch/arm/mach-imx/clock-imx27.c
+++ b/arch/arm/mach-imx/clock-imx27.c
@@ -583,7 +583,7 @@ DEFINE_CLOCK(emi_clk, 0, PCCR1, 19, NULL, NULL, &ahb_clk);
583DEFINE_CLOCK(dma_clk1, 0, PCCR1, 20, NULL, NULL, &ahb_clk); 583DEFINE_CLOCK(dma_clk1, 0, PCCR1, 20, NULL, NULL, &ahb_clk);
584DEFINE_CLOCK(csi_clk1, 0, PCCR1, 21, NULL, NULL, &ahb_clk); 584DEFINE_CLOCK(csi_clk1, 0, PCCR1, 21, NULL, NULL, &ahb_clk);
585DEFINE_CLOCK(brom_clk, 0, PCCR1, 22, NULL, NULL, &ahb_clk); 585DEFINE_CLOCK(brom_clk, 0, PCCR1, 22, NULL, NULL, &ahb_clk);
586DEFINE_CLOCK(ata_clk, 0, PCCR1, 23, NULL, NULL, &ahb_clk); 586DEFINE_CLOCK(pata_clk, 0, PCCR1, 23, NULL, NULL, &ahb_clk);
587DEFINE_CLOCK(wdog_clk, 0, PCCR1, 24, NULL, NULL, &ipg_clk); 587DEFINE_CLOCK(wdog_clk, 0, PCCR1, 24, NULL, NULL, &ipg_clk);
588DEFINE_CLOCK(usb_clk, 0, PCCR1, 25, get_rate_usb, &usb_clk1, &spll_clk); 588DEFINE_CLOCK(usb_clk, 0, PCCR1, 25, get_rate_usb, &usb_clk1, &spll_clk);
589DEFINE_CLOCK(uart6_clk1, 0, PCCR1, 26, NULL, NULL, &ipg_clk); 589DEFINE_CLOCK(uart6_clk1, 0, PCCR1, 26, NULL, NULL, &ipg_clk);
@@ -666,7 +666,7 @@ static struct clk_lookup lookups[] = {
666 _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) 666 _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
667 _REGISTER_CLOCK(NULL, "emi", emi_clk) 667 _REGISTER_CLOCK(NULL, "emi", emi_clk)
668 _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) 668 _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk)
669 _REGISTER_CLOCK(NULL, "ata", ata_clk) 669 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
670 _REGISTER_CLOCK(NULL, "mstick", mstick_clk) 670 _REGISTER_CLOCK(NULL, "mstick", mstick_clk)
671 _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk) 671 _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
672 _REGISTER_CLOCK(NULL, "gpio", gpio_clk) 672 _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
@@ -751,6 +751,8 @@ int __init mx27_clocks_init(unsigned long fref)
751 clk_enable(&gpio_clk); 751 clk_enable(&gpio_clk);
752 clk_enable(&emi_clk); 752 clk_enable(&emi_clk);
753 clk_enable(&iim_clk); 753 clk_enable(&iim_clk);
754 imx_print_silicon_rev("i.MX27", mx27_revision());
755 clk_disable(&iim_clk);
754 756
755#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) 757#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
756 clk_enable(&uart1_clk); 758 clk_enable(&uart1_clk);
diff --git a/arch/arm/mach-imx/clock-imx31.c b/arch/arm/mach-imx/clock-imx31.c
index d973770b1f9..988a28178d4 100644
--- a/arch/arm/mach-imx/clock-imx31.c
+++ b/arch/arm/mach-imx/clock-imx31.c
@@ -476,7 +476,7 @@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CGR0, 4, NULL, NULL, &perclk_clk);
476DEFINE_CLOCK(epit1_clk, 0, MXC_CCM_CGR0, 6, NULL, NULL, &perclk_clk); 476DEFINE_CLOCK(epit1_clk, 0, MXC_CCM_CGR0, 6, NULL, NULL, &perclk_clk);
477DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk); 477DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk);
478DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk); 478DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk);
479DEFINE_CLOCK(ata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk); 479DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk);
480DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, NULL, &ahb_clk); 480DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, NULL, &ahb_clk);
481DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk); 481DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk);
482DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk); 482DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk);
@@ -562,7 +562,7 @@ static struct clk_lookup lookups[] = {
562 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) 562 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
563 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) 563 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
564 _REGISTER_CLOCK(NULL, "firi", firi_clk) 564 _REGISTER_CLOCK(NULL, "firi", firi_clk)
565 _REGISTER_CLOCK(NULL, "ata", ata_clk) 565 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
566 _REGISTER_CLOCK(NULL, "rtic", rtic_clk) 566 _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
567 _REGISTER_CLOCK(NULL, "rng", rng_clk) 567 _REGISTER_CLOCK(NULL, "rng", rng_clk)
568 _REGISTER_CLOCK("imx31-sdma", NULL, sdma_clk1) 568 _REGISTER_CLOCK("imx31-sdma", NULL, sdma_clk1)
@@ -611,11 +611,11 @@ int __init mx31_clocks_init(unsigned long fref)
611 clk_enable(&gpt_clk); 611 clk_enable(&gpt_clk);
612 clk_enable(&emi_clk); 612 clk_enable(&emi_clk);
613 clk_enable(&iim_clk); 613 clk_enable(&iim_clk);
614 mx31_revision();
615 clk_disable(&iim_clk);
614 616
615 clk_enable(&serial_pll_clk); 617 clk_enable(&serial_pll_clk);
616 618
617 mx31_read_cpu_rev();
618
619 if (mx31_revision() >= IMX_CHIP_REVISION_2_0) { 619 if (mx31_revision() >= IMX_CHIP_REVISION_2_0) {
620 reg = __raw_readl(MXC_CCM_PMCR1); 620 reg = __raw_readl(MXC_CCM_PMCR1);
621 /* No PLL restart on DVFS switch; enable auto EMI handshake */ 621 /* No PLL restart on DVFS switch; enable auto EMI handshake */
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c
index 88b62a071ae..8116f119517 100644
--- a/arch/arm/mach-imx/clock-imx35.c
+++ b/arch/arm/mach-imx/clock-imx35.c
@@ -354,7 +354,7 @@ static void clk_cgr_disable(struct clk *clk)
354 } 354 }
355 355
356DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL); 356DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL);
357DEFINE_CLOCK(ata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL); 357DEFINE_CLOCK(pata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL);
358/* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */ 358/* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */
359DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL); 359DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL);
360DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL); 360DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL);
@@ -447,7 +447,7 @@ static struct clk nfc_clk = {
447 447
448static struct clk_lookup lookups[] = { 448static struct clk_lookup lookups[] = {
449 _REGISTER_CLOCK(NULL, "asrc", asrc_clk) 449 _REGISTER_CLOCK(NULL, "asrc", asrc_clk)
450 _REGISTER_CLOCK(NULL, "ata", ata_clk) 450 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
451 _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) 451 _REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
452 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) 452 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
453 _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk) 453 _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk)
@@ -537,7 +537,8 @@ int __init mx35_clocks_init()
537 __raw_writel(cgr3, CCM_BASE + CCM_CGR3); 537 __raw_writel(cgr3, CCM_BASE + CCM_CGR3);
538 538
539 clk_enable(&iim_clk); 539 clk_enable(&iim_clk);
540 mx35_read_cpu_rev(); 540 imx_print_silicon_rev("i.MX35", mx35_revision());
541 clk_disable(&iim_clk);
541 542
542#ifdef CONFIG_MXC_USE_EPIT 543#ifdef CONFIG_MXC_USE_EPIT
543 epit_timer_init(&epit1_clk, 544 epit_timer_init(&epit1_clk,
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c
new file mode 100644
index 00000000000..6914bcbf84e
--- /dev/null
+++ b/arch/arm/mach-imx/cpu-imx25.c
@@ -0,0 +1,41 @@
1/*
2 * MX25 CPU type detection
3 *
4 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
5 * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12#include <linux/module.h>
13#include <linux/io.h>
14#include <mach/hardware.h>
15#include <mach/iim.h>
16
17static int mx25_cpu_rev = -1;
18
19static int mx25_read_cpu_rev(void)
20{
21 u32 rev;
22
23 rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV));
24 switch (rev) {
25 case 0x00:
26 return IMX_CHIP_REVISION_1_0;
27 case 0x01:
28 return IMX_CHIP_REVISION_1_1;
29 default:
30 return IMX_CHIP_REVISION_UNKNOWN;
31 }
32}
33
34int mx25_revision(void)
35{
36 if (mx25_cpu_rev == -1)
37 mx25_cpu_rev = mx25_read_cpu_rev();
38
39 return mx25_cpu_rev;
40}
41EXPORT_SYMBOL(mx25_revision);
diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c
index 3b117be37bd..ff38e1505f6 100644
--- a/arch/arm/mach-imx/cpu-imx27.c
+++ b/arch/arm/mach-imx/cpu-imx27.c
@@ -26,12 +26,12 @@
26 26
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28 28
29static int cpu_silicon_rev = -1; 29static int mx27_cpu_rev = -1;
30static int cpu_partnumber; 30static int mx27_cpu_partnumber;
31 31
32#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ 32#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
33 33
34static void query_silicon_parameter(void) 34static int mx27_read_cpu_rev(void)
35{ 35{
36 u32 val; 36 u32 val;
37 /* 37 /*
@@ -42,20 +42,18 @@ static void query_silicon_parameter(void)
42 val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR 42 val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR
43 + SYS_CHIP_ID)); 43 + SYS_CHIP_ID));
44 44
45 mx27_cpu_partnumber = (int)((val >> 12) & 0xFFFF);
46
45 switch (val >> 28) { 47 switch (val >> 28) {
46 case 0: 48 case 0:
47 cpu_silicon_rev = IMX_CHIP_REVISION_1_0; 49 return IMX_CHIP_REVISION_1_0;
48 break;
49 case 1: 50 case 1:
50 cpu_silicon_rev = IMX_CHIP_REVISION_2_0; 51 return IMX_CHIP_REVISION_2_0;
51 break;
52 case 2: 52 case 2:
53 cpu_silicon_rev = IMX_CHIP_REVISION_2_1; 53 return IMX_CHIP_REVISION_2_1;
54 break;
55 default: 54 default:
56 cpu_silicon_rev = IMX_CHIP_REVISION_UNKNOWN; 55 return IMX_CHIP_REVISION_UNKNOWN;
57 } 56 }
58 cpu_partnumber = (int)((val >> 12) & 0xFFFF);
59} 57}
60 58
61/* 59/*
@@ -65,12 +63,12 @@ static void query_silicon_parameter(void)
65 */ 63 */
66int mx27_revision(void) 64int mx27_revision(void)
67{ 65{
68 if (cpu_silicon_rev == -1) 66 if (mx27_cpu_rev == -1)
69 query_silicon_parameter(); 67 mx27_cpu_rev = mx27_read_cpu_rev();
70 68
71 if (cpu_partnumber != 0x8821) 69 if (mx27_cpu_partnumber != 0x8821)
72 return -EINVAL; 70 return -EINVAL;
73 71
74 return cpu_silicon_rev; 72 return mx27_cpu_rev;
75} 73}
76EXPORT_SYMBOL(mx27_revision); 74EXPORT_SYMBOL(mx27_revision);
diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c
index a3780700a88..3f2345f0cda 100644
--- a/arch/arm/mach-imx/cpu-imx31.c
+++ b/arch/arm/mach-imx/cpu-imx31.c
@@ -13,45 +13,50 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/iim.h> 15#include <mach/iim.h>
16#include <mach/common.h>
16 17
17unsigned int mx31_cpu_rev; 18static int mx31_cpu_rev = -1;
18EXPORT_SYMBOL(mx31_cpu_rev);
19 19
20static struct { 20static struct {
21 u8 srev; 21 u8 srev;
22 const char *name; 22 const char *name;
23 const char *v;
24 unsigned int rev; 23 unsigned int rev;
25} mx31_cpu_type[] __initdata = { 24} mx31_cpu_type[] = {
26 { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, 25 { .srev = 0x00, .name = "i.MX31(L)", .rev = IMX_CHIP_REVISION_1_0 },
27 { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, 26 { .srev = 0x10, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 },
28 { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, 27 { .srev = 0x11, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 },
29 { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, 28 { .srev = 0x12, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 },
30 { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, 29 { .srev = 0x13, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 },
31 { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, 30 { .srev = 0x14, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_2 },
32 { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, 31 { .srev = 0x15, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_2 },
33 { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, 32 { .srev = 0x28, .name = "i.MX31", .rev = IMX_CHIP_REVISION_2_0 },
34 { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, 33 { .srev = 0x29, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_2_0 },
35}; 34};
36 35
37void __init mx31_read_cpu_rev(void) 36static int mx31_read_cpu_rev(void)
38{ 37{
39 u32 i, srev; 38 u32 i, srev;
40 39
41 /* read SREV register from IIM module */ 40 /* read SREV register from IIM module */
42 srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); 41 srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV));
42 srev &= 0xff;
43 43
44 for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) 44 for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
45 if (srev == mx31_cpu_type[i].srev) { 45 if (srev == mx31_cpu_type[i].srev) {
46 printk(KERN_INFO 46 imx_print_silicon_rev(mx31_cpu_type[i].name,
47 "CPU identified as %s, silicon rev %s\n", 47 mx31_cpu_type[i].rev);
48 mx31_cpu_type[i].name, mx31_cpu_type[i].v); 48 return mx31_cpu_type[i].rev;
49
50 mx31_cpu_rev = mx31_cpu_type[i].rev;
51 return;
52 } 49 }
53 50
54 mx31_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; 51 imx_print_silicon_rev("i.MX31", IMX_CHIP_REVISION_UNKNOWN);
52 return IMX_CHIP_REVISION_UNKNOWN;
53}
54
55int mx31_revision(void)
56{
57 if (mx31_cpu_rev == -1)
58 mx31_cpu_rev = mx31_read_cpu_rev();
55 59
56 printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); 60 return mx31_cpu_rev;
57} 61}
62EXPORT_SYMBOL(mx31_revision);
diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c
index 6637cd819ec..846e46eb8cb 100644
--- a/arch/arm/mach-imx/cpu-imx35.c
+++ b/arch/arm/mach-imx/cpu-imx35.c
@@ -13,32 +13,30 @@
13#include <mach/hardware.h> 13#include <mach/hardware.h>
14#include <mach/iim.h> 14#include <mach/iim.h>
15 15
16unsigned int mx35_cpu_rev; 16static int mx35_cpu_rev = -1;
17EXPORT_SYMBOL(mx35_cpu_rev);
18 17
19void __init mx35_read_cpu_rev(void) 18static int mx35_read_cpu_rev(void)
20{ 19{
21 u32 rev; 20 u32 rev;
22 char *srev;
23 21
24 rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); 22 rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
25 switch (rev) { 23 switch (rev) {
26 case 0x00: 24 case 0x00:
27 mx35_cpu_rev = IMX_CHIP_REVISION_1_0; 25 return IMX_CHIP_REVISION_1_0;
28 srev = "1.0";
29 break;
30 case 0x10: 26 case 0x10:
31 mx35_cpu_rev = IMX_CHIP_REVISION_2_0; 27 return IMX_CHIP_REVISION_2_0;
32 srev = "2.0";
33 break;
34 case 0x11: 28 case 0x11:
35 mx35_cpu_rev = IMX_CHIP_REVISION_2_1; 29 return IMX_CHIP_REVISION_2_1;
36 srev = "2.1";
37 break;
38 default: 30 default:
39 mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; 31 return IMX_CHIP_REVISION_UNKNOWN;
40 srev = "unknown";
41 } 32 }
33}
34
35int mx35_revision(void)
36{
37 if (mx35_cpu_rev == -1)
38 mx35_cpu_rev = mx35_read_cpu_rev();
42 39
43 printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); 40 return mx35_cpu_rev;
44} 41}
42EXPORT_SYMBOL(mx35_revision);
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
index 7f97a3cdd41..2f727d7c380 100644
--- a/arch/arm/mach-imx/devices-imx27.h
+++ b/arch/arm/mach-imx/devices-imx27.h
@@ -76,3 +76,7 @@ extern const struct imx_spi_imx_data imx27_cspi_data[];
76#define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) 76#define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata)
77#define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) 77#define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata)
78#define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) 78#define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata)
79
80extern const struct imx_pata_imx_data imx27_pata_imx_data;
81#define imx27_add_pata_imx() \
82 imx_add_pata_imx(&imx27_pata_imx_data)
diff --git a/arch/arm/mach-imx/devices-imx31.h b/arch/arm/mach-imx/devices-imx31.h
index dbe940d9c53..488e241a6db 100644
--- a/arch/arm/mach-imx/devices-imx31.h
+++ b/arch/arm/mach-imx/devices-imx31.h
@@ -78,3 +78,7 @@ extern const struct imx_spi_imx_data imx31_cspi_data[];
78#define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) 78#define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata)
79#define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata) 79#define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata)
80#define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata) 80#define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata)
81
82extern const struct imx_pata_imx_data imx31_pata_imx_data;
83#define imx31_add_pata_imx() \
84 imx_add_pata_imx(&imx31_pata_imx_data)
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h
index 234cbd3c18a..7b99ef0bb50 100644
--- a/arch/arm/mach-imx/devices-imx35.h
+++ b/arch/arm/mach-imx/devices-imx35.h
@@ -81,3 +81,7 @@ extern const struct imx_spi_imx_data imx35_cspi_data[];
81 imx_add_spi_imx(&imx35_cspi_data[id], pdata) 81 imx_add_spi_imx(&imx35_cspi_data[id], pdata)
82#define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) 82#define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata)
83#define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) 83#define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata)
84
85extern const struct imx_pata_imx_data imx35_pata_imx_data;
86#define imx35_add_pata_imx() \
87 imx_add_pata_imx(&imx35_pata_imx_data)
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index a404c89485c..1e486e67dab 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -136,6 +136,7 @@ MACHINE_START(APF9328, "Armadeus APF9328")
136 .map_io = mx1_map_io, 136 .map_io = mx1_map_io,
137 .init_early = imx1_init_early, 137 .init_early = imx1_init_early,
138 .init_irq = mx1_init_irq, 138 .init_irq = mx1_init_irq,
139 .handle_irq = imx1_handle_irq,
139 .timer = &apf9328_timer, 140 .timer = &apf9328_timer,
140 .init_machine = apf9328_init, 141 .init_machine = apf9328_init,
141MACHINE_END 142MACHINE_END
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index 83e5e3a7b12..e008554e48b 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -558,6 +558,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
558 .map_io = mx31_map_io, 558 .map_io = mx31_map_io,
559 .init_early = imx31_init_early, 559 .init_early = imx31_init_early,
560 .init_irq = mx31_init_irq, 560 .init_irq = mx31_init_irq,
561 .handle_irq = imx31_handle_irq,
561 .timer = &armadillo5x0_timer, 562 .timer = &armadillo5x0_timer,
562 .init_machine = armadillo5x0_init, 563 .init_machine = armadillo5x0_init,
563MACHINE_END 564MACHINE_END
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
index f49470553bd..313f62ddc1e 100644
--- a/arch/arm/mach-imx/mach-bug.c
+++ b/arch/arm/mach-imx/mach-bug.c
@@ -62,6 +62,7 @@ MACHINE_START(BUG, "BugLabs BUGBase")
62 .map_io = mx31_map_io, 62 .map_io = mx31_map_io,
63 .init_early = imx31_init_early, 63 .init_early = imx31_init_early,
64 .init_irq = mx31_init_irq, 64 .init_irq = mx31_init_irq,
65 .handle_irq = imx31_handle_irq,
65 .timer = &bug_timer, 66 .timer = &bug_timer,
66 .init_machine = bug_board_init, 67 .init_machine = bug_board_init,
67MACHINE_END 68MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 87887ac5806..b0cd62d6a3c 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -315,6 +315,7 @@ MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
315 .map_io = mx27_map_io, 315 .map_io = mx27_map_io,
316 .init_early = imx27_init_early, 316 .init_early = imx27_init_early,
317 .init_irq = mx27_init_irq, 317 .init_irq = mx27_init_irq,
318 .handle_irq = imx27_handle_irq,
318 .timer = &eukrea_cpuimx27_timer, 319 .timer = &eukrea_cpuimx27_timer,
319 .init_machine = eukrea_cpuimx27_init, 320 .init_machine = eukrea_cpuimx27_init,
320MACHINE_END 321MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 13b704120f0..bd4dbeaeabe 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -198,6 +198,7 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
198 .map_io = mx35_map_io, 198 .map_io = mx35_map_io,
199 .init_early = imx35_init_early, 199 .init_early = imx35_init_early,
200 .init_irq = mx35_init_irq, 200 .init_irq = mx35_init_irq,
201 .handle_irq = imx35_handle_irq,
201 .timer = &eukrea_cpuimx35_timer, 202 .timer = &eukrea_cpuimx35_timer,
202 .init_machine = eukrea_cpuimx35_init, 203 .init_machine = eukrea_cpuimx35_init,
203MACHINE_END 204MACHINE_END
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index da36da52969..e2343c8594f 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -167,6 +167,7 @@ MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25")
167 .map_io = mx25_map_io, 167 .map_io = mx25_map_io,
168 .init_early = imx25_init_early, 168 .init_early = imx25_init_early,
169 .init_irq = mx25_init_irq, 169 .init_irq = mx25_init_irq,
170 .handle_irq = imx25_handle_irq,
170 .timer = &eukrea_cpuimx25_timer, 171 .timer = &eukrea_cpuimx25_timer,
171 .init_machine = eukrea_cpuimx25_init, 172 .init_machine = eukrea_cpuimx25_init,
172MACHINE_END 173MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 6778f8193bc..678cf831bc3 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -279,6 +279,7 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
279 .map_io = mx27_map_io, 279 .map_io = mx27_map_io,
280 .init_early = imx27_init_early, 280 .init_early = imx27_init_early,
281 .init_irq = mx27_init_irq, 281 .init_irq = mx27_init_irq,
282 .handle_irq = imx27_handle_irq,
282 .timer = &visstrim_m10_timer, 283 .timer = &visstrim_m10_timer,
283 .init_machine = visstrim_m10_board_init, 284 .init_machine = visstrim_m10_board_init,
284MACHINE_END 285MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
index 272f793e924..f572ce94394 100644
--- a/arch/arm/mach-imx/mach-imx27ipcam.c
+++ b/arch/arm/mach-imx/mach-imx27ipcam.c
@@ -75,6 +75,7 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
75 .map_io = mx27_map_io, 75 .map_io = mx27_map_io,
76 .init_early = imx27_init_early, 76 .init_early = imx27_init_early,
77 .init_irq = mx27_init_irq, 77 .init_irq = mx27_init_irq,
78 .handle_irq = imx27_handle_irq,
78 .timer = &mx27ipcam_timer, 79 .timer = &mx27ipcam_timer,
79 .init_machine = mx27ipcam_init, 80 .init_machine = mx27ipcam_init,
80MACHINE_END 81MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
index d81a769fe89..e7fc4f04494 100644
--- a/arch/arm/mach-imx/mach-imx27lite.c
+++ b/arch/arm/mach-imx/mach-imx27lite.c
@@ -81,6 +81,7 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
81 .map_io = mx27_map_io, 81 .map_io = mx27_map_io,
82 .init_early = imx27_init_early, 82 .init_early = imx27_init_early,
83 .init_irq = mx27_init_irq, 83 .init_irq = mx27_init_irq,
84 .handle_irq = imx27_handle_irq,
84 .timer = &mx27lite_timer, 85 .timer = &mx27lite_timer,
85 .init_machine = mx27lite_init, 86 .init_machine = mx27lite_init,
86MACHINE_END 87MACHINE_END
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index e472a1d8805..a65d9104834 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -275,6 +275,7 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
275 .map_io = kzm_map_io, 275 .map_io = kzm_map_io,
276 .init_early = imx31_init_early, 276 .init_early = imx31_init_early,
277 .init_irq = mx31_init_irq, 277 .init_irq = mx31_init_irq,
278 .handle_irq = imx31_handle_irq,
278 .timer = &kzm_timer, 279 .timer = &kzm_timer,
279 .init_machine = kzm_board_init, 280 .init_machine = kzm_board_init,
280MACHINE_END 281MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index e8867ffd68c..ebe9a29e30a 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -144,6 +144,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
144 .map_io = mx1_map_io, 144 .map_io = mx1_map_io,
145 .init_early = imx1_init_early, 145 .init_early = imx1_init_early,
146 .init_irq = mx1_init_irq, 146 .init_irq = mx1_init_irq,
147 .handle_irq = imx1_handle_irq,
147 .timer = &mx1ads_timer, 148 .timer = &mx1ads_timer,
148 .init_machine = mx1ads_init, 149 .init_machine = mx1ads_init,
149MACHINE_END 150MACHINE_END
@@ -153,6 +154,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
153 .map_io = mx1_map_io, 154 .map_io = mx1_map_io,
154 .init_early = imx1_init_early, 155 .init_early = imx1_init_early,
155 .init_irq = mx1_init_irq, 156 .init_irq = mx1_init_irq,
157 .handle_irq = imx1_handle_irq,
156 .timer = &mx1ads_timer, 158 .timer = &mx1ads_timer,
157 .init_machine = mx1ads_init, 159 .init_machine = mx1ads_init,
158MACHINE_END 160MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index d389ecf9b5a..43dd22b768e 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -309,6 +309,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
309 .map_io = mx21ads_map_io, 309 .map_io = mx21ads_map_io,
310 .init_early = imx21_init_early, 310 .init_early = imx21_init_early,
311 .init_irq = mx21_init_irq, 311 .init_irq = mx21_init_irq,
312 .handle_irq = imx21_handle_irq,
312 .timer = &mx21ads_timer, 313 .timer = &mx21ads_timer,
313 .init_machine = mx21ads_board_init, 314 .init_machine = mx21ads_board_init,
314MACHINE_END 315MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index 7f66a91df36..bd735ad6675 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -43,6 +43,8 @@
43 43
44#include "devices-imx25.h" 44#include "devices-imx25.h"
45 45
46#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6)
47
46static const struct imxuart_platform_data uart_pdata __initconst = { 48static const struct imxuart_platform_data uart_pdata __initconst = {
47 .flags = IMXUART_HAVE_RTSCTS, 49 .flags = IMXUART_HAVE_RTSCTS,
48}; 50};
@@ -108,6 +110,11 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
108 /* I2C1 */ 110 /* I2C1 */
109 MX25_PAD_I2C1_CLK__I2C1_CLK, 111 MX25_PAD_I2C1_CLK__I2C1_CLK,
110 MX25_PAD_I2C1_DAT__I2C1_DAT, 112 MX25_PAD_I2C1_DAT__I2C1_DAT,
113
114 /* CAN1 */
115 MX25_PAD_GPIO_A__CAN1_TX,
116 MX25_PAD_GPIO_B__CAN1_RX,
117 MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */
111}; 118};
112 119
113static const struct fec_platform_data mx25_fec_pdata __initconst = { 120static const struct fec_platform_data mx25_fec_pdata __initconst = {
@@ -240,6 +247,9 @@ static void __init mx25pdk_init(void)
240 247
241 imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); 248 imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
242 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); 249 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
250
251 gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
252 imx25_add_flexcan0(NULL);
243} 253}
244 254
245static void __init mx25pdk_timer_init(void) 255static void __init mx25pdk_timer_init(void)
@@ -257,6 +267,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
257 .map_io = mx25_map_io, 267 .map_io = mx25_map_io,
258 .init_early = imx25_init_early, 268 .init_early = imx25_init_early,
259 .init_irq = mx25_init_irq, 269 .init_irq = mx25_init_irq,
270 .handle_irq = imx25_handle_irq,
260 .timer = &mx25pdk_timer, 271 .timer = &mx25pdk_timer,
261 .init_machine = mx25pdk_init, 272 .init_machine = mx25pdk_init,
262MACHINE_END 273MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 097ff42c1fe..b2bc10bdf44 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -425,6 +425,7 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
425 .map_io = mx27_map_io, 425 .map_io = mx27_map_io,
426 .init_early = imx27_init_early, 426 .init_early = imx27_init_early,
427 .init_irq = mx27_init_irq, 427 .init_irq = mx27_init_irq,
428 .handle_irq = imx27_handle_irq,
428 .timer = &mx27pdk_timer, 429 .timer = &mx27pdk_timer,
429 .init_machine = mx27pdk_init, 430 .init_machine = mx27pdk_init,
430MACHINE_END 431MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
index fc26ed71b9e..e6d132108b2 100644
--- a/arch/arm/mach-imx/mach-mx27ads.c
+++ b/arch/arm/mach-imx/mach-mx27ads.c
@@ -349,6 +349,7 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
349 .map_io = mx27ads_map_io, 349 .map_io = mx27ads_map_io,
350 .init_early = imx27_init_early, 350 .init_early = imx27_init_early,
351 .init_irq = mx27_init_irq, 351 .init_irq = mx27_init_irq,
352 .handle_irq = imx27_handle_irq,
352 .timer = &mx27ads_timer, 353 .timer = &mx27ads_timer,
353 .init_machine = mx27ads_board_init, 354 .init_machine = mx27ads_board_init,
354MACHINE_END 355MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index c20be753092..b4aa9c35bb4 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -768,6 +768,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
768 .map_io = mx31_map_io, 768 .map_io = mx31_map_io,
769 .init_early = imx31_init_early, 769 .init_early = imx31_init_early,
770 .init_irq = mx31_init_irq, 770 .init_irq = mx31_init_irq,
771 .handle_irq = imx31_handle_irq,
771 .timer = &mx31_3ds_timer, 772 .timer = &mx31_3ds_timer,
772 .init_machine = mx31_3ds_init, 773 .init_machine = mx31_3ds_init,
773 .reserve = mx31_3ds_reserve, 774 .reserve = mx31_3ds_reserve,
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index 29ca8907a78..13e7347e14d 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -539,6 +539,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
539 .map_io = mx31ads_map_io, 539 .map_io = mx31ads_map_io,
540 .init_early = imx31_init_early, 540 .init_early = imx31_init_early,
541 .init_irq = mx31ads_init_irq, 541 .init_irq = mx31ads_init_irq,
542 .handle_irq = imx31_handle_irq,
542 .timer = &mx31ads_timer, 543 .timer = &mx31ads_timer,
543 .init_machine = mx31ads_init, 544 .init_machine = mx31ads_init,
544MACHINE_END 545MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 126913ad106..070a8d1f40c 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -299,6 +299,7 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
299 .map_io = mx31_map_io, 299 .map_io = mx31_map_io,
300 .init_early = imx31_init_early, 300 .init_early = imx31_init_early,
301 .init_irq = mx31_init_irq, 301 .init_irq = mx31_init_irq,
302 .handle_irq = imx31_handle_irq,
302 .timer = &mx31lilly_timer, 303 .timer = &mx31lilly_timer,
303 .init_machine = mx31lilly_board_init, 304 .init_machine = mx31lilly_board_init,
304MACHINE_END 305MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index 4b47fd9fdd8..4f66ea44074 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -284,6 +284,7 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
284 .map_io = mx31lite_map_io, 284 .map_io = mx31lite_map_io,
285 .init_early = imx31_init_early, 285 .init_early = imx31_init_early,
286 .init_irq = mx31_init_irq, 286 .init_irq = mx31_init_irq,
287 .handle_irq = imx31_handle_irq,
287 .timer = &mx31lite_timer, 288 .timer = &mx31lite_timer,
288 .init_machine = mx31lite_init, 289 .init_machine = mx31lite_init,
289MACHINE_END 290MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index b358383120e..cd07ebe9b9d 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -28,6 +28,9 @@
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/types.h> 29#include <linux/types.h>
30#include <linux/memblock.h> 30#include <linux/memblock.h>
31#include <linux/clk.h>
32#include <linux/io.h>
33#include <linux/err.h>
31 34
32#include <linux/usb/otg.h> 35#include <linux/usb/otg.h>
33#include <linux/usb/ulpi.h> 36#include <linux/usb/ulpi.h>
@@ -490,6 +493,18 @@ err:
490 493
491} 494}
492 495
496static void mx31moboard_poweroff(void)
497{
498 struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
499
500 if (!IS_ERR(clk))
501 clk_enable(clk);
502
503 mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
504
505 __raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
506}
507
493static int mx31moboard_baseboard; 508static int mx31moboard_baseboard;
494core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); 509core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
495 510
@@ -528,6 +543,8 @@ static void __init mx31moboard_init(void)
528 543
529 moboard_usbh2_init(); 544 moboard_usbh2_init();
530 545
546 pm_power_off = mx31moboard_poweroff;
547
531 switch (mx31moboard_baseboard) { 548 switch (mx31moboard_baseboard) {
532 case MX31NOBOARD: 549 case MX31NOBOARD:
533 break; 550 break;
@@ -572,6 +589,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
572 .map_io = mx31_map_io, 589 .map_io = mx31_map_io,
573 .init_early = imx31_init_early, 590 .init_early = imx31_init_early,
574 .init_irq = mx31_init_irq, 591 .init_irq = mx31_init_irq,
592 .handle_irq = imx31_handle_irq,
575 .timer = &mx31moboard_timer, 593 .timer = &mx31moboard_timer,
576 .init_machine = mx31moboard_init, 594 .init_machine = mx31moboard_init,
577MACHINE_END 595MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index b3b9bd8ac2a..5a5eb3e0f73 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -221,6 +221,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
221 .map_io = mx35_map_io, 221 .map_io = mx35_map_io,
222 .init_early = imx35_init_early, 222 .init_early = imx35_init_early,
223 .init_irq = mx35_init_irq, 223 .init_irq = mx35_init_irq,
224 .handle_irq = imx35_handle_irq,
224 .timer = &mx35pdk_timer, 225 .timer = &mx35pdk_timer,
225 .init_machine = mx35_3ds_init, 226 .init_machine = mx35_3ds_init,
226MACHINE_END 227MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index c85876fed66..d01a92f7100 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -271,6 +271,7 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
271 .map_io = mx27_map_io, 271 .map_io = mx27_map_io,
272 .init_early = imx27_init_early, 272 .init_early = imx27_init_early,
273 .init_irq = mx27_init_irq, 273 .init_irq = mx27_init_irq,
274 .handle_irq = imx27_handle_irq,
274 .timer = &mxt_td60_timer, 275 .timer = &mxt_td60_timer,
275 .init_machine = mxt_td60_board_init, 276 .init_machine = mxt_td60_board_init,
276MACHINE_END 277MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index 71083aa1603..100babc7187 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -439,6 +439,7 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
439 .map_io = mx27_map_io, 439 .map_io = mx27_map_io,
440 .init_early = imx27_init_early, 440 .init_early = imx27_init_early,
441 .init_irq = mx27_init_irq, 441 .init_irq = mx27_init_irq,
442 .handle_irq = imx27_handle_irq,
442 .init_machine = pca100_init, 443 .init_machine = pca100_init,
443 .timer = &pca100_timer, 444 .timer = &pca100_timer,
444MACHINE_END 445MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index f45b7cd72c8..3fb5eaa8248 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -693,6 +693,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
693 .map_io = mx31_map_io, 693 .map_io = mx31_map_io,
694 .init_early = imx31_init_early, 694 .init_early = imx31_init_early,
695 .init_irq = mx31_init_irq, 695 .init_irq = mx31_init_irq,
696 .handle_irq = imx31_handle_irq,
696 .timer = &pcm037_timer, 697 .timer = &pcm037_timer,
697 .init_machine = pcm037_init, 698 .init_machine = pcm037_init,
698MACHINE_END 699MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index 2d6a64bbac4..dac2b790df0 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -353,6 +353,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
353 .map_io = mx27_map_io, 353 .map_io = mx27_map_io,
354 .init_early = imx27_init_early, 354 .init_early = imx27_init_early,
355 .init_irq = mx27_init_irq, 355 .init_irq = mx27_init_irq,
356 .handle_irq = imx27_handle_irq,
356 .timer = &pcm038_timer, 357 .timer = &pcm038_timer,
357 .init_machine = pcm038_init, 358 .init_machine = pcm038_init,
358MACHINE_END 359MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 660ec3e80cf..a27baa493ce 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -422,6 +422,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
422 .map_io = mx35_map_io, 422 .map_io = mx35_map_io,
423 .init_early = imx35_init_early, 423 .init_early = imx35_init_early,
424 .init_irq = mx35_init_irq, 424 .init_irq = mx35_init_irq,
425 .handle_irq = imx35_handle_irq,
425 .timer = &pcm043_timer, 426 .timer = &pcm043_timer,
426 .init_machine = pcm043_init, 427 .init_machine = pcm043_init,
427MACHINE_END 428MACHINE_END
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
index 3626f486498..4243d1f548c 100644
--- a/arch/arm/mach-imx/mach-qong.c
+++ b/arch/arm/mach-imx/mach-qong.c
@@ -249,6 +249,7 @@ static void __init qong_init(void)
249 mxc_init_imx_uart(); 249 mxc_init_imx_uart();
250 qong_init_nor_mtd(); 250 qong_init_nor_mtd();
251 qong_init_fpga(); 251 qong_init_fpga();
252 imx31_add_imx2_wdt(NULL);
252} 253}
253 254
254static void __init qong_timer_init(void) 255static void __init qong_timer_init(void)
@@ -266,6 +267,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
266 .map_io = mx31_map_io, 267 .map_io = mx31_map_io,
267 .init_early = imx31_init_early, 268 .init_early = imx31_init_early,
268 .init_irq = mx31_init_irq, 269 .init_irq = mx31_init_irq,
270 .handle_irq = imx31_handle_irq,
269 .timer = &qong_timer, 271 .timer = &qong_timer,
270 .init_machine = qong_init, 272 .init_machine = qong_init,
271MACHINE_END 273MACHINE_END
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index db2d60470e1..17f15fb57e1 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -141,6 +141,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
141 .map_io = mx1_map_io, 141 .map_io = mx1_map_io,
142 .init_early = imx1_init_early, 142 .init_early = imx1_init_early,
143 .init_irq = mx1_init_irq, 143 .init_irq = mx1_init_irq,
144 .handle_irq = imx1_handle_irq,
144 .timer = &scb9328_timer, 145 .timer = &scb9328_timer,
145 .init_machine = scb9328_init, 146 .init_machine = scb9328_init,
146MACHINE_END 147MACHINE_END
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 5250283479e..69092458f2d 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -319,6 +319,7 @@ MACHINE_START(VPR200, "VPR200")
319 .map_io = mx35_map_io, 319 .map_io = mx35_map_io,
320 .init_early = imx35_init_early, 320 .init_early = imx35_init_early,
321 .init_irq = mx35_init_irq, 321 .init_irq = mx35_init_irq,
322 .handle_irq = imx35_handle_irq,
322 .timer = &vpr200_timer, 323 .timer = &vpr200_timer,
323 .init_machine = vpr200_board_init, 324 .init_machine = vpr200_board_init,
324MACHINE_END 325MACHINE_END
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index b4f5ab669e4..3d4c31306ca 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -1,8 +1,9 @@
1if ARCH_MX503 || ARCH_MX51 1if ARCH_MX5
2
2# ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single 3# ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single
3# image. So for most time, SOC_IMX50/51/53 should be used. 4# image. So for most time, SOC_IMX50/51/53 should be used.
4 5
5config ARCH_MX5 6config ARCH_MX51
6 bool 7 bool
7 8
8config ARCH_MX50 9config ARCH_MX50
@@ -19,7 +20,6 @@ config SOC_IMX50
19 select ARCH_MXC_IOMUX_V3 20 select ARCH_MXC_IOMUX_V3
20 select ARCH_MXC_AUDMUX_V2 21 select ARCH_MXC_AUDMUX_V2
21 select ARCH_HAS_CPUFREQ 22 select ARCH_HAS_CPUFREQ
22 select ARCH_MX5
23 select ARCH_MX50 23 select ARCH_MX50
24 24
25config SOC_IMX51 25config SOC_IMX51
@@ -30,7 +30,7 @@ config SOC_IMX51
30 select ARCH_MXC_IOMUX_V3 30 select ARCH_MXC_IOMUX_V3
31 select ARCH_MXC_AUDMUX_V2 31 select ARCH_MXC_AUDMUX_V2
32 select ARCH_HAS_CPUFREQ 32 select ARCH_HAS_CPUFREQ
33 select ARCH_MX5 33 select ARCH_MX51
34 34
35config SOC_IMX53 35config SOC_IMX53
36 bool 36 bool
@@ -38,10 +38,8 @@ config SOC_IMX53
38 select ARM_L1_CACHE_SHIFT_6 38 select ARM_L1_CACHE_SHIFT_6
39 select MXC_TZIC 39 select MXC_TZIC
40 select ARCH_MXC_IOMUX_V3 40 select ARCH_MXC_IOMUX_V3
41 select ARCH_MX5
42 select ARCH_MX53 41 select ARCH_MX53
43 42
44if ARCH_MX50_SUPPORTED
45#comment "i.MX50 machines:" 43#comment "i.MX50 machines:"
46 44
47config MACH_MX50_RDP 45config MACH_MX50_RDP
@@ -56,9 +54,6 @@ config MACH_MX50_RDP
56 Include support for MX50 reference design platform (RDP) board. This 54 Include support for MX50 reference design platform (RDP) board. This
57 includes specific configurations for the board and its peripherals. 55 includes specific configurations for the board and its peripherals.
58 56
59endif # ARCH_MX50_SUPPORTED
60
61if ARCH_MX51
62comment "i.MX51 machines:" 57comment "i.MX51 machines:"
63 58
64config MACH_MX51_BABBAGE 59config MACH_MX51_BABBAGE
@@ -153,6 +148,7 @@ config MX51_EFIKA_COMMON
153 select SOC_IMX51 148 select SOC_IMX51
154 select IMX_HAVE_PLATFORM_IMX_UART 149 select IMX_HAVE_PLATFORM_IMX_UART
155 select IMX_HAVE_PLATFORM_MXC_EHCI 150 select IMX_HAVE_PLATFORM_MXC_EHCI
151 select IMX_HAVE_PLATFORM_PATA_IMX
156 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 152 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
157 select IMX_HAVE_PLATFORM_SPI_IMX 153 select IMX_HAVE_PLATFORM_SPI_IMX
158 select MXC_ULPI if USB_ULPI 154 select MXC_ULPI if USB_ULPI
@@ -173,9 +169,6 @@ config MACH_MX51_EFIKASB
173 Include support for Genesi Efika Smartbook. This includes specific 169 Include support for Genesi Efika Smartbook. This includes specific
174 configurations for the board and its peripherals. 170 configurations for the board and its peripherals.
175 171
176endif # ARCH_MX51
177
178if ARCH_MX53_SUPPORTED
179comment "i.MX53 machines:" 172comment "i.MX53 machines:"
180 173
181config MACH_MX53_EVK 174config MACH_MX53_EVK
@@ -227,6 +220,4 @@ config MACH_MX53_ARD
227 Include support for MX53 ARD platform. This includes specific 220 Include support for MX53 ARD platform. This includes specific
228 configurations for the board and its peripherals. 221 configurations for the board and its peripherals.
229 222
230endif # ARCH_MX53_SUPPORTED
231
232endif 223endif
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
index b0a140a03e5..e28d0e165e5 100644
--- a/arch/arm/mach-mx5/board-cpuimx51.c
+++ b/arch/arm/mach-mx5/board-cpuimx51.c
@@ -294,6 +294,7 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
294 .map_io = mx51_map_io, 294 .map_io = mx51_map_io,
295 .init_early = imx51_init_early, 295 .init_early = imx51_init_early,
296 .init_irq = mx51_init_irq, 296 .init_irq = mx51_init_irq,
297 .handle_irq = imx51_handle_irq,
297 .timer = &mxc_timer, 298 .timer = &mxc_timer,
298 .init_machine = eukrea_cpuimx51_init, 299 .init_machine = eukrea_cpuimx51_init,
299MACHINE_END 300MACHINE_END
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 452a0872716..5276660041a 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -332,6 +332,7 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
332 .map_io = mx51_map_io, 332 .map_io = mx51_map_io,
333 .init_early = imx51_init_early, 333 .init_early = imx51_init_early,
334 .init_irq = mx51_init_irq, 334 .init_irq = mx51_init_irq,
335 .handle_irq = imx51_handle_irq,
335 .timer = &mxc_timer, 336 .timer = &mxc_timer,
336 .init_machine = eukrea_cpuimx51sd_init, 337 .init_machine = eukrea_cpuimx51sd_init,
337MACHINE_END 338MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index 7de25c6712e..fc3621d90bd 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -219,6 +219,7 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
219 .map_io = mx50_map_io, 219 .map_io = mx50_map_io,
220 .init_early = imx50_init_early, 220 .init_early = imx50_init_early,
221 .init_irq = mx50_init_irq, 221 .init_irq = mx50_init_irq,
222 .handle_irq = imx50_handle_irq,
222 .timer = &mx50_rdp_timer, 223 .timer = &mx50_rdp_timer,
223 .init_machine = mx50_rdp_board_init, 224 .init_machine = mx50_rdp_board_init,
224MACHINE_END 225MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index e5db7c1af5d..067d8c4eb65 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -172,6 +172,7 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
172 .map_io = mx51_map_io, 172 .map_io = mx51_map_io,
173 .init_early = imx51_init_early, 173 .init_early = imx51_init_early,
174 .init_irq = mx51_init_irq, 174 .init_irq = mx51_init_irq,
175 .handle_irq = imx51_handle_irq,
175 .timer = &mx51_3ds_timer, 176 .timer = &mx51_3ds_timer,
176 .init_machine = mx51_3ds_init, 177 .init_machine = mx51_3ds_init,
177MACHINE_END 178MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index a320094616c..4231d984579 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -418,6 +418,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
418 .map_io = mx51_map_io, 418 .map_io = mx51_map_io,
419 .init_early = imx51_init_early, 419 .init_early = imx51_init_early,
420 .init_irq = mx51_init_irq, 420 .init_irq = mx51_init_irq,
421 .handle_irq = imx51_handle_irq,
421 .timer = &mx51_babbage_timer, 422 .timer = &mx51_babbage_timer,
422 .init_machine = mx51_babbage_init, 423 .init_machine = mx51_babbage_init,
423MACHINE_END 424MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index bfbc30037ab..90ae903aaee 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -161,6 +161,11 @@ static const struct gpio_led_platform_data
161 .num_leds = ARRAY_SIZE(mx51_efikamx_leds), 161 .num_leds = ARRAY_SIZE(mx51_efikamx_leds),
162}; 162};
163 163
164static struct esdhc_platform_data sd_pdata = {
165 .cd_type = ESDHC_CD_CONTROLLER,
166 .wp_type = ESDHC_WP_CONTROLLER,
167};
168
164static struct gpio_keys_button mx51_efikamx_powerkey[] = { 169static struct gpio_keys_button mx51_efikamx_powerkey[] = {
165 { 170 {
166 .code = KEY_POWER, 171 .code = KEY_POWER,
@@ -237,9 +242,11 @@ static void __init mx51_efikamx_init(void)
237 242
238 /* on < 1.2 boards both SD controllers are used */ 243 /* on < 1.2 boards both SD controllers are used */
239 if (system_rev < 0x12) { 244 if (system_rev < 0x12) {
240 imx51_add_sdhci_esdhc_imx(1, NULL); 245 imx51_add_sdhci_esdhc_imx(0, NULL);
246 imx51_add_sdhci_esdhc_imx(1, &sd_pdata);
241 mx51_efikamx_leds[2].default_trigger = "mmc1"; 247 mx51_efikamx_leds[2].default_trigger = "mmc1";
242 } 248 } else
249 imx51_add_sdhci_esdhc_imx(0, &sd_pdata);
243 250
244 gpio_led_register_device(-1, &mx51_efikamx_leds_data); 251 gpio_led_register_device(-1, &mx51_efikamx_leds_data);
245 imx_add_gpio_keys(&mx51_efikamx_powerkey_data); 252 imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
@@ -282,6 +289,7 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
282 .map_io = mx51_map_io, 289 .map_io = mx51_map_io,
283 .init_early = imx51_init_early, 290 .init_early = imx51_init_early,
284 .init_irq = mx51_init_irq, 291 .init_irq = mx51_init_irq,
292 .handle_irq = imx51_handle_irq,
285 .timer = &mx51_efikamx_timer, 293 .timer = &mx51_efikamx_timer,
286 .init_machine = mx51_efikamx_init, 294 .init_machine = mx51_efikamx_init,
287MACHINE_END 295MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c
index 00f27219515..c26508a6708 100644
--- a/arch/arm/mach-mx5/board-mx51_efikasb.c
+++ b/arch/arm/mach-mx5/board-mx51_efikasb.c
@@ -54,6 +54,7 @@
54#define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) 54#define EFIKASB_RFKILL IMX_GPIO_NR(3, 1)
55 55
56#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) 56#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
57#define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL)
57 58
58static iomux_v3_cfg_t mx51efikasb_pads[] = { 59static iomux_v3_cfg_t mx51efikasb_pads[] = {
59 /* USB HOST2 */ 60 /* USB HOST2 */
@@ -95,6 +96,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = {
95 96
96 /* BT */ 97 /* BT */
97 MX51_PAD_EIM_A17__GPIO2_11, 98 MX51_PAD_EIM_A17__GPIO2_11,
99
100 MX51_PAD_SD1_CD,
98}; 101};
99 102
100static int initialize_usbh2_port(struct platform_device *pdev) 103static int initialize_usbh2_port(struct platform_device *pdev)
@@ -180,6 +183,18 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst =
180 .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), 183 .nbuttons = ARRAY_SIZE(mx51_efikasb_keys),
181}; 184};
182 185
186static struct esdhc_platform_data sd0_pdata = {
187#define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27)
188 .cd_gpio = EFIKASB_SD1_CD,
189 .cd_type = ESDHC_CD_GPIO,
190 .wp_type = ESDHC_WP_CONTROLLER,
191};
192
193static struct esdhc_platform_data sd1_pdata = {
194 .cd_type = ESDHC_CD_CONTROLLER,
195 .wp_type = ESDHC_WP_CONTROLLER,
196};
197
183static struct regulator *pwgt1, *pwgt2; 198static struct regulator *pwgt1, *pwgt2;
184 199
185static void mx51_efikasb_power_off(void) 200static void mx51_efikasb_power_off(void)
@@ -248,7 +263,8 @@ static void __init efikasb_board_init(void)
248 263
249 mx51_efikasb_board_id(); 264 mx51_efikasb_board_id();
250 mx51_efikasb_usb(); 265 mx51_efikasb_usb();
251 imx51_add_sdhci_esdhc_imx(1, NULL); 266 imx51_add_sdhci_esdhc_imx(0, &sd0_pdata);
267 imx51_add_sdhci_esdhc_imx(1, &sd1_pdata);
252 268
253 gpio_led_register_device(-1, &mx51_efikasb_leds_data); 269 gpio_led_register_device(-1, &mx51_efikasb_leds_data);
254 imx_add_gpio_keys(&mx51_efikasb_keys_data); 270 imx_add_gpio_keys(&mx51_efikasb_keys_data);
@@ -268,6 +284,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
268 .map_io = mx51_map_io, 284 .map_io = mx51_map_io,
269 .init_early = imx51_init_early, 285 .init_early = imx51_init_early,
270 .init_irq = mx51_init_irq, 286 .init_irq = mx51_init_irq,
287 .handle_irq = imx51_handle_irq,
271 .init_machine = efikasb_board_init, 288 .init_machine = efikasb_board_init,
272 .timer = &mx51_efikasb_timer, 289 .timer = &mx51_efikasb_timer,
273MACHINE_END 290MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
index ddc3015102d..cb4d753c6c9 100644
--- a/arch/arm/mach-mx5/board-mx53_ard.c
+++ b/arch/arm/mach-mx5/board-mx53_ard.c
@@ -249,6 +249,7 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board")
249 .map_io = mx53_map_io, 249 .map_io = mx53_map_io,
250 .init_early = imx53_init_early, 250 .init_early = imx53_init_early,
251 .init_irq = mx53_init_irq, 251 .init_irq = mx53_init_irq,
252 .handle_irq = imx53_handle_irq,
252 .timer = &mx53_ard_timer, 253 .timer = &mx53_ard_timer,
253 .init_machine = mx53_ard_board_init, 254 .init_machine = mx53_ard_board_init,
254MACHINE_END 255MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index 1b417b06b73..6a3e6168e32 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -167,6 +167,7 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
167 .map_io = mx53_map_io, 167 .map_io = mx53_map_io,
168 .init_early = imx53_init_early, 168 .init_early = imx53_init_early,
169 .init_irq = mx53_init_irq, 169 .init_irq = mx53_init_irq,
170 .handle_irq = imx53_handle_irq,
170 .timer = &mx53_evk_timer, 171 .timer = &mx53_evk_timer,
171 .init_machine = mx53_evk_board_init, 172 .init_machine = mx53_evk_board_init,
172MACHINE_END 173MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
index 4e1d51d252d..7149416d151 100644
--- a/arch/arm/mach-mx5/board-mx53_loco.c
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
@@ -22,6 +22,7 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/i2c.h>
25 26
26#include <mach/common.h> 27#include <mach/common.h>
27#include <mach/hardware.h> 28#include <mach/hardware.h>
@@ -42,6 +43,7 @@
42#define LOCO_SD3_CD IMX_GPIO_NR(3, 11) 43#define LOCO_SD3_CD IMX_GPIO_NR(3, 11)
43#define LOCO_SD3_WP IMX_GPIO_NR(3, 12) 44#define LOCO_SD3_WP IMX_GPIO_NR(3, 12)
44#define LOCO_SD1_CD IMX_GPIO_NR(3, 13) 45#define LOCO_SD1_CD IMX_GPIO_NR(3, 13)
46#define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14)
45 47
46static iomux_v3_cfg_t mx53_loco_pads[] = { 48static iomux_v3_cfg_t mx53_loco_pads[] = {
47 /* FEC */ 49 /* FEC */
@@ -64,6 +66,10 @@ static iomux_v3_cfg_t mx53_loco_pads[] = {
64 MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, 66 MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD,
65 MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, 67 MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS,
66 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, 68 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD,
69 /* I2C1 */
70 MX53_PAD_CSI0_DAT8__I2C1_SDA,
71 MX53_PAD_CSI0_DAT9__I2C1_SCL,
72 MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */
67 /* I2C2 */ 73 /* I2C2 */
68 MX53_PAD_KEY_COL3__I2C2_SCL, 74 MX53_PAD_KEY_COL3__I2C2_SCL,
69 MX53_PAD_KEY_ROW3__I2C2_SDA, 75 MX53_PAD_KEY_ROW3__I2C2_SDA,
@@ -257,8 +263,15 @@ static const struct gpio_led_platform_data mx53loco_leds_data __initconst = {
257 .num_leds = ARRAY_SIZE(mx53loco_leds), 263 .num_leds = ARRAY_SIZE(mx53loco_leds),
258}; 264};
259 265
266static struct i2c_board_info mx53loco_i2c_devices[] = {
267 {
268 I2C_BOARD_INFO("mma8450", 0x1C),
269 },
270};
271
260static void __init mx53_loco_board_init(void) 272static void __init mx53_loco_board_init(void)
261{ 273{
274 int ret;
262 imx53_soc_init(); 275 imx53_soc_init();
263 276
264 mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, 277 mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
@@ -267,6 +280,13 @@ static void __init mx53_loco_board_init(void)
267 mx53_loco_fec_reset(); 280 mx53_loco_fec_reset();
268 imx53_add_fec(&mx53_loco_fec_data); 281 imx53_add_fec(&mx53_loco_fec_data);
269 imx53_add_imx2_wdt(0, NULL); 282 imx53_add_imx2_wdt(0, NULL);
283
284 ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en");
285 if (ret)
286 pr_err("Cannot request ACCEL_EN pin: %d\n", ret);
287
288 i2c_register_board_info(0, mx53loco_i2c_devices,
289 ARRAY_SIZE(mx53loco_i2c_devices));
270 imx53_add_imx_i2c(0, &mx53_loco_i2c_data); 290 imx53_add_imx_i2c(0, &mx53_loco_i2c_data);
271 imx53_add_imx_i2c(1, &mx53_loco_i2c_data); 291 imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
272 imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); 292 imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data);
@@ -288,6 +308,7 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
288 .map_io = mx53_map_io, 308 .map_io = mx53_map_io,
289 .init_early = imx53_init_early, 309 .init_early = imx53_init_early,
290 .init_irq = mx53_init_irq, 310 .init_irq = mx53_init_irq,
311 .handle_irq = imx53_handle_irq,
291 .timer = &mx53_loco_timer, 312 .timer = &mx53_loco_timer,
292 .init_machine = mx53_loco_board_init, 313 .init_machine = mx53_loco_board_init,
293MACHINE_END 314MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
index bc02894eafe..e64fd2c088e 100644
--- a/arch/arm/mach-mx5/board-mx53_smd.c
+++ b/arch/arm/mach-mx5/board-mx53_smd.c
@@ -140,6 +140,7 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
140 .map_io = mx53_map_io, 140 .map_io = mx53_map_io,
141 .init_early = imx53_init_early, 141 .init_early = imx53_init_early,
142 .init_irq = mx53_init_irq, 142 .init_irq = mx53_init_irq,
143 .handle_irq = imx53_handle_irq,
143 .timer = &mx53_smd_timer, 144 .timer = &mx53_smd_timer,
144 .init_machine = mx53_smd_board_init, 145 .init_machine = mx53_smd_board_init,
145MACHINE_END 146MACHINE_END
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index a3db3557b7c..2b9bd1fabaf 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -1418,6 +1418,10 @@ DEFINE_CLOCK(ipu_di0_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG5_OFFSET,
1418DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET, 1418DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET,
1419 NULL, NULL, &pll3_sw_clk, NULL); 1419 NULL, NULL, &pll3_sw_clk, NULL);
1420 1420
1421/* PATA */
1422DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG0_OFFSET,
1423 NULL, NULL, &ipg_clk, &spba_clk);
1424
1421#define _REGISTER_CLOCK(d, n, c) \ 1425#define _REGISTER_CLOCK(d, n, c) \
1422 { \ 1426 { \
1423 .dev_id = d, \ 1427 .dev_id = d, \
@@ -1474,6 +1478,7 @@ static struct clk_lookup mx51_lookups[] = {
1474 _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) 1478 _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk)
1475 _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) 1479 _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk)
1476 _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) 1480 _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk)
1481 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
1477}; 1482};
1478 1483
1479static struct clk_lookup mx53_lookups[] = { 1484static struct clk_lookup mx53_lookups[] = {
@@ -1507,6 +1512,7 @@ static struct clk_lookup mx53_lookups[] = {
1507 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) 1512 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
1508 _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) 1513 _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk)
1509 _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) 1514 _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk)
1515 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
1510}; 1516};
1511 1517
1512static void clk_tree_init(void) 1518static void clk_tree_init(void)
@@ -1548,9 +1554,8 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
1548 clk_enable(&main_bus_clk); 1554 clk_enable(&main_bus_clk);
1549 1555
1550 clk_enable(&iim_clk); 1556 clk_enable(&iim_clk);
1551 mx51_revision(); 1557 imx_print_silicon_rev("i.MX51", mx51_revision());
1552 clk_disable(&iim_clk); 1558 clk_disable(&iim_clk);
1553 mx51_display_revision();
1554 1559
1555 /* move usb_phy_clk to 24MHz */ 1560 /* move usb_phy_clk to 24MHz */
1556 clk_set_parent(&usb_phy1_clk, &osc_clk); 1561 clk_set_parent(&usb_phy1_clk, &osc_clk);
@@ -1592,9 +1597,8 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
1592 clk_enable(&main_bus_clk); 1597 clk_enable(&main_bus_clk);
1593 1598
1594 clk_enable(&iim_clk); 1599 clk_enable(&iim_clk);
1595 mx53_revision(); 1600 imx_print_silicon_rev("i.MX53", mx53_revision());
1596 clk_disable(&iim_clk); 1601 clk_disable(&iim_clk);
1597 mx53_display_revision();
1598 1602
1599 /* Set SDHC parents to be PLL2 */ 1603 /* Set SDHC parents to be PLL2 */
1600 clk_set_parent(&esdhc1_clk, &pll2_sw_clk); 1604 clk_set_parent(&esdhc1_clk, &pll2_sw_clk);
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
index 86f87da59c6..5c5328257dc 100644
--- a/arch/arm/mach-mx5/cpu.c
+++ b/arch/arm/mach-mx5/cpu.c
@@ -18,7 +18,7 @@
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19#include <asm/io.h> 19#include <asm/io.h>
20 20
21static int cpu_silicon_rev = -1; 21static int mx5_cpu_rev = -1;
22 22
23#define IIM_SREV 0x24 23#define IIM_SREV 0x24
24#define MX50_HW_ADADIG_DIGPROG 0xB0 24#define MX50_HW_ADADIG_DIGPROG 0xB0
@@ -28,11 +28,14 @@ static int get_mx51_srev(void)
28 void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); 28 void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR);
29 u32 rev = readl(iim_base + IIM_SREV) & 0xff; 29 u32 rev = readl(iim_base + IIM_SREV) & 0xff;
30 30
31 if (rev == 0x0) 31 switch (rev) {
32 case 0x0:
32 return IMX_CHIP_REVISION_2_0; 33 return IMX_CHIP_REVISION_2_0;
33 else if (rev == 0x10) 34 case 0x10:
34 return IMX_CHIP_REVISION_3_0; 35 return IMX_CHIP_REVISION_3_0;
35 return 0; 36 default:
37 return IMX_CHIP_REVISION_UNKNOWN;
38 }
36} 39}
37 40
38/* 41/*
@@ -45,33 +48,13 @@ int mx51_revision(void)
45 if (!cpu_is_mx51()) 48 if (!cpu_is_mx51())
46 return -EINVAL; 49 return -EINVAL;
47 50
48 if (cpu_silicon_rev == -1) 51 if (mx5_cpu_rev == -1)
49 cpu_silicon_rev = get_mx51_srev(); 52 mx5_cpu_rev = get_mx51_srev();
50 53
51 return cpu_silicon_rev; 54 return mx5_cpu_rev;
52} 55}
53EXPORT_SYMBOL(mx51_revision); 56EXPORT_SYMBOL(mx51_revision);
54 57
55void mx51_display_revision(void)
56{
57 int rev;
58 char *srev;
59 rev = mx51_revision();
60
61 switch (rev) {
62 case IMX_CHIP_REVISION_2_0:
63 srev = IMX_CHIP_REVISION_2_0_STRING;
64 break;
65 case IMX_CHIP_REVISION_3_0:
66 srev = IMX_CHIP_REVISION_3_0_STRING;
67 break;
68 default:
69 srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
70 }
71 printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev);
72}
73EXPORT_SYMBOL(mx51_display_revision);
74
75#ifdef CONFIG_NEON 58#ifdef CONFIG_NEON
76 59
77/* 60/*
@@ -121,10 +104,10 @@ int mx53_revision(void)
121 if (!cpu_is_mx53()) 104 if (!cpu_is_mx53())
122 return -EINVAL; 105 return -EINVAL;
123 106
124 if (cpu_silicon_rev == -1) 107 if (mx5_cpu_rev == -1)
125 cpu_silicon_rev = get_mx53_srev(); 108 mx5_cpu_rev = get_mx53_srev();
126 109
127 return cpu_silicon_rev; 110 return mx5_cpu_rev;
128} 111}
129EXPORT_SYMBOL(mx53_revision); 112EXPORT_SYMBOL(mx53_revision);
130 113
@@ -134,7 +117,7 @@ static int get_mx50_srev(void)
134 u32 rev; 117 u32 rev;
135 118
136 if (!anatop) { 119 if (!anatop) {
137 cpu_silicon_rev = -EINVAL; 120 mx5_cpu_rev = -EINVAL;
138 return 0; 121 return 0;
139 } 122 }
140 123
@@ -159,36 +142,13 @@ int mx50_revision(void)
159 if (!cpu_is_mx50()) 142 if (!cpu_is_mx50())
160 return -EINVAL; 143 return -EINVAL;
161 144
162 if (cpu_silicon_rev == -1) 145 if (mx5_cpu_rev == -1)
163 cpu_silicon_rev = get_mx50_srev(); 146 mx5_cpu_rev = get_mx50_srev();
164 147
165 return cpu_silicon_rev; 148 return mx5_cpu_rev;
166} 149}
167EXPORT_SYMBOL(mx50_revision); 150EXPORT_SYMBOL(mx50_revision);
168 151
169void mx53_display_revision(void)
170{
171 int rev;
172 char *srev;
173 rev = mx53_revision();
174
175 switch (rev) {
176 case IMX_CHIP_REVISION_1_0:
177 srev = IMX_CHIP_REVISION_1_0_STRING;
178 break;
179 case IMX_CHIP_REVISION_2_0:
180 srev = IMX_CHIP_REVISION_2_0_STRING;
181 break;
182 case IMX_CHIP_REVISION_2_1:
183 srev = IMX_CHIP_REVISION_2_1_STRING;
184 break;
185 default:
186 srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
187 }
188 printk(KERN_INFO "CPU identified as i.MX53, silicon rev %s\n", srev);
189}
190EXPORT_SYMBOL(mx53_display_revision);
191
192static int __init post_cpu_init(void) 152static int __init post_cpu_init(void)
193{ 153{
194 unsigned int reg; 154 unsigned int reg;
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
index f311c9616bb..af488bc0e22 100644
--- a/arch/arm/mach-mx5/devices-imx51.h
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -65,3 +65,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[];
65extern const struct imx_imx_keypad_data imx51_imx_keypad_data; 65extern const struct imx_imx_keypad_data imx51_imx_keypad_data;
66#define imx51_add_imx_keypad(pdata) \ 66#define imx51_add_imx_keypad(pdata) \
67 imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) 67 imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
68
69extern const struct imx_pata_imx_data imx51_pata_imx_data;
70#define imx51_add_pata_imx() \
71 imx_add_pata_imx(&imx51_pata_imx_data)
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
index c27fe8bb476..7ca5d0c76f8 100644
--- a/arch/arm/mach-mx5/devices-imx53.h
+++ b/arch/arm/mach-mx5/devices-imx53.h
@@ -40,3 +40,7 @@ extern const struct imx_imx_ssi_data imx53_imx_ssi_data[];
40extern const struct imx_imx_keypad_data imx53_imx_keypad_data; 40extern const struct imx_imx_keypad_data imx53_imx_keypad_data;
41#define imx53_add_imx_keypad(pdata) \ 41#define imx53_add_imx_keypad(pdata) \
42 imx_add_imx_keypad(&imx53_imx_keypad_data, pdata) 42 imx_add_imx_keypad(&imx53_imx_keypad_data, pdata)
43
44extern const struct imx_pata_imx_data imx53_pata_imx_data;
45#define imx53_add_pata_imx() \
46 imx_add_pata_imx(&imx53_pata_imx_data)
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c
index d5bf9582553..b004e178417 100644
--- a/arch/arm/mach-mx5/mx51_efika.c
+++ b/arch/arm/mach-mx5/mx51_efika.c
@@ -607,7 +607,6 @@ void __init efika_board_common_init(void)
607 ARRAY_SIZE(mx51efika_pads)); 607 ARRAY_SIZE(mx51efika_pads));
608 imx51_add_imx_uart(0, &uart_pdata); 608 imx51_add_imx_uart(0, &uart_pdata);
609 mx51_efika_usb(); 609 mx51_efika_usb();
610 imx51_add_sdhci_esdhc_imx(0, NULL);
611 610
612 /* FIXME: comes from original code. check this. */ 611 /* FIXME: comes from original code. check this. */
613 if (mx51_revision() < IMX_CHIP_REVISION_2_0) 612 if (mx51_revision() < IMX_CHIP_REVISION_2_0)
@@ -625,6 +624,8 @@ void __init efika_board_common_init(void)
625 ARRAY_SIZE(mx51_efika_spi_board_info)); 624 ARRAY_SIZE(mx51_efika_spi_board_info));
626 imx51_add_ecspi(0, &mx51_efika_spi_pdata); 625 imx51_add_ecspi(0, &mx51_efika_spi_pdata);
627 626
627 imx51_add_pata_imx();
628
628#if defined(CONFIG_CPU_FREQ_IMX) 629#if defined(CONFIG_CPU_FREQ_IMX)
629 get_cpu_op = mx51_get_cpu_op; 630 get_cpu_op = mx51_get_cpu_op;
630#endif 631#endif
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 4cd0231ee53..fdf104f083b 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -23,6 +23,7 @@ config MACH_STMP378X_DEVB
23 select MXS_HAVE_AMBA_DUART 23 select MXS_HAVE_AMBA_DUART
24 select MXS_HAVE_PLATFORM_AUART 24 select MXS_HAVE_PLATFORM_AUART
25 select MXS_HAVE_PLATFORM_MXS_MMC 25 select MXS_HAVE_PLATFORM_MXS_MMC
26 select MXS_HAVE_PLATFORM_RTC_STMP3XXX
26 help 27 help
27 Include support for STMP378x-devb platform. This includes specific 28 Include support for STMP378x-devb platform. This includes specific
28 configurations for the board and its peripherals. 29 configurations for the board and its peripherals.
@@ -34,6 +35,7 @@ config MACH_MX23EVK
34 select MXS_HAVE_PLATFORM_AUART 35 select MXS_HAVE_PLATFORM_AUART
35 select MXS_HAVE_PLATFORM_MXS_MMC 36 select MXS_HAVE_PLATFORM_MXS_MMC
36 select MXS_HAVE_PLATFORM_MXSFB 37 select MXS_HAVE_PLATFORM_MXSFB
38 select MXS_HAVE_PLATFORM_RTC_STMP3XXX
37 help 39 help
38 Include support for MX23EVK platform. This includes specific 40 Include support for MX23EVK platform. This includes specific
39 configurations for the board and its peripherals. 41 configurations for the board and its peripherals.
@@ -48,6 +50,9 @@ config MACH_MX28EVK
48 select MXS_HAVE_PLATFORM_FLEXCAN 50 select MXS_HAVE_PLATFORM_FLEXCAN
49 select MXS_HAVE_PLATFORM_MXS_MMC 51 select MXS_HAVE_PLATFORM_MXS_MMC
50 select MXS_HAVE_PLATFORM_MXSFB 52 select MXS_HAVE_PLATFORM_MXSFB
53 select MXS_HAVE_PLATFORM_MXS_SAIF
54 select MXS_HAVE_PLATFORM_MXS_I2C
55 select MXS_HAVE_PLATFORM_RTC_STMP3XXX
51 select MXS_OCOTP 56 select MXS_OCOTP
52 help 57 help
53 Include support for MX28EVK platform. This includes specific 58 Include support for MX28EVK platform. This includes specific
@@ -63,6 +68,7 @@ config MODULE_TX28
63 select MXS_HAVE_PLATFORM_MXS_I2C 68 select MXS_HAVE_PLATFORM_MXS_I2C
64 select MXS_HAVE_PLATFORM_MXS_MMC 69 select MXS_HAVE_PLATFORM_MXS_MMC
65 select MXS_HAVE_PLATFORM_MXS_PWM 70 select MXS_HAVE_PLATFORM_MXS_PWM
71 select MXS_HAVE_PLATFORM_RTC_STMP3XXX
66 72
67config MACH_TX28 73config MACH_TX28
68 bool "Ka-Ro TX28 module" 74 bool "Ka-Ro TX28 module"
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 5dcc59d5b9e..7954013bd32 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -640,6 +640,8 @@ static struct clk_lookup lookups[] = {
640 _REGISTER_CLOCK(NULL, "lradc", lradc_clk) 640 _REGISTER_CLOCK(NULL, "lradc", lradc_clk)
641 _REGISTER_CLOCK(NULL, "spdif", spdif_clk) 641 _REGISTER_CLOCK(NULL, "spdif", spdif_clk)
642 _REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk) 642 _REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk)
643 _REGISTER_CLOCK("mxs-saif.0", NULL, saif0_clk)
644 _REGISTER_CLOCK("mxs-saif.1", NULL, saif1_clk)
643}; 645};
644 646
645static int clk_misc_init(void) 647static int clk_misc_init(void)
@@ -708,11 +710,11 @@ static int clk_misc_init(void)
708 710
709 /* SAIF has to use frac div for functional operation */ 711 /* SAIF has to use frac div for functional operation */
710 reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0); 712 reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0);
711 reg &= ~BM_CLKCTRL_SAIF0_DIV_FRAC_EN; 713 reg |= BM_CLKCTRL_SAIF0_DIV_FRAC_EN;
712 __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0); 714 __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0);
713 715
714 reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1); 716 reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1);
715 reg &= ~BM_CLKCTRL_SAIF1_DIV_FRAC_EN; 717 reg |= BM_CLKCTRL_SAIF1_DIV_FRAC_EN;
716 __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1); 718 __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1);
717 719
718 /* 720 /*
@@ -774,6 +776,8 @@ int __init mx28_clocks_init(void)
774 clk_enable(&uart_clk); 776 clk_enable(&uart_clk);
775 777
776 clk_set_parent(&lcdif_clk, &ref_pix_clk); 778 clk_set_parent(&lcdif_clk, &ref_pix_clk);
779 clk_set_parent(&saif0_clk, &pll0_clk);
780 clk_set_parent(&saif1_clk, &pll0_clk);
777 781
778 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 782 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
779 783
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h
index c6f345febd3..3fa651d2c99 100644
--- a/arch/arm/mach-mxs/devices-mx23.h
+++ b/arch/arm/mach-mxs/devices-mx23.h
@@ -29,3 +29,5 @@ extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst;
29 29
30struct platform_device *__init mx23_add_mxsfb( 30struct platform_device *__init mx23_add_mxsfb(
31 const struct mxsfb_platform_data *pdata); 31 const struct mxsfb_platform_data *pdata);
32
33struct platform_device *__init mx23_add_rtc_stmp3xxx(void);
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
index 79b94523954..c8887103f0e 100644
--- a/arch/arm/mach-mxs/devices-mx28.h
+++ b/arch/arm/mach-mxs/devices-mx28.h
@@ -45,3 +45,8 @@ extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst;
45 45
46struct platform_device *__init mx28_add_mxsfb( 46struct platform_device *__init mx28_add_mxsfb(
47 const struct mxsfb_platform_data *pdata); 47 const struct mxsfb_platform_data *pdata);
48
49extern const struct mxs_saif_data mx28_saif_data[] __initconst;
50#define mx28_add_saif(id) mxs_add_saif(&mx28_saif_data[id])
51
52struct platform_device *__init mx28_add_rtc_stmp3xxx(void);
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig
index acf9eea124c..18b6bf526a2 100644
--- a/arch/arm/mach-mxs/devices/Kconfig
+++ b/arch/arm/mach-mxs/devices/Kconfig
@@ -23,3 +23,9 @@ config MXS_HAVE_PLATFORM_MXS_PWM
23 23
24config MXS_HAVE_PLATFORM_MXSFB 24config MXS_HAVE_PLATFORM_MXSFB
25 bool 25 bool
26
27config MXS_HAVE_PLATFORM_MXS_SAIF
28 bool
29
30config MXS_HAVE_PLATFORM_RTC_STMP3XXX
31 bool
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile
index 351915c683f..f52e3e53bae 100644
--- a/arch/arm/mach-mxs/devices/Makefile
+++ b/arch/arm/mach-mxs/devices/Makefile
@@ -8,3 +8,5 @@ obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o
8obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o 8obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o
9obj-y += platform-gpio-mxs.o 9obj-y += platform-gpio-mxs.o
10obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o 10obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o
11obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_SAIF) += platform-mxs-saif.o
12obj-$(CONFIG_MXS_HAVE_PLATFORM_RTC_STMP3XXX) += platform-rtc-stmp3xxx.o
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-saif.c b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
new file mode 100644
index 00000000000..1ec965e9fe9
--- /dev/null
+++ b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
@@ -0,0 +1,60 @@
1/*
2 * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License version 2 as published by the
6 * Free Software Foundation.
7 */
8#include <linux/compiler.h>
9#include <linux/err.h>
10#include <linux/init.h>
11
12#include <mach/mx23.h>
13#include <mach/mx28.h>
14#include <mach/devices-common.h>
15
16#define mxs_saif_data_entry_single(soc, _id) \
17 { \
18 .id = _id, \
19 .iobase = soc ## _SAIF ## _id ## _BASE_ADDR, \
20 .irq = soc ## _INT_SAIF ## _id, \
21 .dma = soc ## _DMA_SAIF ## _id, \
22 .dmairq = soc ## _INT_SAIF ## _id ##_DMA, \
23 }
24
25#define mxs_saif_data_entry(soc, _id) \
26 [_id] = mxs_saif_data_entry_single(soc, _id)
27
28#ifdef CONFIG_SOC_IMX28
29const struct mxs_saif_data mx28_saif_data[] __initconst = {
30 mxs_saif_data_entry(MX28, 0),
31 mxs_saif_data_entry(MX28, 1),
32};
33#endif
34
35struct platform_device *__init mxs_add_saif(const struct mxs_saif_data *data)
36{
37 struct resource res[] = {
38 {
39 .start = data->iobase,
40 .end = data->iobase + SZ_4K - 1,
41 .flags = IORESOURCE_MEM,
42 }, {
43 .start = data->irq,
44 .end = data->irq,
45 .flags = IORESOURCE_IRQ,
46 }, {
47 .start = data->dma,
48 .end = data->dma,
49 .flags = IORESOURCE_DMA,
50 }, {
51 .start = data->dmairq,
52 .end = data->dmairq,
53 .flags = IORESOURCE_IRQ,
54 },
55
56 };
57
58 return mxs_add_platform_device("mxs-saif", data->id, res,
59 ARRAY_SIZE(res), NULL, 0);
60}
diff --git a/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c b/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c
new file mode 100644
index 00000000000..639eaee1555
--- /dev/null
+++ b/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2011 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
3 *
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License version 2 as published by the
6 * Free Software Foundation.
7 */
8#include <asm/sizes.h>
9#include <mach/mx23.h>
10#include <mach/mx28.h>
11#include <mach/devices-common.h>
12
13#ifdef CONFIG_SOC_IMX23
14struct platform_device *__init mx23_add_rtc_stmp3xxx(void)
15{
16 struct resource res[] = {
17 {
18 .start = MX23_RTC_BASE_ADDR,
19 .end = MX23_RTC_BASE_ADDR + SZ_8K - 1,
20 .flags = IORESOURCE_MEM,
21 }, {
22 .start = MX23_INT_RTC_ALARM,
23 .end = MX23_INT_RTC_ALARM,
24 .flags = IORESOURCE_IRQ,
25 },
26 };
27
28 return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res),
29 NULL, 0);
30}
31#endif /* CONFIG_SOC_IMX23 */
32
33#ifdef CONFIG_SOC_IMX28
34struct platform_device *__init mx28_add_rtc_stmp3xxx(void)
35{
36 struct resource res[] = {
37 {
38 .start = MX28_RTC_BASE_ADDR,
39 .end = MX28_RTC_BASE_ADDR + SZ_8K - 1,
40 .flags = IORESOURCE_MEM,
41 }, {
42 .start = MX28_INT_RTC_ALARM,
43 .end = MX28_INT_RTC_ALARM,
44 .flags = IORESOURCE_IRQ,
45 },
46 };
47
48 return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res),
49 NULL, 0);
50}
51#endif /* CONFIG_SOC_IMX28 */
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h
index 812d7a813a7..a8080f44c03 100644
--- a/arch/arm/mach-mxs/include/mach/devices-common.h
+++ b/arch/arm/mach-mxs/include/mach/devices-common.h
@@ -92,3 +92,15 @@ struct platform_device *__init mxs_add_mxs_mmc(
92/* pwm */ 92/* pwm */
93struct platform_device *__init mxs_add_mxs_pwm( 93struct platform_device *__init mxs_add_mxs_pwm(
94 resource_size_t iobase, int id); 94 resource_size_t iobase, int id);
95
96/* saif */
97struct mxs_saif_data {
98 int id;
99 resource_size_t iobase;
100 resource_size_t irq;
101 resource_size_t dma;
102 resource_size_t dmairq;
103};
104
105struct platform_device *__init mxs_add_saif(
106 const struct mxs_saif_data *data);
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
index 99b01e988c8..a1d132dce5c 100644
--- a/arch/arm/mach-mxs/mach-mx23evk.c
+++ b/arch/arm/mach-mxs/mach-mx23evk.c
@@ -166,6 +166,7 @@ static void __init mx23evk_init(void)
166 gpio_set_value(MX23EVK_BL_ENABLE, 1); 166 gpio_set_value(MX23EVK_BL_ENABLE, 1);
167 167
168 mx23_add_mxsfb(&mx23evk_mxsfb_pdata); 168 mx23_add_mxsfb(&mx23evk_mxsfb_pdata);
169 mx23_add_rtc_stmp3xxx();
169} 170}
170 171
171static void __init mx23evk_timer_init(void) 172static void __init mx23evk_timer_init(void)
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 8b3aa7afdae..e7bff1e2cd2 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -17,6 +17,9 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/i2c.h>
21#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h>
20 23
21#include <asm/mach-types.h> 24#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -182,6 +185,24 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
182 185
183 /* led */ 186 /* led */
184 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL, 187 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL,
188
189 /* I2C */
190 MX28_PAD_I2C0_SCL__I2C0_SCL |
191 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
192 MX28_PAD_I2C0_SDA__I2C0_SDA |
193 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
194
195 /* saif0 & saif1 */
196 MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
197 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
198 MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
199 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
200 MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
201 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
202 MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
203 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
204 MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
205 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
185}; 206};
186 207
187/* led */ 208/* led */
@@ -351,6 +372,50 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
351 }, 372 },
352}; 373};
353 374
375static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
376 {
377 I2C_BOARD_INFO("sgtl5000", 0x0a),
378 },
379};
380
381#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
382static struct regulator_consumer_supply mx28evk_audio_consumer_supplies[] = {
383 REGULATOR_SUPPLY("VDDA", "0-000a"),
384 REGULATOR_SUPPLY("VDDIO", "0-000a"),
385};
386
387static struct regulator_init_data mx28evk_vdd_reg_init_data = {
388 .constraints = {
389 .name = "3V3",
390 .always_on = 1,
391 },
392 .consumer_supplies = mx28evk_audio_consumer_supplies,
393 .num_consumer_supplies = ARRAY_SIZE(mx28evk_audio_consumer_supplies),
394};
395
396static struct fixed_voltage_config mx28evk_vdd_pdata = {
397 .supply_name = "board-3V3",
398 .microvolts = 3300000,
399 .gpio = -EINVAL,
400 .enabled_at_boot = 1,
401 .init_data = &mx28evk_vdd_reg_init_data,
402};
403static struct platform_device mx28evk_voltage_regulator = {
404 .name = "reg-fixed-voltage",
405 .id = -1,
406 .num_resources = 0,
407 .dev = {
408 .platform_data = &mx28evk_vdd_pdata,
409 },
410};
411static void __init mx28evk_add_regulators(void)
412{
413 platform_device_register(&mx28evk_voltage_regulator);
414}
415#else
416static void __init mx28evk_add_regulators(void) {}
417#endif
418
354static struct gpio mx28evk_lcd_gpios[] = { 419static struct gpio mx28evk_lcd_gpios[] = {
355 { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" }, 420 { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
356 { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" }, 421 { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
@@ -389,6 +454,18 @@ static void __init mx28evk_init(void)
389 else 454 else
390 mx28_add_mxsfb(&mx28evk_mxsfb_pdata); 455 mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
391 456
457 mx28_add_saif(0);
458 mx28_add_saif(1);
459
460 mx28_add_mxs_i2c(0);
461 i2c_register_board_info(0, mxs_i2c0_board_info,
462 ARRAY_SIZE(mxs_i2c0_board_info));
463
464 mx28evk_add_regulators();
465
466 mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
467 NULL, 0);
468
392 /* power on mmc slot by writing 0 to the gpio */ 469 /* power on mmc slot by writing 0 to the gpio */
393 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, 470 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
394 "mmc0-slot-power"); 471 "mmc0-slot-power");
@@ -403,6 +480,9 @@ static void __init mx28evk_init(void)
403 else 480 else
404 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); 481 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
405 482
483 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
484 mx28_add_rtc_stmp3xxx();
485
406 gpio_led_register_device(0, &mx28evk_led_data); 486 gpio_led_register_device(0, &mx28evk_led_data);
407} 487}
408 488
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c
index 3fe5dd53214..177e53123a0 100644
--- a/arch/arm/mach-mxs/mach-stmp378x_devb.c
+++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c
@@ -90,6 +90,7 @@ static void __init stmp378x_dvb_init(void)
90 90
91 mx23_add_duart(); 91 mx23_add_duart();
92 mx23_add_auart0(); 92 mx23_add_auart0();
93 mx23_add_rtc_stmp3xxx();
93 94
94 /* power on mmc slot */ 95 /* power on mmc slot */
95 ret = gpio_request_one(STMP378X_DEVB_MMC0_SLOT_POWER, 96 ret = gpio_request_one(STMP378X_DEVB_MMC0_SLOT_POWER,
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
index 515a423f82c..ce5d5632e62 100644
--- a/arch/arm/mach-mxs/mach-tx28.c
+++ b/arch/arm/mach-mxs/mach-tx28.c
@@ -161,6 +161,7 @@ static void __init tx28_stk5v3_init(void)
161 i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, 161 i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
162 ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); 162 ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
163 mx28_add_mxs_mmc(0, &tx28_mmc0_pdata); 163 mx28_add_mxs_mmc(0, &tx28_mmc0_pdata);
164 mx28_add_rtc_stmp3xxx();
164} 165}
165 166
166static void __init tx28_timer_init(void) 167static void __init tx28_timer_init(void)
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index a5353fc0793..502e45f0317 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -4,50 +4,31 @@ source "arch/arm/plat-mxc/devices/Kconfig"
4 4
5menu "Freescale MXC Implementations" 5menu "Freescale MXC Implementations"
6 6
7config ARCH_MX50_SUPPORTED
8 bool
9
10config ARCH_MX53_SUPPORTED
11 bool
12
13choice 7choice
14 prompt "Freescale CPU family:" 8 prompt "Freescale CPU family:"
15 default ARCH_MX3 9 default ARCH_MX3
16 10
17config ARCH_MX1 11config ARCH_IMX_V4_V5
18 bool "MX1-based" 12 bool "i.MX1, i.MX21, i.MX25, i.MX27"
19 help 13 select AUTO_ZRELADDR
20 This enables support for systems based on the Freescale i.MX1 family 14 select ARM_PATCH_PHYS_VIRT
21
22config ARCH_MX2
23 bool "MX2-based"
24 help
25 This enables support for systems based on the Freescale i.MX2 family
26
27config ARCH_MX25
28 bool "MX25-based"
29 help 15 help
30 This enables support for systems based on the Freescale i.MX25 family 16 This enables support for systems based on the Freescale i.MX ARMv4
17 and ARMv5 SoCs
31 18
32config ARCH_MX3 19config ARCH_MX3
33 bool "MX3-based" 20 bool "MX3-based"
34 help 21 help
35 This enables support for systems based on the Freescale i.MX3 family 22 This enables support for systems based on the Freescale i.MX3 family
36 23
37config ARCH_MX503 24config ARCH_MX5
38 bool "i.MX50 + i.MX53" 25 bool "i.MX50, i.MX51, i.MX53"
39 select ARCH_MX50_SUPPORTED 26 select AUTO_ZRELADDR
40 select ARCH_MX53_SUPPORTED 27 select ARM_PATCH_PHYS_VIRT
41 help 28 help
42 This enables support for machines using Freescale's i.MX50 and i.MX51 29 This enables support for machines using Freescale's i.MX50 and i.MX51
43 processors. 30 processors.
44 31
45config ARCH_MX51
46 bool "i.MX51"
47 select ARCH_MX51_SUPPORTED
48 help
49 This enables support for systems based on the Freescale i.MX51 family
50
51endchoice 32endchoice
52 33
53source "arch/arm/mach-imx/Kconfig" 34source "arch/arm/mach-imx/Kconfig"
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c
index 55d2534ec72..8875fb415f6 100644
--- a/arch/arm/plat-mxc/avic.c
+++ b/arch/arm/plat-mxc/avic.c
@@ -50,6 +50,8 @@
50 50
51void __iomem *avic_base; 51void __iomem *avic_base;
52 52
53static u32 avic_saved_mask_reg[2];
54
53#ifdef CONFIG_MXC_IRQ_PRIOR 55#ifdef CONFIG_MXC_IRQ_PRIOR
54static int avic_irq_set_priority(unsigned char irq, unsigned char prio) 56static int avic_irq_set_priority(unsigned char irq, unsigned char prio)
55{ 57{
@@ -90,24 +92,8 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type)
90} 92}
91#endif /* CONFIG_FIQ */ 93#endif /* CONFIG_FIQ */
92 94
93/* Disable interrupt number "irq" in the AVIC */
94static void mxc_mask_irq(struct irq_data *d)
95{
96 __raw_writel(d->irq, avic_base + AVIC_INTDISNUM);
97}
98 95
99/* Enable interrupt number "irq" in the AVIC */ 96static struct mxc_extra_irq avic_extra_irq = {
100static void mxc_unmask_irq(struct irq_data *d)
101{
102 __raw_writel(d->irq, avic_base + AVIC_INTENNUM);
103}
104
105static struct mxc_irq_chip mxc_avic_chip = {
106 .base = {
107 .irq_ack = mxc_mask_irq,
108 .irq_mask = mxc_mask_irq,
109 .irq_unmask = mxc_unmask_irq,
110 },
111#ifdef CONFIG_MXC_IRQ_PRIOR 97#ifdef CONFIG_MXC_IRQ_PRIOR
112 .set_priority = avic_irq_set_priority, 98 .set_priority = avic_irq_set_priority,
113#endif 99#endif
@@ -116,6 +102,68 @@ static struct mxc_irq_chip mxc_avic_chip = {
116#endif 102#endif
117}; 103};
118 104
105#ifdef CONFIG_PM
106static void avic_irq_suspend(struct irq_data *d)
107{
108 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
109 struct irq_chip_type *ct = gc->chip_types;
110 int idx = gc->irq_base >> 5;
111
112 avic_saved_mask_reg[idx] = __raw_readl(avic_base + ct->regs.mask);
113 __raw_writel(gc->wake_active, avic_base + ct->regs.mask);
114}
115
116static void avic_irq_resume(struct irq_data *d)
117{
118 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
119 struct irq_chip_type *ct = gc->chip_types;
120 int idx = gc->irq_base >> 5;
121
122 __raw_writel(avic_saved_mask_reg[idx], avic_base + ct->regs.mask);
123}
124
125#else
126#define avic_irq_suspend NULL
127#define avic_irq_resume NULL
128#endif
129
130static __init void avic_init_gc(unsigned int irq_start)
131{
132 struct irq_chip_generic *gc;
133 struct irq_chip_type *ct;
134 int idx = irq_start >> 5;
135
136 gc = irq_alloc_generic_chip("mxc-avic", 1, irq_start, avic_base,
137 handle_level_irq);
138 gc->private = &avic_extra_irq;
139 gc->wake_enabled = IRQ_MSK(32);
140
141 ct = gc->chip_types;
142 ct->chip.irq_mask = irq_gc_mask_clr_bit;
143 ct->chip.irq_unmask = irq_gc_mask_set_bit;
144 ct->chip.irq_ack = irq_gc_mask_clr_bit;
145 ct->chip.irq_set_wake = irq_gc_set_wake;
146 ct->chip.irq_suspend = avic_irq_suspend;
147 ct->chip.irq_resume = avic_irq_resume;
148 ct->regs.mask = !idx ? AVIC_INTENABLEL : AVIC_INTENABLEH;
149 ct->regs.ack = ct->regs.mask;
150
151 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
152}
153
154asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
155{
156 u32 nivector;
157
158 do {
159 nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16;
160 if (nivector == 0xffff)
161 break;
162
163 handle_IRQ(nivector, regs);
164 } while (1);
165}
166
119/* 167/*
120 * This function initializes the AVIC hardware and disables all the 168 * This function initializes the AVIC hardware and disables all the
121 * interrupts. It registers the interrupt enable and disable functions 169 * interrupts. It registers the interrupt enable and disable functions
@@ -140,11 +188,9 @@ void __init mxc_init_irq(void __iomem *irqbase)
140 /* all IRQ no FIQ */ 188 /* all IRQ no FIQ */
141 __raw_writel(0, avic_base + AVIC_INTTYPEH); 189 __raw_writel(0, avic_base + AVIC_INTTYPEH);
142 __raw_writel(0, avic_base + AVIC_INTTYPEL); 190 __raw_writel(0, avic_base + AVIC_INTTYPEL);
143 for (i = 0; i < AVIC_NUM_IRQS; i++) { 191
144 irq_set_chip_and_handler(i, &mxc_avic_chip.base, 192 for (i = 0; i < AVIC_NUM_IRQS; i += 32)
145 handle_level_irq); 193 avic_init_gc(i);
146 set_irq_flags(i, IRQF_VALID);
147 }
148 194
149 /* Set default priority value (0) for all IRQ's */ 195 /* Set default priority value (0) for all IRQ's */
150 for (i = 0; i < 8; i++) 196 for (i = 0; i < 8; i++)
@@ -157,4 +203,3 @@ void __init mxc_init_irq(void __iomem *irqbase)
157 203
158 printk(KERN_INFO "MXC IRQ initialized\n"); 204 printk(KERN_INFO "MXC IRQ initialized\n");
159} 205}
160
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d52cf5..f5b7e0fa237 100644
--- a/arch/arm/plat-mxc/cpu.c
+++ b/arch/arm/plat-mxc/cpu.c
@@ -1,5 +1,6 @@
1 1
2#include <linux/module.h> 2#include <linux/module.h>
3#include <mach/hardware.h>
3 4
4unsigned int __mxc_cpu_type; 5unsigned int __mxc_cpu_type;
5EXPORT_SYMBOL(__mxc_cpu_type); 6EXPORT_SYMBOL(__mxc_cpu_type);
@@ -9,3 +10,11 @@ void mxc_set_cpu_type(unsigned int type)
9 __mxc_cpu_type = type; 10 __mxc_cpu_type = type;
10} 11}
11 12
13void imx_print_silicon_rev(const char *cpu, int srev)
14{
15 if (srev == IMX_CHIP_REVISION_UNKNOWN)
16 pr_info("CPU identified as %s, unknown revision\n", cpu);
17 else
18 pr_info("CPU identified as %s, silicon rev %d.%d\n",
19 cpu, (srev >> 4) & 0xf, srev & 0xf);
20}
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 39b08957e8a..b0f74f70b25 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -31,6 +31,9 @@ config IMX_HAVE_PLATFORM_IMX_I2C
31config IMX_HAVE_PLATFORM_IMX_KEYPAD 31config IMX_HAVE_PLATFORM_IMX_KEYPAD
32 bool 32 bool
33 33
34config IMX_HAVE_PLATFORM_PATA_IMX
35 bool
36
34config IMX_HAVE_PLATFORM_IMX_SSI 37config IMX_HAVE_PLATFORM_IMX_SSI
35 bool 38 bool
36 39
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index b41bf972b54..a093b454541 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -10,6 +10,7 @@ obj-y += platform-imx-dma.o
10obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o 10obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o
11obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o 11obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
12obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o 12obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o
13obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o
13obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o 14obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
14obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o 15obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
15obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o 16obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/plat-mxc/devices/platform-pata_imx.c
new file mode 100644
index 00000000000..70e2f2a4471
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c
@@ -0,0 +1,59 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it under
3 * the terms of the GNU General Public License version 2 as published by the
4 * Free Software Foundation.
5 */
6#include <mach/hardware.h>
7#include <mach/devices-common.h>
8
9#define imx_pata_imx_data_entry_single(soc, _size) \
10 { \
11 .iobase = soc ## _ATA_BASE_ADDR, \
12 .iosize = _size, \
13 .irq = soc ## _INT_ATA, \
14 }
15
16#ifdef CONFIG_SOC_IMX27
17const struct imx_pata_imx_data imx27_pata_imx_data __initconst =
18 imx_pata_imx_data_entry_single(MX27, SZ_4K);
19#endif /* ifdef CONFIG_SOC_IMX27 */
20
21#ifdef CONFIG_SOC_IMX31
22const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
23 imx_pata_imx_data_entry_single(MX31, SZ_16K);
24#endif /* ifdef CONFIG_SOC_IMX31 */
25
26#ifdef CONFIG_SOC_IMX35
27const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
28 imx_pata_imx_data_entry_single(MX35, SZ_16K);
29#endif /* ifdef CONFIG_SOC_IMX35 */
30
31#ifdef CONFIG_SOC_IMX51
32const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
33 imx_pata_imx_data_entry_single(MX51, SZ_16K);
34#endif /* ifdef CONFIG_SOC_IMX51 */
35
36#ifdef CONFIG_SOC_IMX53
37const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
38 imx_pata_imx_data_entry_single(MX53, SZ_16K);
39#endif /* ifdef CONFIG_SOC_IMX53 */
40
41struct platform_device *__init imx_add_pata_imx(
42 const struct imx_pata_imx_data *data)
43{
44 struct resource res[] = {
45 {
46 .start = data->iobase,
47 .end = data->iobase + data->iosize - 1,
48 .flags = IORESOURCE_MEM,
49 },
50 {
51 .start = data->irq,
52 .end = data->irq,
53 .flags = IORESOURCE_IRQ,
54 },
55 };
56 return imx_add_platform_device("pata_imx", -1,
57 res, ARRAY_SIZE(res), NULL, 0);
58}
59
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index d7149d1bd32..ace4bb550ed 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -82,4 +82,19 @@ enum mxc_cpu_pwr_mode {
82 82
83extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); 83extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
84extern void (*imx_idle)(void); 84extern void (*imx_idle)(void);
85extern void imx_print_silicon_rev(const char *cpu, int srev);
86
87void avic_handle_irq(struct pt_regs *);
88void tzic_handle_irq(struct pt_regs *);
89
90#define imx1_handle_irq avic_handle_irq
91#define imx21_handle_irq avic_handle_irq
92#define imx25_handle_irq avic_handle_irq
93#define imx27_handle_irq avic_handle_irq
94#define imx31_handle_irq avic_handle_irq
95#define imx35_handle_irq avic_handle_irq
96#define imx50_handle_irq tzic_handle_irq
97#define imx51_handle_irq tzic_handle_irq
98#define imx53_handle_irq tzic_handle_irq
99
85#endif 100#endif
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 524538aabc4..4cbad45edc1 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -251,6 +251,14 @@ struct platform_device *__init imx_add_mxc_nand(
251 const struct imx_mxc_nand_data *data, 251 const struct imx_mxc_nand_data *data,
252 const struct mxc_nand_platform_data *pdata); 252 const struct mxc_nand_platform_data *pdata);
253 253
254struct imx_pata_imx_data {
255 resource_size_t iobase;
256 resource_size_t iosize;
257 resource_size_t irq;
258};
259struct platform_device *__init imx_add_pata_imx(
260 const struct imx_pata_imx_data *data);
261
254struct imx_mxc_pwm_data { 262struct imx_mxc_pwm_data {
255 int id; 263 int id;
256 resource_size_t iobase; 264 resource_size_t iobase;
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S
index 066d464d322..842fbcb0d6c 100644
--- a/arch/arm/plat-mxc/include/mach/entry-macro.S
+++ b/arch/arm/plat-mxc/include/mach/entry-macro.S
@@ -9,72 +9,16 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <mach/hardware.h> 12/* Unused, we use CONFIG_MULTI_IRQ_HANDLER */
13 13
14#define AVIC_NIMASK 0x04
15
16 @ this macro disables fast irq (not implemented)
17 .macro disable_fiq 14 .macro disable_fiq
18 .endm 15 .endm
19 16
20 .macro get_irqnr_preamble, base, tmp 17 .macro get_irqnr_preamble, base, tmp
21#ifndef CONFIG_MXC_TZIC
22 ldr \base, =avic_base
23 ldr \base, [\base]
24#ifdef CONFIG_MXC_IRQ_PRIOR
25 ldr r4, [\base, #AVIC_NIMASK]
26#endif
27#elif defined CONFIG_MXC_TZIC
28 ldr \base, =tzic_base
29 ldr \base, [\base]
30#endif /* CONFIG_MXC_TZIC */
31 .endm 18 .endm
32 19
33 .macro arch_ret_to_user, tmp1, tmp2 20 .macro arch_ret_to_user, tmp1, tmp2
34 .endm 21 .endm
35 22
36 @ this macro checks which interrupt occurred
37 @ and returns its number in irqnr
38 @ and returns if an interrupt occurred in irqstat
39 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
40#ifndef CONFIG_MXC_TZIC
41 @ Load offset & priority of the highest priority
42 @ interrupt pending from AVIC_NIVECSR
43 ldr \irqstat, [\base, #0x40]
44 @ Shift to get the decoded IRQ number, using ASR so
45 @ 'no interrupt pending' becomes 0xffffffff
46 mov \irqnr, \irqstat, asr #16
47 @ set zero flag if IRQ + 1 == 0
48 adds \tmp, \irqnr, #1
49#ifdef CONFIG_MXC_IRQ_PRIOR
50 bicne \tmp, \irqstat, #0xFFFFFFE0
51 strne \tmp, [\base, #AVIC_NIMASK]
52 streq r4, [\base, #AVIC_NIMASK]
53#endif
54#elif defined CONFIG_MXC_TZIC
55 @ Load offset & priority of the highest priority
56 @ interrupt pending.
57 @ 0x080 is INTSEC0 register
58 @ 0xD80 is HIPND0 register
59 mov \irqnr, #0
601000: add \irqstat, \base, \irqnr, lsr #3
61 ldr \tmp, [\irqstat, #0xd80]
62 ldr \irqstat, [\irqstat, #0x080]
63 ands \tmp, \tmp, \irqstat
64 bne 1001f
65 add \irqnr, \irqnr, #32
66 cmp \irqnr, #128
67 blo 1000b
68 b 2001f
691001: mov \irqstat, #1
701002: tst \tmp, \irqstat
71 bne 2002f
72 movs \tmp, \tmp, lsr #1
73 addne \irqnr, \irqnr, #1
74 bne 1002b
752001:
76 mov \irqnr, #0
772002:
78 movs \irqnr, \irqnr
79#endif
80 .endm 24 .endm
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
index c92f0b1f216..63f22a009a6 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
@@ -735,6 +735,7 @@ enum iomux_pins {
735#define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC) 735#define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC)
736#define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC) 736#define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC)
737#define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC) 737#define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC)
738#define MX31_PIN_WATCHDOG_RST__WATCHDOG_RST IOMUX_MODE(MX31_PIN_WATCHDOG_RST, IOMUX_CONFIG_FUNC)
738 739
739 740
740/* 741/*
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h
index 11be5cdbdd1..35e6c7f4ffd 100644
--- a/arch/arm/plat-mxc/include/mach/memory.h
+++ b/arch/arm/plat-mxc/include/mach/memory.h
@@ -21,22 +21,8 @@
21#define MX53_PHYS_OFFSET UL(0x70000000) 21#define MX53_PHYS_OFFSET UL(0x70000000)
22 22
23#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) 23#if !defined(CONFIG_RUNTIME_PHYS_OFFSET)
24# if defined CONFIG_ARCH_MX1 24# if defined CONFIG_ARCH_MX3
25# define PLAT_PHYS_OFFSET MX1_PHYS_OFFSET
26# elif defined CONFIG_MACH_MX21
27# define PLAT_PHYS_OFFSET MX21_PHYS_OFFSET
28# elif defined CONFIG_ARCH_MX25
29# define PLAT_PHYS_OFFSET MX25_PHYS_OFFSET
30# elif defined CONFIG_MACH_MX27
31# define PLAT_PHYS_OFFSET MX27_PHYS_OFFSET
32# elif defined CONFIG_ARCH_MX3
33# define PLAT_PHYS_OFFSET MX3x_PHYS_OFFSET 25# define PLAT_PHYS_OFFSET MX3x_PHYS_OFFSET
34# elif defined CONFIG_ARCH_MX50
35# define PLAT_PHYS_OFFSET MX50_PHYS_OFFSET
36# elif defined CONFIG_ARCH_MX51
37# define PLAT_PHYS_OFFSET MX51_PHYS_OFFSET
38# elif defined CONFIG_ARCH_MX53
39# define PLAT_PHYS_OFFSET MX53_PHYS_OFFSET
40# endif 26# endif
41#endif 27#endif
42 28
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h
index 087cd7ac8d5..ccebf5ba12f 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/plat-mxc/include/mach/mx25.h
@@ -41,6 +41,7 @@
41#define MX25_SSI2_BASE_ADDR 0x50014000 41#define MX25_SSI2_BASE_ADDR 0x50014000
42#define MX25_SSI1_BASE_ADDR 0x50034000 42#define MX25_SSI1_BASE_ADDR 0x50034000
43#define MX25_NFC_BASE_ADDR 0xbb000000 43#define MX25_NFC_BASE_ADDR 0xbb000000
44#define MX25_IIM_BASE_ADDR 0x53ff0000
44#define MX25_DRYICE_BASE_ADDR 0x53ffc000 45#define MX25_DRYICE_BASE_ADDR 0x53ffc000
45#define MX25_ESDHC1_BASE_ADDR 0x53fb4000 46#define MX25_ESDHC1_BASE_ADDR 0x53fb4000
46#define MX25_ESDHC2_BASE_ADDR 0x53fb8000 47#define MX25_ESDHC2_BASE_ADDR 0x53fb8000
@@ -104,4 +105,8 @@
104#define MX25_DMA_REQ_SSI1_RX0 28 105#define MX25_DMA_REQ_SSI1_RX0 28
105#define MX25_DMA_REQ_SSI1_TX0 29 106#define MX25_DMA_REQ_SSI1_TX0 29
106 107
108#ifndef __ASSEMBLY__
109extern int mx25_revision(void);
110#endif
111
107#endif /* ifndef __MACH_MX25_H__ */ 112#endif /* ifndef __MACH_MX25_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h
index d13dbfeef08..80965a99aa5 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/plat-mxc/include/mach/mx35.h
@@ -36,7 +36,7 @@
36#define MX35_UART3_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x0c000) 36#define MX35_UART3_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x0c000)
37#define MX35_CSPI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x10000) 37#define MX35_CSPI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x10000)
38#define MX35_SSI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x14000) 38#define MX35_SSI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x14000)
39#define MX35_ATA_DMA_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x20000) 39#define MX35_ATA_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x20000)
40#define MX35_MSHC1_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x24000) 40#define MX35_MSHC1_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x24000)
41#define MX35_FEC_BASE_ADDR 0x50038000 41#define MX35_FEC_BASE_ADDR 0x50038000
42#define MX35_SPBA_CTRL_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x3c000) 42#define MX35_SPBA_CTRL_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x3c000)
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h
index 388a407d72d..30dbf424583 100644
--- a/arch/arm/plat-mxc/include/mach/mx3x.h
+++ b/arch/arm/plat-mxc/include/mach/mx3x.h
@@ -187,22 +187,8 @@
187/* Mandatory defines used globally */ 187/* Mandatory defines used globally */
188 188
189#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) 189#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
190 190extern int mx35_revision(void);
191extern unsigned int mx31_cpu_rev; 191extern int mx31_revision(void);
192extern void mx31_read_cpu_rev(void);
193
194static inline int mx31_revision(void)
195{
196 return mx31_cpu_rev;
197}
198
199extern unsigned int mx35_cpu_rev;
200extern void mx35_read_cpu_rev(void);
201
202static inline int mx35_revision(void)
203{
204 return mx35_cpu_rev;
205}
206#endif 192#endif
207 193
208#endif /* ifndef __MACH_MX3x_H__ */ 194#endif /* ifndef __MACH_MX3x_H__ */
diff --git a/arch/arm/plat-mxc/irq-common.c b/arch/arm/plat-mxc/irq-common.c
index 96953e2e4f1..b6e11458e5a 100644
--- a/arch/arm/plat-mxc/irq-common.c
+++ b/arch/arm/plat-mxc/irq-common.c
@@ -23,17 +23,17 @@
23 23
24int imx_irq_set_priority(unsigned char irq, unsigned char prio) 24int imx_irq_set_priority(unsigned char irq, unsigned char prio)
25{ 25{
26 struct mxc_irq_chip *chip; 26 struct irq_chip_generic *gc;
27 struct irq_chip *base; 27 struct mxc_extra_irq *exirq;
28 int ret; 28 int ret;
29 29
30 ret = -ENOSYS; 30 ret = -ENOSYS;
31 31
32 base = irq_get_chip(irq); 32 gc = irq_get_chip_data(irq);
33 if (base) { 33 if (gc && gc->private) {
34 chip = container_of(base, struct mxc_irq_chip, base); 34 exirq = gc->private;
35 if (chip->set_priority) 35 if (exirq->set_priority)
36 ret = chip->set_priority(irq, prio); 36 ret = exirq->set_priority(irq, prio);
37 } 37 }
38 38
39 return ret; 39 return ret;
@@ -43,15 +43,16 @@ EXPORT_SYMBOL(imx_irq_set_priority);
43int mxc_set_irq_fiq(unsigned int irq, unsigned int type) 43int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
44{ 44{
45 struct irq_chip_generic *gc; 45 struct irq_chip_generic *gc;
46 int (*set_irq_fiq)(unsigned int, unsigned int); 46 struct mxc_extra_irq *exirq;
47 int ret; 47 int ret;
48 48
49 ret = -ENOSYS; 49 ret = -ENOSYS;
50 50
51 gc = irq_get_chip_data(irq); 51 gc = irq_get_chip_data(irq);
52 if (gc && gc->private) { 52 if (gc && gc->private) {
53 set_irq_fiq = gc->private; 53 exirq = gc->private;
54 ret = set_irq_fiq(irq, type); 54 if (exirq->set_irq_fiq)
55 ret = exirq->set_irq_fiq(irq, type);
55 } 56 }
56 57
57 return ret; 58 return ret;
diff --git a/arch/arm/plat-mxc/irq-common.h b/arch/arm/plat-mxc/irq-common.h
index 7203543fb1b..6ccb3a14c69 100644
--- a/arch/arm/plat-mxc/irq-common.h
+++ b/arch/arm/plat-mxc/irq-common.h
@@ -19,9 +19,8 @@
19#ifndef __PLAT_MXC_IRQ_COMMON_H__ 19#ifndef __PLAT_MXC_IRQ_COMMON_H__
20#define __PLAT_MXC_IRQ_COMMON_H__ 20#define __PLAT_MXC_IRQ_COMMON_H__
21 21
22struct mxc_irq_chip 22struct mxc_extra_irq
23{ 23{
24 struct irq_chip base;
25 int (*set_priority)(unsigned char irq, unsigned char prio); 24 int (*set_priority)(unsigned char irq, unsigned char prio);
26 int (*set_irq_fiq)(unsigned int irq, unsigned int type); 25 int (*set_irq_fiq)(unsigned int irq, unsigned int type);
27}; 26};
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 761c3c940a6..42d74ea5908 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) 57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
58 return -EINVAL; 58 return -EINVAL;
59 59
60 if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25() || cpu_is_mx51()) { 60 if (!(cpu_is_mx1() || cpu_is_mx21())) {
61 unsigned long long c; 61 unsigned long long c;
62 unsigned long period_cycles, duty_cycles, prescale; 62 unsigned long period_cycles, duty_cycles, prescale;
63 u32 cr; 63 u32 cr;
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c
index f257fccdc39..e993a184189 100644
--- a/arch/arm/plat-mxc/tzic.c
+++ b/arch/arm/plat-mxc/tzic.c
@@ -42,7 +42,7 @@
42#define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */ 42#define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */
43#define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */ 43#define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */
44#define TZIC_PND0 0x0D00 /* Pending Register 0 */ 44#define TZIC_PND0 0x0D00 /* Pending Register 0 */
45#define TZIC_HIPND0 0x0D80 /* High Priority Pending Register */ 45#define TZIC_HIPND(i) (0x0D80+ ((i) << 2)) /* High Priority Pending Register */
46#define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */ 46#define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */
47#define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ 47#define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */
48#define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ 48#define TZIC_ID0 0x0FD0 /* Indentification Register 0 */
@@ -74,6 +74,12 @@ static int tzic_set_irq_fiq(unsigned int irq, unsigned int type)
74 74
75static unsigned int *wakeup_intr[4]; 75static unsigned int *wakeup_intr[4];
76 76
77static struct mxc_extra_irq tzic_extra_irq = {
78#ifdef CONFIG_FIQ
79 .set_irq_fiq = tzic_set_irq_fiq,
80#endif
81};
82
77static __init void tzic_init_gc(unsigned int irq_start) 83static __init void tzic_init_gc(unsigned int irq_start)
78{ 84{
79 struct irq_chip_generic *gc; 85 struct irq_chip_generic *gc;
@@ -82,7 +88,7 @@ static __init void tzic_init_gc(unsigned int irq_start)
82 88
83 gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, 89 gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base,
84 handle_level_irq); 90 handle_level_irq);
85 gc->private = tzic_set_irq_fiq; 91 gc->private = &tzic_extra_irq;
86 gc->wake_enabled = IRQ_MSK(32); 92 gc->wake_enabled = IRQ_MSK(32);
87 wakeup_intr[idx] = &gc->wake_active; 93 wakeup_intr[idx] = &gc->wake_active;
88 94
@@ -96,6 +102,28 @@ static __init void tzic_init_gc(unsigned int irq_start)
96 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); 102 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
97} 103}
98 104
105asmlinkage void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
106{
107 u32 stat;
108 int i, irqofs, handled;
109
110 do {
111 handled = 0;
112
113 for (i = 0; i < 4; i++) {
114 stat = __raw_readl(tzic_base + TZIC_HIPND(i)) &
115 __raw_readl(tzic_base + TZIC_INTSEC0(i));
116
117 while (stat) {
118 handled = 1;
119 irqofs = fls(stat) - 1;
120 handle_IRQ(irqofs + i * 32, regs);
121 stat &= ~(1 << irqofs);
122 }
123 }
124 } while (handled);
125}
126
99/* 127/*
100 * This function initializes the TZIC hardware and disables all the 128 * This function initializes the TZIC hardware and disables all the
101 * interrupts. It registers the interrupt enable and disable functions 129 * interrupts. It registers the interrupt enable and disable functions