diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-11 12:30:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-11 12:30:44 -0400 |
commit | c9ee46a910f6edb40ddb7fb9aeac0030057c6fdb (patch) | |
tree | eede22c95d61618360b6059e082f579cbe681e2b /arch/arm | |
parent | 4fa046655b80e9bb361a95da5c86ce778f5018b9 (diff) | |
parent | 81490fcdf406f42fff9d9f57d541788f90242885 (diff) |
Merge branch 'for-rmk-next' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Diffstat (limited to 'arch/arm')
88 files changed, 2652 insertions, 1178 deletions
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/mx27_defconfig index b2038b0e266f..813cfb366c18 100644 --- a/arch/arm/configs/mx27_defconfig +++ b/arch/arm/configs/mx27_defconfig | |||
@@ -21,8 +21,14 @@ CONFIG_ARCH_MX2=y | |||
21 | CONFIG_MACH_MX27=y | 21 | CONFIG_MACH_MX27=y |
22 | CONFIG_MACH_MX27ADS=y | 22 | CONFIG_MACH_MX27ADS=y |
23 | CONFIG_MACH_PCM038=y | 23 | CONFIG_MACH_PCM038=y |
24 | CONFIG_MACH_CPUIMX27=y | ||
25 | CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2=y | ||
26 | CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y | ||
24 | CONFIG_MACH_MX27_3DS=y | 27 | CONFIG_MACH_MX27_3DS=y |
28 | CONFIG_MACH_IMX27_VISSTRIM_M10=y | ||
25 | CONFIG_MACH_IMX27LITE=y | 29 | CONFIG_MACH_IMX27LITE=y |
30 | CONFIG_MACH_PCA100=y | ||
31 | CONFIG_MACH_MXT_TD60=y | ||
26 | CONFIG_MXC_IRQ_PRIOR=y | 32 | CONFIG_MXC_IRQ_PRIOR=y |
27 | CONFIG_MXC_PWM=y | 33 | CONFIG_MXC_PWM=y |
28 | CONFIG_NO_HZ=y | 34 | CONFIG_NO_HZ=y |
@@ -76,7 +82,9 @@ CONFIG_INPUT_EVDEV=y | |||
76 | # CONFIG_INPUT_KEYBOARD is not set | 82 | # CONFIG_INPUT_KEYBOARD is not set |
77 | # CONFIG_INPUT_MOUSE is not set | 83 | # CONFIG_INPUT_MOUSE is not set |
78 | CONFIG_INPUT_TOUCHSCREEN=y | 84 | CONFIG_INPUT_TOUCHSCREEN=y |
85 | CONFIG_TOUCHSCREEN_ADS7846=m | ||
79 | # CONFIG_SERIO is not set | 86 | # CONFIG_SERIO is not set |
87 | CONFIG_SERIAL_8250=m | ||
80 | CONFIG_SERIAL_IMX=y | 88 | CONFIG_SERIAL_IMX=y |
81 | CONFIG_SERIAL_IMX_CONSOLE=y | 89 | CONFIG_SERIAL_IMX_CONSOLE=y |
82 | # CONFIG_LEGACY_PTYS is not set | 90 | # CONFIG_LEGACY_PTYS is not set |
@@ -85,19 +93,20 @@ CONFIG_I2C=y | |||
85 | CONFIG_I2C_CHARDEV=y | 93 | CONFIG_I2C_CHARDEV=y |
86 | CONFIG_I2C_IMX=y | 94 | CONFIG_I2C_IMX=y |
87 | CONFIG_SPI=y | 95 | CONFIG_SPI=y |
88 | CONFIG_SPI_BITBANG=y | 96 | CONFIG_SPI_IMX=y |
89 | CONFIG_W1=y | 97 | CONFIG_W1=y |
90 | CONFIG_W1_MASTER_MXC=y | 98 | CONFIG_W1_MASTER_MXC=y |
91 | CONFIG_W1_SLAVE_THERM=y | 99 | CONFIG_W1_SLAVE_THERM=y |
92 | # CONFIG_HWMON is not set | 100 | # CONFIG_HWMON is not set |
93 | CONFIG_FB=y | 101 | CONFIG_FB=y |
94 | CONFIG_FB_IMX=y | 102 | CONFIG_FB_IMX=y |
95 | # CONFIG_VGA_CONSOLE is not set | ||
96 | CONFIG_FRAMEBUFFER_CONSOLE=y | 103 | CONFIG_FRAMEBUFFER_CONSOLE=y |
97 | CONFIG_FONTS=y | 104 | CONFIG_FONTS=y |
98 | CONFIG_FONT_8x8=y | 105 | CONFIG_FONT_8x8=y |
99 | # CONFIG_HID_SUPPORT is not set | 106 | # CONFIG_HID_SUPPORT is not set |
100 | # CONFIG_USB_SUPPORT is not set | 107 | CONFIG_USB=m |
108 | # CONFIG_USB_DEVICE_CLASS is not set | ||
109 | CONFIG_USB_ULPI=y | ||
101 | CONFIG_MMC=y | 110 | CONFIG_MMC=y |
102 | CONFIG_MMC_MXC=y | 111 | CONFIG_MMC_MXC=y |
103 | CONFIG_RTC_CLASS=y | 112 | CONFIG_RTC_CLASS=y |
diff --git a/arch/arm/configs/mx31pdk_defconfig b/arch/arm/configs/mx31pdk_defconfig deleted file mode 100644 index 2d29329749e4..000000000000 --- a/arch/arm/configs/mx31pdk_defconfig +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | # CONFIG_LOCALVERSION_AUTO is not set | ||
2 | # CONFIG_SWAP is not set | ||
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
4 | # CONFIG_COMPAT_BRK is not set | ||
5 | # CONFIG_IOSCHED_DEADLINE is not set | ||
6 | # CONFIG_IOSCHED_CFQ is not set | ||
7 | CONFIG_ARCH_MXC=y | ||
8 | # CONFIG_MACH_MX31ADS is not set | ||
9 | CONFIG_MACH_MX31_3DS=y | ||
10 | CONFIG_AEABI=y | ||
11 | CONFIG_NET=y | ||
12 | CONFIG_PACKET=y | ||
13 | CONFIG_UNIX=y | ||
14 | CONFIG_NET_KEY=y | ||
15 | CONFIG_INET=y | ||
16 | CONFIG_IP_PNP=y | ||
17 | CONFIG_IP_PNP_DHCP=y | ||
18 | # CONFIG_INET_LRO is not set | ||
19 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
20 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
21 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
22 | # CONFIG_BLK_DEV is not set | ||
23 | # CONFIG_MISC_DEVICES is not set | ||
24 | CONFIG_NETDEVICES=y | ||
25 | CONFIG_NET_ETHERNET=y | ||
26 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
27 | # CONFIG_INPUT_KEYBOARD is not set | ||
28 | # CONFIG_INPUT_MOUSE is not set | ||
29 | # CONFIG_SERIO is not set | ||
30 | # CONFIG_DEVKMEM is not set | ||
31 | CONFIG_SERIAL_IMX=y | ||
32 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
33 | # CONFIG_LEGACY_PTYS is not set | ||
34 | # CONFIG_HW_RANDOM is not set | ||
35 | # CONFIG_HWMON is not set | ||
36 | # CONFIG_VGA_CONSOLE is not set | ||
37 | # CONFIG_HID_SUPPORT is not set | ||
38 | # CONFIG_USB_SUPPORT is not set | ||
39 | # CONFIG_DNOTIFY is not set | ||
40 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
41 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
42 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
43 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
44 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig index 161f907b611f..f0c339fd5d21 100644 --- a/arch/arm/configs/mx3_defconfig +++ b/arch/arm/configs/mx3_defconfig | |||
@@ -24,6 +24,7 @@ CONFIG_MACH_PCM043=y | |||
24 | CONFIG_MACH_ARMADILLO5X0=y | 24 | CONFIG_MACH_ARMADILLO5X0=y |
25 | CONFIG_MACH_MX35_3DS=y | 25 | CONFIG_MACH_MX35_3DS=y |
26 | CONFIG_MACH_KZM_ARM11_01=y | 26 | CONFIG_MACH_KZM_ARM11_01=y |
27 | CONFIG_MACH_EUKREA_CPUIMX35=y | ||
27 | CONFIG_MXC_IRQ_PRIOR=y | 28 | CONFIG_MXC_IRQ_PRIOR=y |
28 | CONFIG_MXC_PWM=y | 29 | CONFIG_MXC_PWM=y |
29 | CONFIG_NO_HZ=y | 30 | CONFIG_NO_HZ=y |
@@ -108,7 +109,6 @@ CONFIG_MMC=y | |||
108 | CONFIG_MMC_MXC=y | 109 | CONFIG_MMC_MXC=y |
109 | CONFIG_DMADEVICES=y | 110 | CONFIG_DMADEVICES=y |
110 | # CONFIG_DNOTIFY is not set | 111 | # CONFIG_DNOTIFY is not set |
111 | CONFIG_INOTIFY=y | ||
112 | CONFIG_TMPFS=y | 112 | CONFIG_TMPFS=y |
113 | CONFIG_JFFS2_FS=y | 113 | CONFIG_JFFS2_FS=y |
114 | CONFIG_UBIFS_FS=y | 114 | CONFIG_UBIFS_FS=y |
diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx51_defconfig index a665ecbbe2bc..163cfee7644c 100644 --- a/arch/arm/configs/mx51_defconfig +++ b/arch/arm/configs/mx51_defconfig | |||
@@ -15,6 +15,8 @@ CONFIG_MODULE_SRCVERSION_ALL=y | |||
15 | CONFIG_ARCH_MXC=y | 15 | CONFIG_ARCH_MXC=y |
16 | CONFIG_ARCH_MX5=y | 16 | CONFIG_ARCH_MX5=y |
17 | CONFIG_MACH_MX51_BABBAGE=y | 17 | CONFIG_MACH_MX51_BABBAGE=y |
18 | CONFIG_MACH_MX51_3DS=y | ||
19 | CONFIG_MACH_EUKREA_CPUIMX51=y | ||
18 | CONFIG_NO_HZ=y | 20 | CONFIG_NO_HZ=y |
19 | CONFIG_HIGH_RES_TIMERS=y | 21 | CONFIG_HIGH_RES_TIMERS=y |
20 | CONFIG_PREEMPT_VOLUNTARY=y | 22 | CONFIG_PREEMPT_VOLUNTARY=y |
@@ -69,7 +71,6 @@ CONFIG_REALTEK_PHY=y | |||
69 | CONFIG_NATIONAL_PHY=y | 71 | CONFIG_NATIONAL_PHY=y |
70 | CONFIG_STE10XP=y | 72 | CONFIG_STE10XP=y |
71 | CONFIG_LSI_ET1011C_PHY=y | 73 | CONFIG_LSI_ET1011C_PHY=y |
72 | CONFIG_FIXED_PHY=y | ||
73 | CONFIG_MDIO_BITBANG=y | 74 | CONFIG_MDIO_BITBANG=y |
74 | CONFIG_MDIO_GPIO=y | 75 | CONFIG_MDIO_GPIO=y |
75 | CONFIG_NET_ETHERNET=y | 76 | CONFIG_NET_ETHERNET=y |
@@ -100,7 +101,6 @@ CONFIG_I2C_ALGOPCF=m | |||
100 | CONFIG_I2C_ALGOPCA=m | 101 | CONFIG_I2C_ALGOPCA=m |
101 | CONFIG_GPIO_SYSFS=y | 102 | CONFIG_GPIO_SYSFS=y |
102 | # CONFIG_HWMON is not set | 103 | # CONFIG_HWMON is not set |
103 | # CONFIG_VGA_CONSOLE is not set | ||
104 | # CONFIG_HID_SUPPORT is not set | 104 | # CONFIG_HID_SUPPORT is not set |
105 | CONFIG_USB=y | 105 | CONFIG_USB=y |
106 | CONFIG_USB_EHCI_HCD=y | 106 | CONFIG_USB_EHCI_HCD=y |
@@ -117,13 +117,11 @@ CONFIG_EXT2_FS_XATTR=y | |||
117 | CONFIG_EXT2_FS_POSIX_ACL=y | 117 | CONFIG_EXT2_FS_POSIX_ACL=y |
118 | CONFIG_EXT2_FS_SECURITY=y | 118 | CONFIG_EXT2_FS_SECURITY=y |
119 | CONFIG_EXT3_FS=y | 119 | CONFIG_EXT3_FS=y |
120 | CONFIG_EXT3_DEFAULTS_TO_ORDERED=y | ||
121 | CONFIG_EXT3_FS_POSIX_ACL=y | 120 | CONFIG_EXT3_FS_POSIX_ACL=y |
122 | CONFIG_EXT3_FS_SECURITY=y | 121 | CONFIG_EXT3_FS_SECURITY=y |
123 | CONFIG_EXT4_FS=y | 122 | CONFIG_EXT4_FS=y |
124 | CONFIG_EXT4_FS_POSIX_ACL=y | 123 | CONFIG_EXT4_FS_POSIX_ACL=y |
125 | CONFIG_EXT4_FS_SECURITY=y | 124 | CONFIG_EXT4_FS_SECURITY=y |
126 | CONFIG_INOTIFY=y | ||
127 | CONFIG_QUOTA=y | 125 | CONFIG_QUOTA=y |
128 | CONFIG_QUOTA_NETLINK_INTERFACE=y | 126 | CONFIG_QUOTA_NETLINK_INTERFACE=y |
129 | # CONFIG_PRINT_QUOTA_WARNING is not set | 127 | # CONFIG_PRINT_QUOTA_WARNING is not set |
@@ -136,6 +134,7 @@ CONFIG_ZISOFS=y | |||
136 | CONFIG_UDF_FS=m | 134 | CONFIG_UDF_FS=m |
137 | CONFIG_MSDOS_FS=m | 135 | CONFIG_MSDOS_FS=m |
138 | CONFIG_VFAT_FS=y | 136 | CONFIG_VFAT_FS=y |
137 | CONFIG_TMPFS=y | ||
139 | CONFIG_CONFIGFS_FS=m | 138 | CONFIG_CONFIGFS_FS=m |
140 | CONFIG_NFS_FS=y | 139 | CONFIG_NFS_FS=y |
141 | CONFIG_NFS_V3=y | 140 | CONFIG_NFS_V3=y |
@@ -151,7 +150,6 @@ CONFIG_NLS_UTF8=y | |||
151 | CONFIG_MAGIC_SYSRQ=y | 150 | CONFIG_MAGIC_SYSRQ=y |
152 | CONFIG_DEBUG_FS=y | 151 | CONFIG_DEBUG_FS=y |
153 | CONFIG_DEBUG_KERNEL=y | 152 | CONFIG_DEBUG_KERNEL=y |
154 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
155 | # CONFIG_SCHED_DEBUG is not set | 153 | # CONFIG_SCHED_DEBUG is not set |
156 | # CONFIG_DEBUG_BUGVERBOSE is not set | 154 | # CONFIG_DEBUG_BUGVERBOSE is not set |
157 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 155 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -159,7 +157,6 @@ CONFIG_DEBUG_KERNEL=y | |||
159 | # CONFIG_ARM_UNWIND is not set | 157 | # CONFIG_ARM_UNWIND is not set |
160 | CONFIG_DEBUG_LL=y | 158 | CONFIG_DEBUG_LL=y |
161 | CONFIG_EARLY_PRINTK=y | 159 | CONFIG_EARLY_PRINTK=y |
162 | CONFIG_KEYS=y | ||
163 | CONFIG_SECURITYFS=y | 160 | CONFIG_SECURITYFS=y |
164 | CONFIG_CRYPTO_DEFLATE=y | 161 | CONFIG_CRYPTO_DEFLATE=y |
165 | CONFIG_CRYPTO_LZO=y | 162 | CONFIG_CRYPTO_LZO=y |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c5c0369bb481..9b45f1f523fa 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -146,8 +146,8 @@ choice | |||
146 | default MACH_EUKREA_MBIMX27_BASEBOARD | 146 | default MACH_EUKREA_MBIMX27_BASEBOARD |
147 | 147 | ||
148 | config MACH_EUKREA_MBIMX27_BASEBOARD | 148 | config MACH_EUKREA_MBIMX27_BASEBOARD |
149 | prompt "Eukrea MBIMX27 development board" | 149 | bool "Eukrea MBIMX27 development board" |
150 | bool | 150 | select IMX_HAVE_PLATFORM_IMX_SSI |
151 | select IMX_HAVE_PLATFORM_IMX_UART | 151 | select IMX_HAVE_PLATFORM_IMX_UART |
152 | select IMX_HAVE_PLATFORM_SPI_IMX | 152 | select IMX_HAVE_PLATFORM_SPI_IMX |
153 | help | 153 | help |
@@ -163,6 +163,15 @@ config MACH_MX27_3DS | |||
163 | Include support for MX27PDK platform. This includes specific | 163 | Include support for MX27PDK platform. This includes specific |
164 | configurations for the board and its peripherals. | 164 | configurations for the board and its peripherals. |
165 | 165 | ||
166 | config MACH_IMX27_VISSTRIM_M10 | ||
167 | bool "Vista Silicon i.MX27 Visstrim_m10" | ||
168 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
169 | select IMX_HAVE_PLATFORM_IMX_UART | ||
170 | help | ||
171 | Include support for Visstrim_m10 platform and its different variants. | ||
172 | This includes specific configurations for the board and its | ||
173 | peripherals. | ||
174 | |||
166 | config MACH_IMX27LITE | 175 | config MACH_IMX27LITE |
167 | bool "LogicPD MX27 LITEKIT platform" | 176 | bool "LogicPD MX27 LITEKIT platform" |
168 | select IMX_HAVE_PLATFORM_IMX_UART | 177 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -173,6 +182,7 @@ config MACH_IMX27LITE | |||
173 | config MACH_PCA100 | 182 | config MACH_PCA100 |
174 | bool "Phytec phyCARD-s (pca100)" | 183 | bool "Phytec phyCARD-s (pca100)" |
175 | select IMX_HAVE_PLATFORM_IMX_I2C | 184 | select IMX_HAVE_PLATFORM_IMX_I2C |
185 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
176 | select IMX_HAVE_PLATFORM_IMX_UART | 186 | select IMX_HAVE_PLATFORM_IMX_UART |
177 | select IMX_HAVE_PLATFORM_MXC_NAND | 187 | select IMX_HAVE_PLATFORM_MXC_NAND |
178 | select IMX_HAVE_PLATFORM_SPI_IMX | 188 | select IMX_HAVE_PLATFORM_SPI_IMX |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 46a9fdfbbd15..5582692bb176 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -27,6 +27,7 @@ obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o | |||
27 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | 27 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o |
28 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o | 28 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o |
29 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o | 29 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o |
30 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o | ||
30 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o | 31 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o |
31 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o | 32 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o |
32 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o | 33 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
diff --git a/arch/arm/mach-imx/clock-imx1.c b/arch/arm/mach-imx/clock-imx1.c index c05096c38301..daca30b2d5b1 100644 --- a/arch/arm/mach-imx/clock-imx1.c +++ b/arch/arm/mach-imx/clock-imx1.c | |||
@@ -592,7 +592,7 @@ static struct clk_lookup lookups[] __initdata = { | |||
592 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) | 592 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) |
593 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) | 593 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) |
594 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 594 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
595 | _REGISTER_CLOCK("spi_imx.0", NULL, spi_clk) | 595 | _REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk) |
596 | _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk) | 596 | _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk) |
597 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 597 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
598 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) | 598 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) |
diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c index bb419ef4d133..cf15ea516a72 100644 --- a/arch/arm/mach-imx/clock-imx21.c +++ b/arch/arm/mach-imx/clock-imx21.c | |||
@@ -1172,9 +1172,9 @@ static struct clk_lookup lookups[] = { | |||
1172 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0]) | 1172 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0]) |
1173 | _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0]) | 1173 | _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0]) |
1174 | _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1]) | 1174 | _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1]) |
1175 | _REGISTER_CLOCK(NULL, "cspi1", cspi_clk[0]) | 1175 | _REGISTER_CLOCK("imx21-cspi.0", NULL, cspi_clk[0]) |
1176 | _REGISTER_CLOCK(NULL, "cspi2", cspi_clk[1]) | 1176 | _REGISTER_CLOCK("imx21-cspi.1", NULL, cspi_clk[1]) |
1177 | _REGISTER_CLOCK(NULL, "cspi3", cspi_clk[2]) | 1177 | _REGISTER_CLOCK("imx21-cspi.2", NULL, cspi_clk[2]) |
1178 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) | 1178 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) |
1179 | _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) | 1179 | _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) |
1180 | _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) | 1180 | _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) |
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c index 5a1aa15c8a16..98a25bada783 100644 --- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -594,27 +594,27 @@ DEFINE_CLOCK(uart2_clk1, 0, PCCR1, 30, NULL, NULL, &ipg_clk); | |||
594 | DEFINE_CLOCK(uart1_clk1, 0, PCCR1, 31, NULL, NULL, &ipg_clk); | 594 | DEFINE_CLOCK(uart1_clk1, 0, PCCR1, 31, NULL, NULL, &ipg_clk); |
595 | 595 | ||
596 | /* Clocks we cannot directly gate, but drivers need their rates */ | 596 | /* Clocks we cannot directly gate, but drivers need their rates */ |
597 | DEFINE_CLOCK(cspi1_clk, 0, 0, 0, NULL, &cspi1_clk1, &per2_clk); | 597 | DEFINE_CLOCK(cspi1_clk, 0, NULL, 0, NULL, &cspi1_clk1, &per2_clk); |
598 | DEFINE_CLOCK(cspi2_clk, 1, 0, 0, NULL, &cspi2_clk1, &per2_clk); | 598 | DEFINE_CLOCK(cspi2_clk, 1, NULL, 0, NULL, &cspi2_clk1, &per2_clk); |
599 | DEFINE_CLOCK(cspi3_clk, 2, 0, 0, NULL, &cspi13_clk1, &per2_clk); | 599 | DEFINE_CLOCK(cspi3_clk, 2, NULL, 0, NULL, &cspi13_clk1, &per2_clk); |
600 | DEFINE_CLOCK(sdhc1_clk, 0, 0, 0, NULL, &sdhc1_clk1, &per2_clk); | 600 | DEFINE_CLOCK(sdhc1_clk, 0, NULL, 0, NULL, &sdhc1_clk1, &per2_clk); |
601 | DEFINE_CLOCK(sdhc2_clk, 1, 0, 0, NULL, &sdhc2_clk1, &per2_clk); | 601 | DEFINE_CLOCK(sdhc2_clk, 1, NULL, 0, NULL, &sdhc2_clk1, &per2_clk); |
602 | DEFINE_CLOCK(sdhc3_clk, 2, 0, 0, NULL, &sdhc3_clk1, &per2_clk); | 602 | DEFINE_CLOCK(sdhc3_clk, 2, NULL, 0, NULL, &sdhc3_clk1, &per2_clk); |
603 | DEFINE_CLOCK(pwm_clk, 0, 0, 0, NULL, &pwm_clk1, &per1_clk); | 603 | DEFINE_CLOCK(pwm_clk, 0, NULL, 0, NULL, &pwm_clk1, &per1_clk); |
604 | DEFINE_CLOCK(gpt1_clk, 0, 0, 0, NULL, &gpt1_clk1, &per1_clk); | 604 | DEFINE_CLOCK(gpt1_clk, 0, NULL, 0, NULL, &gpt1_clk1, &per1_clk); |
605 | DEFINE_CLOCK(gpt2_clk, 1, 0, 0, NULL, &gpt2_clk1, &per1_clk); | 605 | DEFINE_CLOCK(gpt2_clk, 1, NULL, 0, NULL, &gpt2_clk1, &per1_clk); |
606 | DEFINE_CLOCK(gpt3_clk, 2, 0, 0, NULL, &gpt3_clk1, &per1_clk); | 606 | DEFINE_CLOCK(gpt3_clk, 2, NULL, 0, NULL, &gpt3_clk1, &per1_clk); |
607 | DEFINE_CLOCK(gpt4_clk, 3, 0, 0, NULL, &gpt4_clk1, &per1_clk); | 607 | DEFINE_CLOCK(gpt4_clk, 3, NULL, 0, NULL, &gpt4_clk1, &per1_clk); |
608 | DEFINE_CLOCK(gpt5_clk, 4, 0, 0, NULL, &gpt5_clk1, &per1_clk); | 608 | DEFINE_CLOCK(gpt5_clk, 4, NULL, 0, NULL, &gpt5_clk1, &per1_clk); |
609 | DEFINE_CLOCK(gpt6_clk, 5, 0, 0, NULL, &gpt6_clk1, &per1_clk); | 609 | DEFINE_CLOCK(gpt6_clk, 5, NULL, 0, NULL, &gpt6_clk1, &per1_clk); |
610 | DEFINE_CLOCK(uart1_clk, 0, 0, 0, NULL, &uart1_clk1, &per1_clk); | 610 | DEFINE_CLOCK(uart1_clk, 0, NULL, 0, NULL, &uart1_clk1, &per1_clk); |
611 | DEFINE_CLOCK(uart2_clk, 1, 0, 0, NULL, &uart2_clk1, &per1_clk); | 611 | DEFINE_CLOCK(uart2_clk, 1, NULL, 0, NULL, &uart2_clk1, &per1_clk); |
612 | DEFINE_CLOCK(uart3_clk, 2, 0, 0, NULL, &uart3_clk1, &per1_clk); | 612 | DEFINE_CLOCK(uart3_clk, 2, NULL, 0, NULL, &uart3_clk1, &per1_clk); |
613 | DEFINE_CLOCK(uart4_clk, 3, 0, 0, NULL, &uart4_clk1, &per1_clk); | 613 | DEFINE_CLOCK(uart4_clk, 3, NULL, 0, NULL, &uart4_clk1, &per1_clk); |
614 | DEFINE_CLOCK(uart5_clk, 4, 0, 0, NULL, &uart5_clk1, &per1_clk); | 614 | DEFINE_CLOCK(uart5_clk, 4, NULL, 0, NULL, &uart5_clk1, &per1_clk); |
615 | DEFINE_CLOCK(uart6_clk, 5, 0, 0, NULL, &uart6_clk1, &per1_clk); | 615 | DEFINE_CLOCK(uart6_clk, 5, NULL, 0, NULL, &uart6_clk1, &per1_clk); |
616 | DEFINE_CLOCK1(lcdc_clk, 0, 0, 0, parent, &lcdc_clk1, &per3_clk); | 616 | DEFINE_CLOCK1(lcdc_clk, 0, NULL, 0, parent, &lcdc_clk1, &per3_clk); |
617 | DEFINE_CLOCK1(csi_clk, 0, 0, 0, parent, &csi_clk1, &per4_clk); | 617 | DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk); |
618 | 618 | ||
619 | #define _REGISTER_CLOCK(d, n, c) \ | 619 | #define _REGISTER_CLOCK(d, n, c) \ |
620 | { \ | 620 | { \ |
@@ -640,9 +640,9 @@ static struct clk_lookup lookups[] = { | |||
640 | _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) | 640 | _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) |
641 | _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) | 641 | _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) |
642 | _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) | 642 | _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) |
643 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 643 | _REGISTER_CLOCK("imx27-cspi.0", NULL, cspi1_clk) |
644 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 644 | _REGISTER_CLOCK("imx27-cspi.1", NULL, cspi2_clk) |
645 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) | 645 | _REGISTER_CLOCK("imx27-cspi.2", NULL, cspi3_clk) |
646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
647 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) | 647 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) |
648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) | 648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) |
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h index a8d94f078196..81979486218e 100644 --- a/arch/arm/mach-imx/devices-imx1.h +++ b/arch/arm/mach-imx/devices-imx1.h | |||
@@ -9,10 +9,12 @@ | |||
9 | #include <mach/mx1.h> | 9 | #include <mach/mx1.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx1_add_i2c_imx(pdata) \ | 12 | extern const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst; |
13 | imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata) | 13 | #define imx1_add_imx_i2c(pdata) \ |
14 | imx_add_imx_i2c(&imx1_imx_i2c_data, pdata) | ||
14 | 15 | ||
15 | #define imx1_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst; |
16 | imx_add_imx_uart_3irq(0, MX1_UART1_BASE_ADDR, 0xd0, MX1_INT_UART1RX, MX1_INT_UART1TX, MX1_INT_UART1RTS, pdata) | 17 | #define imx1_add_imx_uart(id, pdata) \ |
17 | #define imx1_add_imx_uart1(pdata) \ | 18 | imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata) |
18 | imx_add_imx_uart_3irq(0, MX1_UART2_BASE_ADDR, 0xd0, MX1_INT_UART2RX, MX1_INT_UART2TX, MX1_INT_UART2RTS, pdata) | 19 | #define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata) |
20 | #define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index 42788e99d127..d189039749b0 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -9,22 +9,28 @@ | |||
9 | #include <mach/mx21.h> | 9 | #include <mach/mx21.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx21_add_i2c_imx(pdata) \ | 12 | extern const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst; |
13 | imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata) | 13 | #define imx21_add_imx_i2c(pdata) \ |
14 | imx_add_imx_i2c(&imx21_imx_i2c_data, pdata) | ||
14 | 15 | ||
15 | #define imx21_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst; |
16 | imx_add_imx_uart_1irq(0, MX21_UART1_BASE_ADDR, SZ_4K, MX21_INT_UART1, pdata) | 17 | #define imx21_add_imx_ssi(id, pdata) \ |
17 | #define imx21_add_imx_uart1(pdata) \ | 18 | imx_add_imx_ssi(&imx21_imx_ssi_data[id], pdata) |
18 | imx_add_imx_uart_1irq(1, MX21_UART2_BASE_ADDR, SZ_4K, MX21_INT_UART2, pdata) | ||
19 | #define imx21_add_imx_uart2(pdata) \ | ||
20 | imx_add_imx_uart_1irq(2, MX21_UART3_BASE_ADDR, SZ_4K, MX21_INT_UART3, pdata) | ||
21 | #define imx21_add_imx_uart3(pdata) \ | ||
22 | imx_add_imx_uart_1irq(3, MX21_UART4_BASE_ADDR, SZ_4K, MX21_INT_UART4, pdata) | ||
23 | 19 | ||
20 | extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst; | ||
21 | #define imx21_add_imx_uart(id, pdata) \ | ||
22 | imx_add_imx_uart_1irq(&imx21_imx_uart_data[id], pdata) | ||
23 | #define imx21_add_imx_uart0(pdata) imx21_add_imx_uart(0, pdata) | ||
24 | #define imx21_add_imx_uart1(pdata) imx21_add_imx_uart(1, pdata) | ||
25 | #define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata) | ||
26 | #define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata) | ||
27 | |||
28 | extern const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst; | ||
24 | #define imx21_add_mxc_nand(pdata) \ | 29 | #define imx21_add_mxc_nand(pdata) \ |
25 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) | 30 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) |
26 | 31 | ||
27 | #define imx21_add_spi_imx0(pdata) \ | 32 | extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; |
28 | imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata) | 33 | #define imx21_add_cspi(id, pdata) \ |
29 | #define imx21_add_spi_imx1(pdata) \ | 34 | imx_add_spi_imx(&imx21_cspi_data[id], pdata) |
30 | imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata) | 35 | #define imx21_add_spi_imx0(pdata) imx21_add_cspi(0, pdata) |
36 | #define imx21_add_spi_imx1(pdata) imx21_add_cspi(1, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 65e7bb7ec2e8..7011690364f2 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -9,30 +9,35 @@ | |||
9 | #include <mach/mx27.h> | 9 | #include <mach/mx27.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx27_add_i2c_imx0(pdata) \ | 12 | extern const struct imx_fec_data imx27_fec_data __initconst; |
13 | imx_add_imx_i2c(0, MX27_I2C1_BASE_ADDR, SZ_4K, MX27_INT_I2C1, pdata) | 13 | #define imx27_add_fec(pdata) \ |
14 | #define imx27_add_i2c_imx1(pdata) \ | 14 | imx_add_fec(&imx27_fec_data, pdata) |
15 | imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata) | ||
16 | 15 | ||
17 | #define imx27_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst; |
18 | imx_add_imx_uart_1irq(0, MX27_UART1_BASE_ADDR, SZ_4K, MX27_INT_UART1, pdata) | 17 | #define imx27_add_imx_i2c(id, pdata) \ |
19 | #define imx27_add_imx_uart1(pdata) \ | 18 | imx_add_imx_i2c(&imx27_imx_i2c_data[id], pdata) |
20 | imx_add_imx_uart_1irq(1, MX27_UART2_BASE_ADDR, SZ_4K, MX27_INT_UART2, pdata) | ||
21 | #define imx27_add_imx_uart2(pdata) \ | ||
22 | imx_add_imx_uart_1irq(2, MX27_UART3_BASE_ADDR, SZ_4K, MX27_INT_UART3, pdata) | ||
23 | #define imx27_add_imx_uart3(pdata) \ | ||
24 | imx_add_imx_uart_1irq(3, MX27_UART4_BASE_ADDR, SZ_4K, MX27_INT_UART4, pdata) | ||
25 | #define imx27_add_imx_uart4(pdata) \ | ||
26 | imx_add_imx_uart_1irq(4, MX27_UART5_BASE_ADDR, SZ_4K, MX27_INT_UART5, pdata) | ||
27 | #define imx27_add_imx_uart5(pdata) \ | ||
28 | imx_add_imx_uart_1irq(5, MX27_UART6_BASE_ADDR, SZ_4K, MX27_INT_UART6, pdata) | ||
29 | 19 | ||
20 | extern const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst; | ||
21 | #define imx27_add_imx_ssi(id, pdata) \ | ||
22 | imx_add_imx_ssi(&imx27_imx_ssi_data[id], pdata) | ||
23 | |||
24 | extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst; | ||
25 | #define imx27_add_imx_uart(id, pdata) \ | ||
26 | imx_add_imx_uart_1irq(&imx27_imx_uart_data[id], pdata) | ||
27 | #define imx27_add_imx_uart0(pdata) imx27_add_imx_uart(0, pdata) | ||
28 | #define imx27_add_imx_uart1(pdata) imx27_add_imx_uart(1, pdata) | ||
29 | #define imx27_add_imx_uart2(pdata) imx27_add_imx_uart(2, pdata) | ||
30 | #define imx27_add_imx_uart3(pdata) imx27_add_imx_uart(3, pdata) | ||
31 | #define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata) | ||
32 | #define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata) | ||
33 | |||
34 | extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; | ||
30 | #define imx27_add_mxc_nand(pdata) \ | 35 | #define imx27_add_mxc_nand(pdata) \ |
31 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) | 36 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) |
32 | 37 | ||
33 | #define imx27_add_spi_imx0(pdata) \ | 38 | extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; |
34 | imx_add_spi_imx(0, MX27_CSPI1_BASE_ADDR, SZ_4K, MX27_INT_CSPI1, pdata) | 39 | #define imx27_add_cspi(id, pdata) \ |
35 | #define imx27_add_spi_imx1(pdata) \ | 40 | imx_add_spi_imx(&imx27_cspi_data[id], pdata) |
36 | imx_add_spi_imx(1, MX27_CSPI2_BASE_ADDR, SZ_4K, MX27_INT_CSPI2, pdata) | 41 | #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) |
37 | #define imx27_add_spi_imx2(pdata) \ | 42 | #define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) |
38 | imx_add_spi_imx(2, MX27_CSPI3_BASE_ADDR, SZ_4K, MX27_INT_CSPI3, pdata) | 43 | #define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) |
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 9c271a752b84..fba5047de8b1 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -314,27 +314,6 @@ struct platform_device mxc_fb_device = { | |||
314 | }, | 314 | }, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | #ifdef CONFIG_MACH_MX27 | ||
318 | static struct resource mxc_fec_resources[] = { | ||
319 | { | ||
320 | .start = MX27_FEC_BASE_ADDR, | ||
321 | .end = MX27_FEC_BASE_ADDR + SZ_4K - 1, | ||
322 | .flags = IORESOURCE_MEM, | ||
323 | }, { | ||
324 | .start = MX27_INT_FEC, | ||
325 | .end = MX27_INT_FEC, | ||
326 | .flags = IORESOURCE_IRQ, | ||
327 | }, | ||
328 | }; | ||
329 | |||
330 | struct platform_device mxc_fec_device = { | ||
331 | .name = "fec", | ||
332 | .id = 0, | ||
333 | .num_resources = ARRAY_SIZE(mxc_fec_resources), | ||
334 | .resource = mxc_fec_resources, | ||
335 | }; | ||
336 | #endif | ||
337 | |||
338 | static struct resource mxc_pwm_resources[] = { | 317 | static struct resource mxc_pwm_resources[] = { |
339 | { | 318 | { |
340 | .start = MX2x_PWM_BASE_ADDR, | 319 | .start = MX2x_PWM_BASE_ADDR, |
@@ -480,41 +459,6 @@ struct platform_device mxc_usbh2 = { | |||
480 | }; | 459 | }; |
481 | #endif | 460 | #endif |
482 | 461 | ||
483 | #define DEFINE_IMX_SSI_DMARES(_name, ssin, suffix) \ | ||
484 | { \ | ||
485 | .name = _name, \ | ||
486 | .start = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ | ||
487 | .end = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ | ||
488 | .flags = IORESOURCE_DMA, \ | ||
489 | } | ||
490 | |||
491 | #define DEFINE_IMX_SSI_DEVICE(n, ssin, baseaddr, irq) \ | ||
492 | static struct resource imx_ssi_resources ## n[] = { \ | ||
493 | { \ | ||
494 | .start = MX2x_SSI ## ssin ## _BASE_ADDR, \ | ||
495 | .end = MX2x_SSI ## ssin ## _BASE_ADDR + 0x6f, \ | ||
496 | .flags = IORESOURCE_MEM, \ | ||
497 | }, { \ | ||
498 | .start = MX2x_INT_SSI1, \ | ||
499 | .end = MX2x_INT_SSI1, \ | ||
500 | .flags = IORESOURCE_IRQ, \ | ||
501 | }, \ | ||
502 | DEFINE_IMX_SSI_DMARES("tx0", ssin, TX0), \ | ||
503 | DEFINE_IMX_SSI_DMARES("rx0", ssin, RX0), \ | ||
504 | DEFINE_IMX_SSI_DMARES("tx1", ssin, TX1), \ | ||
505 | DEFINE_IMX_SSI_DMARES("rx1", ssin, RX1), \ | ||
506 | }; \ | ||
507 | \ | ||
508 | struct platform_device imx_ssi_device ## n = { \ | ||
509 | .name = "imx-ssi", \ | ||
510 | .id = n, \ | ||
511 | .num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \ | ||
512 | .resource = imx_ssi_resources ## n, \ | ||
513 | } | ||
514 | |||
515 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | ||
516 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | ||
517 | |||
518 | /* GPIO port description */ | 462 | /* GPIO port description */ |
519 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ | 463 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
520 | { \ | 464 | { \ |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index efd4527506a5..807f02a031c9 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -16,7 +16,6 @@ extern struct platform_device mxc_gpt5; | |||
16 | extern struct platform_device mxc_wdt; | 16 | extern struct platform_device mxc_wdt; |
17 | extern struct platform_device mxc_w1_master_device; | 17 | extern struct platform_device mxc_w1_master_device; |
18 | extern struct platform_device mxc_fb_device; | 18 | extern struct platform_device mxc_fb_device; |
19 | extern struct platform_device mxc_fec_device; | ||
20 | extern struct platform_device mxc_pwm_device; | 19 | extern struct platform_device mxc_pwm_device; |
21 | extern struct platform_device mxc_sdhc_device0; | 20 | extern struct platform_device mxc_sdhc_device0; |
22 | extern struct platform_device mxc_sdhc_device1; | 21 | extern struct platform_device mxc_sdhc_device1; |
@@ -26,7 +25,5 @@ extern struct platform_device mxc_otg_host; | |||
26 | extern struct platform_device mxc_usbh1; | 25 | extern struct platform_device mxc_usbh1; |
27 | extern struct platform_device mxc_usbh2; | 26 | extern struct platform_device mxc_usbh2; |
28 | extern struct platform_device mx21_usbhc_device; | 27 | extern struct platform_device mx21_usbhc_device; |
29 | extern struct platform_device imx_ssi_device0; | ||
30 | extern struct platform_device imx_ssi_device1; | ||
31 | extern struct platform_device imx_kpp_device; | 28 | extern struct platform_device imx_kpp_device; |
32 | #endif | 29 | #endif |
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 4edc5f439201..026263c665ca 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -36,13 +36,12 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
38 | #include <mach/spi.h> | 38 | #include <mach/spi.h> |
39 | #include <mach/ssi.h> | ||
40 | #include <mach/audmux.h> | 39 | #include <mach/audmux.h> |
41 | 40 | ||
42 | #include "devices-imx27.h" | 41 | #include "devices-imx27.h" |
43 | #include "devices.h" | 42 | #include "devices.h" |
44 | 43 | ||
45 | static int eukrea_mbimx27_pins[] = { | 44 | static const int eukrea_mbimx27_pins[] __initconst = { |
46 | /* UART2 */ | 45 | /* UART2 */ |
47 | PE3_PF_UART2_CTS, | 46 | PE3_PF_UART2_CTS, |
48 | PE4_PF_UART2_RTS, | 47 | PE4_PF_UART2_RTS, |
@@ -311,7 +310,8 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
311 | .dat3_card_detect = 1, | 310 | .dat3_card_detect = 1, |
312 | }; | 311 | }; |
313 | 312 | ||
314 | struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata = { | 313 | static const |
314 | struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata __initconst = { | ||
315 | .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, | 315 | .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, |
316 | }; | 316 | }; |
317 | 317 | ||
@@ -357,7 +357,7 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
357 | i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, | 357 | i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, |
358 | ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); | 358 | ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); |
359 | 359 | ||
360 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata); | 360 | imx27_add_imx_ssi(0, &eukrea_mbimx27_ssi_pdata); |
361 | 361 | ||
362 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ | 362 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ |
363 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 363 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 339150ab0ea5..28f73a1c79f7 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "devices-imx27.h" | 46 | #include "devices-imx27.h" |
47 | #include "devices.h" | 47 | #include "devices.h" |
48 | 48 | ||
49 | static int eukrea_cpuimx27_pins[] = { | 49 | static const int eukrea_cpuimx27_pins[] __initconst = { |
50 | /* UART1 */ | 50 | /* UART1 */ |
51 | PE12_PF_UART1_TXD, | 51 | PE12_PF_UART1_TXD, |
52 | PE13_PF_UART1_RXD, | 52 | PE13_PF_UART1_RXD, |
@@ -157,7 +157,6 @@ cpuimx27_nand_board_info __initconst = { | |||
157 | 157 | ||
158 | static struct platform_device *platform_devices[] __initdata = { | 158 | static struct platform_device *platform_devices[] __initdata = { |
159 | &eukrea_cpuimx27_nor_mtd_device, | 159 | &eukrea_cpuimx27_nor_mtd_device, |
160 | &mxc_fec_device, | ||
161 | &mxc_wdt, | 160 | &mxc_wdt, |
162 | &mxc_w1_master_device, | 161 | &mxc_w1_master_device, |
163 | }; | 162 | }; |
@@ -259,8 +258,9 @@ static void __init eukrea_cpuimx27_init(void) | |||
259 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 258 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
260 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 259 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
261 | 260 | ||
262 | imx27_add_i2c_imx1(&cpuimx27_i2c1_data); | 261 | imx27_add_imx_i2c(1, &cpuimx27_i2c1_data); |
263 | 262 | ||
263 | imx27_add_fec(NULL); | ||
264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
265 | 265 | ||
266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | 266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c new file mode 100644 index 000000000000..a0d78faa08e8 --- /dev/null +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -0,0 +1,263 @@ | |||
1 | /* | ||
2 | * mach-imx27_visstrim_m10.c | ||
3 | * | ||
4 | * Copyright 2010 Javier Martin <javier.martin@vista-silicon.com> | ||
5 | * | ||
6 | * Based on mach-pcm038.c, mach-pca100.c, mach-mx27ads.c and others. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
21 | * MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/i2c.h> | ||
29 | #include <linux/i2c/pca953x.h> | ||
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/input.h> | ||
32 | #include <linux/gpio.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/time.h> | ||
36 | #include <mach/common.h> | ||
37 | #include <mach/mmc.h> | ||
38 | #include <mach/iomux.h> | ||
39 | #include <mach/mxc_ehci.h> | ||
40 | |||
41 | #include "devices-imx27.h" | ||
42 | #include "devices.h" | ||
43 | |||
44 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) | ||
45 | #define SDHC1_IRQ IRQ_GPIOB(25) | ||
46 | |||
47 | static const int visstrim_m10_pins[] __initconst = { | ||
48 | /* UART1 (console) */ | ||
49 | PE12_PF_UART1_TXD, | ||
50 | PE13_PF_UART1_RXD, | ||
51 | PE14_PF_UART1_CTS, | ||
52 | PE15_PF_UART1_RTS, | ||
53 | /* FEC */ | ||
54 | PD0_AIN_FEC_TXD0, | ||
55 | PD1_AIN_FEC_TXD1, | ||
56 | PD2_AIN_FEC_TXD2, | ||
57 | PD3_AIN_FEC_TXD3, | ||
58 | PD4_AOUT_FEC_RX_ER, | ||
59 | PD5_AOUT_FEC_RXD1, | ||
60 | PD6_AOUT_FEC_RXD2, | ||
61 | PD7_AOUT_FEC_RXD3, | ||
62 | PD8_AF_FEC_MDIO, | ||
63 | PD9_AIN_FEC_MDC, | ||
64 | PD10_AOUT_FEC_CRS, | ||
65 | PD11_AOUT_FEC_TX_CLK, | ||
66 | PD12_AOUT_FEC_RXD0, | ||
67 | PD13_AOUT_FEC_RX_DV, | ||
68 | PD14_AOUT_FEC_RX_CLK, | ||
69 | PD15_AOUT_FEC_COL, | ||
70 | PD16_AIN_FEC_TX_ER, | ||
71 | PF23_AIN_FEC_TX_EN, | ||
72 | /* SDHC1 */ | ||
73 | PE18_PF_SD1_D0, | ||
74 | PE19_PF_SD1_D1, | ||
75 | PE20_PF_SD1_D2, | ||
76 | PE21_PF_SD1_D3, | ||
77 | PE22_PF_SD1_CMD, | ||
78 | PE23_PF_SD1_CLK, | ||
79 | /* Both I2Cs */ | ||
80 | PD17_PF_I2C_DATA, | ||
81 | PD18_PF_I2C_CLK, | ||
82 | PC5_PF_I2C2_SDA, | ||
83 | PC6_PF_I2C2_SCL, | ||
84 | /* USB OTG */ | ||
85 | OTG_PHY_CS_GPIO | GPIO_GPIO | GPIO_OUT, | ||
86 | PC9_PF_USBOTG_DATA0, | ||
87 | PC11_PF_USBOTG_DATA1, | ||
88 | PC10_PF_USBOTG_DATA2, | ||
89 | PC13_PF_USBOTG_DATA3, | ||
90 | PC12_PF_USBOTG_DATA4, | ||
91 | PC7_PF_USBOTG_DATA5, | ||
92 | PC8_PF_USBOTG_DATA6, | ||
93 | PE25_PF_USBOTG_DATA7, | ||
94 | PE24_PF_USBOTG_CLK, | ||
95 | PE2_PF_USBOTG_DIR, | ||
96 | PE0_PF_USBOTG_NXT, | ||
97 | PE1_PF_USBOTG_STP, | ||
98 | PB23_PF_USB_PWR, | ||
99 | PB24_PF_USB_OC, | ||
100 | }; | ||
101 | |||
102 | /* GPIOs used as events for applications */ | ||
103 | static struct gpio_keys_button visstrim_gpio_keys[] = { | ||
104 | { | ||
105 | .type = EV_KEY, | ||
106 | .code = KEY_RESTART, | ||
107 | .gpio = (GPIO_PORTC + 15), | ||
108 | .desc = "Default config", | ||
109 | .active_low = 0, | ||
110 | .wakeup = 1, | ||
111 | }, | ||
112 | { | ||
113 | .type = EV_KEY, | ||
114 | .code = KEY_RECORD, | ||
115 | .gpio = (GPIO_PORTF + 14), | ||
116 | .desc = "Record", | ||
117 | .active_low = 0, | ||
118 | .wakeup = 1, | ||
119 | }, | ||
120 | { | ||
121 | .type = EV_KEY, | ||
122 | .code = KEY_STOP, | ||
123 | .gpio = (GPIO_PORTF + 13), | ||
124 | .desc = "Stop", | ||
125 | .active_low = 0, | ||
126 | .wakeup = 1, | ||
127 | } | ||
128 | }; | ||
129 | |||
130 | static struct gpio_keys_platform_data visstrim_gpio_keys_platform_data = { | ||
131 | .buttons = visstrim_gpio_keys, | ||
132 | .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), | ||
133 | }; | ||
134 | |||
135 | static struct platform_device visstrim_gpio_keys_device = { | ||
136 | .name = "gpio-keys", | ||
137 | .id = -1, | ||
138 | .dev = { | ||
139 | .platform_data = &visstrim_gpio_keys_platform_data, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | /* Visstrim_SM10 has a microSD slot connected to sdhc1 */ | ||
144 | static int visstrim_m10_sdhc1_init(struct device *dev, | ||
145 | irq_handler_t detect_irq, void *data) | ||
146 | { | ||
147 | int ret; | ||
148 | |||
149 | ret = request_irq(SDHC1_IRQ, detect_irq, IRQF_TRIGGER_FALLING, | ||
150 | "mmc-detect", data); | ||
151 | return ret; | ||
152 | } | ||
153 | |||
154 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) | ||
155 | { | ||
156 | free_irq(SDHC1_IRQ, data); | ||
157 | } | ||
158 | |||
159 | static struct imxmmc_platform_data visstrim_m10_sdhc_pdata = { | ||
160 | .init = visstrim_m10_sdhc1_init, | ||
161 | .exit = visstrim_m10_sdhc1_exit, | ||
162 | }; | ||
163 | |||
164 | /* Visstrim_SM10 NOR flash */ | ||
165 | static struct physmap_flash_data visstrim_m10_flash_data = { | ||
166 | .width = 2, | ||
167 | }; | ||
168 | |||
169 | static struct resource visstrim_m10_flash_resource = { | ||
170 | .start = 0xc0000000, | ||
171 | .end = 0xc0000000 + SZ_64M - 1, | ||
172 | .flags = IORESOURCE_MEM, | ||
173 | }; | ||
174 | |||
175 | static struct platform_device visstrim_m10_nor_mtd_device = { | ||
176 | .name = "physmap-flash", | ||
177 | .id = 0, | ||
178 | .dev = { | ||
179 | .platform_data = &visstrim_m10_flash_data, | ||
180 | }, | ||
181 | .num_resources = 1, | ||
182 | .resource = &visstrim_m10_flash_resource, | ||
183 | }; | ||
184 | |||
185 | static struct platform_device *platform_devices[] __initdata = { | ||
186 | &visstrim_gpio_keys_device, | ||
187 | &visstrim_m10_nor_mtd_device, | ||
188 | }; | ||
189 | |||
190 | /* Visstrim_M10 uses UART0 as console */ | ||
191 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
192 | .flags = IMXUART_HAVE_RTSCTS, | ||
193 | }; | ||
194 | |||
195 | /* I2C */ | ||
196 | static const struct imxi2c_platform_data visstrim_m10_i2c_data __initconst = { | ||
197 | .bitrate = 100000, | ||
198 | }; | ||
199 | |||
200 | static struct pca953x_platform_data visstrim_m10_pca9555_pdata = { | ||
201 | .gpio_base = 240, /* After MX27 internal GPIOs */ | ||
202 | .invert = 0, | ||
203 | }; | ||
204 | |||
205 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { | ||
206 | { | ||
207 | I2C_BOARD_INFO("pca9555", 0x20), | ||
208 | .platform_data = &visstrim_m10_pca9555_pdata, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | /* USB OTG */ | ||
213 | static int otg_phy_init(struct platform_device *pdev) | ||
214 | { | ||
215 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static struct mxc_usbh_platform_data visstrim_m10_usbotg_pdata = { | ||
220 | .init = otg_phy_init, | ||
221 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
222 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | ||
223 | }; | ||
224 | |||
225 | static void __init visstrim_m10_board_init(void) | ||
226 | { | ||
227 | int ret; | ||
228 | |||
229 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, | ||
230 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); | ||
231 | if (ret) | ||
232 | pr_err("Failed to setup pins (%d)\n", ret); | ||
233 | |||
234 | imx27_add_imx_uart0(&uart_pdata); | ||
235 | |||
236 | i2c_register_board_info(0, visstrim_m10_i2c_devices, | ||
237 | ARRAY_SIZE(visstrim_m10_i2c_devices)); | ||
238 | imx27_add_imx_i2c(0, &visstrim_m10_i2c_data); | ||
239 | imx27_add_imx_i2c(1, &visstrim_m10_i2c_data); | ||
240 | mxc_register_device(&mxc_sdhc_device0, &visstrim_m10_sdhc_pdata); | ||
241 | mxc_register_device(&mxc_otg_host, &visstrim_m10_usbotg_pdata); | ||
242 | imx27_add_fec(NULL); | ||
243 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
244 | } | ||
245 | |||
246 | static void __init visstrim_m10_timer_init(void) | ||
247 | { | ||
248 | mx27_clocks_init((unsigned long)25000000); | ||
249 | } | ||
250 | |||
251 | static struct sys_timer visstrim_m10_timer = { | ||
252 | .init = visstrim_m10_timer_init, | ||
253 | }; | ||
254 | |||
255 | MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | ||
256 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
257 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
258 | .boot_params = MX27_PHYS_OFFSET + 0x100, | ||
259 | .map_io = mx27_map_io, | ||
260 | .init_irq = mx27_init_irq, | ||
261 | .init_machine = visstrim_m10_board_init, | ||
262 | .timer = &visstrim_m10_timer, | ||
263 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 22a2b5d91213..60d4d0ac4939 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "devices-imx27.h" | 27 | #include "devices-imx27.h" |
28 | #include "devices.h" | 28 | #include "devices.h" |
29 | 29 | ||
30 | static unsigned int mx27lite_pins[] = { | 30 | static const int mx27lite_pins[] __initconst = { |
31 | /* UART1 */ | 31 | /* UART1 */ |
32 | PE12_PF_UART1_TXD, | 32 | PE12_PF_UART1_TXD, |
33 | PE13_PF_UART1_RXD, | 33 | PE13_PF_UART1_RXD, |
@@ -58,16 +58,12 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
58 | .flags = IMXUART_HAVE_RTSCTS, | 58 | .flags = IMXUART_HAVE_RTSCTS, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct platform_device *platform_devices[] __initdata = { | ||
62 | &mxc_fec_device, | ||
63 | }; | ||
64 | |||
65 | static void __init mx27lite_init(void) | 61 | static void __init mx27lite_init(void) |
66 | { | 62 | { |
67 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | 63 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), |
68 | "imx27lite"); | 64 | "imx27lite"); |
69 | imx27_add_imx_uart0(&uart_pdata); | 65 | imx27_add_imx_uart0(&uart_pdata); |
70 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 66 | imx27_add_fec(NULL); |
71 | } | 67 | } |
72 | 68 | ||
73 | static void __init mx27lite_timer_init(void) | 69 | static void __init mx27lite_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 77a760cfadc0..85e2877572b5 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "devices-imx1.h" | 32 | #include "devices-imx1.h" |
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | static int mx1ads_pins[] = { | 35 | static const int mx1ads_pins[] __initconst = { |
36 | /* UART1 */ | 36 | /* UART1 */ |
37 | PC9_PF_UART1_CTS, | 37 | PC9_PF_UART1_CTS, |
38 | PC10_PF_UART1_RTS, | 38 | PC10_PF_UART1_RTS, |
@@ -131,7 +131,7 @@ static void __init mx1ads_init(void) | |||
131 | i2c_register_board_info(0, mx1ads_i2c_devices, | 131 | i2c_register_board_info(0, mx1ads_i2c_devices, |
132 | ARRAY_SIZE(mx1ads_i2c_devices)); | 132 | ARRAY_SIZE(mx1ads_i2c_devices)); |
133 | 133 | ||
134 | imx1_add_i2c_imx(&mx1ads_i2c_data); | 134 | imx1_add_imx_i2c(&mx1ads_i2c_data); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void __init mx1ads_timer_init(void) | 137 | static void __init mx1ads_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 96d7f8189f32..7f021e6f6acd 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #define MX21ADS_IO_LED4_ON 0x4000 | 67 | #define MX21ADS_IO_LED4_ON 0x4000 |
68 | #define MX21ADS_IO_LED3_ON 0x8000 | 68 | #define MX21ADS_IO_LED3_ON 0x8000 |
69 | 69 | ||
70 | static unsigned int mx21ads_pins[] = { | 70 | static const int mx21ads_pins[] __initconst = { |
71 | 71 | ||
72 | /* CS8900A */ | 72 | /* CS8900A */ |
73 | (GPIO_PORTE | GPIO_GPIO | GPIO_IN | 11), | 73 | (GPIO_PORTE | GPIO_GPIO | GPIO_IN | 11), |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index e66ffaa1c26c..a69dba252658 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "devices-imx27.h" | 33 | #include "devices-imx27.h" |
34 | #include "devices.h" | 34 | #include "devices.h" |
35 | 35 | ||
36 | static unsigned int mx27pdk_pins[] = { | 36 | static const int mx27pdk_pins[] __initconst = { |
37 | /* UART1 */ | 37 | /* UART1 */ |
38 | PE12_PF_UART1_TXD, | 38 | PE12_PF_UART1_TXD, |
39 | PE13_PF_UART1_RXD, | 39 | PE13_PF_UART1_RXD, |
@@ -64,10 +64,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
64 | .flags = IMXUART_HAVE_RTSCTS, | 64 | .flags = IMXUART_HAVE_RTSCTS, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | static struct platform_device *platform_devices[] __initdata = { | ||
68 | &mxc_fec_device, | ||
69 | }; | ||
70 | |||
71 | /* | 67 | /* |
72 | * Matrix keyboard | 68 | * Matrix keyboard |
73 | */ | 69 | */ |
@@ -94,7 +90,7 @@ static void __init mx27pdk_init(void) | |||
94 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 90 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
95 | "mx27pdk"); | 91 | "mx27pdk"); |
96 | imx27_add_imx_uart0(&uart_pdata); | 92 | imx27_add_imx_uart0(&uart_pdata); |
97 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 93 | imx27_add_fec(NULL); |
98 | mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); | 94 | mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); |
99 | } | 95 | } |
100 | 96 | ||
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 9c77da98a10e..ffb39a42f240 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -66,7 +66,7 @@ | |||
66 | /* to determine the correct external crystal reference */ | 66 | /* to determine the correct external crystal reference */ |
67 | #define CKIH_27MHZ_BIT_SET (1 << 3) | 67 | #define CKIH_27MHZ_BIT_SET (1 << 3) |
68 | 68 | ||
69 | static unsigned int mx27ads_pins[] = { | 69 | static const int mx27ads_pins[] __initconst = { |
70 | /* UART0 */ | 70 | /* UART0 */ |
71 | PE12_PF_UART1_TXD, | 71 | PE12_PF_UART1_TXD, |
72 | PE13_PF_UART1_RXD, | 72 | PE13_PF_UART1_RXD, |
@@ -284,7 +284,6 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
284 | 284 | ||
285 | static struct platform_device *platform_devices[] __initdata = { | 285 | static struct platform_device *platform_devices[] __initdata = { |
286 | &mx27ads_nor_mtd_device, | 286 | &mx27ads_nor_mtd_device, |
287 | &mxc_fec_device, | ||
288 | &mxc_w1_master_device, | 287 | &mxc_w1_master_device, |
289 | }; | 288 | }; |
290 | 289 | ||
@@ -308,11 +307,12 @@ static void __init mx27ads_board_init(void) | |||
308 | /* only the i2c master 1 is used on this CPU card */ | 307 | /* only the i2c master 1 is used on this CPU card */ |
309 | i2c_register_board_info(1, mx27ads_i2c_devices, | 308 | i2c_register_board_info(1, mx27ads_i2c_devices, |
310 | ARRAY_SIZE(mx27ads_i2c_devices)); | 309 | ARRAY_SIZE(mx27ads_i2c_devices)); |
311 | imx27_add_i2c_imx1(&mx27ads_i2c1_data); | 310 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); |
312 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); | 311 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); |
313 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 312 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
314 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); | 313 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); |
315 | 314 | ||
315 | imx27_add_fec(NULL); | ||
316 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 316 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
317 | } | 317 | } |
318 | 318 | ||
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index a3a1e452d4c5..f4c397dec794 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "devices-imx27.h" | 37 | #include "devices-imx27.h" |
38 | #include "devices.h" | 38 | #include "devices.h" |
39 | 39 | ||
40 | static unsigned int mxt_td60_pins[] __initdata = { | 40 | static const int mxt_td60_pins[] __initconst = { |
41 | /* UART0 */ | 41 | /* UART0 */ |
42 | PE12_PF_UART1_TXD, | 42 | PE12_PF_UART1_TXD, |
43 | PE13_PF_UART1_RXD, | 43 | PE13_PF_UART1_RXD, |
@@ -231,10 +231,6 @@ static struct imxmmc_platform_data sdhc1_pdata = { | |||
231 | .exit = mxt_td60_sdhc1_exit, | 231 | .exit = mxt_td60_sdhc1_exit, |
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct platform_device *platform_devices[] __initdata = { | ||
235 | &mxc_fec_device, | ||
236 | }; | ||
237 | |||
238 | static const struct imxuart_platform_data uart_pdata __initconst = { | 234 | static const struct imxuart_platform_data uart_pdata __initconst = { |
239 | .flags = IMXUART_HAVE_RTSCTS, | 235 | .flags = IMXUART_HAVE_RTSCTS, |
240 | }; | 236 | }; |
@@ -255,12 +251,11 @@ static void __init mxt_td60_board_init(void) | |||
255 | i2c_register_board_info(1, mxt_td60_i2c2_devices, | 251 | i2c_register_board_info(1, mxt_td60_i2c2_devices, |
256 | ARRAY_SIZE(mxt_td60_i2c2_devices)); | 252 | ARRAY_SIZE(mxt_td60_i2c2_devices)); |
257 | 253 | ||
258 | imx27_add_i2c_imx0(&mxt_td60_i2c0_data); | 254 | imx27_add_imx_i2c(0, &mxt_td60_i2c0_data); |
259 | imx27_add_i2c_imx1(&mxt_td60_i2c1_data); | 255 | imx27_add_imx_i2c(1, &mxt_td60_i2c1_data); |
260 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); | 256 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); |
261 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 257 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
262 | 258 | imx27_add_fec(NULL); | |
263 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
264 | } | 259 | } |
265 | 260 | ||
266 | static void __init mxt_td60_timer_init(void) | 261 | static void __init mxt_td60_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 23c9e1f37b9c..223c31c48db6 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
40 | #include <mach/audmux.h> | 40 | #include <mach/audmux.h> |
41 | #include <mach/ssi.h> | ||
42 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
43 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
44 | #include <mach/mmc.h> | 43 | #include <mach/mmc.h> |
@@ -55,7 +54,7 @@ | |||
55 | #define SPI1_SS1 (GPIO_PORTD + 27) | 54 | #define SPI1_SS1 (GPIO_PORTD + 27) |
56 | #define SD2_CD (GPIO_PORTC + 29) | 55 | #define SD2_CD (GPIO_PORTC + 29) |
57 | 56 | ||
58 | static int pca100_pins[] = { | 57 | static const int pca100_pins[] __initconst = { |
59 | /* UART1 */ | 58 | /* UART1 */ |
60 | PE12_PF_UART1_TXD, | 59 | PE12_PF_UART1_TXD, |
61 | PE13_PF_UART1_RXD, | 60 | PE13_PF_UART1_RXD, |
@@ -174,7 +173,6 @@ pca100_nand_board_info __initconst = { | |||
174 | 173 | ||
175 | static struct platform_device *platform_devices[] __initdata = { | 174 | static struct platform_device *platform_devices[] __initdata = { |
176 | &mxc_w1_master_device, | 175 | &mxc_w1_master_device, |
177 | &mxc_fec_device, | ||
178 | &mxc_wdt, | 176 | &mxc_wdt, |
179 | }; | 177 | }; |
180 | 178 | ||
@@ -193,11 +191,9 @@ static struct i2c_board_info pca100_i2c_devices[] = { | |||
193 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | 191 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ |
194 | .platform_data = &board_eeprom, | 192 | .platform_data = &board_eeprom, |
195 | }, { | 193 | }, { |
196 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | 194 | I2C_BOARD_INFO("pcf8563", 0x51), |
197 | .type = "pcf8563" | ||
198 | }, { | 195 | }, { |
199 | I2C_BOARD_INFO("lm75", 0x4a), | 196 | I2C_BOARD_INFO("lm75", 0x4a), |
200 | .type = "lm75" | ||
201 | } | 197 | } |
202 | }; | 198 | }; |
203 | 199 | ||
@@ -252,7 +248,7 @@ static void pca100_ac97_cold_reset(struct snd_ac97 *ac97) | |||
252 | msleep(2); | 248 | msleep(2); |
253 | } | 249 | } |
254 | 250 | ||
255 | static struct imx_ssi_platform_data pca100_ssi_pdata = { | 251 | static const struct imx_ssi_platform_data pca100_ssi_pdata __initconst = { |
256 | .ac97_reset = pca100_ac97_cold_reset, | 252 | .ac97_reset = pca100_ac97_cold_reset, |
257 | .ac97_warm_reset = pca100_ac97_warm_reset, | 253 | .ac97_warm_reset = pca100_ac97_warm_reset, |
258 | .flags = IMX_SSI_USE_AC97, | 254 | .flags = IMX_SSI_USE_AC97, |
@@ -389,7 +385,7 @@ static void __init pca100_init(void) | |||
389 | if (ret) | 385 | if (ret) |
390 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); | 386 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); |
391 | 387 | ||
392 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); | 388 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); |
393 | 389 | ||
394 | imx27_add_imx_uart0(&uart_pdata); | 390 | imx27_add_imx_uart0(&uart_pdata); |
395 | 391 | ||
@@ -401,7 +397,7 @@ static void __init pca100_init(void) | |||
401 | i2c_register_board_info(1, pca100_i2c_devices, | 397 | i2c_register_board_info(1, pca100_i2c_devices, |
402 | ARRAY_SIZE(pca100_i2c_devices)); | 398 | ARRAY_SIZE(pca100_i2c_devices)); |
403 | 399 | ||
404 | imx27_add_i2c_imx1(&pca100_i2c1_data); | 400 | imx27_add_imx_i2c(1, &pca100_i2c1_data); |
405 | 401 | ||
406 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 402 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
407 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN); | 403 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN); |
@@ -436,6 +432,7 @@ static void __init pca100_init(void) | |||
436 | 432 | ||
437 | mxc_register_device(&mxc_fb_device, &pca100_fb_data); | 433 | mxc_register_device(&mxc_fb_device, &pca100_fb_data); |
438 | 434 | ||
435 | imx27_add_fec(NULL); | ||
439 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 436 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
440 | } | 437 | } |
441 | 438 | ||
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 9212e8f37001..b9888a8defc1 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
44 | #include "devices.h" | 44 | #include "devices.h" |
45 | 45 | ||
46 | static int pcm038_pins[] = { | 46 | static const int pcm038_pins[] __initconst = { |
47 | /* UART1 */ | 47 | /* UART1 */ |
48 | PE12_PF_UART1_TXD, | 48 | PE12_PF_UART1_TXD, |
49 | PE13_PF_UART1_RXD, | 49 | PE13_PF_UART1_RXD, |
@@ -173,7 +173,6 @@ pcm038_nand_board_info __initconst = { | |||
173 | static struct platform_device *platform_devices[] __initdata = { | 173 | static struct platform_device *platform_devices[] __initdata = { |
174 | &pcm038_nor_mtd_device, | 174 | &pcm038_nor_mtd_device, |
175 | &mxc_w1_master_device, | 175 | &mxc_w1_master_device, |
176 | &mxc_fec_device, | ||
177 | &pcm038_sram_mtd_device, | 176 | &pcm038_sram_mtd_device, |
178 | &mxc_wdt, | 177 | &mxc_wdt, |
179 | }; | 178 | }; |
@@ -257,7 +256,7 @@ static struct regulator_init_data cam_data = { | |||
257 | .consumer_supplies = cam_consumers, | 256 | .consumer_supplies = cam_consumers, |
258 | }; | 257 | }; |
259 | 258 | ||
260 | struct mc13783_regulator_init_data pcm038_regulators[] = { | 259 | static struct mc13783_regulator_init_data pcm038_regulators[] = { |
261 | { | 260 | { |
262 | .id = MC13783_REGU_VCAM, | 261 | .id = MC13783_REGU_VCAM, |
263 | .init_data = &cam_data, | 262 | .init_data = &cam_data, |
@@ -309,7 +308,7 @@ static void __init pcm038_init(void) | |||
309 | i2c_register_board_info(1, pcm038_i2c_devices, | 308 | i2c_register_board_info(1, pcm038_i2c_devices, |
310 | ARRAY_SIZE(pcm038_i2c_devices)); | 309 | ARRAY_SIZE(pcm038_i2c_devices)); |
311 | 310 | ||
312 | imx27_add_i2c_imx1(&pcm038_i2c1_data); | 311 | imx27_add_imx_i2c(1, &pcm038_i2c1_data); |
313 | 312 | ||
314 | /* PE18 for user-LED D40 */ | 313 | /* PE18 for user-LED D40 */ |
315 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); | 314 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); |
@@ -325,6 +324,7 @@ static void __init pcm038_init(void) | |||
325 | 324 | ||
326 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 325 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); |
327 | 326 | ||
327 | imx27_add_fec(NULL); | ||
328 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 328 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
329 | 329 | ||
330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 88bf0d1e26e6..fb2e5f3d37f6 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -95,7 +95,7 @@ static struct platform_device dm9000x_device = { | |||
95 | } | 95 | } |
96 | }; | 96 | }; |
97 | 97 | ||
98 | static int mxc_uart1_pins[] = { | 98 | static const int mxc_uart1_pins[] = { |
99 | PC9_PF_UART1_CTS, | 99 | PC9_PF_UART1_CTS, |
100 | PC10_PF_UART1_RTS, | 100 | PC10_PF_UART1_RTS, |
101 | PC11_PF_UART1_TXD, | 101 | PC11_PF_UART1_TXD, |
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index f490a406d57e..9110d9cca7a2 100644 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #include "devices.h" | 32 | #include "devices.h" |
33 | 33 | ||
34 | static int pcm970_pins[] = { | 34 | static const int pcm970_pins[] __initconst = { |
35 | /* SDHC */ | 35 | /* SDHC */ |
36 | PB4_PF_SD2_D0, | 36 | PB4_PF_SD2_D0, |
37 | PB5_PF_SD2_D1, | 37 | PB5_PF_SD2_D1, |
@@ -200,7 +200,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
200 | }, | 200 | }, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct sja1000_platform_data pcm970_sja1000_platform_data = { | 203 | static struct sja1000_platform_data pcm970_sja1000_platform_data = { |
204 | .osc_freq = 16000000, | 204 | .osc_freq = 16000000, |
205 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, | 205 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, |
206 | .cdr = CDR_CBP, | 206 | .cdr = CDR_CBP, |
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig index c71a7bc19284..aa57e35ce3cd 100644 --- a/arch/arm/mach-mx25/Kconfig +++ b/arch/arm/mach-mx25/Kconfig | |||
@@ -12,6 +12,8 @@ config MACH_EUKREA_CPUIMX25 | |||
12 | select IMX_HAVE_PLATFORM_IMX_I2C | 12 | select IMX_HAVE_PLATFORM_IMX_I2C |
13 | select IMX_HAVE_PLATFORM_IMX_UART | 13 | select IMX_HAVE_PLATFORM_IMX_UART |
14 | select IMX_HAVE_PLATFORM_MXC_NAND | 14 | select IMX_HAVE_PLATFORM_MXC_NAND |
15 | select IMX_HAVE_PLATFORM_FLEXCAN | ||
16 | select IMX_HAVE_PLATFORM_ESDHC | ||
15 | select MXC_ULPI if USB_ULPI | 17 | select MXC_ULPI if USB_ULPI |
16 | 18 | ||
17 | choice | 19 | choice |
@@ -20,8 +22,8 @@ choice | |||
20 | default MACH_EUKREA_MBIMXSD25_BASEBOARD | 22 | default MACH_EUKREA_MBIMXSD25_BASEBOARD |
21 | 23 | ||
22 | config MACH_EUKREA_MBIMXSD25_BASEBOARD | 24 | config MACH_EUKREA_MBIMXSD25_BASEBOARD |
23 | prompt "Eukrea MBIMXSD development board" | 25 | bool "Eukrea MBIMXSD development board" |
24 | bool | 26 | select IMX_HAVE_PLATFORM_IMX_SSI |
25 | help | 27 | help |
26 | This adds board specific devices that can be found on Eukrea's | 28 | This adds board specific devices that can be found on Eukrea's |
27 | MBIMXSD evaluation board. | 29 | MBIMXSD evaluation board. |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 40c7cc41cee3..2179713873c2 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -139,6 +139,16 @@ static unsigned long get_rate_lcdc(struct clk *clk) | |||
139 | return get_rate_per(7); | 139 | return get_rate_per(7); |
140 | } | 140 | } |
141 | 141 | ||
142 | static unsigned long get_rate_esdhc1(struct clk *clk) | ||
143 | { | ||
144 | return get_rate_per(3); | ||
145 | } | ||
146 | |||
147 | static unsigned long get_rate_esdhc2(struct clk *clk) | ||
148 | { | ||
149 | return get_rate_per(4); | ||
150 | } | ||
151 | |||
142 | static unsigned long get_rate_csi(struct clk *clk) | 152 | static unsigned long get_rate_csi(struct clk *clk) |
143 | { | 153 | { |
144 | return get_rate_per(0); | 154 | return get_rate_per(0); |
@@ -213,6 +223,12 @@ DEFINE_CLOCK(ssi2_per_clk, 0, CCM_CGCR0, 14, get_rate_ipg, NULL, NULL); | |||
213 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); | 223 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); |
214 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); | 224 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
215 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); | 225 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
226 | DEFINE_CLOCK(esdhc1_ahb_clk, 0, CCM_CGCR0, 21, get_rate_esdhc1, NULL, NULL); | ||
227 | DEFINE_CLOCK(esdhc1_per_clk, 0, CCM_CGCR0, 3, get_rate_esdhc1, NULL, | ||
228 | &esdhc1_ahb_clk); | ||
229 | DEFINE_CLOCK(esdhc2_ahb_clk, 0, CCM_CGCR0, 22, get_rate_esdhc2, NULL, NULL); | ||
230 | DEFINE_CLOCK(esdhc2_per_clk, 0, CCM_CGCR0, 4, get_rate_esdhc2, NULL, | ||
231 | &esdhc2_ahb_clk); | ||
216 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); | 232 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); |
217 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); | 233 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); |
218 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); | 234 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); |
@@ -238,6 +254,10 @@ DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); | |||
238 | DEFINE_CLOCK(wdt_clk, 0, CCM_CGCR2, 19, get_rate_ipg, NULL, NULL); | 254 | DEFINE_CLOCK(wdt_clk, 0, CCM_CGCR2, 19, get_rate_ipg, NULL, NULL); |
239 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk); | 255 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk); |
240 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk); | 256 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk); |
257 | DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGCR1, 13, get_rate_esdhc1, NULL, | ||
258 | &esdhc1_per_clk); | ||
259 | DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGCR1, 14, get_rate_esdhc2, NULL, | ||
260 | &esdhc2_per_clk); | ||
241 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL); | 261 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL); |
242 | DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); | 262 | DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); |
243 | DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); | 263 | DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); |
@@ -261,9 +281,9 @@ static struct clk_lookup lookups[] = { | |||
261 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) | 281 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) |
262 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) | 282 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) |
263 | _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) | 283 | _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) |
264 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 284 | _REGISTER_CLOCK("imx25-cspi.0", NULL, cspi1_clk) |
265 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 285 | _REGISTER_CLOCK("imx25-cspi.1", NULL, cspi2_clk) |
266 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) | 286 | _REGISTER_CLOCK("imx25-cspi.2", NULL, cspi3_clk) |
267 | _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk) | 287 | _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk) |
268 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) | 288 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) |
269 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) | 289 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) |
@@ -279,6 +299,8 @@ static struct clk_lookup lookups[] = { | |||
279 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) | 299 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) |
280 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | 300 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) |
281 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | 301 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) |
302 | _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk) | ||
303 | _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk) | ||
282 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) | 304 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) |
283 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | 305 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) |
284 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) | 306 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) |
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h index d86a7c3ca8b0..733aaee5bae8 100644 --- a/arch/arm/mach-mx25/devices-imx25.h +++ b/arch/arm/mach-mx25/devices-imx25.h | |||
@@ -9,35 +9,47 @@ | |||
9 | #include <mach/mx25.h> | 9 | #include <mach/mx25.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | extern const struct imx_fec_data imx25_fec_data __initconst; | ||
13 | #define imx25_add_fec(pdata) \ | ||
14 | imx_add_fec(&imx25_fec_data, pdata) | ||
15 | |||
12 | #define imx25_add_flexcan0(pdata) \ | 16 | #define imx25_add_flexcan0(pdata) \ |
13 | imx_add_flexcan(0, MX25_CAN1_BASE_ADDR, SZ_16K, MX25_INT_CAN1, pdata) | 17 | imx_add_flexcan(0, MX25_CAN1_BASE_ADDR, SZ_16K, MX25_INT_CAN1, pdata) |
14 | #define imx25_add_flexcan1(pdata) \ | 18 | #define imx25_add_flexcan1(pdata) \ |
15 | imx_add_flexcan(1, MX25_CAN2_BASE_ADDR, SZ_16K, MX25_INT_CAN2, pdata) | 19 | imx_add_flexcan(1, MX25_CAN2_BASE_ADDR, SZ_16K, MX25_INT_CAN2, pdata) |
16 | 20 | ||
17 | #define imx25_add_imx_i2c0(pdata) \ | 21 | extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst; |
18 | imx_add_imx_i2c(0, MX25_I2C1_BASE_ADDR, SZ_16K, MX25_INT_I2C1, pdata) | 22 | #define imx25_add_imx_i2c(id, pdata) \ |
19 | #define imx25_add_imx_i2c1(pdata) \ | 23 | imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata) |
20 | imx_add_imx_i2c(1, MX25_I2C2_BASE_ADDR, SZ_16K, MX25_INT_I2C2, pdata) | 24 | #define imx25_add_imx_i2c0(pdata) imx25_add_imx_i2c(0, pdata) |
21 | #define imx25_add_imx_i2c2(pdata) \ | 25 | #define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata) |
22 | imx_add_imx_i2c(2, MX25_I2C3_BASE_ADDR, SZ_16K, MX25_INT_I2C3, pdata) | 26 | #define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata) |
23 | 27 | ||
24 | #define imx25_add_imx_uart0(pdata) \ | 28 | extern const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst; |
25 | imx_add_imx_uart_1irq(0, MX25_UART1_BASE_ADDR, SZ_16K, MX25_INT_UART1, pdata) | 29 | #define imx25_add_imx_ssi(id, pdata) \ |
26 | #define imx25_add_imx_uart1(pdata) \ | 30 | imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata) |
27 | imx_add_imx_uart_1irq(1, MX25_UART2_BASE_ADDR, SZ_16K, MX25_INT_UART2, pdata) | 31 | |
28 | #define imx25_add_imx_uart2(pdata) \ | 32 | extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst; |
29 | imx_add_imx_uart_1irq(2, MX25_UART3_BASE_ADDR, SZ_16K, MX25_INT_UART3, pdata) | 33 | #define imx25_add_imx_uart(id, pdata) \ |
30 | #define imx25_add_imx_uart3(pdata) \ | 34 | imx_add_imx_uart_1irq(&imx25_imx_uart_data[id], pdata) |
31 | imx_add_imx_uart_1irq(3, MX25_UART4_BASE_ADDR, SZ_16K, MX25_INT_UART4, pdata) | 35 | #define imx25_add_imx_uart0(pdata) imx25_add_imx_uart(0, pdata) |
32 | #define imx25_add_imx_uart4(pdata) \ | 36 | #define imx25_add_imx_uart1(pdata) imx25_add_imx_uart(1, pdata) |
33 | imx_add_imx_uart_1irq(4, MX25_UART5_BASE_ADDR, SZ_16K, MX25_INT_UART5, pdata) | 37 | #define imx25_add_imx_uart2(pdata) imx25_add_imx_uart(2, pdata) |
38 | #define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata) | ||
39 | #define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata) | ||
34 | 40 | ||
41 | extern const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst; | ||
35 | #define imx25_add_mxc_nand(pdata) \ | 42 | #define imx25_add_mxc_nand(pdata) \ |
36 | imx_add_mxc_nand_v21(MX25_NFC_BASE_ADDR, MX25_INT_NANDFC, pdata) | 43 | imx_add_mxc_nand(&imx25_mxc_nand_data, pdata) |
37 | 44 | ||
38 | #define imx25_add_spi_imx0(pdata) \ | 45 | extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst; |
39 | imx_add_spi_imx(0, MX25_CSPI1_BASE_ADDR, SZ_16K, MX25_INT_CSPI1, pdata) | 46 | #define imx25_add_spi_imx(id, pdata) \ |
40 | #define imx25_add_spi_imx1(pdata) \ | 47 | imx_add_spi_imx(&imx25_spi_imx_data[id], pdata) |
41 | imx_add_spi_imx(1, MX25_CSPI2_BASE_ADDR, SZ_16K, MX25_INT_CSPI2, pdata) | 48 | #define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata) |
42 | #define imx25_add_spi_imx2(pdata) \ | 49 | #define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata) |
43 | imx_add_spi_imx(2, MX25_CSPI3_BASE_ADDR, SZ_16K, MX25_INT_CSPI3, pdata) | 50 | #define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata) |
51 | |||
52 | #define imx25_add_esdhc0(pdata) \ | ||
53 | imx_add_esdhc(0, MX25_ESDHC1_BASE_ADDR, SZ_16K, MX25_INT_MMC_SDHC1, pdata) | ||
54 | #define imx25_add_esdhc1(pdata) \ | ||
55 | imx_add_esdhc(1, MX25_ESDHC2_BASE_ADDR, SZ_16K, MX25_INT_MMC_SDHC2, pdata) | ||
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 3468eb15b236..1d0eb3e85941 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -208,26 +208,6 @@ int __init imx25_register_gpios(void) | |||
208 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 208 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
209 | } | 209 | } |
210 | 210 | ||
211 | static struct resource mx25_fec_resources[] = { | ||
212 | { | ||
213 | .start = MX25_FEC_BASE_ADDR, | ||
214 | .end = MX25_FEC_BASE_ADDR + 0xfff, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
217 | { | ||
218 | .start = MX25_INT_FEC, | ||
219 | .end = MX25_INT_FEC, | ||
220 | .flags = IORESOURCE_IRQ, | ||
221 | }, | ||
222 | }; | ||
223 | |||
224 | struct platform_device mx25_fec_device = { | ||
225 | .name = "fec", | ||
226 | .id = 0, | ||
227 | .num_resources = ARRAY_SIZE(mx25_fec_resources), | ||
228 | .resource = mx25_fec_resources, | ||
229 | }; | ||
230 | |||
231 | static struct resource mx25_rtc_resources[] = { | 211 | static struct resource mx25_rtc_resources[] = { |
232 | { | 212 | { |
233 | .start = MX25_DRYICE_BASE_ADDR, | 213 | .start = MX25_DRYICE_BASE_ADDR, |
@@ -305,44 +285,6 @@ struct platform_device mx25_kpp_device = { | |||
305 | .resource = mx25_kpp_resources, | 285 | .resource = mx25_kpp_resources, |
306 | }; | 286 | }; |
307 | 287 | ||
308 | static struct resource imx_ssi_resources0[] = { | ||
309 | { | ||
310 | .start = MX25_SSI1_BASE_ADDR, | ||
311 | .end = MX25_SSI1_BASE_ADDR + 0x3fff, | ||
312 | .flags = IORESOURCE_MEM, | ||
313 | }, { | ||
314 | .start = MX25_INT_SSI1, | ||
315 | .end = MX25_INT_SSI1, | ||
316 | .flags = IORESOURCE_IRQ, | ||
317 | }, | ||
318 | }; | ||
319 | |||
320 | static struct resource imx_ssi_resources1[] = { | ||
321 | { | ||
322 | .start = MX25_SSI2_BASE_ADDR, | ||
323 | .end = MX25_SSI2_BASE_ADDR + 0x3fff, | ||
324 | .flags = IORESOURCE_MEM | ||
325 | }, { | ||
326 | .start = MX25_INT_SSI2, | ||
327 | .end = MX25_INT_SSI2, | ||
328 | .flags = IORESOURCE_IRQ, | ||
329 | }, | ||
330 | }; | ||
331 | |||
332 | struct platform_device imx_ssi_device0 = { | ||
333 | .name = "imx-ssi", | ||
334 | .id = 0, | ||
335 | .num_resources = ARRAY_SIZE(imx_ssi_resources0), | ||
336 | .resource = imx_ssi_resources0, | ||
337 | }; | ||
338 | |||
339 | struct platform_device imx_ssi_device1 = { | ||
340 | .name = "imx-ssi", | ||
341 | .id = 1, | ||
342 | .num_resources = ARRAY_SIZE(imx_ssi_resources1), | ||
343 | .resource = imx_ssi_resources1, | ||
344 | }; | ||
345 | |||
346 | static struct resource mx25_csi_resources[] = { | 288 | static struct resource mx25_csi_resources[] = { |
347 | { | 289 | { |
348 | .start = MX25_CSI_BASE_ADDR, | 290 | .start = MX25_CSI_BASE_ADDR, |
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index 4aceb68e35a7..7b70a43c3a4b 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -6,11 +6,8 @@ extern struct platform_device mxc_pwm_device1; | |||
6 | extern struct platform_device mxc_pwm_device2; | 6 | extern struct platform_device mxc_pwm_device2; |
7 | extern struct platform_device mxc_pwm_device3; | 7 | extern struct platform_device mxc_pwm_device3; |
8 | extern struct platform_device mxc_keypad_device; | 8 | extern struct platform_device mxc_keypad_device; |
9 | extern struct platform_device mx25_fec_device; | ||
10 | extern struct platform_device mx25_rtc_device; | 9 | extern struct platform_device mx25_rtc_device; |
11 | extern struct platform_device mx25_fb_device; | 10 | extern struct platform_device mx25_fb_device; |
12 | extern struct platform_device mxc_wdt; | 11 | extern struct platform_device mxc_wdt; |
13 | extern struct platform_device mx25_kpp_device; | 12 | extern struct platform_device mx25_kpp_device; |
14 | extern struct platform_device imx_ssi_device0; | ||
15 | extern struct platform_device imx_ssi_device1; | ||
16 | extern struct platform_device mx25_csi_device; | 13 | extern struct platform_device mx25_csi_device; |
diff --git a/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c index 4aaadc753d3e..c1fe048c445e 100644 --- a/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <mach/mx25.h> | 34 | #include <mach/mx25.h> |
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/imxfb.h> | 36 | #include <mach/imxfb.h> |
37 | #include <mach/ssi.h> | ||
38 | #include <mach/audmux.h> | 37 | #include <mach/audmux.h> |
39 | 38 | ||
40 | #include "devices-imx25.h" | 39 | #include "devices-imx25.h" |
@@ -90,6 +89,9 @@ static struct pad_desc eukrea_mbimxsd_pads[] = { | |||
90 | MX25_PAD_KPP_COL2__AUD5_TXC, | 89 | MX25_PAD_KPP_COL2__AUD5_TXC, |
91 | MX25_PAD_KPP_COL1__AUD5_RXD, | 90 | MX25_PAD_KPP_COL1__AUD5_RXD, |
92 | MX25_PAD_KPP_COL0__AUD5_TXD, | 91 | MX25_PAD_KPP_COL0__AUD5_TXD, |
92 | /* CAN */ | ||
93 | MX25_PAD_GPIO_D__CAN2_RX, | ||
94 | MX25_PAD_GPIO_C__CAN2_TX, | ||
93 | }; | 95 | }; |
94 | 96 | ||
95 | #define GPIO_LED1 83 | 97 | #define GPIO_LED1 83 |
@@ -205,7 +207,8 @@ static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = { | |||
205 | }, | 207 | }, |
206 | }; | 208 | }; |
207 | 209 | ||
208 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = { | 210 | static const |
211 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | ||
209 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 212 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
210 | }; | 213 | }; |
211 | 214 | ||
@@ -239,7 +242,10 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
239 | 242 | ||
240 | imx25_add_imx_uart1(&uart_pdata); | 243 | imx25_add_imx_uart1(&uart_pdata); |
241 | mxc_register_device(&mx25_fb_device, &eukrea_mximxsd_fb_pdata); | 244 | mxc_register_device(&mx25_fb_device, &eukrea_mximxsd_fb_pdata); |
242 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimxsd_ssi_pdata); | 245 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
246 | |||
247 | imx25_add_flexcan1(NULL); | ||
248 | imx25_add_esdhc0(NULL); | ||
243 | 249 | ||
244 | gpio_request(GPIO_LED1, "LED1"); | 250 | gpio_request(GPIO_LED1, "LED1"); |
245 | gpio_direction_output(GPIO_LED1, 1); | 251 | gpio_direction_output(GPIO_LED1, 1); |
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c index e064bb3d6919..21d9b9e9c92c 100644 --- a/arch/arm/mach-mx25/mach-cpuimx25.c +++ b/arch/arm/mach-mx25/mach-cpuimx25.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/fec.h> | ||
27 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
28 | #include <linux/usb/otg.h> | 27 | #include <linux/usb/otg.h> |
29 | #include <linux/usb/ulpi.h> | 28 | #include <linux/usb/ulpi.h> |
@@ -67,7 +66,7 @@ static struct pad_desc eukrea_cpuimx25_pads[] = { | |||
67 | MX25_PAD_I2C1_DAT__I2C1_DAT, | 66 | MX25_PAD_I2C1_DAT__I2C1_DAT, |
68 | }; | 67 | }; |
69 | 68 | ||
70 | static struct fec_platform_data mx25_fec_pdata = { | 69 | static const struct fec_platform_data mx25_fec_pdata __initconst = { |
71 | .phy = PHY_INTERFACE_MODE_RMII, | 70 | .phy = PHY_INTERFACE_MODE_RMII, |
72 | }; | 71 | }; |
73 | 72 | ||
@@ -129,7 +128,7 @@ static void __init eukrea_cpuimx25_init(void) | |||
129 | imx25_add_imx_uart0(&uart_pdata); | 128 | imx25_add_imx_uart0(&uart_pdata); |
130 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); | 129 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); |
131 | mxc_register_device(&mx25_rtc_device, NULL); | 130 | mxc_register_device(&mx25_rtc_device, NULL); |
132 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | 131 | imx25_add_fec(&mx25_fec_pdata); |
133 | 132 | ||
134 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, | 133 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, |
135 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); | 134 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); |
diff --git a/arch/arm/mach-mx25/mach-mx25_3ds.c b/arch/arm/mach-mx25/mach-mx25_3ds.c index 62bc21f11a71..bd1805698631 100644 --- a/arch/arm/mach-mx25/mach-mx25_3ds.c +++ b/arch/arm/mach-mx25/mach-mx25_3ds.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/fec.h> | ||
32 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
33 | #include <linux/input/matrix_keypad.h> | 32 | #include <linux/input/matrix_keypad.h> |
34 | 33 | ||
@@ -99,7 +98,7 @@ static struct pad_desc mx25pdk_pads[] = { | |||
99 | MX25_PAD_KPP_COL3__KPP_COL3, | 98 | MX25_PAD_KPP_COL3__KPP_COL3, |
100 | }; | 99 | }; |
101 | 100 | ||
102 | static struct fec_platform_data mx25_fec_pdata = { | 101 | static const struct fec_platform_data mx25_fec_pdata __initconst = { |
103 | .phy = PHY_INTERFACE_MODE_RMII, | 102 | .phy = PHY_INTERFACE_MODE_RMII, |
104 | }; | 103 | }; |
105 | 104 | ||
@@ -192,7 +191,7 @@ static void __init mx25pdk_init(void) | |||
192 | mxc_register_device(&mxc_wdt, NULL); | 191 | mxc_register_device(&mxc_wdt, NULL); |
193 | 192 | ||
194 | mx25pdk_fec_reset(); | 193 | mx25pdk_fec_reset(); |
195 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | 194 | imx25_add_fec(&mx25_fec_pdata); |
196 | mxc_register_device(&mx25_kpp_device, &mx25pdk_keymap_data); | 195 | mxc_register_device(&mx25_kpp_device, &mx25pdk_keymap_data); |
197 | } | 196 | } |
198 | 197 | ||
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 85beece802aa..096fd33f8ab9 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -9,6 +9,7 @@ config ARCH_MX35 | |||
9 | bool | 9 | bool |
10 | select ARCH_MXC_IOMUX_V3 | 10 | select ARCH_MXC_IOMUX_V3 |
11 | select ARCH_MXC_AUDMUX_V2 | 11 | select ARCH_MXC_AUDMUX_V2 |
12 | select HAVE_EPIT | ||
12 | 13 | ||
13 | comment "MX3 platforms:" | 14 | comment "MX3 platforms:" |
14 | 15 | ||
@@ -16,6 +17,7 @@ config MACH_MX31ADS | |||
16 | bool "Support MX31ADS platforms" | 17 | bool "Support MX31ADS platforms" |
17 | select ARCH_MX31 | 18 | select ARCH_MX31 |
18 | select IMX_HAVE_PLATFORM_IMX_I2C | 19 | select IMX_HAVE_PLATFORM_IMX_I2C |
20 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
19 | select IMX_HAVE_PLATFORM_IMX_UART | 21 | select IMX_HAVE_PLATFORM_IMX_UART |
20 | default y | 22 | default y |
21 | help | 23 | help |
@@ -117,9 +119,11 @@ config MACH_PCM043 | |||
117 | bool "Support Phytec pcm043 (i.MX35) platforms" | 119 | bool "Support Phytec pcm043 (i.MX35) platforms" |
118 | select ARCH_MX35 | 120 | select ARCH_MX35 |
119 | select IMX_HAVE_PLATFORM_IMX_I2C | 121 | select IMX_HAVE_PLATFORM_IMX_I2C |
122 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
120 | select IMX_HAVE_PLATFORM_IMX_UART | 123 | select IMX_HAVE_PLATFORM_IMX_UART |
121 | select IMX_HAVE_PLATFORM_MXC_NAND | 124 | select IMX_HAVE_PLATFORM_MXC_NAND |
122 | select IMX_HAVE_PLATFORM_FLEXCAN | 125 | select IMX_HAVE_PLATFORM_FLEXCAN |
126 | select IMX_HAVE_PLATFORM_ESDHC | ||
123 | select MXC_ULPI if USB_ULPI | 127 | select MXC_ULPI if USB_ULPI |
124 | help | 128 | help |
125 | Include support for Phytec pcm043 platform. This includes | 129 | Include support for Phytec pcm043 platform. This includes |
@@ -140,6 +144,7 @@ config MACH_MX35_3DS | |||
140 | bool "Support MX35PDK platform" | 144 | bool "Support MX35PDK platform" |
141 | select ARCH_MX35 | 145 | select ARCH_MX35 |
142 | select IMX_HAVE_PLATFORM_IMX_UART | 146 | select IMX_HAVE_PLATFORM_IMX_UART |
147 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
143 | default n | 148 | default n |
144 | help | 149 | help |
145 | Include support for MX35PDK platform. This includes specific | 150 | Include support for MX35PDK platform. This includes specific |
@@ -159,6 +164,8 @@ config MACH_EUKREA_CPUIMX35 | |||
159 | select IMX_HAVE_PLATFORM_IMX_UART | 164 | select IMX_HAVE_PLATFORM_IMX_UART |
160 | select IMX_HAVE_PLATFORM_IMX_I2C | 165 | select IMX_HAVE_PLATFORM_IMX_I2C |
161 | select IMX_HAVE_PLATFORM_MXC_NAND | 166 | select IMX_HAVE_PLATFORM_MXC_NAND |
167 | select IMX_HAVE_PLATFORM_FLEXCAN | ||
168 | select IMX_HAVE_PLATFORM_ESDHC | ||
162 | select MXC_ULPI if USB_ULPI | 169 | select MXC_ULPI if USB_ULPI |
163 | help | 170 | help |
164 | Include support for Eukrea CPUIMX35 platform. This includes | 171 | Include support for Eukrea CPUIMX35 platform. This includes |
@@ -170,8 +177,8 @@ choice | |||
170 | default MACH_EUKREA_MBIMXSD35_BASEBOARD | 177 | default MACH_EUKREA_MBIMXSD35_BASEBOARD |
171 | 178 | ||
172 | config MACH_EUKREA_MBIMXSD35_BASEBOARD | 179 | config MACH_EUKREA_MBIMXSD35_BASEBOARD |
173 | prompt "Eukrea MBIMXSD development board" | 180 | bool "Eukrea MBIMXSD development board" |
174 | bool | 181 | select IMX_HAVE_PLATFORM_IMX_SSI |
175 | help | 182 | help |
176 | This adds board specific devices that can be found on Eukrea's | 183 | This adds board specific devices that can be found on Eukrea's |
177 | MBIMXSD evaluation board. | 184 | MBIMXSD evaluation board. |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 2bd7beceb991..8a182d0a3fcf 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -7,7 +7,6 @@ | |||
7 | obj-y := mm.o devices.o cpu.o | 7 | obj-y := mm.o devices.o cpu.o |
8 | CFLAGS_mm.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | 8 | CFLAGS_mm.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS |
9 | CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | 9 | CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS |
10 | CFLAGS_cpu.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
11 | obj-$(CONFIG_ARCH_MX31) += clock-imx31.o iomux-imx31.o | 10 | obj-$(CONFIG_ARCH_MX31) += clock-imx31.o iomux-imx31.o |
12 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o | 11 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o |
13 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o | 12 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o |
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 9a9eb6de6127..109e98f323e0 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -477,7 +477,7 @@ DEFINE_CLOCK(epit1_clk, 0, MXC_CCM_CGR0, 6, NULL, NULL, &perclk_clk); | |||
477 | DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk); | 477 | DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk); |
478 | DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk); | 478 | DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk); |
479 | DEFINE_CLOCK(ata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk); | 479 | DEFINE_CLOCK(ata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk); |
480 | DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, &sdma_clk1, &ahb_clk); | 480 | DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, NULL, &ahb_clk); |
481 | DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk); | 481 | DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk); |
482 | DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk); | 482 | DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk); |
483 | DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CGR0, 20, NULL, NULL, &perclk_clk); | 483 | DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CGR0, 20, NULL, NULL, &perclk_clk); |
@@ -525,9 +525,9 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); | |||
525 | 525 | ||
526 | static struct clk_lookup lookups[] = { | 526 | static struct clk_lookup lookups[] = { |
527 | _REGISTER_CLOCK(NULL, "emi", emi_clk) | 527 | _REGISTER_CLOCK(NULL, "emi", emi_clk) |
528 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 528 | _REGISTER_CLOCK("imx31-cspi.0", NULL, cspi1_clk) |
529 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 529 | _REGISTER_CLOCK("imx31-cspi.1", NULL, cspi2_clk) |
530 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) | 530 | _REGISTER_CLOCK("imx31-cspi.2", NULL, cspi3_clk) |
531 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 531 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
532 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) | 532 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) |
533 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) | 533 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) |
@@ -564,7 +564,7 @@ static struct clk_lookup lookups[] = { | |||
564 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 564 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
565 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) | 565 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) |
566 | _REGISTER_CLOCK(NULL, "rng", rng_clk) | 566 | _REGISTER_CLOCK(NULL, "rng", rng_clk) |
567 | _REGISTER_CLOCK(NULL, "sdma_ahb", sdma_clk1) | 567 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk1) |
568 | _REGISTER_CLOCK(NULL, "sdma_ipg", sdma_clk2) | 568 | _REGISTER_CLOCK(NULL, "sdma_ipg", sdma_clk2) |
569 | _REGISTER_CLOCK(NULL, "mstick", mstick1_clk) | 569 | _REGISTER_CLOCK(NULL, "mstick", mstick1_clk) |
570 | _REGISTER_CLOCK(NULL, "mstick", mstick2_clk) | 570 | _REGISTER_CLOCK(NULL, "mstick", mstick2_clk) |
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 7a62e744a8b0..61e4a318980a 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -364,8 +364,8 @@ DEFINE_CLOCK(cspi2_clk, 1, CCM_CGR0, 12, get_rate_ipg, NULL); | |||
364 | DEFINE_CLOCK(ect_clk, 0, CCM_CGR0, 14, get_rate_ipg, NULL); | 364 | DEFINE_CLOCK(ect_clk, 0, CCM_CGR0, 14, get_rate_ipg, NULL); |
365 | DEFINE_CLOCK(edio_clk, 0, CCM_CGR0, 16, NULL, NULL); | 365 | DEFINE_CLOCK(edio_clk, 0, CCM_CGR0, 16, NULL, NULL); |
366 | DEFINE_CLOCK(emi_clk, 0, CCM_CGR0, 18, get_rate_ipg, NULL); | 366 | DEFINE_CLOCK(emi_clk, 0, CCM_CGR0, 18, get_rate_ipg, NULL); |
367 | DEFINE_CLOCK(epit1_clk, 0, CCM_CGR0, 20, get_rate_ipg_per, NULL); | 367 | DEFINE_CLOCK(epit1_clk, 0, CCM_CGR0, 20, get_rate_ipg, NULL); |
368 | DEFINE_CLOCK(epit2_clk, 1, CCM_CGR0, 22, get_rate_ipg_per, NULL); | 368 | DEFINE_CLOCK(epit2_clk, 1, CCM_CGR0, 22, get_rate_ipg, NULL); |
369 | DEFINE_CLOCK(esai_clk, 0, CCM_CGR0, 24, NULL, NULL); | 369 | DEFINE_CLOCK(esai_clk, 0, CCM_CGR0, 24, NULL, NULL); |
370 | DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGR0, 26, get_rate_sdhc, NULL); | 370 | DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGR0, 26, get_rate_sdhc, NULL); |
371 | DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGR0, 28, get_rate_sdhc, NULL); | 371 | DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGR0, 28, get_rate_sdhc, NULL); |
@@ -451,17 +451,17 @@ static struct clk_lookup lookups[] = { | |||
451 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 451 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
452 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) | 452 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) |
453 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) | 453 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) |
454 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 454 | _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk) |
455 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 455 | _REGISTER_CLOCK("imx35-cspi.1", NULL, cspi2_clk) |
456 | _REGISTER_CLOCK(NULL, "ect", ect_clk) | 456 | _REGISTER_CLOCK(NULL, "ect", ect_clk) |
457 | _REGISTER_CLOCK(NULL, "edio", edio_clk) | 457 | _REGISTER_CLOCK(NULL, "edio", edio_clk) |
458 | _REGISTER_CLOCK(NULL, "emi", emi_clk) | 458 | _REGISTER_CLOCK(NULL, "emi", emi_clk) |
459 | _REGISTER_CLOCK(NULL, "epit", epit1_clk) | 459 | _REGISTER_CLOCK("imx-epit.0", NULL, epit1_clk) |
460 | _REGISTER_CLOCK(NULL, "epit", epit2_clk) | 460 | _REGISTER_CLOCK("imx-epit.1", NULL, epit2_clk) |
461 | _REGISTER_CLOCK(NULL, "esai", esai_clk) | 461 | _REGISTER_CLOCK(NULL, "esai", esai_clk) |
462 | _REGISTER_CLOCK(NULL, "sdhc", esdhc1_clk) | 462 | _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk) |
463 | _REGISTER_CLOCK(NULL, "sdhc", esdhc2_clk) | 463 | _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk) |
464 | _REGISTER_CLOCK(NULL, "sdhc", esdhc3_clk) | 464 | _REGISTER_CLOCK("sdhci-esdhc-imx.2", NULL, esdhc3_clk) |
465 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 465 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
466 | _REGISTER_CLOCK(NULL, "gpio", gpio1_clk) | 466 | _REGISTER_CLOCK(NULL, "gpio", gpio1_clk) |
467 | _REGISTER_CLOCK(NULL, "gpio", gpio2_clk) | 467 | _REGISTER_CLOCK(NULL, "gpio", gpio2_clk) |
@@ -482,7 +482,7 @@ static struct clk_lookup lookups[] = { | |||
482 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) | 482 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) |
483 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) | 483 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) |
484 | _REGISTER_CLOCK(NULL, "scc", scc_clk) | 484 | _REGISTER_CLOCK(NULL, "scc", scc_clk) |
485 | _REGISTER_CLOCK(NULL, "sdma", sdma_clk) | 485 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk) |
486 | _REGISTER_CLOCK(NULL, "spba", spba_clk) | 486 | _REGISTER_CLOCK(NULL, "spba", spba_clk) |
487 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) | 487 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) |
488 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | 488 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) |
@@ -535,8 +535,16 @@ int __init mx35_clocks_init() | |||
535 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | 535 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); |
536 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | 536 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); |
537 | 537 | ||
538 | clk_enable(&iim_clk); | ||
539 | mx35_read_cpu_rev(); | ||
540 | |||
541 | #ifdef CONFIG_MXC_USE_EPIT | ||
542 | epit_timer_init(&epit1_clk, | ||
543 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | ||
544 | #else | ||
538 | mxc_timer_init(&gpt_clk, | 545 | mxc_timer_init(&gpt_clk, |
539 | MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); | 546 | MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); |
547 | #endif | ||
540 | 548 | ||
541 | return 0; | 549 | return 0; |
542 | } | 550 | } |
diff --git a/arch/arm/mach-mx3/cpu.c b/arch/arm/mach-mx3/cpu.c index 861afe0fe3ad..d00a75457812 100644 --- a/arch/arm/mach-mx3/cpu.c +++ b/arch/arm/mach-mx3/cpu.c | |||
@@ -25,15 +25,15 @@ struct mx3_cpu_type { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | static struct mx3_cpu_type mx31_cpu_type[] __initdata = { | 27 | static struct mx3_cpu_type mx31_cpu_type[] __initdata = { |
28 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = CHIP_REV_1_0 }, | 28 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = MX3x_CHIP_REV_1_0 }, |
29 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = CHIP_REV_1_1 }, | 29 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = MX3x_CHIP_REV_1_1 }, |
30 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = CHIP_REV_1_1 }, | 30 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = MX3x_CHIP_REV_1_1 }, |
31 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = CHIP_REV_1_1 }, | 31 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = MX3x_CHIP_REV_1_1 }, |
32 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = CHIP_REV_1_1 }, | 32 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = MX3x_CHIP_REV_1_1 }, |
33 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = CHIP_REV_1_2 }, | 33 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = MX3x_CHIP_REV_1_2 }, |
34 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = CHIP_REV_1_2 }, | 34 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = MX3x_CHIP_REV_1_2 }, |
35 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = CHIP_REV_2_0 }, | 35 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = MX3x_CHIP_REV_2_0 }, |
36 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = CHIP_REV_2_0 }, | 36 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = MX3x_CHIP_REV_2_0 }, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | void __init mx31_read_cpu_rev(void) | 39 | void __init mx31_read_cpu_rev(void) |
@@ -41,7 +41,7 @@ void __init mx31_read_cpu_rev(void) | |||
41 | u32 i, srev; | 41 | u32 i, srev; |
42 | 42 | ||
43 | /* read SREV register from IIM module */ | 43 | /* read SREV register from IIM module */ |
44 | srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR + MXC_IIMSREV)); | 44 | srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); |
45 | 45 | ||
46 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) | 46 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) |
47 | if (srev == mx31_cpu_type[i].srev) { | 47 | if (srev == mx31_cpu_type[i].srev) { |
@@ -55,3 +55,30 @@ void __init mx31_read_cpu_rev(void) | |||
55 | 55 | ||
56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); | 56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); |
57 | } | 57 | } |
58 | |||
59 | unsigned int mx35_cpu_rev; | ||
60 | EXPORT_SYMBOL(mx35_cpu_rev); | ||
61 | |||
62 | void __init mx35_read_cpu_rev(void) | ||
63 | { | ||
64 | u32 rev; | ||
65 | char *srev = "unknown"; | ||
66 | |||
67 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); | ||
68 | switch (rev) { | ||
69 | case 0x00: | ||
70 | mx35_cpu_rev = MX3x_CHIP_REV_1_0; | ||
71 | srev = "1.0"; | ||
72 | break; | ||
73 | case 0x10: | ||
74 | mx35_cpu_rev = MX3x_CHIP_REV_2_0; | ||
75 | srev = "2.0"; | ||
76 | break; | ||
77 | case 0x11: | ||
78 | mx35_cpu_rev = MX3x_CHIP_REV_2_1; | ||
79 | srev = "2.1"; | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); | ||
84 | } | ||
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h index 3b1a44a20585..de9598590eba 100644 --- a/arch/arm/mach-mx3/devices-imx31.h +++ b/arch/arm/mach-mx3/devices-imx31.h | |||
@@ -9,30 +9,33 @@ | |||
9 | #include <mach/mx31.h> | 9 | #include <mach/mx31.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx31_add_imx_i2c0(pdata) \ | 12 | extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst; |
13 | imx_add_imx_i2c(0, MX31_I2C1_BASE_ADDR, SZ_4K, MX31_INT_I2C1, pdata) | 13 | #define imx31_add_imx_i2c(id, pdata) \ |
14 | #define imx31_add_imx_i2c1(pdata) \ | 14 | imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata) |
15 | imx_add_imx_i2c(1, MX31_I2C2_BASE_ADDR, SZ_4K, MX31_INT_I2C2, pdata) | 15 | #define imx31_add_imx_i2c0(pdata) imx31_add_imx_i2c(0, pdata) |
16 | #define imx31_add_imx_i2c2(pdata) \ | 16 | #define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata) |
17 | imx_add_imx_i2c(2, MX31_I2C3_BASE_ADDR, SZ_4K, MX31_INT_I2C3, pdata) | 17 | #define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata) |
18 | 18 | ||
19 | #define imx31_add_imx_uart0(pdata) \ | 19 | extern const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst; |
20 | imx_add_imx_uart_1irq(0, MX31_UART1_BASE_ADDR, SZ_16K, MX31_INT_UART1, pdata) | 20 | #define imx31_add_imx_ssi(id, pdata) \ |
21 | #define imx31_add_imx_uart1(pdata) \ | 21 | imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata) |
22 | imx_add_imx_uart_1irq(1, MX31_UART2_BASE_ADDR, SZ_16K, MX31_INT_UART2, pdata) | ||
23 | #define imx31_add_imx_uart2(pdata) \ | ||
24 | imx_add_imx_uart_1irq(2, MX31_UART3_BASE_ADDR, SZ_16K, MX31_INT_UART3, pdata) | ||
25 | #define imx31_add_imx_uart3(pdata) \ | ||
26 | imx_add_imx_uart_1irq(3, MX31_UART4_BASE_ADDR, SZ_16K, MX31_INT_UART4, pdata) | ||
27 | #define imx31_add_imx_uart4(pdata) \ | ||
28 | imx_add_imx_uart_1irq(4, MX31_UART5_BASE_ADDR, SZ_16K, MX31_INT_UART5, pdata) | ||
29 | 22 | ||
23 | extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst; | ||
24 | #define imx31_add_imx_uart(id, pdata) \ | ||
25 | imx_add_imx_uart_1irq(&imx31_imx_uart_data[id], pdata) | ||
26 | #define imx31_add_imx_uart0(pdata) imx31_add_imx_uart(0, pdata) | ||
27 | #define imx31_add_imx_uart1(pdata) imx31_add_imx_uart(1, pdata) | ||
28 | #define imx31_add_imx_uart2(pdata) imx31_add_imx_uart(2, pdata) | ||
29 | #define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) | ||
30 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) | ||
31 | |||
32 | extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst; | ||
30 | #define imx31_add_mxc_nand(pdata) \ | 33 | #define imx31_add_mxc_nand(pdata) \ |
31 | imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) | 34 | imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) |
32 | 35 | ||
33 | #define imx31_add_spi_imx0(pdata) \ | 36 | extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; |
34 | imx_add_spi_imx(0, MX31_CSPI1_BASE_ADDR, SZ_4K, MX31_INT_CSPI1, pdata) | 37 | #define imx31_add_cspi(id, pdata) \ |
35 | #define imx31_add_spi_imx1(pdata) \ | 38 | imx_add_spi_imx(&imx31_cspi_data[id], pdata) |
36 | imx_add_spi_imx(1, MX31_CSPI2_BASE_ADDR, SZ_4K, MX31_INT_CSPI2, pdata) | 39 | #define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) |
37 | #define imx31_add_spi_imx2(pdata) \ | 40 | #define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata) |
38 | imx_add_spi_imx(2, MX31_CSPI3_BASE_ADDR, SZ_4K, MX31_INT_CSPI3, pdata) | 41 | #define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata) |
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h index f6a431a4c3d2..509b346b7fef 100644 --- a/arch/arm/mach-mx3/devices-imx35.h +++ b/arch/arm/mach-mx3/devices-imx35.h | |||
@@ -9,29 +9,46 @@ | |||
9 | #include <mach/mx35.h> | 9 | #include <mach/mx35.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | extern const struct imx_fec_data imx35_fec_data __initconst; | ||
13 | #define imx35_add_fec(pdata) \ | ||
14 | imx_add_fec(&imx35_fec_data, pdata) | ||
15 | |||
12 | #define imx35_add_flexcan0(pdata) \ | 16 | #define imx35_add_flexcan0(pdata) \ |
13 | imx_add_flexcan(0, MX35_CAN1_BASE_ADDR, SZ_16K, MX35_INT_CAN1, pdata) | 17 | imx_add_flexcan(0, MX35_CAN1_BASE_ADDR, SZ_16K, MX35_INT_CAN1, pdata) |
14 | #define imx35_add_flexcan1(pdata) \ | 18 | #define imx35_add_flexcan1(pdata) \ |
15 | imx_add_flexcan(1, MX35_CAN2_BASE_ADDR, SZ_16K, MX35_INT_CAN2, pdata) | 19 | imx_add_flexcan(1, MX35_CAN2_BASE_ADDR, SZ_16K, MX35_INT_CAN2, pdata) |
16 | 20 | ||
17 | #define imx35_add_imx_i2c0(pdata) \ | 21 | extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst; |
18 | imx_add_imx_i2c(0, MX35_I2C1_BASE_ADDR, SZ_4K, MX35_INT_I2C1, pdata) | 22 | #define imx35_add_imx_i2c(id, pdata) \ |
19 | #define imx35_add_imx_i2c1(pdata) \ | 23 | imx_add_imx_i2c(&imx35_imx_i2c_data[id], pdata) |
20 | imx_add_imx_i2c(1, MX35_I2C2_BASE_ADDR, SZ_4K, MX35_INT_I2C2, pdata) | 24 | #define imx35_add_imx_i2c0(pdata) imx35_add_imx_i2c(0, pdata) |
21 | #define imx35_add_imx_i2c2(pdata) \ | 25 | #define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata) |
22 | imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata) | 26 | #define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata) |
27 | |||
28 | extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst; | ||
29 | #define imx35_add_imx_ssi(id, pdata) \ | ||
30 | imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata) | ||
23 | 31 | ||
24 | #define imx35_add_imx_uart0(pdata) \ | 32 | extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst; |
25 | imx_add_imx_uart_1irq(0, MX35_UART1_BASE_ADDR, SZ_16K, MX35_INT_UART1, pdata) | 33 | #define imx35_add_imx_uart(id, pdata) \ |
26 | #define imx35_add_imx_uart1(pdata) \ | 34 | imx_add_imx_uart_1irq(&imx35_imx_uart_data[id], pdata) |
27 | imx_add_imx_uart_1irq(1, MX35_UART2_BASE_ADDR, SZ_16K, MX35_INT_UART2, pdata) | 35 | #define imx35_add_imx_uart0(pdata) imx35_add_imx_uart(0, pdata) |
28 | #define imx35_add_imx_uart2(pdata) \ | 36 | #define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata) |
29 | imx_add_imx_uart_1irq(2, MX35_UART3_BASE_ADDR, SZ_16K, MX35_INT_UART3, pdata) | 37 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) |
30 | 38 | ||
39 | extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst; | ||
31 | #define imx35_add_mxc_nand(pdata) \ | 40 | #define imx35_add_mxc_nand(pdata) \ |
32 | imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata) | 41 | imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) |
42 | |||
43 | extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; | ||
44 | #define imx35_add_cspi(id, pdata) \ | ||
45 | imx_add_spi_imx(&imx35_cspi_data[id], pdata) | ||
46 | #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) | ||
47 | #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) | ||
33 | 48 | ||
34 | #define imx35_add_spi_imx0(pdata) \ | 49 | #define imx35_add_esdhc0(pdata) \ |
35 | imx_add_spi_imx(0, MX35_CSPI1_BASE_ADDR, SZ_4K, MX35_INT_CSPI1, pdata) | 50 | imx_add_esdhc(0, MX35_ESDHC1_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC1, pdata) |
36 | #define imx35_add_spi_imx1(pdata) \ | 51 | #define imx35_add_esdhc1(pdata) \ |
37 | imx_add_spi_imx(1, MX35_CSPI2_BASE_ADDR, SZ_4K, MX35_INT_CSPI2, pdata) | 52 | imx_add_esdhc(1, MX35_ESDHC2_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC2, pdata) |
53 | #define imx35_add_esdhc2(pdata) \ | ||
54 | imx_add_esdhc(2, MX35_ESDHC3_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC3, pdata) | ||
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index a4fd1a26fc91..f4dff11aaee7 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -281,65 +281,6 @@ struct platform_device mxc_usbh2 = { | |||
281 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | 281 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
282 | }; | 282 | }; |
283 | 283 | ||
284 | #if defined(CONFIG_ARCH_MX35) | ||
285 | static struct resource mxc_fec_resources[] = { | ||
286 | { | ||
287 | .start = MXC_FEC_BASE_ADDR, | ||
288 | .end = MXC_FEC_BASE_ADDR + 0xfff, | ||
289 | .flags = IORESOURCE_MEM, | ||
290 | }, { | ||
291 | .start = MXC_INT_FEC, | ||
292 | .end = MXC_INT_FEC, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | struct platform_device mxc_fec_device = { | ||
298 | .name = "fec", | ||
299 | .id = 0, | ||
300 | .num_resources = ARRAY_SIZE(mxc_fec_resources), | ||
301 | .resource = mxc_fec_resources, | ||
302 | }; | ||
303 | #endif | ||
304 | |||
305 | static struct resource imx_ssi_resources0[] = { | ||
306 | { | ||
307 | .start = SSI1_BASE_ADDR, | ||
308 | .end = SSI1_BASE_ADDR + 0xfff, | ||
309 | .flags = IORESOURCE_MEM, | ||
310 | }, { | ||
311 | .start = MX31_INT_SSI1, | ||
312 | .end = MX31_INT_SSI1, | ||
313 | .flags = IORESOURCE_IRQ, | ||
314 | }, | ||
315 | }; | ||
316 | |||
317 | static struct resource imx_ssi_resources1[] = { | ||
318 | { | ||
319 | .start = SSI2_BASE_ADDR, | ||
320 | .end = SSI2_BASE_ADDR + 0xfff, | ||
321 | .flags = IORESOURCE_MEM | ||
322 | }, { | ||
323 | .start = MX31_INT_SSI2, | ||
324 | .end = MX31_INT_SSI2, | ||
325 | .flags = IORESOURCE_IRQ, | ||
326 | }, | ||
327 | }; | ||
328 | |||
329 | struct platform_device imx_ssi_device0 = { | ||
330 | .name = "imx-ssi", | ||
331 | .id = 0, | ||
332 | .num_resources = ARRAY_SIZE(imx_ssi_resources0), | ||
333 | .resource = imx_ssi_resources0, | ||
334 | }; | ||
335 | |||
336 | struct platform_device imx_ssi_device1 = { | ||
337 | .name = "imx-ssi", | ||
338 | .id = 1, | ||
339 | .num_resources = ARRAY_SIZE(imx_ssi_resources1), | ||
340 | .resource = imx_ssi_resources1, | ||
341 | }; | ||
342 | |||
343 | static struct resource imx_wdt_resources[] = { | 284 | static struct resource imx_wdt_resources[] = { |
344 | { | 285 | { |
345 | .flags = IORESOURCE_MEM, | 286 | .flags = IORESOURCE_MEM, |
@@ -410,10 +351,6 @@ static int __init mx3_devices_init(void) | |||
410 | mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff; | 351 | mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff; |
411 | mxc_usbh1_resources[1].start = MXC_INT_USBHS; | 352 | mxc_usbh1_resources[1].start = MXC_INT_USBHS; |
412 | mxc_usbh1_resources[1].end = MXC_INT_USBHS; | 353 | mxc_usbh1_resources[1].end = MXC_INT_USBHS; |
413 | imx_ssi_resources0[1].start = MX35_INT_SSI1; | ||
414 | imx_ssi_resources0[1].end = MX35_INT_SSI1; | ||
415 | imx_ssi_resources1[1].start = MX35_INT_SSI2; | ||
416 | imx_ssi_resources1[1].end = MX35_INT_SSI2; | ||
417 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | 354 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; |
418 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | 355 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; |
419 | } | 356 | } |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index e5535234839f..585f814473d5 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -2,7 +2,6 @@ extern struct platform_device mxc_w1_master_device; | |||
2 | extern struct platform_device mx3_ipu; | 2 | extern struct platform_device mx3_ipu; |
3 | extern struct platform_device mx3_fb; | 3 | extern struct platform_device mx3_fb; |
4 | extern struct platform_device mx3_camera; | 4 | extern struct platform_device mx3_camera; |
5 | extern struct platform_device mxc_fec_device; | ||
6 | extern struct platform_device mxcsdhc_device0; | 5 | extern struct platform_device mxcsdhc_device0; |
7 | extern struct platform_device mxcsdhc_device1; | 6 | extern struct platform_device mxcsdhc_device1; |
8 | extern struct platform_device mxc_otg_udc_device; | 7 | extern struct platform_device mxc_otg_udc_device; |
@@ -10,9 +9,6 @@ extern struct platform_device mxc_otg_host; | |||
10 | extern struct platform_device mxc_usbh1; | 9 | extern struct platform_device mxc_usbh1; |
11 | extern struct platform_device mxc_usbh2; | 10 | extern struct platform_device mxc_usbh2; |
12 | extern struct platform_device mxc_rnga_device; | 11 | extern struct platform_device mxc_rnga_device; |
13 | extern struct platform_device imx_ssi_device0; | ||
14 | extern struct platform_device imx_ssi_device1; | ||
15 | extern struct platform_device imx_ssi_device1; | ||
16 | extern struct platform_device imx_wdt_device0; | 12 | extern struct platform_device imx_wdt_device0; |
17 | extern struct platform_device imx_rtc_device0; | 13 | extern struct platform_device imx_rtc_device0; |
18 | extern struct platform_device imx_kpp_device; | 14 | extern struct platform_device imx_kpp_device; |
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c index f8f15e3ac7a0..886959906fbc 100644 --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <mach/ipu.h> | 43 | #include <mach/ipu.h> |
44 | #include <mach/mx3fb.h> | 44 | #include <mach/mx3fb.h> |
45 | #include <mach/audmux.h> | 45 | #include <mach/audmux.h> |
46 | #include <mach/ssi.h> | ||
47 | 46 | ||
48 | #include "devices-imx35.h" | 47 | #include "devices-imx35.h" |
49 | #include "devices.h" | 48 | #include "devices.h" |
@@ -120,6 +119,16 @@ static struct pad_desc eukrea_mbimxsd_pads[] = { | |||
120 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, | 119 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, |
121 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, | 120 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, |
122 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, | 121 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, |
122 | /* CAN2 */ | ||
123 | MX35_PAD_TX5_RX0__CAN2_TXCAN, | ||
124 | MX35_PAD_TX4_RX1__CAN2_RXCAN, | ||
125 | /* SDCARD */ | ||
126 | MX35_PAD_SD1_CMD__ESDHC1_CMD, | ||
127 | MX35_PAD_SD1_CLK__ESDHC1_CLK, | ||
128 | MX35_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
129 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
130 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
131 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
123 | }; | 132 | }; |
124 | 133 | ||
125 | #define GPIO_LED1 (2 * 32 + 29) | 134 | #define GPIO_LED1 (2 * 32 + 29) |
@@ -206,7 +215,8 @@ static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = { | |||
206 | }, | 215 | }, |
207 | }; | 216 | }; |
208 | 217 | ||
209 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = { | 218 | static const |
219 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | ||
210 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 220 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
211 | }; | 221 | }; |
212 | 222 | ||
@@ -242,7 +252,10 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
242 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 252 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
243 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 253 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
244 | 254 | ||
245 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimxsd_ssi_pdata); | 255 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
256 | |||
257 | imx35_add_flexcan1(NULL); | ||
258 | imx35_add_esdhc0(NULL); | ||
246 | 259 | ||
247 | gpio_request(GPIO_LED1, "LED1"); | 260 | gpio_request(GPIO_LED1, "LED1"); |
248 | gpio_direction_output(GPIO_LED1, 1); | 261 | gpio_direction_output(GPIO_LED1, 1); |
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c index 2a4f8b781ba4..6024bb958eea 100644 --- a/arch/arm/mach-mx3/mach-cpuimx35.c +++ b/arch/arm/mach-mx3/mach-cpuimx35.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/usb/otg.h> | 31 | #include <linux/usb/otg.h> |
32 | #include <linux/usb/ulpi.h> | 32 | #include <linux/usb/ulpi.h> |
33 | #include <linux/fsl_devices.h> | 33 | #include <linux/fsl_devices.h> |
34 | #include <linux/i2c-gpio.h> | ||
34 | 35 | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
@@ -53,39 +54,16 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
53 | }; | 54 | }; |
54 | 55 | ||
55 | static const struct imxi2c_platform_data | 56 | static const struct imxi2c_platform_data |
56 | eukrea_cpuimx35_i2c0_data __initconst = { | 57 | eukrea_cpuimx35_i2c0_data __initconst = { |
57 | .bitrate = 50000, | 58 | .bitrate = 100000, |
58 | }; | 59 | }; |
59 | 60 | ||
60 | #define TSC2007_IRQGPIO (2 * 32 + 2) | ||
61 | static int ts_get_pendown_state(void) | ||
62 | { | ||
63 | int val = 0; | ||
64 | gpio_free(TSC2007_IRQGPIO); | ||
65 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
66 | gpio_direction_input(TSC2007_IRQGPIO); | ||
67 | |||
68 | val = gpio_get_value(TSC2007_IRQGPIO); | ||
69 | |||
70 | gpio_free(TSC2007_IRQGPIO); | ||
71 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
72 | |||
73 | return val ? 0 : 1; | ||
74 | } | ||
75 | |||
76 | static int ts_init(void) | ||
77 | { | ||
78 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | static struct tsc2007_platform_data tsc2007_info = { | 61 | static struct tsc2007_platform_data tsc2007_info = { |
83 | .model = 2007, | 62 | .model = 2007, |
84 | .x_plate_ohms = 180, | 63 | .x_plate_ohms = 180, |
85 | .get_pendown_state = ts_get_pendown_state, | ||
86 | .init_platform_hw = ts_init, | ||
87 | }; | 64 | }; |
88 | 65 | ||
66 | #define TSC2007_IRQGPIO (2 * 32 + 2) | ||
89 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | 67 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { |
90 | { | 68 | { |
91 | I2C_BOARD_INFO("pcf8563", 0x51), | 69 | I2C_BOARD_INFO("pcf8563", 0x51), |
@@ -98,7 +76,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
98 | }; | 76 | }; |
99 | 77 | ||
100 | static struct platform_device *devices[] __initdata = { | 78 | static struct platform_device *devices[] __initdata = { |
101 | &mxc_fec_device, | ||
102 | &imx_wdt_device0, | 79 | &imx_wdt_device0, |
103 | }; | 80 | }; |
104 | 81 | ||
@@ -135,18 +112,18 @@ static struct pad_desc eukrea_cpuimx35_pads[] = { | |||
135 | }; | 112 | }; |
136 | 113 | ||
137 | static const struct mxc_nand_platform_data | 114 | static const struct mxc_nand_platform_data |
138 | eukrea_cpuimx35_nand_board_info __initconst = { | 115 | eukrea_cpuimx35_nand_board_info __initconst = { |
139 | .width = 1, | 116 | .width = 1, |
140 | .hw_ecc = 1, | 117 | .hw_ecc = 1, |
141 | .flash_bbt = 1, | 118 | .flash_bbt = 1, |
142 | }; | 119 | }; |
143 | 120 | ||
144 | static struct mxc_usbh_platform_data otg_pdata = { | 121 | static struct mxc_usbh_platform_data __maybe_unused otg_pdata = { |
145 | .portsc = MXC_EHCI_MODE_UTMI, | 122 | .portsc = MXC_EHCI_MODE_UTMI, |
146 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 123 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
147 | }; | 124 | }; |
148 | 125 | ||
149 | static struct mxc_usbh_platform_data usbh1_pdata = { | 126 | static struct mxc_usbh_platform_data __maybe_unused usbh1_pdata = { |
150 | .portsc = MXC_EHCI_MODE_SERIAL, | 127 | .portsc = MXC_EHCI_MODE_SERIAL, |
151 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | 128 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | |
152 | MXC_EHCI_IPPUE_DOWN, | 129 | MXC_EHCI_IPPUE_DOWN, |
@@ -180,6 +157,7 @@ static void __init mxc_board_init(void) | |||
180 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, | 157 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, |
181 | ARRAY_SIZE(eukrea_cpuimx35_pads)); | 158 | ARRAY_SIZE(eukrea_cpuimx35_pads)); |
182 | 159 | ||
160 | imx35_add_fec(NULL); | ||
183 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 161 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
184 | 162 | ||
185 | imx35_add_imx_uart0(&uart_pdata); | 163 | imx35_add_imx_uart0(&uart_pdata); |
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index 94b3e7c42404..96cedc4a47f5 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -517,7 +517,7 @@ static unsigned int ssi_pins[] = { | |||
517 | 517 | ||
518 | static void mxc_init_audio(void) | 518 | static void mxc_init_audio(void) |
519 | { | 519 | { |
520 | mxc_register_device(&imx_ssi_device0, NULL); | 520 | imx31_add_imx_ssi(0, NULL); |
521 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 521 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index 1c30d7212f17..91bb06552af1 100644 --- a/arch/arm/mach-mx3/mach-mx35_3ds.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | 2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. |
3 | * Copyright (C) 2009 Marc Kleine-Budde, Pengutronix | ||
3 | * | 4 | * |
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | 5 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
5 | * | 6 | * |
@@ -27,6 +28,8 @@ | |||
27 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
28 | #include <linux/fsl_devices.h> | 29 | #include <linux/fsl_devices.h> |
29 | 30 | ||
31 | #include <linux/mtd/physmap.h> | ||
32 | |||
30 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
@@ -35,6 +38,7 @@ | |||
35 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
36 | #include <mach/common.h> | 39 | #include <mach/common.h> |
37 | #include <mach/iomux-mx35.h> | 40 | #include <mach/iomux-mx35.h> |
41 | #include <mach/mxc_ehci.h> | ||
38 | 42 | ||
39 | #include "devices-imx35.h" | 43 | #include "devices-imx35.h" |
40 | #include "devices.h" | 44 | #include "devices.h" |
@@ -43,8 +47,34 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
43 | .flags = IMXUART_HAVE_RTSCTS, | 47 | .flags = IMXUART_HAVE_RTSCTS, |
44 | }; | 48 | }; |
45 | 49 | ||
50 | static struct physmap_flash_data mx35pdk_flash_data = { | ||
51 | .width = 2, | ||
52 | }; | ||
53 | |||
54 | static struct resource mx35pdk_flash_resource = { | ||
55 | .start = MX35_CS0_BASE_ADDR, | ||
56 | .end = MX35_CS0_BASE_ADDR + SZ_64M - 1, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }; | ||
59 | |||
60 | static struct platform_device mx35pdk_flash = { | ||
61 | .name = "physmap-flash", | ||
62 | .id = 0, | ||
63 | .dev = { | ||
64 | .platform_data = &mx35pdk_flash_data, | ||
65 | }, | ||
66 | .resource = &mx35pdk_flash_resource, | ||
67 | .num_resources = 1, | ||
68 | }; | ||
69 | |||
70 | static const struct mxc_nand_platform_data mx35pdk_nand_board_info __initconst = { | ||
71 | .width = 1, | ||
72 | .hw_ecc = 1, | ||
73 | .flash_bbt = 1, | ||
74 | }; | ||
75 | |||
46 | static struct platform_device *devices[] __initdata = { | 76 | static struct platform_device *devices[] __initdata = { |
47 | &mxc_fec_device, | 77 | &mx35pdk_flash, |
48 | }; | 78 | }; |
49 | 79 | ||
50 | static struct pad_desc mx35pdk_pads[] = { | 80 | static struct pad_desc mx35pdk_pads[] = { |
@@ -75,14 +105,24 @@ static struct pad_desc mx35pdk_pads[] = { | |||
75 | /* USBOTG */ | 105 | /* USBOTG */ |
76 | MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR, | 106 | MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR, |
77 | MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, | 107 | MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, |
108 | /* USBH1 */ | ||
109 | MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR, | ||
110 | MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC, | ||
78 | }; | 111 | }; |
79 | 112 | ||
80 | /* OTG config */ | 113 | /* OTG config */ |
81 | static struct fsl_usb2_platform_data usb_pdata = { | 114 | static struct fsl_usb2_platform_data usb_otg_pdata = { |
82 | .operating_mode = FSL_USB2_DR_DEVICE, | 115 | .operating_mode = FSL_USB2_DR_DEVICE, |
83 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 116 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
84 | }; | 117 | }; |
85 | 118 | ||
119 | /* USB HOST config */ | ||
120 | static struct mxc_usbh_platform_data usb_host_pdata = { | ||
121 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
122 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | | ||
123 | MXC_EHCI_INTERNAL_PHY, | ||
124 | }; | ||
125 | |||
86 | /* | 126 | /* |
87 | * Board specific initialization. | 127 | * Board specific initialization. |
88 | */ | 128 | */ |
@@ -90,11 +130,16 @@ static void __init mxc_board_init(void) | |||
90 | { | 130 | { |
91 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 131 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
92 | 132 | ||
133 | imx35_add_fec(NULL); | ||
93 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 134 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
94 | 135 | ||
95 | imx35_add_imx_uart0(&uart_pdata); | 136 | imx35_add_imx_uart0(&uart_pdata); |
96 | 137 | ||
97 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 138 | mxc_register_device(&mxc_otg_udc_device, &usb_otg_pdata); |
139 | |||
140 | mxc_register_device(&mxc_usbh1, &usb_host_pdata); | ||
141 | |||
142 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | ||
98 | } | 143 | } |
99 | 144 | ||
100 | static void __init mx35pdk_timer_init(void) | 145 | static void __init mx35pdk_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index 28886f0e62f9..e790a00cf99f 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <mach/mxc_ehci.h> | 42 | #include <mach/mxc_ehci.h> |
43 | #include <mach/ulpi.h> | 43 | #include <mach/ulpi.h> |
44 | #include <mach/audmux.h> | 44 | #include <mach/audmux.h> |
45 | #include <mach/ssi.h> | ||
46 | 45 | ||
47 | #include "devices-imx35.h" | 46 | #include "devices-imx35.h" |
48 | #include "devices.h" | 47 | #include "devices.h" |
@@ -141,7 +140,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = { | |||
141 | 140 | ||
142 | static struct platform_device *devices[] __initdata = { | 141 | static struct platform_device *devices[] __initdata = { |
143 | &pcm043_flash, | 142 | &pcm043_flash, |
144 | &mxc_fec_device, | ||
145 | &imx_wdt_device0, | 143 | &imx_wdt_device0, |
146 | }; | 144 | }; |
147 | 145 | ||
@@ -217,6 +215,13 @@ static struct pad_desc pcm043_pads[] = { | |||
217 | /* CAN2 */ | 215 | /* CAN2 */ |
218 | MX35_PAD_TX5_RX0__CAN2_TXCAN, | 216 | MX35_PAD_TX5_RX0__CAN2_TXCAN, |
219 | MX35_PAD_TX4_RX1__CAN2_RXCAN, | 217 | MX35_PAD_TX4_RX1__CAN2_RXCAN, |
218 | /* esdhc */ | ||
219 | MX35_PAD_SD1_CMD__ESDHC1_CMD, | ||
220 | MX35_PAD_SD1_CLK__ESDHC1_CLK, | ||
221 | MX35_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
222 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
223 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
224 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
220 | }; | 225 | }; |
221 | 226 | ||
222 | #define AC97_GPIO_TXFS (1 * 32 + 31) | 227 | #define AC97_GPIO_TXFS (1 * 32 + 31) |
@@ -293,7 +298,7 @@ err1: | |||
293 | mdelay(1); | 298 | mdelay(1); |
294 | } | 299 | } |
295 | 300 | ||
296 | static struct imx_ssi_platform_data pcm043_ssi_pdata = { | 301 | static const struct imx_ssi_platform_data pcm043_ssi_pdata __initconst = { |
297 | .ac97_reset = pcm043_ac97_cold_reset, | 302 | .ac97_reset = pcm043_ac97_cold_reset, |
298 | .ac97_warm_reset = pcm043_ac97_warm_reset, | 303 | .ac97_warm_reset = pcm043_ac97_warm_reset, |
299 | .flags = IMX_SSI_USE_AC97, | 304 | .flags = IMX_SSI_USE_AC97, |
@@ -357,11 +362,12 @@ static void __init mxc_board_init(void) | |||
357 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ | 362 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ |
358 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); | 363 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); |
359 | 364 | ||
365 | imx35_add_fec(NULL); | ||
360 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 366 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
361 | 367 | ||
362 | imx35_add_imx_uart0(&uart_pdata); | 368 | imx35_add_imx_uart0(&uart_pdata); |
363 | imx35_add_mxc_nand(&pcm037_nand_board_info); | 369 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
364 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); | 370 | imx35_add_imx_ssi(0, &pcm043_ssi_pdata); |
365 | 371 | ||
366 | imx35_add_imx_uart1(&uart_pdata); | 372 | imx35_add_imx_uart1(&uart_pdata); |
367 | 373 | ||
@@ -389,6 +395,7 @@ static void __init mxc_board_init(void) | |||
389 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 395 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); |
390 | 396 | ||
391 | imx35_add_flexcan1(NULL); | 397 | imx35_add_flexcan1(NULL); |
398 | imx35_add_esdhc0(NULL); | ||
392 | } | 399 | } |
393 | 400 | ||
394 | static void __init pcm043_timer_init(void) | 401 | static void __init pcm043_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 20e48c0195c4..b4ffc531a82c 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -110,6 +110,24 @@ void __init mx35_init_irq(void) | |||
110 | static int mxc_init_l2x0(void) | 110 | static int mxc_init_l2x0(void) |
111 | { | 111 | { |
112 | void __iomem *l2x0_base; | 112 | void __iomem *l2x0_base; |
113 | void __iomem *clkctl_base; | ||
114 | /* | ||
115 | * First of all, we must repair broken chip settings. There are some | ||
116 | * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These | ||
117 | * misconfigured CPUs will run amok immediately when the L2 cache gets enabled. | ||
118 | * Workaraound is to setup the correct register setting prior enabling the | ||
119 | * L2 cache. This should not hurt already working CPUs, as they are using the | ||
120 | * same value | ||
121 | */ | ||
122 | #define L2_MEM_VAL 0x10 | ||
123 | |||
124 | clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096); | ||
125 | if (clkctl_base != NULL) { | ||
126 | writel(0x00000515, clkctl_base + L2_MEM_VAL); | ||
127 | iounmap(clkctl_base); | ||
128 | } else { | ||
129 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | ||
130 | } | ||
113 | 131 | ||
114 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); | 132 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); |
115 | if (IS_ERR(l2x0_base)) { | 133 | if (IS_ERR(l2x0_base)) { |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 0848db5dd364..fad31cc5004b 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -5,11 +5,14 @@ config ARCH_MX51 | |||
5 | default y | 5 | default y |
6 | select MXC_TZIC | 6 | select MXC_TZIC |
7 | select ARCH_MXC_IOMUX_V3 | 7 | select ARCH_MXC_IOMUX_V3 |
8 | select ARCH_MXC_AUDMUX_V2 | ||
8 | 9 | ||
9 | comment "MX5 platforms:" | 10 | comment "MX5 platforms:" |
10 | 11 | ||
11 | config MACH_MX51_BABBAGE | 12 | config MACH_MX51_BABBAGE |
12 | bool "Support MX51 BABBAGE platforms" | 13 | bool "Support MX51 BABBAGE platforms" |
14 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
15 | select IMX_HAVE_PLATFORM_IMX_UART | ||
13 | help | 16 | help |
14 | Include support for MX51 Babbage platform, also known as MX51EVK in | 17 | Include support for MX51 Babbage platform, also known as MX51EVK in |
15 | u-boot. This includes specific configurations for the board and its | 18 | u-boot. This includes specific configurations for the board and its |
@@ -17,6 +20,8 @@ config MACH_MX51_BABBAGE | |||
17 | 20 | ||
18 | config MACH_MX51_3DS | 21 | config MACH_MX51_3DS |
19 | bool "Support MX51PDK (3DS)" | 22 | bool "Support MX51PDK (3DS)" |
23 | select IMX_HAVE_PLATFORM_IMX_UART | ||
24 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
20 | select MXC_DEBUG_BOARD | 25 | select MXC_DEBUG_BOARD |
21 | help | 26 | help |
22 | Include support for MX51PDK (3DS) platform. This includes specific | 27 | Include support for MX51PDK (3DS) platform. This includes specific |
@@ -24,6 +29,8 @@ config MACH_MX51_3DS | |||
24 | 29 | ||
25 | config MACH_EUKREA_CPUIMX51 | 30 | config MACH_EUKREA_CPUIMX51 |
26 | bool "Support Eukrea CPUIMX51 module" | 31 | bool "Support Eukrea CPUIMX51 module" |
32 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
33 | select IMX_HAVE_PLATFORM_IMX_UART | ||
27 | help | 34 | help |
28 | Include support for Eukrea CPUIMX51 platform. This includes | 35 | Include support for Eukrea CPUIMX51 platform. This includes |
29 | specific configurations for the module and its peripherals. | 36 | specific configurations for the module and its peripherals. |
@@ -42,4 +49,11 @@ config MACH_EUKREA_MBIMX51_BASEBOARD | |||
42 | 49 | ||
43 | endchoice | 50 | endchoice |
44 | 51 | ||
52 | config MACH_MX51_EFIKAMX | ||
53 | bool "Support MX51 Genesi Efika MX nettop" | ||
54 | select IMX_HAVE_PLATFORM_IMX_UART | ||
55 | help | ||
56 | Include support for Genesi Efika MX nettop. This includes specific | ||
57 | configurations for the board and its peripherals. | ||
58 | |||
45 | endif | 59 | endif |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 86c66e7f52f3..d1aac9c3d33c 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -9,3 +9,4 @@ obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | |||
9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o | 9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o |
10 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o | 10 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o |
11 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o | 11 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o |
12 | obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o | ||
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 623607a20f57..61f051043bbc 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include <mach/eukrea-baseboards.h> | 28 | #include <mach/eukrea-baseboards.h> |
29 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/iomux-mx51.h> | 31 | #include <mach/iomux-mx51.h> |
33 | #include <mach/i2c.h> | ||
34 | #include <mach/mxc_ehci.h> | 32 | #include <mach/mxc_ehci.h> |
35 | 33 | ||
36 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
@@ -39,6 +37,7 @@ | |||
39 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
41 | 39 | ||
40 | #include "devices-imx51.h" | ||
42 | #include "devices.h" | 41 | #include "devices.h" |
43 | 42 | ||
44 | #define CPUIMX51_USBH1_STP (0*32 + 27) | 43 | #define CPUIMX51_USBH1_STP (0*32 + 27) |
@@ -109,7 +108,6 @@ static struct platform_device serial_device = { | |||
109 | #endif | 108 | #endif |
110 | 109 | ||
111 | static struct platform_device *devices[] __initdata = { | 110 | static struct platform_device *devices[] __initdata = { |
112 | &mxc_fec_device, | ||
113 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 111 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
114 | &serial_device, | 112 | &serial_device, |
115 | #endif | 113 | #endif |
@@ -148,11 +146,12 @@ static struct pad_desc eukrea_cpuimx51_pads[] = { | |||
148 | MX51_PAD_USBH1_STP__USBH1_STP, | 146 | MX51_PAD_USBH1_STP__USBH1_STP, |
149 | }; | 147 | }; |
150 | 148 | ||
151 | static struct imxuart_platform_data uart_pdata = { | 149 | static const struct imxuart_platform_data uart_pdata __initconst = { |
152 | .flags = IMXUART_HAVE_RTSCTS, | 150 | .flags = IMXUART_HAVE_RTSCTS, |
153 | }; | 151 | }; |
154 | 152 | ||
155 | static struct imxi2c_platform_data eukrea_cpuimx51_i2c_data = { | 153 | static const |
154 | struct imxi2c_platform_data eukrea_cpuimx51_i2c_data __initconst = { | ||
156 | .bitrate = 100000, | 155 | .bitrate = 100000, |
157 | }; | 156 | }; |
158 | 157 | ||
@@ -239,7 +238,7 @@ static void __init eukrea_cpuimx51_init(void) | |||
239 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51_pads, | 238 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51_pads, |
240 | ARRAY_SIZE(eukrea_cpuimx51_pads)); | 239 | ARRAY_SIZE(eukrea_cpuimx51_pads)); |
241 | 240 | ||
242 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 241 | imx51_add_imx_uart(0, &uart_pdata); |
243 | gpio_request(CPUIMX51_QUARTA_GPIO, "quarta_irq"); | 242 | gpio_request(CPUIMX51_QUARTA_GPIO, "quarta_irq"); |
244 | gpio_direction_input(CPUIMX51_QUARTA_GPIO); | 243 | gpio_direction_input(CPUIMX51_QUARTA_GPIO); |
245 | gpio_free(CPUIMX51_QUARTA_GPIO); | 244 | gpio_free(CPUIMX51_QUARTA_GPIO); |
@@ -253,9 +252,10 @@ static void __init eukrea_cpuimx51_init(void) | |||
253 | gpio_direction_input(CPUIMX51_QUARTD_GPIO); | 252 | gpio_direction_input(CPUIMX51_QUARTD_GPIO); |
254 | gpio_free(CPUIMX51_QUARTD_GPIO); | 253 | gpio_free(CPUIMX51_QUARTD_GPIO); |
255 | 254 | ||
255 | imx51_add_fec(NULL); | ||
256 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 256 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
257 | 257 | ||
258 | mxc_register_device(&mxc_i2c_device1, &eukrea_cpuimx51_i2c_data); | 258 | imx51_add_imx_i2c(1, &eukrea_cpuimx51_i2c_data); |
259 | i2c_register_board_info(1, eukrea_cpuimx51_i2c_devices, | 259 | i2c_register_board_info(1, eukrea_cpuimx51_i2c_devices, |
260 | ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); | 260 | ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); |
261 | 261 | ||
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index f95c2fd94667..ed08a2352a1a 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/input/matrix_keypad.h> | 15 | #include <linux/input/matrix_keypad.h> |
16 | #include <linux/spi/spi.h> | ||
16 | 17 | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
@@ -21,12 +22,13 @@ | |||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
23 | #include <mach/iomux-mx51.h> | 24 | #include <mach/iomux-mx51.h> |
24 | #include <mach/imx-uart.h> | ||
25 | #include <mach/3ds_debugboard.h> | 25 | #include <mach/3ds_debugboard.h> |
26 | 26 | ||
27 | #include "devices-imx51.h" | ||
27 | #include "devices.h" | 28 | #include "devices.h" |
28 | 29 | ||
29 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | 30 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) |
31 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | ||
30 | 32 | ||
31 | static struct pad_desc mx51_3ds_pads[] = { | 33 | static struct pad_desc mx51_3ds_pads[] = { |
32 | /* UART1 */ | 34 | /* UART1 */ |
@@ -61,19 +63,25 @@ static struct pad_desc mx51_3ds_pads[] = { | |||
61 | MX51_PAD_KEY_COL3__KEY_COL3, | 63 | MX51_PAD_KEY_COL3__KEY_COL3, |
62 | MX51_PAD_KEY_COL4__KEY_COL4, | 64 | MX51_PAD_KEY_COL4__KEY_COL4, |
63 | MX51_PAD_KEY_COL5__KEY_COL5, | 65 | MX51_PAD_KEY_COL5__KEY_COL5, |
66 | |||
67 | /* eCSPI2 */ | ||
68 | MX51_PAD_NANDF_RB2__ECSPI2_SCLK, | ||
69 | MX51_PAD_NANDF_RB3__ECSPI2_MISO, | ||
70 | MX51_PAD_NANDF_D15__ECSPI2_MOSI, | ||
71 | MX51_PAD_NANDF_D12__GPIO_3_28, | ||
64 | }; | 72 | }; |
65 | 73 | ||
66 | /* Serial ports */ | 74 | /* Serial ports */ |
67 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 75 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
68 | static struct imxuart_platform_data uart_pdata = { | 76 | static const struct imxuart_platform_data uart_pdata __initconst = { |
69 | .flags = IMXUART_HAVE_RTSCTS, | 77 | .flags = IMXUART_HAVE_RTSCTS, |
70 | }; | 78 | }; |
71 | 79 | ||
72 | static inline void mxc_init_imx_uart(void) | 80 | static inline void mxc_init_imx_uart(void) |
73 | { | 81 | { |
74 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 82 | imx51_add_imx_uart(0, &uart_pdata); |
75 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 83 | imx51_add_imx_uart(1, &uart_pdata); |
76 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 84 | imx51_add_imx_uart(2, &uart_pdata); |
77 | } | 85 | } |
78 | #else /* !SERIAL_IMX */ | 86 | #else /* !SERIAL_IMX */ |
79 | static inline void mxc_init_imx_uart(void) | 87 | static inline void mxc_init_imx_uart(void) |
@@ -127,6 +135,26 @@ static inline void mxc_init_keypad(void) | |||
127 | } | 135 | } |
128 | #endif | 136 | #endif |
129 | 137 | ||
138 | static int mx51_3ds_spi2_cs[] = { | ||
139 | MXC_SPI_CS(0), | ||
140 | MX51_3DS_ECSPI2_CS, | ||
141 | }; | ||
142 | |||
143 | static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = { | ||
144 | .chipselect = mx51_3ds_spi2_cs, | ||
145 | .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs), | ||
146 | }; | ||
147 | |||
148 | static struct spi_board_info mx51_3ds_spi_nor_device[] = { | ||
149 | { | ||
150 | .modalias = "m25p80", | ||
151 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
152 | .bus_num = 1, | ||
153 | .chip_select = 1, | ||
154 | .mode = SPI_MODE_0, | ||
155 | .platform_data = NULL,}, | ||
156 | }; | ||
157 | |||
130 | /* | 158 | /* |
131 | * Board specific initialization. | 159 | * Board specific initialization. |
132 | */ | 160 | */ |
@@ -136,6 +164,10 @@ static void __init mxc_board_init(void) | |||
136 | ARRAY_SIZE(mx51_3ds_pads)); | 164 | ARRAY_SIZE(mx51_3ds_pads)); |
137 | mxc_init_imx_uart(); | 165 | mxc_init_imx_uart(); |
138 | 166 | ||
167 | imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); | ||
168 | spi_register_board_info(mx51_3ds_spi_nor_device, | ||
169 | ARRAY_SIZE(mx51_3ds_spi_nor_device)); | ||
170 | |||
139 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 171 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
140 | printk(KERN_WARNING "Init of the debugboard failed, all " | 172 | printk(KERN_WARNING "Init of the debugboard failed, all " |
141 | "devices on the board are unusable.\n"); | 173 | "devices on the board are unusable.\n"); |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 6e384d92e625..23ee4a447406 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -17,12 +17,11 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/fsl_devices.h> | 19 | #include <linux/fsl_devices.h> |
20 | #include <linux/fec.h> | ||
20 | 21 | ||
21 | #include <mach/common.h> | 22 | #include <mach/common.h> |
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <mach/imx-uart.h> | ||
24 | #include <mach/iomux-mx51.h> | 24 | #include <mach/iomux-mx51.h> |
25 | #include <mach/i2c.h> | ||
26 | #include <mach/mxc_ehci.h> | 25 | #include <mach/mxc_ehci.h> |
27 | 26 | ||
28 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
@@ -31,11 +30,13 @@ | |||
31 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
33 | 32 | ||
33 | #include "devices-imx51.h" | ||
34 | #include "devices.h" | 34 | #include "devices.h" |
35 | 35 | ||
36 | #define BABBAGE_USB_HUB_RESET (0*32 + 7) /* GPIO_1_7 */ | 36 | #define BABBAGE_USB_HUB_RESET (0*32 + 7) /* GPIO_1_7 */ |
37 | #define BABBAGE_USBH1_STP (0*32 + 27) /* GPIO_1_27 */ | 37 | #define BABBAGE_USBH1_STP (0*32 + 27) /* GPIO_1_27 */ |
38 | #define BABBAGE_PHY_RESET (1*32 +5) /* GPIO_2_5 */ | 38 | #define BABBAGE_PHY_RESET (1*32 + 5) /* GPIO_2_5 */ |
39 | #define BABBAGE_FEC_PHY_RESET (1*32 + 14) /* GPIO_2_14 */ | ||
39 | 40 | ||
40 | /* USB_CTRL_1 */ | 41 | /* USB_CTRL_1 */ |
41 | #define MX51_USB_CTRL_1_OFFSET 0x10 | 42 | #define MX51_USB_CTRL_1_OFFSET 0x10 |
@@ -45,10 +46,6 @@ | |||
45 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | 46 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 |
46 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 | 47 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 |
47 | 48 | ||
48 | static struct platform_device *devices[] __initdata = { | ||
49 | &mxc_fec_device, | ||
50 | }; | ||
51 | |||
52 | static struct pad_desc mx51babbage_pads[] = { | 49 | static struct pad_desc mx51babbage_pads[] = { |
53 | /* UART1 */ | 50 | /* UART1 */ |
54 | MX51_PAD_UART1_RXD__UART1_RXD, | 51 | MX51_PAD_UART1_RXD__UART1_RXD, |
@@ -93,19 +90,41 @@ static struct pad_desc mx51babbage_pads[] = { | |||
93 | 90 | ||
94 | /* USB HUB reset line*/ | 91 | /* USB HUB reset line*/ |
95 | MX51_PAD_GPIO_1_7__GPIO_1_7, | 92 | MX51_PAD_GPIO_1_7__GPIO_1_7, |
93 | |||
94 | /* FEC */ | ||
95 | MX51_PAD_EIM_EB2__FEC_MDIO, | ||
96 | MX51_PAD_EIM_EB3__FEC_RDAT1, | ||
97 | MX51_PAD_EIM_CS2__FEC_RDAT2, | ||
98 | MX51_PAD_EIM_CS3__FEC_RDAT3, | ||
99 | MX51_PAD_EIM_CS4__FEC_RX_ER, | ||
100 | MX51_PAD_EIM_CS5__FEC_CRS, | ||
101 | MX51_PAD_NANDF_RB2__FEC_COL, | ||
102 | MX51_PAD_NANDF_RB3__FEC_RXCLK, | ||
103 | MX51_PAD_NANDF_RB6__FEC_RDAT0, | ||
104 | MX51_PAD_NANDF_RB7__FEC_TDAT0, | ||
105 | MX51_PAD_NANDF_CS2__FEC_TX_ER, | ||
106 | MX51_PAD_NANDF_CS3__FEC_MDC, | ||
107 | MX51_PAD_NANDF_CS4__FEC_TDAT1, | ||
108 | MX51_PAD_NANDF_CS5__FEC_TDAT2, | ||
109 | MX51_PAD_NANDF_CS6__FEC_TDAT3, | ||
110 | MX51_PAD_NANDF_CS7__FEC_TX_EN, | ||
111 | MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK, | ||
112 | |||
113 | /* FEC PHY reset line */ | ||
114 | MX51_PAD_EIM_A20__GPIO_2_14, | ||
96 | }; | 115 | }; |
97 | 116 | ||
98 | /* Serial ports */ | 117 | /* Serial ports */ |
99 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 118 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
100 | static struct imxuart_platform_data uart_pdata = { | 119 | static const struct imxuart_platform_data uart_pdata __initconst = { |
101 | .flags = IMXUART_HAVE_RTSCTS, | 120 | .flags = IMXUART_HAVE_RTSCTS, |
102 | }; | 121 | }; |
103 | 122 | ||
104 | static inline void mxc_init_imx_uart(void) | 123 | static inline void mxc_init_imx_uart(void) |
105 | { | 124 | { |
106 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 125 | imx51_add_imx_uart(0, &uart_pdata); |
107 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 126 | imx51_add_imx_uart(1, &uart_pdata); |
108 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 127 | imx51_add_imx_uart(2, &uart_pdata); |
109 | } | 128 | } |
110 | #else /* !SERIAL_IMX */ | 129 | #else /* !SERIAL_IMX */ |
111 | static inline void mxc_init_imx_uart(void) | 130 | static inline void mxc_init_imx_uart(void) |
@@ -113,7 +132,7 @@ static inline void mxc_init_imx_uart(void) | |||
113 | } | 132 | } |
114 | #endif /* SERIAL_IMX */ | 133 | #endif /* SERIAL_IMX */ |
115 | 134 | ||
116 | static struct imxi2c_platform_data babbage_i2c_data = { | 135 | static const struct imxi2c_platform_data babbage_i2c_data __initconst = { |
117 | .bitrate = 100000, | 136 | .bitrate = 100000, |
118 | }; | 137 | }; |
119 | 138 | ||
@@ -171,6 +190,22 @@ static inline void babbage_usbhub_reset(void) | |||
171 | gpio_set_value(BABBAGE_USB_HUB_RESET, 1); | 190 | gpio_set_value(BABBAGE_USB_HUB_RESET, 1); |
172 | } | 191 | } |
173 | 192 | ||
193 | static inline void babbage_fec_reset(void) | ||
194 | { | ||
195 | int ret; | ||
196 | |||
197 | /* reset FEC PHY */ | ||
198 | ret = gpio_request(BABBAGE_FEC_PHY_RESET, "fec-phy-reset"); | ||
199 | if (ret) { | ||
200 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
201 | return; | ||
202 | } | ||
203 | gpio_direction_output(BABBAGE_FEC_PHY_RESET, 0); | ||
204 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 0); | ||
205 | msleep(1); | ||
206 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); | ||
207 | } | ||
208 | |||
174 | /* This function is board specific as the bit mask for the plldiv will also | 209 | /* This function is board specific as the bit mask for the plldiv will also |
175 | be different for other Freescale SoCs, thus a common bitmask is not | 210 | be different for other Freescale SoCs, thus a common bitmask is not |
176 | possible and cannot get place in /plat-mxc/ehci.c.*/ | 211 | possible and cannot get place in /plat-mxc/ehci.c.*/ |
@@ -178,7 +213,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
178 | { | 213 | { |
179 | u32 v; | 214 | u32 v; |
180 | void __iomem *usb_base; | 215 | void __iomem *usb_base; |
181 | u32 usbother_base; | 216 | void __iomem *usbother_base; |
182 | 217 | ||
183 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 218 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); |
184 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 219 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -196,7 +231,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
196 | { | 231 | { |
197 | u32 v; | 232 | u32 v; |
198 | void __iomem *usb_base; | 233 | void __iomem *usb_base; |
199 | u32 usbother_base; | 234 | void __iomem *usbother_base; |
200 | 235 | ||
201 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 236 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); |
202 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 237 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -250,10 +285,11 @@ static void __init mxc_board_init(void) | |||
250 | mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads, | 285 | mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads, |
251 | ARRAY_SIZE(mx51babbage_pads)); | 286 | ARRAY_SIZE(mx51babbage_pads)); |
252 | mxc_init_imx_uart(); | 287 | mxc_init_imx_uart(); |
253 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 288 | babbage_fec_reset(); |
289 | imx51_add_fec(NULL); | ||
254 | 290 | ||
255 | mxc_register_device(&mxc_i2c_device0, &babbage_i2c_data); | 291 | imx51_add_imx_i2c(0, &babbage_i2c_data); |
256 | mxc_register_device(&mxc_i2c_device1, &babbage_i2c_data); | 292 | imx51_add_imx_i2c(1, &babbage_i2c_data); |
257 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); | 293 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); |
258 | 294 | ||
259 | if (otg_mode_host) | 295 | if (otg_mode_host) |
@@ -283,7 +319,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | |||
283 | /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ | 319 | /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ |
284 | .phys_io = MX51_AIPS1_BASE_ADDR, | 320 | .phys_io = MX51_AIPS1_BASE_ADDR, |
285 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 321 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
286 | .boot_params = PHYS_OFFSET + 0x100, | 322 | .boot_params = MX51_PHYS_OFFSET + 0x100, |
287 | .map_io = mx51_map_io, | 323 | .map_io = mx51_map_io, |
288 | .init_irq = mx51_init_irq, | 324 | .init_irq = mx51_init_irq, |
289 | .init_machine = mxc_board_init, | 325 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c new file mode 100644 index 000000000000..b00502acdc15 --- /dev/null +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Linaro Limited | ||
3 | * | ||
4 | * based on code from the following | ||
5 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved. | ||
7 | * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved. | ||
8 | * | ||
9 | * The code contained herein is licensed under the GNU General Public | ||
10 | * License. You may obtain a copy of the GNU General Public License | ||
11 | * Version 2 or later at the following locations: | ||
12 | * | ||
13 | * http://www.opensource.org/licenses/gpl-license.html | ||
14 | * http://www.gnu.org/copyleft/gpl.html | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/fsl_devices.h> | ||
24 | |||
25 | #include <mach/common.h> | ||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/iomux-mx51.h> | ||
28 | #include <mach/i2c.h> | ||
29 | #include <mach/mxc_ehci.h> | ||
30 | |||
31 | #include <asm/irq.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/time.h> | ||
36 | |||
37 | #include "devices-imx51.h" | ||
38 | #include "devices.h" | ||
39 | |||
40 | #define MX51_USB_PLL_DIV_24_MHZ 0x01 | ||
41 | |||
42 | static struct pad_desc mx51efikamx_pads[] = { | ||
43 | /* UART1 */ | ||
44 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
45 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
46 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
47 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
48 | }; | ||
49 | |||
50 | /* Serial ports */ | ||
51 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
52 | static const struct imxuart_platform_data uart_pdata = { | ||
53 | .flags = IMXUART_HAVE_RTSCTS, | ||
54 | }; | ||
55 | |||
56 | static inline void mxc_init_imx_uart(void) | ||
57 | { | ||
58 | imx51_add_imx_uart(0, &uart_pdata); | ||
59 | imx51_add_imx_uart(1, &uart_pdata); | ||
60 | imx51_add_imx_uart(2, &uart_pdata); | ||
61 | } | ||
62 | #else /* !SERIAL_IMX */ | ||
63 | static inline void mxc_init_imx_uart(void) | ||
64 | { | ||
65 | } | ||
66 | #endif /* SERIAL_IMX */ | ||
67 | |||
68 | /* This function is board specific as the bit mask for the plldiv will also | ||
69 | * be different for other Freescale SoCs, thus a common bitmask is not | ||
70 | * possible and cannot get place in /plat-mxc/ehci.c. | ||
71 | */ | ||
72 | static int initialize_otg_port(struct platform_device *pdev) | ||
73 | { | ||
74 | u32 v; | ||
75 | void __iomem *usb_base; | ||
76 | void __iomem *usbother_base; | ||
77 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | ||
78 | usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); | ||
79 | |||
80 | /* Set the PHY clock to 19.2MHz */ | ||
81 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
82 | v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK; | ||
83 | v |= MX51_USB_PLL_DIV_24_MHZ; | ||
84 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
85 | iounmap(usb_base); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static struct mxc_usbh_platform_data dr_utmi_config = { | ||
90 | .init = initialize_otg_port, | ||
91 | .portsc = MXC_EHCI_UTMI_16BIT, | ||
92 | .flags = MXC_EHCI_INTERNAL_PHY, | ||
93 | }; | ||
94 | |||
95 | static void __init mxc_board_init(void) | ||
96 | { | ||
97 | mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, | ||
98 | ARRAY_SIZE(mx51efikamx_pads)); | ||
99 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | ||
100 | mxc_init_imx_uart(); | ||
101 | } | ||
102 | |||
103 | static void __init mx51_efikamx_timer_init(void) | ||
104 | { | ||
105 | mx51_clocks_init(32768, 24000000, 22579200, 24576000); | ||
106 | } | ||
107 | |||
108 | static struct sys_timer mxc_timer = { | ||
109 | .init = mx51_efikamx_timer_init, | ||
110 | }; | ||
111 | |||
112 | MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | ||
113 | /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */ | ||
114 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
115 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
116 | .boot_params = MX51_PHYS_OFFSET + 0x100, | ||
117 | .map_io = mx51_map_io, | ||
118 | .init_irq = mx51_init_irq, | ||
119 | .init_machine = mxc_board_init, | ||
120 | .timer = &mxc_timer, | ||
121 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c index 57c10a9926cc..21cecc040172 100644 --- a/arch/arm/mach-mx5/clock-mx51.c +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -41,34 +41,36 @@ static struct clk usboh3_clk; | |||
41 | 41 | ||
42 | #define MAX_DPLL_WAIT_TRIES 1000 /* 1000 * udelay(1) = 1ms */ | 42 | #define MAX_DPLL_WAIT_TRIES 1000 /* 1000 * udelay(1) = 1ms */ |
43 | 43 | ||
44 | static int _clk_ccgr_enable(struct clk *clk) | 44 | static void _clk_ccgr_setclk(struct clk *clk, unsigned mode) |
45 | { | 45 | { |
46 | u32 reg; | 46 | u32 reg = __raw_readl(clk->enable_reg); |
47 | |||
48 | reg &= ~(MXC_CCM_CCGRx_CG_MASK << clk->enable_shift); | ||
49 | reg |= mode << clk->enable_shift; | ||
47 | 50 | ||
48 | reg = __raw_readl(clk->enable_reg); | ||
49 | reg |= MXC_CCM_CCGRx_MOD_ON << clk->enable_shift; | ||
50 | __raw_writel(reg, clk->enable_reg); | 51 | __raw_writel(reg, clk->enable_reg); |
52 | } | ||
51 | 53 | ||
54 | static int _clk_ccgr_enable(struct clk *clk) | ||
55 | { | ||
56 | _clk_ccgr_setclk(clk, MXC_CCM_CCGRx_MOD_ON); | ||
52 | return 0; | 57 | return 0; |
53 | } | 58 | } |
54 | 59 | ||
55 | static void _clk_ccgr_disable(struct clk *clk) | 60 | static void _clk_ccgr_disable(struct clk *clk) |
56 | { | 61 | { |
57 | u32 reg; | 62 | _clk_ccgr_setclk(clk, MXC_CCM_CCGRx_MOD_OFF); |
58 | reg = __raw_readl(clk->enable_reg); | 63 | } |
59 | reg &= ~(MXC_CCM_CCGRx_CG_MASK << clk->enable_shift); | ||
60 | __raw_writel(reg, clk->enable_reg); | ||
61 | 64 | ||
65 | static int _clk_ccgr_enable_inrun(struct clk *clk) | ||
66 | { | ||
67 | _clk_ccgr_setclk(clk, MXC_CCM_CCGRx_MOD_IDLE); | ||
68 | return 0; | ||
62 | } | 69 | } |
63 | 70 | ||
64 | static void _clk_ccgr_disable_inwait(struct clk *clk) | 71 | static void _clk_ccgr_disable_inwait(struct clk *clk) |
65 | { | 72 | { |
66 | u32 reg; | 73 | _clk_ccgr_setclk(clk, MXC_CCM_CCGRx_MOD_IDLE); |
67 | |||
68 | reg = __raw_readl(clk->enable_reg); | ||
69 | reg &= ~(MXC_CCM_CCGRx_CG_MASK << clk->enable_shift); | ||
70 | reg |= MXC_CCM_CCGRx_MOD_IDLE << clk->enable_shift; | ||
71 | __raw_writel(reg, clk->enable_reg); | ||
72 | } | 74 | } |
73 | 75 | ||
74 | /* | 76 | /* |
@@ -571,6 +573,64 @@ static int _clk_uart_set_parent(struct clk *clk, struct clk *parent) | |||
571 | return 0; | 573 | return 0; |
572 | } | 574 | } |
573 | 575 | ||
576 | #define clk_nfc_set_parent NULL | ||
577 | |||
578 | static unsigned long clk_nfc_get_rate(struct clk *clk) | ||
579 | { | ||
580 | unsigned long rate; | ||
581 | u32 reg, div; | ||
582 | |||
583 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
584 | div = ((reg & MXC_CCM_CBCDR_NFC_PODF_MASK) >> | ||
585 | MXC_CCM_CBCDR_NFC_PODF_OFFSET) + 1; | ||
586 | rate = clk_get_rate(clk->parent) / div; | ||
587 | WARN_ON(rate == 0); | ||
588 | return rate; | ||
589 | } | ||
590 | |||
591 | static unsigned long clk_nfc_round_rate(struct clk *clk, | ||
592 | unsigned long rate) | ||
593 | { | ||
594 | u32 div; | ||
595 | unsigned long parent_rate = clk_get_rate(clk->parent); | ||
596 | |||
597 | if (!rate) | ||
598 | return -EINVAL; | ||
599 | |||
600 | div = parent_rate / rate; | ||
601 | |||
602 | if (parent_rate % rate) | ||
603 | div++; | ||
604 | |||
605 | if (div > 8) | ||
606 | return -EINVAL; | ||
607 | |||
608 | return parent_rate / div; | ||
609 | |||
610 | } | ||
611 | |||
612 | static int clk_nfc_set_rate(struct clk *clk, unsigned long rate) | ||
613 | { | ||
614 | u32 reg, div; | ||
615 | |||
616 | div = clk_get_rate(clk->parent) / rate; | ||
617 | if (div == 0) | ||
618 | div++; | ||
619 | if (((clk_get_rate(clk->parent) / div) != rate) || (div > 8)) | ||
620 | return -EINVAL; | ||
621 | |||
622 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
623 | reg &= ~MXC_CCM_CBCDR_NFC_PODF_MASK; | ||
624 | reg |= (div - 1) << MXC_CCM_CBCDR_NFC_PODF_OFFSET; | ||
625 | __raw_writel(reg, MXC_CCM_CBCDR); | ||
626 | |||
627 | while (__raw_readl(MXC_CCM_CDHIPR) & | ||
628 | MXC_CCM_CDHIPR_NFC_IPG_INT_MEM_PODF_BUSY){ | ||
629 | } | ||
630 | |||
631 | return 0; | ||
632 | } | ||
633 | |||
574 | static unsigned long clk_usboh3_get_rate(struct clk *clk) | 634 | static unsigned long clk_usboh3_get_rate(struct clk *clk) |
575 | { | 635 | { |
576 | u32 reg, prediv, podf; | 636 | u32 reg, prediv, podf; |
@@ -620,6 +680,17 @@ static unsigned long get_ckih2_reference_clock_rate(struct clk *clk) | |||
620 | return ckih2_reference; | 680 | return ckih2_reference; |
621 | } | 681 | } |
622 | 682 | ||
683 | static unsigned long clk_emi_slow_get_rate(struct clk *clk) | ||
684 | { | ||
685 | u32 reg, div; | ||
686 | |||
687 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
688 | div = ((reg & MXC_CCM_CBCDR_EMI_PODF_MASK) >> | ||
689 | MXC_CCM_CBCDR_EMI_PODF_OFFSET) + 1; | ||
690 | |||
691 | return clk_get_rate(clk->parent) / div; | ||
692 | } | ||
693 | |||
623 | /* External high frequency clock */ | 694 | /* External high frequency clock */ |
624 | static struct clk ckih_clk = { | 695 | static struct clk ckih_clk = { |
625 | .get_rate = get_high_reference_clock_rate, | 696 | .get_rate = get_high_reference_clock_rate, |
@@ -762,45 +833,105 @@ static struct clk kpp_clk = { | |||
762 | .id = 0, | 833 | .id = 0, |
763 | }; | 834 | }; |
764 | 835 | ||
765 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ | 836 | static struct clk emi_slow_clk = { |
837 | .parent = &pll2_sw_clk, | ||
838 | .enable_reg = MXC_CCM_CCGR5, | ||
839 | .enable_shift = MXC_CCM_CCGRx_CG8_OFFSET, | ||
840 | .enable = _clk_ccgr_enable, | ||
841 | .disable = _clk_ccgr_disable_inwait, | ||
842 | .get_rate = clk_emi_slow_get_rate, | ||
843 | }; | ||
844 | |||
845 | #define DEFINE_CLOCK1(name, i, er, es, pfx, p, s) \ | ||
766 | static struct clk name = { \ | 846 | static struct clk name = { \ |
767 | .id = i, \ | 847 | .id = i, \ |
768 | .enable_reg = er, \ | 848 | .enable_reg = er, \ |
769 | .enable_shift = es, \ | 849 | .enable_shift = es, \ |
770 | .get_rate = gr, \ | 850 | .get_rate = pfx##_get_rate, \ |
771 | .set_rate = sr, \ | 851 | .set_rate = pfx##_set_rate, \ |
852 | .round_rate = pfx##_round_rate, \ | ||
853 | .set_parent = pfx##_set_parent, \ | ||
772 | .enable = _clk_ccgr_enable, \ | 854 | .enable = _clk_ccgr_enable, \ |
773 | .disable = _clk_ccgr_disable, \ | 855 | .disable = _clk_ccgr_disable, \ |
774 | .parent = p, \ | 856 | .parent = p, \ |
775 | .secondary = s, \ | 857 | .secondary = s, \ |
776 | } | 858 | } |
777 | 859 | ||
778 | /* DEFINE_CLOCK(name, id, enable_reg, enable_shift, | 860 | /* eCSPI */ |
779 | get_rate, set_rate, parent, secondary); */ | 861 | static unsigned long clk_ecspi_get_rate(struct clk *clk) |
862 | { | ||
863 | u32 reg, pred, podf; | ||
864 | |||
865 | reg = __raw_readl(MXC_CCM_CSCDR2); | ||
866 | |||
867 | pred = (reg & MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK) >> | ||
868 | MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET; | ||
869 | podf = (reg & MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK) >> | ||
870 | MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET; | ||
871 | |||
872 | return DIV_ROUND_CLOSEST(clk_get_rate(clk->parent), | ||
873 | (pred + 1) * (podf + 1)); | ||
874 | } | ||
875 | |||
876 | static int clk_ecspi_set_parent(struct clk *clk, struct clk *parent) | ||
877 | { | ||
878 | u32 reg, mux; | ||
879 | |||
880 | mux = _get_mux(parent, &pll1_sw_clk, &pll2_sw_clk, &pll3_sw_clk, | ||
881 | &lp_apm_clk); | ||
882 | |||
883 | reg = __raw_readl(MXC_CCM_CSCMR1) & ~MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK; | ||
884 | reg |= mux << MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET; | ||
885 | __raw_writel(reg, MXC_CCM_CSCMR1); | ||
886 | |||
887 | return 0; | ||
888 | } | ||
889 | |||
890 | static struct clk ecspi_main_clk = { | ||
891 | .parent = &pll3_sw_clk, | ||
892 | .get_rate = clk_ecspi_get_rate, | ||
893 | .set_parent = clk_ecspi_set_parent, | ||
894 | }; | ||
895 | |||
896 | #define DEFINE_CLOCK_FULL(name, i, er, es, gr, sr, e, d, p, s) \ | ||
897 | static struct clk name = { \ | ||
898 | .id = i, \ | ||
899 | .enable_reg = er, \ | ||
900 | .enable_shift = es, \ | ||
901 | .get_rate = gr, \ | ||
902 | .set_rate = sr, \ | ||
903 | .enable = e, \ | ||
904 | .disable = d, \ | ||
905 | .parent = p, \ | ||
906 | .secondary = s, \ | ||
907 | } | ||
908 | |||
909 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ | ||
910 | DEFINE_CLOCK_FULL(name, i, er, es, gr, sr, _clk_ccgr_enable, _clk_ccgr_disable, p, s) | ||
780 | 911 | ||
781 | /* Shared peripheral bus arbiter */ | 912 | /* Shared peripheral bus arbiter */ |
782 | DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET, | 913 | DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET, |
783 | NULL, NULL, &ipg_clk, NULL); | 914 | NULL, NULL, &ipg_clk, NULL); |
784 | 915 | ||
785 | /* UART */ | 916 | /* UART */ |
786 | DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG4_OFFSET, | ||
787 | NULL, NULL, &uart_root_clk, NULL); | ||
788 | DEFINE_CLOCK(uart2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG6_OFFSET, | ||
789 | NULL, NULL, &uart_root_clk, NULL); | ||
790 | DEFINE_CLOCK(uart3_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG8_OFFSET, | ||
791 | NULL, NULL, &uart_root_clk, NULL); | ||
792 | DEFINE_CLOCK(uart1_ipg_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG3_OFFSET, | 917 | DEFINE_CLOCK(uart1_ipg_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG3_OFFSET, |
793 | NULL, NULL, &ipg_clk, &aips_tz1_clk); | 918 | NULL, NULL, &ipg_clk, &aips_tz1_clk); |
794 | DEFINE_CLOCK(uart2_ipg_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG5_OFFSET, | 919 | DEFINE_CLOCK(uart2_ipg_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG5_OFFSET, |
795 | NULL, NULL, &ipg_clk, &aips_tz1_clk); | 920 | NULL, NULL, &ipg_clk, &aips_tz1_clk); |
796 | DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET, | 921 | DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET, |
797 | NULL, NULL, &ipg_clk, &spba_clk); | 922 | NULL, NULL, &ipg_clk, &spba_clk); |
923 | DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG4_OFFSET, | ||
924 | NULL, NULL, &uart_root_clk, &uart1_ipg_clk); | ||
925 | DEFINE_CLOCK(uart2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG6_OFFSET, | ||
926 | NULL, NULL, &uart_root_clk, &uart2_ipg_clk); | ||
927 | DEFINE_CLOCK(uart3_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG8_OFFSET, | ||
928 | NULL, NULL, &uart_root_clk, &uart3_ipg_clk); | ||
798 | 929 | ||
799 | /* GPT */ | 930 | /* GPT */ |
800 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | ||
801 | NULL, NULL, &ipg_clk, NULL); | ||
802 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, | 931 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, |
803 | NULL, NULL, &ipg_clk, NULL); | 932 | NULL, NULL, &ipg_clk, NULL); |
933 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | ||
934 | NULL, NULL, &ipg_clk, &gpt_ipg_clk); | ||
804 | 935 | ||
805 | /* I2C */ | 936 | /* I2C */ |
806 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, | 937 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, |
@@ -814,6 +945,42 @@ DEFINE_CLOCK(hsi2c_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG11_OFFSET, | |||
814 | DEFINE_CLOCK(fec_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG12_OFFSET, | 945 | DEFINE_CLOCK(fec_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG12_OFFSET, |
815 | NULL, NULL, &ipg_clk, NULL); | 946 | NULL, NULL, &ipg_clk, NULL); |
816 | 947 | ||
948 | /* NFC */ | ||
949 | DEFINE_CLOCK1(nfc_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG10_OFFSET, | ||
950 | clk_nfc, &emi_slow_clk, NULL); | ||
951 | |||
952 | /* SSI */ | ||
953 | DEFINE_CLOCK(ssi1_ipg_clk, 0, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG8_OFFSET, | ||
954 | NULL, NULL, &ipg_clk, NULL); | ||
955 | DEFINE_CLOCK(ssi1_clk, 0, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG9_OFFSET, | ||
956 | NULL, NULL, &pll3_sw_clk, &ssi1_ipg_clk); | ||
957 | DEFINE_CLOCK(ssi2_ipg_clk, 1, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG10_OFFSET, | ||
958 | NULL, NULL, &ipg_clk, NULL); | ||
959 | DEFINE_CLOCK(ssi2_clk, 1, MXC_CCM_CCGR3, MXC_CCM_CCGRx_CG11_OFFSET, | ||
960 | NULL, NULL, &pll3_sw_clk, &ssi2_ipg_clk); | ||
961 | |||
962 | /* eCSPI */ | ||
963 | DEFINE_CLOCK_FULL(ecspi1_ipg_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG9_OFFSET, | ||
964 | NULL, NULL, _clk_ccgr_enable_inrun, _clk_ccgr_disable, | ||
965 | &ipg_clk, &spba_clk); | ||
966 | DEFINE_CLOCK(ecspi1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG10_OFFSET, | ||
967 | NULL, NULL, &ecspi_main_clk, &ecspi1_ipg_clk); | ||
968 | DEFINE_CLOCK_FULL(ecspi2_ipg_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG11_OFFSET, | ||
969 | NULL, NULL, _clk_ccgr_enable_inrun, _clk_ccgr_disable, | ||
970 | &ipg_clk, &aips_tz2_clk); | ||
971 | DEFINE_CLOCK(ecspi2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG12_OFFSET, | ||
972 | NULL, NULL, &ecspi_main_clk, &ecspi2_ipg_clk); | ||
973 | |||
974 | /* CSPI */ | ||
975 | DEFINE_CLOCK(cspi_ipg_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG9_OFFSET, | ||
976 | NULL, NULL, &ipg_clk, &aips_tz2_clk); | ||
977 | DEFINE_CLOCK(cspi_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG13_OFFSET, | ||
978 | NULL, NULL, &ipg_clk, &cspi_ipg_clk); | ||
979 | |||
980 | /* SDMA */ | ||
981 | DEFINE_CLOCK(sdma_clk, 1, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG15_OFFSET, | ||
982 | NULL, NULL, &ahb_clk, NULL); | ||
983 | |||
817 | #define _REGISTER_CLOCK(d, n, c) \ | 984 | #define _REGISTER_CLOCK(d, n, c) \ |
818 | { \ | 985 | { \ |
819 | .dev_id = d, \ | 986 | .dev_id = d, \ |
@@ -837,6 +1004,16 @@ static struct clk_lookup lookups[] = { | |||
837 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) | 1004 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) |
838 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) | 1005 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) |
839 | _REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk) | 1006 | _REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk) |
1007 | _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk) | ||
1008 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | ||
1009 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | ||
1010 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk) | ||
1011 | _REGISTER_CLOCK(NULL, "ckih", ckih_clk) | ||
1012 | _REGISTER_CLOCK(NULL, "ckih2", ckih2_clk) | ||
1013 | _REGISTER_CLOCK(NULL, "gpt_32k", gpt_32k_clk) | ||
1014 | _REGISTER_CLOCK("imx51-ecspi.0", NULL, ecspi1_clk) | ||
1015 | _REGISTER_CLOCK("imx51-ecspi.1", NULL, ecspi2_clk) | ||
1016 | _REGISTER_CLOCK("imx51-cspi.0", NULL, cspi_clk) | ||
840 | }; | 1017 | }; |
841 | 1018 | ||
842 | static void clk_tree_init(void) | 1019 | static void clk_tree_init(void) |
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h new file mode 100644 index 000000000000..c233379256b8 --- /dev/null +++ b/arch/arm/mach-mx5/devices-imx51.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx51.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | extern const struct imx_fec_data imx51_fec_data __initconst; | ||
13 | #define imx51_add_fec(pdata) \ | ||
14 | imx_add_fec(&imx51_fec_data, pdata) | ||
15 | |||
16 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst; | ||
17 | #define imx51_add_imx_i2c(id, pdata) \ | ||
18 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) | ||
19 | |||
20 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst; | ||
21 | #define imx51_add_imx_ssi(id, pdata) \ | ||
22 | imx_add_imx_ssi(&imx51_imx_ssi_data[id], pdata) | ||
23 | |||
24 | extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst; | ||
25 | #define imx51_add_imx_uart(id, pdata) \ | ||
26 | imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) | ||
27 | |||
28 | extern const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst; | ||
29 | #define imx51_add_mxc_nand(pdata) \ | ||
30 | imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) | ||
31 | |||
32 | extern const struct imx_spi_imx_data imx51_cspi_data __initconst; | ||
33 | #define imx51_add_cspi(pdata) \ | ||
34 | imx_add_spi_imx(&imx51_cspi_data, pdata) | ||
35 | |||
36 | extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst; | ||
37 | #define imx51_add_ecspi(id, pdata) \ | ||
38 | imx_add_spi_imx(&imx51_ecspi_data[id], pdata) | ||
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index 1920ff4963b2..4c7be87a7c9d 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -17,120 +17,6 @@ | |||
17 | #include <mach/imx-uart.h> | 17 | #include <mach/imx-uart.h> |
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | 19 | ||
20 | static struct resource uart0[] = { | ||
21 | { | ||
22 | .start = MX51_UART1_BASE_ADDR, | ||
23 | .end = MX51_UART1_BASE_ADDR + 0xfff, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | }, { | ||
26 | .start = MX51_MXC_INT_UART1, | ||
27 | .end = MX51_MXC_INT_UART1, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | struct platform_device mxc_uart_device0 = { | ||
33 | .name = "imx-uart", | ||
34 | .id = 0, | ||
35 | .resource = uart0, | ||
36 | .num_resources = ARRAY_SIZE(uart0), | ||
37 | }; | ||
38 | |||
39 | static struct resource uart1[] = { | ||
40 | { | ||
41 | .start = MX51_UART2_BASE_ADDR, | ||
42 | .end = MX51_UART2_BASE_ADDR + 0xfff, | ||
43 | .flags = IORESOURCE_MEM, | ||
44 | }, { | ||
45 | .start = MX51_MXC_INT_UART2, | ||
46 | .end = MX51_MXC_INT_UART2, | ||
47 | .flags = IORESOURCE_IRQ, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | struct platform_device mxc_uart_device1 = { | ||
52 | .name = "imx-uart", | ||
53 | .id = 1, | ||
54 | .resource = uart1, | ||
55 | .num_resources = ARRAY_SIZE(uart1), | ||
56 | }; | ||
57 | |||
58 | static struct resource uart2[] = { | ||
59 | { | ||
60 | .start = MX51_UART3_BASE_ADDR, | ||
61 | .end = MX51_UART3_BASE_ADDR + 0xfff, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, { | ||
64 | .start = MX51_MXC_INT_UART3, | ||
65 | .end = MX51_MXC_INT_UART3, | ||
66 | .flags = IORESOURCE_IRQ, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | struct platform_device mxc_uart_device2 = { | ||
71 | .name = "imx-uart", | ||
72 | .id = 2, | ||
73 | .resource = uart2, | ||
74 | .num_resources = ARRAY_SIZE(uart2), | ||
75 | }; | ||
76 | |||
77 | static struct resource mxc_fec_resources[] = { | ||
78 | { | ||
79 | .start = MX51_MXC_FEC_BASE_ADDR, | ||
80 | .end = MX51_MXC_FEC_BASE_ADDR + 0xfff, | ||
81 | .flags = IORESOURCE_MEM, | ||
82 | }, { | ||
83 | .start = MX51_MXC_INT_FEC, | ||
84 | .end = MX51_MXC_INT_FEC, | ||
85 | .flags = IORESOURCE_IRQ, | ||
86 | }, | ||
87 | }; | ||
88 | |||
89 | struct platform_device mxc_fec_device = { | ||
90 | .name = "fec", | ||
91 | .id = 0, | ||
92 | .num_resources = ARRAY_SIZE(mxc_fec_resources), | ||
93 | .resource = mxc_fec_resources, | ||
94 | }; | ||
95 | |||
96 | static struct resource mxc_i2c0_resources[] = { | ||
97 | { | ||
98 | .start = MX51_I2C1_BASE_ADDR, | ||
99 | .end = MX51_I2C1_BASE_ADDR + SZ_4K - 1, | ||
100 | .flags = IORESOURCE_MEM, | ||
101 | }, { | ||
102 | .start = MX51_MXC_INT_I2C1, | ||
103 | .end = MX51_MXC_INT_I2C1, | ||
104 | .flags = IORESOURCE_IRQ, | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | struct platform_device mxc_i2c_device0 = { | ||
109 | .name = "imx-i2c", | ||
110 | .id = 0, | ||
111 | .num_resources = ARRAY_SIZE(mxc_i2c0_resources), | ||
112 | .resource = mxc_i2c0_resources, | ||
113 | }; | ||
114 | |||
115 | static struct resource mxc_i2c1_resources[] = { | ||
116 | { | ||
117 | .start = MX51_I2C2_BASE_ADDR, | ||
118 | .end = MX51_I2C2_BASE_ADDR + SZ_4K - 1, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, { | ||
121 | .start = MX51_MXC_INT_I2C2, | ||
122 | .end = MX51_MXC_INT_I2C2, | ||
123 | .flags = IORESOURCE_IRQ, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | struct platform_device mxc_i2c_device1 = { | ||
128 | .name = "imx-i2c", | ||
129 | .id = 1, | ||
130 | .num_resources = ARRAY_SIZE(mxc_i2c1_resources), | ||
131 | .resource = mxc_i2c1_resources, | ||
132 | }; | ||
133 | |||
134 | static struct resource mxc_hsi2c_resources[] = { | 20 | static struct resource mxc_hsi2c_resources[] = { |
135 | { | 21 | { |
136 | .start = MX51_HSI2C_DMA_BASE_ADDR, | 22 | .start = MX51_HSI2C_DMA_BASE_ADDR, |
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h index e509cfaad1d4..af1d07c0bbc1 100644 --- a/arch/arm/mach-mx5/devices.h +++ b/arch/arm/mach-mx5/devices.h | |||
@@ -1,12 +1,6 @@ | |||
1 | extern struct platform_device mxc_uart_device0; | ||
2 | extern struct platform_device mxc_uart_device1; | ||
3 | extern struct platform_device mxc_uart_device2; | ||
4 | extern struct platform_device mxc_fec_device; | ||
5 | extern struct platform_device mxc_usbdr_host_device; | 1 | extern struct platform_device mxc_usbdr_host_device; |
6 | extern struct platform_device mxc_usbh1_device; | 2 | extern struct platform_device mxc_usbh1_device; |
7 | extern struct platform_device mxc_usbdr_udc_device; | 3 | extern struct platform_device mxc_usbdr_udc_device; |
8 | extern struct platform_device mxc_wdt; | 4 | extern struct platform_device mxc_wdt; |
9 | extern struct platform_device mxc_i2c_device0; | ||
10 | extern struct platform_device mxc_i2c_device1; | ||
11 | extern struct platform_device mxc_hsi2c_device; | 5 | extern struct platform_device mxc_hsi2c_device; |
12 | extern struct platform_device mxc_keypad_device; | 6 | extern struct platform_device mxc_keypad_device; |
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index ffa93d1d6ef8..d0e417ce2c08 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | 32 | ||
33 | #include "devices-imx51.h" | ||
33 | #include "devices.h" | 34 | #include "devices.h" |
34 | 35 | ||
35 | #define MBIMX51_TSC2007_GPIO (2*32 + 30) | 36 | #define MBIMX51_TSC2007_GPIO (2*32 + 30) |
@@ -114,7 +115,7 @@ static struct pad_desc mbimx51_pads[] = { | |||
114 | MX51_PAD_KEY_COL3__KEY_COL3, | 115 | MX51_PAD_KEY_COL3__KEY_COL3, |
115 | }; | 116 | }; |
116 | 117 | ||
117 | static struct imxuart_platform_data uart_pdata = { | 118 | static const struct imxuart_platform_data uart_pdata __initconst = { |
118 | .flags = IMXUART_HAVE_RTSCTS, | 119 | .flags = IMXUART_HAVE_RTSCTS, |
119 | }; | 120 | }; |
120 | 121 | ||
@@ -172,8 +173,8 @@ void __init eukrea_mbimx51_baseboard_init(void) | |||
172 | mxc_iomux_v3_setup_multiple_pads(mbimx51_pads, | 173 | mxc_iomux_v3_setup_multiple_pads(mbimx51_pads, |
173 | ARRAY_SIZE(mbimx51_pads)); | 174 | ARRAY_SIZE(mbimx51_pads)); |
174 | 175 | ||
175 | mxc_register_device(&mxc_uart_device1, NULL); | 176 | imx51_add_imx_uart(1, NULL); |
176 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 177 | imx51_add_imx_uart(2, &uart_pdata); |
177 | 178 | ||
178 | gpio_request(MBIMX51_LED0, "LED0"); | 179 | gpio_request(MBIMX51_LED0, "LED0"); |
179 | gpio_direction_output(MBIMX51_LED0, 1); | 180 | gpio_direction_output(MBIMX51_LED0, 1); |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 6785db4179b8..95f8d614d4fc 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -92,6 +92,18 @@ config MXC_DEBUG_BOARD | |||
92 | data/address de-multiplexing and decode, signal level shift, | 92 | data/address de-multiplexing and decode, signal level shift, |
93 | interrupt control and various board functions. | 93 | interrupt control and various board functions. |
94 | 94 | ||
95 | config HAVE_EPIT | ||
96 | bool | ||
97 | |||
98 | config MXC_USE_EPIT | ||
99 | bool "Use EPIT instead of GPT" | ||
100 | depends on HAVE_EPIT | ||
101 | help | ||
102 | Use EPIT as the system timer on systems that have it. Normally you | ||
103 | don't have a reason to do so as the EPIT has the same features and | ||
104 | uses the same clocks as the GPT. Anyway, on some systems the GPT | ||
105 | may be in use for other purposes. | ||
106 | |||
95 | config MXC_ULPI | 107 | config MXC_ULPI |
96 | bool | 108 | bool |
97 | 109 | ||
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index 78d405ed8616..bb3443f9751a 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | |||
13 | obj-$(CONFIG_MXC_PWM) += pwm.o | 13 | obj-$(CONFIG_MXC_PWM) += pwm.o |
14 | obj-$(CONFIG_USB_EHCI_MXC) += ehci.o | 14 | obj-$(CONFIG_USB_EHCI_MXC) += ehci.o |
15 | obj-$(CONFIG_MXC_ULPI) += ulpi.o | 15 | obj-$(CONFIG_MXC_ULPI) += ulpi.o |
16 | obj-$(CONFIG_MXC_USE_EPIT) += epit.o | ||
16 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o | 17 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o |
17 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o | 18 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o |
18 | obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o | 19 | obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o |
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index f9e7cdbd0005..62920490c0d6 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c | |||
@@ -186,7 +186,13 @@ EXPORT_SYMBOL_GPL(mxc_audmux_v2_configure_port); | |||
186 | static int mxc_audmux_v2_init(void) | 186 | static int mxc_audmux_v2_init(void) |
187 | { | 187 | { |
188 | int ret; | 188 | int ret; |
189 | 189 | #if defined(CONFIG_ARCH_MX5) | |
190 | if (cpu_is_mx51()) { | ||
191 | audmux_base = MX51_IO_ADDRESS(MX51_AUDMUX_BASE_ADDR); | ||
192 | ret = 0; | ||
193 | return ret; | ||
194 | } | ||
195 | #endif | ||
190 | #if defined(CONFIG_ARCH_MX3) | 196 | #if defined(CONFIG_ARCH_MX3) |
191 | if (cpu_is_mx31()) | 197 | if (cpu_is_mx31()) |
192 | audmux_base = MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR); | 198 | audmux_base = MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR); |
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index 9ab784b776f9..404799487f17 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -1,3 +1,10 @@ | |||
1 | config IMX_HAVE_PLATFORM_ESDHC | ||
2 | bool | ||
3 | |||
4 | config IMX_HAVE_PLATFORM_FEC | ||
5 | bool | ||
6 | default y if ARCH_MX25 || SOC_IMX27 || ARCH_MX35 || ARCH_MX51 | ||
7 | |||
1 | config IMX_HAVE_PLATFORM_FLEXCAN | 8 | config IMX_HAVE_PLATFORM_FLEXCAN |
2 | select HAVE_CAN_FLEXCAN | 9 | select HAVE_CAN_FLEXCAN |
3 | bool | 10 | bool |
@@ -5,6 +12,9 @@ config IMX_HAVE_PLATFORM_FLEXCAN | |||
5 | config IMX_HAVE_PLATFORM_IMX_I2C | 12 | config IMX_HAVE_PLATFORM_IMX_I2C |
6 | bool | 13 | bool |
7 | 14 | ||
15 | config IMX_HAVE_PLATFORM_IMX_SSI | ||
16 | bool | ||
17 | |||
8 | config IMX_HAVE_PLATFORM_IMX_UART | 18 | config IMX_HAVE_PLATFORM_IMX_UART |
9 | bool | 19 | bool |
10 | 20 | ||
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index 347da5161f7e..0a3c1f089413 100644 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile | |||
@@ -1,8 +1,9 @@ | |||
1 | ifdef CONFIG_CAN_FLEXCAN | 1 | obj-$(CONFIG_IMX_HAVE_PLATFORM_ESDHC) += platform-esdhc.o |
2 | # the ifdef can be removed once the flexcan driver has been merged | 2 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o |
3 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | 3 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o |
4 | endif | 4 | obj-y += platform-imx-dma.o |
5 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o | 5 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o |
6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o | ||
6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o | 7 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o |
7 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o | 8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o |
8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | 9 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o |
diff --git a/arch/arm/plat-mxc/devices/platform-esdhc.c b/arch/arm/plat-mxc/devices/platform-esdhc.c new file mode 100644 index 000000000000..68db2a22d2cd --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-esdhc.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 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 | |||
9 | #include <mach/devices-common.h> | ||
10 | #include <mach/esdhc.h> | ||
11 | |||
12 | struct platform_device *__init imx_add_esdhc(int id, | ||
13 | resource_size_t iobase, resource_size_t iosize, | ||
14 | resource_size_t irq, | ||
15 | const struct esdhc_platform_data *pdata) | ||
16 | { | ||
17 | struct resource res[] = { | ||
18 | { | ||
19 | .start = iobase, | ||
20 | .end = iobase + iosize - 1, | ||
21 | .flags = IORESOURCE_MEM, | ||
22 | }, { | ||
23 | .start = irq, | ||
24 | .end = irq, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | }, | ||
27 | }; | ||
28 | |||
29 | return imx_add_platform_device("sdhci-esdhc-imx", id, res, | ||
30 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
31 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c new file mode 100644 index 000000000000..11d087f4e219 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-fec.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | #include <mach/hardware.h> | ||
11 | #include <mach/devices-common.h> | ||
12 | |||
13 | #define imx_fec_data_entry_single(soc) \ | ||
14 | { \ | ||
15 | .iobase = soc ## _FEC_BASE_ADDR, \ | ||
16 | .irq = soc ## _INT_FEC, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_ARCH_MX25 | ||
20 | const struct imx_fec_data imx25_fec_data __initconst = | ||
21 | imx_fec_data_entry_single(MX25); | ||
22 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX27 | ||
25 | const struct imx_fec_data imx27_fec_data __initconst = | ||
26 | imx_fec_data_entry_single(MX27); | ||
27 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
28 | |||
29 | #ifdef CONFIG_ARCH_MX35 | ||
30 | const struct imx_fec_data imx35_fec_data __initconst = | ||
31 | imx_fec_data_entry_single(MX35); | ||
32 | #endif | ||
33 | |||
34 | #ifdef CONFIG_ARCH_MX51 | ||
35 | const struct imx_fec_data imx51_fec_data __initconst = | ||
36 | imx_fec_data_entry_single(MX51); | ||
37 | #endif | ||
38 | |||
39 | struct platform_device *__init imx_add_fec( | ||
40 | const struct imx_fec_data *data, | ||
41 | const struct fec_platform_data *pdata) | ||
42 | { | ||
43 | struct resource res[] = { | ||
44 | { | ||
45 | .start = data->iobase, | ||
46 | .end = data->iobase + SZ_4K, | ||
47 | .flags = IORESOURCE_MEM, | ||
48 | }, { | ||
49 | .start = data->irq, | ||
50 | .end = data->irq, | ||
51 | .flags = IORESOURCE_IRQ, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | return imx_add_platform_device("fec", 0 /* -1? */, | ||
56 | res, ARRAY_SIZE(res), | ||
57 | pdata, sizeof(*pdata)); | ||
58 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c new file mode 100644 index 000000000000..02d989018059 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/compiler.h> | ||
10 | #include <linux/err.h> | ||
11 | #include <linux/init.h> | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | #include <mach/devices-common.h> | ||
15 | #ifdef SDMA_IS_MERGED | ||
16 | #include <mach/sdma.h> | ||
17 | #else | ||
18 | struct sdma_platform_data { | ||
19 | int sdma_version; | ||
20 | char *cpu_name; | ||
21 | int to_version; | ||
22 | }; | ||
23 | #endif | ||
24 | |||
25 | struct imx_imx_sdma_data { | ||
26 | resource_size_t iobase; | ||
27 | resource_size_t irq; | ||
28 | struct sdma_platform_data pdata; | ||
29 | }; | ||
30 | |||
31 | #define imx_imx_sdma_data_entry_single(soc, _sdma_version, _cpu_name, _to_version)\ | ||
32 | { \ | ||
33 | .iobase = soc ## _SDMA ## _BASE_ADDR, \ | ||
34 | .irq = soc ## _INT_SDMA, \ | ||
35 | .pdata = { \ | ||
36 | .sdma_version = _sdma_version, \ | ||
37 | .cpu_name = _cpu_name, \ | ||
38 | .to_version = _to_version, \ | ||
39 | }, \ | ||
40 | } | ||
41 | |||
42 | #ifdef CONFIG_ARCH_MX25 | ||
43 | const struct imx_imx_sdma_data imx25_imx_sdma_data __initconst = | ||
44 | imx_imx_sdma_data_entry_single(MX25, 1, "imx25", 0); | ||
45 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
46 | |||
47 | #ifdef CONFIG_ARCH_MX31 | ||
48 | struct imx_imx_sdma_data imx31_imx_sdma_data __initdata = | ||
49 | imx_imx_sdma_data_entry_single(MX31, 1, "imx31", 0); | ||
50 | #endif /* ifdef CONFIG_ARCH_MX31 */ | ||
51 | |||
52 | #ifdef CONFIG_ARCH_MX35 | ||
53 | struct imx_imx_sdma_data imx35_imx_sdma_data __initdata = | ||
54 | imx_imx_sdma_data_entry_single(MX35, 2, "imx35", 0); | ||
55 | #endif /* ifdef CONFIG_ARCH_MX35 */ | ||
56 | |||
57 | #ifdef CONFIG_ARCH_MX51 | ||
58 | const struct imx_imx_sdma_data imx51_imx_sdma_data __initconst = | ||
59 | imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 0); | ||
60 | #endif /* ifdef CONFIG_ARCH_MX51 */ | ||
61 | |||
62 | static struct platform_device __init __maybe_unused *imx_add_imx_sdma( | ||
63 | const struct imx_imx_sdma_data *data) | ||
64 | { | ||
65 | struct resource res[] = { | ||
66 | { | ||
67 | .start = data->iobase, | ||
68 | .end = data->iobase + SZ_4K - 1, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, { | ||
71 | .start = data->irq, | ||
72 | .end = data->irq, | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | return imx_add_platform_device("imx-sdma", -1, | ||
78 | res, ARRAY_SIZE(res), | ||
79 | &data->pdata, sizeof(data->pdata)); | ||
80 | } | ||
81 | |||
82 | static struct platform_device __init __maybe_unused *imx_add_imx_dma(void) | ||
83 | { | ||
84 | return imx_add_platform_device("imx-dma", -1, NULL, 0, NULL, 0); | ||
85 | } | ||
86 | |||
87 | static int __init imxXX_add_imx_dma(void) | ||
88 | { | ||
89 | struct platform_device *ret; | ||
90 | |||
91 | #if defined(CONFIG_SOC_IMX21) || defined(CONFIG_SOC_IMX27) | ||
92 | if (cpu_is_mx21() || cpu_is_mx27()) | ||
93 | ret = imx_add_imx_dma(); | ||
94 | else | ||
95 | #endif | ||
96 | |||
97 | #if defined(CONFIG_ARCH_MX25) | ||
98 | if (cpu_is_mx25()) | ||
99 | ret = imx_add_imx_sdma(&imx25_imx_sdma_data); | ||
100 | else | ||
101 | #endif | ||
102 | |||
103 | #if defined(CONFIG_ARCH_MX31) | ||
104 | if (cpu_is_mx31()) { | ||
105 | imx31_imx_sdma_data.pdata.to_version = mx31_revision() >> 4; | ||
106 | ret = imx_add_imx_sdma(&imx31_imx_sdma_data); | ||
107 | } else | ||
108 | #endif | ||
109 | |||
110 | #if defined(CONFIG_ARCH_MX35) | ||
111 | if (cpu_is_mx35()) { | ||
112 | imx35_imx_sdma_data.pdata.to_version = mx35_revision() >> 4; | ||
113 | ret = imx_add_imx_sdma(&imx35_imx_sdma_data); | ||
114 | } else | ||
115 | #endif | ||
116 | |||
117 | #if defined(CONFIG_ARCH_MX51) | ||
118 | if (cpu_is_mx51()) | ||
119 | ret = imx_add_imx_sdma(&imx51_imx_sdma_data); | ||
120 | else | ||
121 | #endif | ||
122 | ret = ERR_PTR(-ENODEV); | ||
123 | |||
124 | if (IS_ERR(ret)) | ||
125 | return PTR_ERR(ret); | ||
126 | |||
127 | return 0; | ||
128 | } | ||
129 | arch_initcall(imxXX_add_imx_dma); | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c index d0af9f7d8aed..ca988d40a3d7 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c +++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c | |||
@@ -6,24 +6,94 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include <mach/hardware.h> | ||
9 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
10 | 11 | ||
11 | struct platform_device *__init imx_add_imx_i2c(int id, | 12 | #define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) \ |
12 | resource_size_t iobase, resource_size_t iosize, int irq, | 13 | { \ |
14 | .id = _id, \ | ||
15 | .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \ | ||
16 | .iosize = _size, \ | ||
17 | .irq = soc ## _INT_I2C ## _hwid, \ | ||
18 | } | ||
19 | |||
20 | #define imx_imx_i2c_data_entry(soc, _id, _hwid, _size) \ | ||
21 | [_id] = imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) | ||
22 | |||
23 | #ifdef CONFIG_SOC_IMX1 | ||
24 | const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = | ||
25 | imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K); | ||
26 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
27 | |||
28 | #ifdef CONFIG_SOC_IMX21 | ||
29 | const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = | ||
30 | imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K); | ||
31 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
32 | |||
33 | #ifdef CONFIG_ARCH_MX25 | ||
34 | const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { | ||
35 | #define imx25_imx_i2c_data_entry(_id, _hwid) \ | ||
36 | imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K) | ||
37 | imx25_imx_i2c_data_entry(0, 1), | ||
38 | imx25_imx_i2c_data_entry(1, 2), | ||
39 | imx25_imx_i2c_data_entry(2, 3), | ||
40 | }; | ||
41 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
42 | |||
43 | #ifdef CONFIG_SOC_IMX27 | ||
44 | const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { | ||
45 | #define imx27_imx_i2c_data_entry(_id, _hwid) \ | ||
46 | imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K) | ||
47 | imx27_imx_i2c_data_entry(0, 1), | ||
48 | imx27_imx_i2c_data_entry(1, 2), | ||
49 | }; | ||
50 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
51 | |||
52 | #ifdef CONFIG_ARCH_MX31 | ||
53 | const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { | ||
54 | #define imx31_imx_i2c_data_entry(_id, _hwid) \ | ||
55 | imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K) | ||
56 | imx31_imx_i2c_data_entry(0, 1), | ||
57 | imx31_imx_i2c_data_entry(1, 2), | ||
58 | imx31_imx_i2c_data_entry(2, 3), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_ARCH_MX31 */ | ||
61 | |||
62 | #ifdef CONFIG_ARCH_MX35 | ||
63 | const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { | ||
64 | #define imx35_imx_i2c_data_entry(_id, _hwid) \ | ||
65 | imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K) | ||
66 | imx35_imx_i2c_data_entry(0, 1), | ||
67 | imx35_imx_i2c_data_entry(1, 2), | ||
68 | }; | ||
69 | #endif /* ifdef CONFIG_ARCH_MX35 */ | ||
70 | |||
71 | #ifdef CONFIG_ARCH_MX51 | ||
72 | const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | ||
73 | #define imx51_imx_i2c_data_entry(_id, _hwid) \ | ||
74 | imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K) | ||
75 | imx51_imx_i2c_data_entry(0, 1), | ||
76 | imx51_imx_i2c_data_entry(1, 2), | ||
77 | }; | ||
78 | #endif /* ifdef CONFIG_ARCH_MX51 */ | ||
79 | |||
80 | struct platform_device *__init imx_add_imx_i2c( | ||
81 | const struct imx_imx_i2c_data *data, | ||
13 | const struct imxi2c_platform_data *pdata) | 82 | const struct imxi2c_platform_data *pdata) |
14 | { | 83 | { |
15 | struct resource res[] = { | 84 | struct resource res[] = { |
16 | { | 85 | { |
17 | .start = iobase, | 86 | .start = data->iobase, |
18 | .end = iobase + iosize - 1, | 87 | .end = data->iobase + data->iosize - 1, |
19 | .flags = IORESOURCE_MEM, | 88 | .flags = IORESOURCE_MEM, |
20 | }, { | 89 | }, { |
21 | .start = irq, | 90 | .start = data->irq, |
22 | .end = irq, | 91 | .end = data->irq, |
23 | .flags = IORESOURCE_IRQ, | 92 | .flags = IORESOURCE_IRQ, |
24 | }, | 93 | }, |
25 | }; | 94 | }; |
26 | 95 | ||
27 | return imx_add_platform_device("imx-i2c", id, res, ARRAY_SIZE(res), | 96 | return imx_add_platform_device("imx-i2c", data->id, |
97 | res, ARRAY_SIZE(res), | ||
28 | pdata, sizeof(*pdata)); | 98 | pdata, sizeof(*pdata)); |
29 | } | 99 | } |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-ssi.c b/arch/arm/plat-mxc/devices/platform-imx-ssi.c new file mode 100644 index 000000000000..38a7a0b8f2f1 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-ssi.c | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx_imx_ssi_data_entry(soc, _id, _hwid, _size) \ | ||
13 | [_id] = { \ | ||
14 | .id = _id, \ | ||
15 | .iobase = soc ## _SSI ## _hwid ## _BASE_ADDR, \ | ||
16 | .iosize = _size, \ | ||
17 | .irq = soc ## _INT_SSI ## _hwid, \ | ||
18 | .dmatx0 = soc ## _DMA_REQ_SSI ## _hwid ## _TX0, \ | ||
19 | .dmarx0 = soc ## _DMA_REQ_SSI ## _hwid ## _RX0, \ | ||
20 | .dmatx1 = soc ## _DMA_REQ_SSI ## _hwid ## _TX1, \ | ||
21 | .dmarx1 = soc ## _DMA_REQ_SSI ## _hwid ## _RX1, \ | ||
22 | } | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX21 | ||
25 | const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst = { | ||
26 | #define imx21_imx_ssi_data_entry(_id, _hwid) \ | ||
27 | imx_imx_ssi_data_entry(MX21, _id, _hwid, SZ_4K) | ||
28 | imx21_imx_ssi_data_entry(0, 1), | ||
29 | imx21_imx_ssi_data_entry(1, 2), | ||
30 | }; | ||
31 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
32 | |||
33 | #ifdef CONFIG_ARCH_MX25 | ||
34 | const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst = { | ||
35 | #define imx25_imx_ssi_data_entry(_id, _hwid) \ | ||
36 | imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K) | ||
37 | imx25_imx_ssi_data_entry(0, 1), | ||
38 | imx25_imx_ssi_data_entry(1, 2), | ||
39 | }; | ||
40 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
41 | |||
42 | #ifdef CONFIG_SOC_IMX27 | ||
43 | const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = { | ||
44 | #define imx27_imx_ssi_data_entry(_id, _hwid) \ | ||
45 | imx_imx_ssi_data_entry(MX27, _id, _hwid, SZ_4K) | ||
46 | imx27_imx_ssi_data_entry(0, 1), | ||
47 | imx27_imx_ssi_data_entry(1, 2), | ||
48 | }; | ||
49 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
50 | |||
51 | #ifdef CONFIG_ARCH_MX31 | ||
52 | const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst = { | ||
53 | #define imx31_imx_ssi_data_entry(_id, _hwid) \ | ||
54 | imx_imx_ssi_data_entry(MX31, _id, _hwid, SZ_4K) | ||
55 | imx31_imx_ssi_data_entry(0, 1), | ||
56 | imx31_imx_ssi_data_entry(1, 2), | ||
57 | }; | ||
58 | #endif /* ifdef CONFIG_ARCH_MX31 */ | ||
59 | |||
60 | #ifdef CONFIG_ARCH_MX35 | ||
61 | const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = { | ||
62 | #define imx35_imx_ssi_data_entry(_id, _hwid) \ | ||
63 | imx_imx_ssi_data_entry(MX35, _id, _hwid, SZ_4K) | ||
64 | imx35_imx_ssi_data_entry(0, 1), | ||
65 | imx35_imx_ssi_data_entry(1, 2), | ||
66 | }; | ||
67 | #endif /* ifdef CONFIG_ARCH_MX35 */ | ||
68 | |||
69 | #ifdef CONFIG_ARCH_MX51 | ||
70 | const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = { | ||
71 | #define imx51_imx_ssi_data_entry(_id, _hwid) \ | ||
72 | imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_4K) | ||
73 | imx51_imx_ssi_data_entry(0, 1), | ||
74 | imx51_imx_ssi_data_entry(1, 2), | ||
75 | }; | ||
76 | #endif /* ifdef CONFIG_ARCH_MX51 */ | ||
77 | |||
78 | struct platform_device *__init imx_add_imx_ssi( | ||
79 | const struct imx_imx_ssi_data *data, | ||
80 | const struct imx_ssi_platform_data *pdata) | ||
81 | { | ||
82 | struct resource res[] = { | ||
83 | { | ||
84 | .start = data->iobase, | ||
85 | .end = data->iobase + data->iosize - 1, | ||
86 | .flags = IORESOURCE_MEM, | ||
87 | }, { | ||
88 | .start = data->irq, | ||
89 | .end = data->irq, | ||
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | #define DMARES(_name) { \ | ||
93 | .name = #_name, \ | ||
94 | .start = data->dma ## _name, \ | ||
95 | .end = data->dma ## _name, \ | ||
96 | .flags = IORESOURCE_DMA, \ | ||
97 | } | ||
98 | DMARES(tx0), | ||
99 | DMARES(rx0), | ||
100 | DMARES(tx1), | ||
101 | DMARES(rx1), | ||
102 | }; | ||
103 | |||
104 | return imx_add_platform_device("imx-ssi", data->id, | ||
105 | res, ARRAY_SIZE(res), | ||
106 | pdata, sizeof(*pdata)); | ||
107 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/plat-mxc/devices/platform-imx-uart.c index fa3dff1433e8..2039640adf27 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-uart.c +++ b/arch/arm/plat-mxc/devices/platform-imx-uart.c | |||
@@ -6,55 +6,148 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include <mach/hardware.h> | ||
9 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
10 | 11 | ||
11 | struct platform_device *__init imx_add_imx_uart_3irq(int id, | 12 | #define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size) \ |
12 | resource_size_t iobase, resource_size_t iosize, | 13 | [_id] = { \ |
13 | resource_size_t irqrx, resource_size_t irqtx, | 14 | .id = _id, \ |
14 | resource_size_t irqrts, | 15 | .iobase = soc ## _UART ## _hwid ## _BASE_ADDR, \ |
16 | .iosize = _size, \ | ||
17 | .irqrx = soc ## _INT_UART ## _hwid ## RX, \ | ||
18 | .irqtx = soc ## _INT_UART ## _hwid ## TX, \ | ||
19 | .irqrts = soc ## _INT_UART ## _hwid ## RTS, \ | ||
20 | } | ||
21 | |||
22 | #define imx_imx_uart_1irq_data_entry(soc, _id, _hwid, _size) \ | ||
23 | [_id] = { \ | ||
24 | .id = _id, \ | ||
25 | .iobase = soc ## _UART ## _hwid ## _BASE_ADDR, \ | ||
26 | .iosize = _size, \ | ||
27 | .irq = soc ## _INT_UART ## _hwid, \ | ||
28 | } | ||
29 | |||
30 | #ifdef CONFIG_SOC_IMX1 | ||
31 | const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst = { | ||
32 | #define imx1_imx_uart_data_entry(_id, _hwid) \ | ||
33 | imx_imx_uart_3irq_data_entry(MX1, _id, _hwid, 0xd0) | ||
34 | imx1_imx_uart_data_entry(0, 1), | ||
35 | imx1_imx_uart_data_entry(1, 2), | ||
36 | }; | ||
37 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
38 | |||
39 | #ifdef CONFIG_SOC_IMX21 | ||
40 | const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = { | ||
41 | #define imx21_imx_uart_data_entry(_id, _hwid) \ | ||
42 | imx_imx_uart_1irq_data_entry(MX21, _id, _hwid, SZ_4K) | ||
43 | imx21_imx_uart_data_entry(0, 1), | ||
44 | imx21_imx_uart_data_entry(1, 2), | ||
45 | imx21_imx_uart_data_entry(2, 3), | ||
46 | imx21_imx_uart_data_entry(3, 4), | ||
47 | }; | ||
48 | #endif | ||
49 | |||
50 | #ifdef CONFIG_ARCH_MX25 | ||
51 | const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst = { | ||
52 | #define imx25_imx_uart_data_entry(_id, _hwid) \ | ||
53 | imx_imx_uart_1irq_data_entry(MX25, _id, _hwid, SZ_16K) | ||
54 | imx25_imx_uart_data_entry(0, 1), | ||
55 | imx25_imx_uart_data_entry(1, 2), | ||
56 | imx25_imx_uart_data_entry(2, 3), | ||
57 | imx25_imx_uart_data_entry(3, 4), | ||
58 | imx25_imx_uart_data_entry(4, 5), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
61 | |||
62 | #ifdef CONFIG_SOC_IMX27 | ||
63 | const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = { | ||
64 | #define imx27_imx_uart_data_entry(_id, _hwid) \ | ||
65 | imx_imx_uart_1irq_data_entry(MX27, _id, _hwid, SZ_4K) | ||
66 | imx27_imx_uart_data_entry(0, 1), | ||
67 | imx27_imx_uart_data_entry(1, 2), | ||
68 | imx27_imx_uart_data_entry(2, 3), | ||
69 | imx27_imx_uart_data_entry(3, 4), | ||
70 | imx27_imx_uart_data_entry(4, 5), | ||
71 | imx27_imx_uart_data_entry(5, 6), | ||
72 | }; | ||
73 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
74 | |||
75 | #ifdef CONFIG_ARCH_MX31 | ||
76 | const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst = { | ||
77 | #define imx31_imx_uart_data_entry(_id, _hwid) \ | ||
78 | imx_imx_uart_1irq_data_entry(MX31, _id, _hwid, SZ_4K) | ||
79 | imx31_imx_uart_data_entry(0, 1), | ||
80 | imx31_imx_uart_data_entry(1, 2), | ||
81 | imx31_imx_uart_data_entry(2, 3), | ||
82 | imx31_imx_uart_data_entry(3, 4), | ||
83 | imx31_imx_uart_data_entry(4, 5), | ||
84 | }; | ||
85 | #endif /* ifdef CONFIG_ARCH_MX31 */ | ||
86 | |||
87 | #ifdef CONFIG_ARCH_MX35 | ||
88 | const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = { | ||
89 | #define imx35_imx_uart_data_entry(_id, _hwid) \ | ||
90 | imx_imx_uart_1irq_data_entry(MX31, _id, _hwid, SZ_16K) | ||
91 | imx35_imx_uart_data_entry(0, 1), | ||
92 | imx35_imx_uart_data_entry(1, 2), | ||
93 | imx35_imx_uart_data_entry(2, 3), | ||
94 | }; | ||
95 | #endif /* ifdef CONFIG_ARCH_MX35 */ | ||
96 | |||
97 | #ifdef CONFIG_ARCH_MX51 | ||
98 | const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { | ||
99 | #define imx51_imx_uart_data_entry(_id, _hwid) \ | ||
100 | imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K) | ||
101 | imx51_imx_uart_data_entry(0, 1), | ||
102 | imx51_imx_uart_data_entry(1, 2), | ||
103 | imx51_imx_uart_data_entry(2, 3), | ||
104 | }; | ||
105 | #endif /* ifdef CONFIG_ARCH_MX51 */ | ||
106 | |||
107 | struct platform_device *__init imx_add_imx_uart_3irq( | ||
108 | const struct imx_imx_uart_3irq_data *data, | ||
15 | const struct imxuart_platform_data *pdata) | 109 | const struct imxuart_platform_data *pdata) |
16 | { | 110 | { |
17 | struct resource res[] = { | 111 | struct resource res[] = { |
18 | { | 112 | { |
19 | .start = iobase, | 113 | .start = data->iobase, |
20 | .end = iobase + iosize - 1, | 114 | .end = data->iobase + data->iosize - 1, |
21 | .flags = IORESOURCE_MEM, | 115 | .flags = IORESOURCE_MEM, |
22 | }, { | 116 | }, { |
23 | .start = irqrx, | 117 | .start = data->irqrx, |
24 | .end = irqrx, | 118 | .end = data->irqrx, |
25 | .flags = IORESOURCE_IRQ, | 119 | .flags = IORESOURCE_IRQ, |
26 | }, { | 120 | }, { |
27 | .start = irqtx, | 121 | .start = data->irqtx, |
28 | .end = irqtx, | 122 | .end = data->irqtx, |
29 | .flags = IORESOURCE_IRQ, | 123 | .flags = IORESOURCE_IRQ, |
30 | }, { | 124 | }, { |
31 | .start = irqrts, | 125 | .start = data->irqrts, |
32 | .end = irqrx, | 126 | .end = data->irqrx, |
33 | .flags = IORESOURCE_IRQ, | 127 | .flags = IORESOURCE_IRQ, |
34 | }, | 128 | }, |
35 | }; | 129 | }; |
36 | 130 | ||
37 | return imx_add_platform_device("imx-uart", id, res, ARRAY_SIZE(res), | 131 | return imx_add_platform_device("imx-uart", data->id, res, |
38 | pdata, sizeof(*pdata)); | 132 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); |
39 | } | 133 | } |
40 | 134 | ||
41 | struct platform_device *__init imx_add_imx_uart_1irq(int id, | 135 | struct platform_device *__init imx_add_imx_uart_1irq( |
42 | resource_size_t iobase, resource_size_t iosize, | 136 | const struct imx_imx_uart_1irq_data *data, |
43 | resource_size_t irq, | ||
44 | const struct imxuart_platform_data *pdata) | 137 | const struct imxuart_platform_data *pdata) |
45 | { | 138 | { |
46 | struct resource res[] = { | 139 | struct resource res[] = { |
47 | { | 140 | { |
48 | .start = iobase, | 141 | .start = data->iobase, |
49 | .end = iobase + iosize - 1, | 142 | .end = data->iobase + data->iosize - 1, |
50 | .flags = IORESOURCE_MEM, | 143 | .flags = IORESOURCE_MEM, |
51 | }, { | 144 | }, { |
52 | .start = irq, | 145 | .start = data->irq, |
53 | .end = irq, | 146 | .end = data->irq, |
54 | .flags = IORESOURCE_IRQ, | 147 | .flags = IORESOURCE_IRQ, |
55 | }, | 148 | }, |
56 | }; | 149 | }; |
57 | 150 | ||
58 | return imx_add_platform_device("imx-uart", id, res, ARRAY_SIZE(res), | 151 | return imx_add_platform_device("imx-uart", data->id, res, ARRAY_SIZE(res), |
59 | pdata, sizeof(*pdata)); | 152 | pdata, sizeof(*pdata)); |
60 | } | 153 | } |
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_nand.c b/arch/arm/plat-mxc/devices/platform-mxc_nand.c index 1c286418d123..3fdcc32e3d67 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc_nand.c +++ b/arch/arm/plat-mxc/devices/platform-mxc_nand.c | |||
@@ -7,38 +7,77 @@ | |||
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include <asm/sizes.h> | 9 | #include <asm/sizes.h> |
10 | #include <mach/hardware.h> | ||
10 | #include <mach/devices-common.h> | 11 | #include <mach/devices-common.h> |
11 | 12 | ||
12 | static struct platform_device *__init imx_add_mxc_nand(resource_size_t iobase, | 13 | #define imx_mxc_nand_data_entry_single(soc, _size) \ |
13 | int irq, const struct mxc_nand_platform_data *pdata, | 14 | { \ |
14 | resource_size_t iosize) | 15 | .iobase = soc ## _NFC_BASE_ADDR, \ |
16 | .iosize = _size, \ | ||
17 | .irq = soc ## _INT_NFC \ | ||
18 | } | ||
19 | |||
20 | #define imx_mxc_nandv3_data_entry_single(soc, _size) \ | ||
21 | { \ | ||
22 | .id = -1, \ | ||
23 | .iobase = soc ## _NFC_BASE_ADDR, \ | ||
24 | .iosize = _size, \ | ||
25 | .axibase = soc ## _NFC_AXI_BASE_ADDR, \ | ||
26 | .irq = soc ## _INT_NFC \ | ||
27 | } | ||
28 | |||
29 | #ifdef CONFIG_SOC_IMX21 | ||
30 | const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst = | ||
31 | imx_mxc_nand_data_entry_single(MX21, SZ_4K); | ||
32 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
33 | |||
34 | #ifdef CONFIG_ARCH_MX25 | ||
35 | const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst = | ||
36 | imx_mxc_nand_data_entry_single(MX25, SZ_8K); | ||
37 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
38 | |||
39 | #ifdef CONFIG_SOC_IMX27 | ||
40 | const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst = | ||
41 | imx_mxc_nand_data_entry_single(MX27, SZ_4K); | ||
42 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
43 | |||
44 | #ifdef CONFIG_ARCH_MX31 | ||
45 | const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst = | ||
46 | imx_mxc_nand_data_entry_single(MX31, SZ_4K); | ||
47 | #endif | ||
48 | |||
49 | #ifdef CONFIG_ARCH_MX35 | ||
50 | const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst = | ||
51 | imx_mxc_nand_data_entry_single(MX35, SZ_8K); | ||
52 | #endif | ||
53 | |||
54 | #ifdef CONFIG_ARCH_MX51 | ||
55 | const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst = | ||
56 | imx_mxc_nandv3_data_entry_single(MX51, SZ_16K); | ||
57 | #endif | ||
58 | |||
59 | struct platform_device *__init imx_add_mxc_nand( | ||
60 | const struct imx_mxc_nand_data *data, | ||
61 | const struct mxc_nand_platform_data *pdata) | ||
15 | { | 62 | { |
16 | static int id = 0; | 63 | /* AXI has to come first, that's how the mxc_nand driver expect it */ |
17 | |||
18 | struct resource res[] = { | 64 | struct resource res[] = { |
19 | { | 65 | { |
20 | .start = iobase, | 66 | .start = data->axibase, |
21 | .end = iobase + iosize - 1, | 67 | .end = data->axibase + SZ_16K - 1, |
22 | .flags = IORESOURCE_MEM, | 68 | .flags = IORESOURCE_MEM, |
23 | }, { | 69 | }, { |
24 | .start = irq, | 70 | .start = data->iobase, |
25 | .end = irq, | 71 | .end = data->iobase + data->iosize - 1, |
72 | .flags = IORESOURCE_MEM, | ||
73 | }, { | ||
74 | .start = data->irq, | ||
75 | .end = data->irq, | ||
26 | .flags = IORESOURCE_IRQ, | 76 | .flags = IORESOURCE_IRQ, |
27 | }, | 77 | }, |
28 | }; | 78 | }; |
29 | 79 | return imx_add_platform_device("mxc_nand", data->id, | |
30 | return imx_add_platform_device("mxc_nand", id++, res, ARRAY_SIZE(res), | 80 | res + !data->axibase, |
81 | ARRAY_SIZE(res) - !data->axibase, | ||
31 | pdata, sizeof(*pdata)); | 82 | pdata, sizeof(*pdata)); |
32 | } | 83 | } |
33 | |||
34 | struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase, | ||
35 | int irq, const struct mxc_nand_platform_data *pdata) | ||
36 | { | ||
37 | return imx_add_mxc_nand(iobase, irq, pdata, SZ_4K); | ||
38 | } | ||
39 | |||
40 | struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase, | ||
41 | int irq, const struct mxc_nand_platform_data *pdata) | ||
42 | { | ||
43 | return imx_add_mxc_nand(iobase, irq, pdata, SZ_8K); | ||
44 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c index 2831a6d3eb4b..e48340ec331e 100644 --- a/arch/arm/plat-mxc/devices/platform-spi_imx.c +++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c | |||
@@ -6,25 +6,96 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include <asm/sizes.h> | 9 | #include <mach/hardware.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | struct platform_device *__init imx_add_spi_imx(int id, | 12 | #define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \ |
13 | resource_size_t iobase, resource_size_t iosize, int irq, | 13 | { \ |
14 | .devid = _devid, \ | ||
15 | .id = _id, \ | ||
16 | .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR, \ | ||
17 | .iosize = _size, \ | ||
18 | .irq = soc ## _INT_ ## type ## hwid, \ | ||
19 | } | ||
20 | |||
21 | #define imx_spi_imx_data_entry(soc, type, devid, id, hwid, size) \ | ||
22 | [id] = imx_spi_imx_data_entry_single(soc, type, devid, id, hwid, size) | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX21 | ||
25 | const struct imx_spi_imx_data imx21_cspi_data[] __initconst = { | ||
26 | #define imx21_cspi_data_entry(_id, _hwid) \ | ||
27 | imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K) | ||
28 | imx21_cspi_data_entry(0, 1), | ||
29 | imx21_cspi_data_entry(1, 2), | ||
30 | #endif | ||
31 | |||
32 | #ifdef CONFIG_ARCH_MX25 | ||
33 | const struct imx_spi_imx_data imx25_cspi_data[] __initconst = { | ||
34 | #define imx25_cspi_data_entry(_id, _hwid) \ | ||
35 | imx_spi_imx_data_entry(MX25, CSPI, "imx25-cspi", _id, _hwid, SZ_16K) | ||
36 | imx25_cspi_data_entry(0, 1), | ||
37 | imx25_cspi_data_entry(1, 2), | ||
38 | imx25_cspi_data_entry(2, 3), | ||
39 | }; | ||
40 | #endif /* ifdef CONFIG_ARCH_MX25 */ | ||
41 | |||
42 | #ifdef CONFIG_SOC_IMX27 | ||
43 | const struct imx_spi_imx_data imx27_cspi_data[] __initconst = { | ||
44 | #define imx27_cspi_data_entry(_id, _hwid) \ | ||
45 | imx_spi_imx_data_entry(MX27, CSPI, "imx27-cspi", _id, _hwid, SZ_4K) | ||
46 | imx27_cspi_data_entry(0, 1), | ||
47 | imx27_cspi_data_entry(1, 2), | ||
48 | imx27_cspi_data_entry(2, 3), | ||
49 | }; | ||
50 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
51 | |||
52 | #ifdef CONFIG_ARCH_MX31 | ||
53 | const struct imx_spi_imx_data imx31_cspi_data[] __initconst = { | ||
54 | #define imx31_cspi_data_entry(_id, _hwid) \ | ||
55 | imx_spi_imx_data_entry(MX31, CSPI, "imx31-cspi", _id, _hwid, SZ_4K) | ||
56 | imx31_cspi_data_entry(0, 1), | ||
57 | imx31_cspi_data_entry(1, 2), | ||
58 | imx31_cspi_data_entry(2, 3), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_ARCH_MX31 */ | ||
61 | |||
62 | #ifdef CONFIG_ARCH_MX35 | ||
63 | const struct imx_spi_imx_data imx35_cspi_data[] __initconst = { | ||
64 | #define imx35_cspi_data_entry(_id, _hwid) \ | ||
65 | imx_spi_imx_data_entry(MX35, CSPI, "imx35-cspi", _id, _hwid, SZ_4K) | ||
66 | imx35_cspi_data_entry(0, 1), | ||
67 | imx35_cspi_data_entry(1, 2), | ||
68 | }; | ||
69 | #endif /* ifdef CONFIG_ARCH_MX35 */ | ||
70 | |||
71 | #ifdef CONFIG_ARCH_MX51 | ||
72 | const struct imx_spi_imx_data imx51_cspi_data __initconst = | ||
73 | imx_spi_imx_data_entry_single(MX51, CSPI, "imx51-cspi", 0, , SZ_4K); | ||
74 | |||
75 | const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = { | ||
76 | #define imx51_ecspi_data_entry(_id, _hwid) \ | ||
77 | imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K) | ||
78 | imx51_ecspi_data_entry(0, 1), | ||
79 | imx51_ecspi_data_entry(1, 2), | ||
80 | }; | ||
81 | #endif /* ifdef CONFIG_ARCH_MX51 */ | ||
82 | |||
83 | struct platform_device *__init imx_add_spi_imx( | ||
84 | const struct imx_spi_imx_data *data, | ||
14 | const struct spi_imx_master *pdata) | 85 | const struct spi_imx_master *pdata) |
15 | { | 86 | { |
16 | struct resource res[] = { | 87 | struct resource res[] = { |
17 | { | 88 | { |
18 | .start = iobase, | 89 | .start = data->iobase, |
19 | .end = iobase + iosize - 1, | 90 | .end = data->iobase + data->iosize - 1, |
20 | .flags = IORESOURCE_MEM, | 91 | .flags = IORESOURCE_MEM, |
21 | }, { | 92 | }, { |
22 | .start = irq, | 93 | .start = data->irq, |
23 | .end = irq, | 94 | .end = data->irq, |
24 | .flags = IORESOURCE_IRQ, | 95 | .flags = IORESOURCE_IRQ, |
25 | }, | 96 | }, |
26 | }; | 97 | }; |
27 | 98 | ||
28 | return imx_add_platform_device("spi_imx", id, res, ARRAY_SIZE(res), | 99 | return imx_add_platform_device(data->devid, data->id, |
29 | pdata, sizeof(*pdata)); | 100 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); |
30 | } | 101 | } |
diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c index 35a064ff02ba..9915607683de 100644 --- a/arch/arm/plat-mxc/ehci.c +++ b/arch/arm/plat-mxc/ehci.c | |||
@@ -249,8 +249,8 @@ int mxc_initialize_usb_hw(int port, unsigned int flags) | |||
249 | #ifdef CONFIG_ARCH_MX51 | 249 | #ifdef CONFIG_ARCH_MX51 |
250 | if (cpu_is_mx51()) { | 250 | if (cpu_is_mx51()) { |
251 | void __iomem *usb_base; | 251 | void __iomem *usb_base; |
252 | u32 usbotg_base; | 252 | void __iomem *usbotg_base; |
253 | u32 usbother_base; | 253 | void __iomem *usbother_base; |
254 | int ret = 0; | 254 | int ret = 0; |
255 | 255 | ||
256 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 256 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); |
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c new file mode 100644 index 000000000000..ee9582f4972e --- /dev/null +++ b/arch/arm/plat-mxc/epit.c | |||
@@ -0,0 +1,242 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-mxc/epit.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Sascha Hauer <s.hauer@pengutronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #define EPITCR 0x00 | ||
22 | #define EPITSR 0x04 | ||
23 | #define EPITLR 0x08 | ||
24 | #define EPITCMPR 0x0c | ||
25 | #define EPITCNR 0x10 | ||
26 | |||
27 | #define EPITCR_EN (1 << 0) | ||
28 | #define EPITCR_ENMOD (1 << 1) | ||
29 | #define EPITCR_OCIEN (1 << 2) | ||
30 | #define EPITCR_RLD (1 << 3) | ||
31 | #define EPITCR_PRESC(x) (((x) & 0xfff) << 4) | ||
32 | #define EPITCR_SWR (1 << 16) | ||
33 | #define EPITCR_IOVW (1 << 17) | ||
34 | #define EPITCR_DBGEN (1 << 18) | ||
35 | #define EPITCR_WAITEN (1 << 19) | ||
36 | #define EPITCR_RES (1 << 20) | ||
37 | #define EPITCR_STOPEN (1 << 21) | ||
38 | #define EPITCR_OM_DISCON (0 << 22) | ||
39 | #define EPITCR_OM_TOGGLE (1 << 22) | ||
40 | #define EPITCR_OM_CLEAR (2 << 22) | ||
41 | #define EPITCR_OM_SET (3 << 22) | ||
42 | #define EPITCR_CLKSRC_OFF (0 << 24) | ||
43 | #define EPITCR_CLKSRC_PERIPHERAL (1 << 24) | ||
44 | #define EPITCR_CLKSRC_REF_HIGH (1 << 24) | ||
45 | #define EPITCR_CLKSRC_REF_LOW (3 << 24) | ||
46 | |||
47 | #define EPITSR_OCIF (1 << 0) | ||
48 | |||
49 | #include <linux/interrupt.h> | ||
50 | #include <linux/irq.h> | ||
51 | #include <linux/clockchips.h> | ||
52 | #include <linux/clk.h> | ||
53 | |||
54 | #include <mach/hardware.h> | ||
55 | #include <asm/mach/time.h> | ||
56 | #include <mach/common.h> | ||
57 | |||
58 | static struct clock_event_device clockevent_epit; | ||
59 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | ||
60 | |||
61 | static void __iomem *timer_base; | ||
62 | |||
63 | static inline void epit_irq_disable(void) | ||
64 | { | ||
65 | u32 val; | ||
66 | |||
67 | val = __raw_readl(timer_base + EPITCR); | ||
68 | val &= ~EPITCR_OCIEN; | ||
69 | __raw_writel(val, timer_base + EPITCR); | ||
70 | } | ||
71 | |||
72 | static inline void epit_irq_enable(void) | ||
73 | { | ||
74 | u32 val; | ||
75 | |||
76 | val = __raw_readl(timer_base + EPITCR); | ||
77 | val |= EPITCR_OCIEN; | ||
78 | __raw_writel(val, timer_base + EPITCR); | ||
79 | } | ||
80 | |||
81 | static void epit_irq_acknowledge(void) | ||
82 | { | ||
83 | __raw_writel(EPITSR_OCIF, timer_base + EPITSR); | ||
84 | } | ||
85 | |||
86 | static cycle_t epit_read(struct clocksource *cs) | ||
87 | { | ||
88 | return 0 - __raw_readl(timer_base + EPITCNR); | ||
89 | } | ||
90 | |||
91 | static struct clocksource clocksource_epit = { | ||
92 | .name = "epit", | ||
93 | .rating = 200, | ||
94 | .read = epit_read, | ||
95 | .mask = CLOCKSOURCE_MASK(32), | ||
96 | .shift = 20, | ||
97 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
98 | }; | ||
99 | |||
100 | static int __init epit_clocksource_init(struct clk *timer_clk) | ||
101 | { | ||
102 | unsigned int c = clk_get_rate(timer_clk); | ||
103 | |||
104 | clocksource_epit.mult = clocksource_hz2mult(c, | ||
105 | clocksource_epit.shift); | ||
106 | clocksource_register(&clocksource_epit); | ||
107 | |||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | /* clock event */ | ||
112 | |||
113 | static int epit_set_next_event(unsigned long evt, | ||
114 | struct clock_event_device *unused) | ||
115 | { | ||
116 | unsigned long tcmp; | ||
117 | |||
118 | tcmp = __raw_readl(timer_base + EPITCNR); | ||
119 | |||
120 | __raw_writel(tcmp - evt, timer_base + EPITCMPR); | ||
121 | |||
122 | return 0; | ||
123 | } | ||
124 | |||
125 | static void epit_set_mode(enum clock_event_mode mode, | ||
126 | struct clock_event_device *evt) | ||
127 | { | ||
128 | unsigned long flags; | ||
129 | |||
130 | /* | ||
131 | * The timer interrupt generation is disabled at least | ||
132 | * for enough time to call epit_set_next_event() | ||
133 | */ | ||
134 | local_irq_save(flags); | ||
135 | |||
136 | /* Disable interrupt in GPT module */ | ||
137 | epit_irq_disable(); | ||
138 | |||
139 | if (mode != clockevent_mode) { | ||
140 | /* Set event time into far-far future */ | ||
141 | |||
142 | /* Clear pending interrupt */ | ||
143 | epit_irq_acknowledge(); | ||
144 | } | ||
145 | |||
146 | /* Remember timer mode */ | ||
147 | clockevent_mode = mode; | ||
148 | local_irq_restore(flags); | ||
149 | |||
150 | switch (mode) { | ||
151 | case CLOCK_EVT_MODE_PERIODIC: | ||
152 | printk(KERN_ERR "epit_set_mode: Periodic mode is not " | ||
153 | "supported for i.MX EPIT\n"); | ||
154 | break; | ||
155 | case CLOCK_EVT_MODE_ONESHOT: | ||
156 | /* | ||
157 | * Do not put overhead of interrupt enable/disable into | ||
158 | * epit_set_next_event(), the core has about 4 minutes | ||
159 | * to call epit_set_next_event() or shutdown clock after | ||
160 | * mode switching | ||
161 | */ | ||
162 | local_irq_save(flags); | ||
163 | epit_irq_enable(); | ||
164 | local_irq_restore(flags); | ||
165 | break; | ||
166 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
167 | case CLOCK_EVT_MODE_UNUSED: | ||
168 | case CLOCK_EVT_MODE_RESUME: | ||
169 | /* Left event sources disabled, no more interrupts appear */ | ||
170 | break; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * IRQ handler for the timer | ||
176 | */ | ||
177 | static irqreturn_t epit_timer_interrupt(int irq, void *dev_id) | ||
178 | { | ||
179 | struct clock_event_device *evt = &clockevent_epit; | ||
180 | |||
181 | epit_irq_acknowledge(); | ||
182 | |||
183 | evt->event_handler(evt); | ||
184 | |||
185 | return IRQ_HANDLED; | ||
186 | } | ||
187 | |||
188 | static struct irqaction epit_timer_irq = { | ||
189 | .name = "i.MX EPIT Timer Tick", | ||
190 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
191 | .handler = epit_timer_interrupt, | ||
192 | }; | ||
193 | |||
194 | static struct clock_event_device clockevent_epit = { | ||
195 | .name = "epit", | ||
196 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
197 | .shift = 32, | ||
198 | .set_mode = epit_set_mode, | ||
199 | .set_next_event = epit_set_next_event, | ||
200 | .rating = 200, | ||
201 | }; | ||
202 | |||
203 | static int __init epit_clockevent_init(struct clk *timer_clk) | ||
204 | { | ||
205 | unsigned int c = clk_get_rate(timer_clk); | ||
206 | |||
207 | clockevent_epit.mult = div_sc(c, NSEC_PER_SEC, | ||
208 | clockevent_epit.shift); | ||
209 | clockevent_epit.max_delta_ns = | ||
210 | clockevent_delta2ns(0xfffffffe, &clockevent_epit); | ||
211 | clockevent_epit.min_delta_ns = | ||
212 | clockevent_delta2ns(0x800, &clockevent_epit); | ||
213 | |||
214 | clockevent_epit.cpumask = cpumask_of(0); | ||
215 | |||
216 | clockevents_register_device(&clockevent_epit); | ||
217 | |||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | ||
222 | { | ||
223 | clk_enable(timer_clk); | ||
224 | |||
225 | timer_base = base; | ||
226 | |||
227 | /* | ||
228 | * Initialise to a known state (all timers off, and timing reset) | ||
229 | */ | ||
230 | __raw_writel(0x0, timer_base + EPITCR); | ||
231 | |||
232 | __raw_writel(0xffffffff, timer_base + EPITLR); | ||
233 | __raw_writel(EPITCR_EN | EPITCR_CLKSRC_REF_HIGH | EPITCR_WAITEN, | ||
234 | timer_base + EPITCR); | ||
235 | |||
236 | /* init and register the timer to the framework */ | ||
237 | epit_clocksource_init(timer_clk); | ||
238 | epit_clockevent_init(timer_clk); | ||
239 | |||
240 | /* Make irqs happen */ | ||
241 | setup_irq(irq, &epit_timer_irq); | ||
242 | } | ||
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index 57ec4a896a5d..9d38da077edb 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -235,7 +235,7 @@ static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
235 | unsigned long flags; | 235 | unsigned long flags; |
236 | 236 | ||
237 | spin_lock_irqsave(&port->lock, flags); | 237 | spin_lock_irqsave(&port->lock, flags); |
238 | l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset); | 238 | l = (__raw_readl(reg) & (~(1 << offset))) | (!!value << offset); |
239 | __raw_writel(l, reg); | 239 | __raw_writel(l, reg); |
240 | spin_unlock_irqrestore(&port->lock, flags); | 240 | spin_unlock_irqrestore(&port->lock, flags); |
241 | } | 241 | } |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 2941472582d2..7a1e1f89ff09 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -32,6 +32,7 @@ extern void mx31_init_irq(void); | |||
32 | extern void mx35_init_irq(void); | 32 | extern void mx35_init_irq(void); |
33 | extern void mx51_init_irq(void); | 33 | extern void mx51_init_irq(void); |
34 | extern void mxc91231_init_irq(void); | 34 | extern void mxc91231_init_irq(void); |
35 | extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq); | ||
35 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); | 36 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); |
36 | extern int mx1_clocks_init(unsigned long fref); | 37 | extern int mx1_clocks_init(unsigned long fref); |
37 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); | 38 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); |
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index c5f68c587309..049897880403 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -14,47 +14,101 @@ struct platform_device *imx_add_platform_device(const char *name, int id, | |||
14 | const struct resource *res, unsigned int num_resources, | 14 | const struct resource *res, unsigned int num_resources, |
15 | const void *data, size_t size_data); | 15 | const void *data, size_t size_data); |
16 | 16 | ||
17 | #if defined (CONFIG_CAN_FLEXCAN) || defined (CONFIG_CAN_FLEXCAN_MODULE) | 17 | #include <linux/fec.h> |
18 | struct imx_fec_data { | ||
19 | resource_size_t iobase; | ||
20 | resource_size_t irq; | ||
21 | }; | ||
22 | struct platform_device *__init imx_add_fec( | ||
23 | const struct imx_fec_data *data, | ||
24 | const struct fec_platform_data *pdata); | ||
25 | |||
18 | #include <linux/can/platform/flexcan.h> | 26 | #include <linux/can/platform/flexcan.h> |
19 | struct platform_device *__init imx_add_flexcan(int id, | 27 | struct platform_device *__init imx_add_flexcan(int id, |
20 | resource_size_t iobase, resource_size_t iosize, | 28 | resource_size_t iobase, resource_size_t iosize, |
21 | resource_size_t irq, | 29 | resource_size_t irq, |
22 | const struct flexcan_platform_data *pdata); | 30 | const struct flexcan_platform_data *pdata); |
23 | #else | ||
24 | /* the ifdef can be removed once the flexcan driver has been merged */ | ||
25 | struct flexcan_platform_data; | ||
26 | static inline struct platform_device *__init imx_add_flexcan(int id, | ||
27 | resource_size_t iobase, resource_size_t iosize, | ||
28 | resource_size_t irq, | ||
29 | const struct flexcan_platform_data *pdata) | ||
30 | { | ||
31 | return NULL; | ||
32 | } | ||
33 | #endif | ||
34 | 31 | ||
35 | #include <mach/i2c.h> | 32 | #include <mach/i2c.h> |
36 | struct platform_device *__init imx_add_imx_i2c(int id, | 33 | struct imx_imx_i2c_data { |
37 | resource_size_t iobase, resource_size_t iosize, int irq, | 34 | int id; |
35 | resource_size_t iobase; | ||
36 | resource_size_t iosize; | ||
37 | resource_size_t irq; | ||
38 | }; | ||
39 | struct platform_device *__init imx_add_imx_i2c( | ||
40 | const struct imx_imx_i2c_data *data, | ||
38 | const struct imxi2c_platform_data *pdata); | 41 | const struct imxi2c_platform_data *pdata); |
39 | 42 | ||
43 | #include <mach/ssi.h> | ||
44 | struct imx_imx_ssi_data { | ||
45 | int id; | ||
46 | resource_size_t iobase; | ||
47 | resource_size_t iosize; | ||
48 | resource_size_t irq; | ||
49 | resource_size_t dmatx0; | ||
50 | resource_size_t dmarx0; | ||
51 | resource_size_t dmatx1; | ||
52 | resource_size_t dmarx1; | ||
53 | }; | ||
54 | struct platform_device *__init imx_add_imx_ssi( | ||
55 | const struct imx_imx_ssi_data *data, | ||
56 | const struct imx_ssi_platform_data *pdata); | ||
57 | |||
40 | #include <mach/imx-uart.h> | 58 | #include <mach/imx-uart.h> |
41 | struct platform_device *__init imx_add_imx_uart_3irq(int id, | 59 | struct imx_imx_uart_3irq_data { |
42 | resource_size_t iobase, resource_size_t iosize, | 60 | int id; |
43 | resource_size_t irqrx, resource_size_t irqtx, | 61 | resource_size_t iobase; |
44 | resource_size_t irqrts, | 62 | resource_size_t iosize; |
63 | resource_size_t irqrx; | ||
64 | resource_size_t irqtx; | ||
65 | resource_size_t irqrts; | ||
66 | }; | ||
67 | struct platform_device *__init imx_add_imx_uart_3irq( | ||
68 | const struct imx_imx_uart_3irq_data *data, | ||
45 | const struct imxuart_platform_data *pdata); | 69 | const struct imxuart_platform_data *pdata); |
46 | struct platform_device *__init imx_add_imx_uart_1irq(int id, | 70 | |
47 | resource_size_t iobase, resource_size_t iosize, | 71 | struct imx_imx_uart_1irq_data { |
48 | resource_size_t irq, | 72 | int id; |
73 | resource_size_t iobase; | ||
74 | resource_size_t iosize; | ||
75 | resource_size_t irq; | ||
76 | }; | ||
77 | struct platform_device *__init imx_add_imx_uart_1irq( | ||
78 | const struct imx_imx_uart_1irq_data *data, | ||
49 | const struct imxuart_platform_data *pdata); | 79 | const struct imxuart_platform_data *pdata); |
50 | 80 | ||
51 | #include <mach/mxc_nand.h> | 81 | #include <mach/mxc_nand.h> |
52 | struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase, | 82 | struct imx_mxc_nand_data { |
53 | int irq, const struct mxc_nand_platform_data *pdata); | 83 | /* |
54 | struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase, | 84 | * id is traditionally 0, but -1 is more appropriate. We use -1 for new |
55 | int irq, const struct mxc_nand_platform_data *pdata); | 85 | * machines but don't change existing devices as the nand device usually |
86 | * appears in the kernel command line to pass its partitioning. | ||
87 | */ | ||
88 | int id; | ||
89 | resource_size_t iobase; | ||
90 | resource_size_t iosize; | ||
91 | resource_size_t axibase; | ||
92 | resource_size_t irq; | ||
93 | }; | ||
94 | struct platform_device *__init imx_add_mxc_nand( | ||
95 | const struct imx_mxc_nand_data *data, | ||
96 | const struct mxc_nand_platform_data *pdata); | ||
56 | 97 | ||
57 | #include <mach/spi.h> | 98 | #include <mach/spi.h> |
58 | struct platform_device *__init imx_add_spi_imx(int id, | 99 | struct imx_spi_imx_data { |
59 | resource_size_t iobase, resource_size_t iosize, int irq, | 100 | const char *devid; |
101 | int id; | ||
102 | resource_size_t iobase; | ||
103 | resource_size_t iosize; | ||
104 | int irq; | ||
105 | }; | ||
106 | struct platform_device *__init imx_add_spi_imx( | ||
107 | const struct imx_spi_imx_data *data, | ||
60 | const struct spi_imx_master *pdata); | 108 | const struct spi_imx_master *pdata); |
109 | |||
110 | #include <mach/esdhc.h> | ||
111 | struct platform_device *__init imx_add_esdhc(int id, | ||
112 | resource_size_t iobase, resource_size_t iosize, | ||
113 | resource_size_t irq, | ||
114 | const struct esdhc_platform_data *pdata); | ||
diff --git a/arch/arm/plat-mxc/include/mach/esdhc.h b/arch/arm/plat-mxc/include/mach/esdhc.h new file mode 100644 index 000000000000..a48a9aaa56b1 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/esdhc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; version 2 | ||
7 | * of the License. | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_IMX_ESDHC_H | ||
11 | #define __ASM_ARCH_IMX_ESDHC_H | ||
12 | |||
13 | struct esdhc_platform_data { | ||
14 | unsigned int wp_gpio; /* write protect pin */ | ||
15 | }; | ||
16 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h index 21bfa46785bb..5160f1073ec9 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h | |||
@@ -45,6 +45,15 @@ typedef enum iomux_config { | |||
45 | PAD_CTL_PKE | PAD_CTL_HYS) | 45 | PAD_CTL_PKE | PAD_CTL_HYS) |
46 | #define MX51_GPIO_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | \ | 46 | #define MX51_GPIO_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | \ |
47 | PAD_CTL_SRE_FAST) | 47 | PAD_CTL_SRE_FAST) |
48 | #define MX51_ECSPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ | ||
49 | PAD_CTL_SRE_FAST) | ||
50 | |||
51 | #define MX51_PAD_CTRL_1 (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \ | ||
52 | PAD_CTL_PUE | PAD_CTL_PKE | PAD_CTL_HYS) | ||
53 | #define MX51_PAD_CTRL_2 (PAD_CTL_HYS | PAD_CTL_PKE) | ||
54 | #define MX51_PAD_CTRL_3 (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
55 | #define MX51_PAD_CTRL_4 (PAD_CTL_DVS | PAD_CTL_HYS | PAD_CTL_PKE) | ||
56 | #define MX51_PAD_CTRL_5 (PAD_CTL_DVS | PAD_CTL_DSE_HIGH) | ||
48 | 57 | ||
49 | /* | 58 | /* |
50 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> | 59 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> |
@@ -106,14 +115,20 @@ typedef enum iomux_config { | |||
106 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) | 115 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) |
107 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) | 116 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) |
108 | #define MX51_PAD_EIM_EB2__GPIO_2_22 IOMUX_PAD(0x468, 0x0d4, 1, 0x0, 0, NO_PAD_CTRL) | 117 | #define MX51_PAD_EIM_EB2__GPIO_2_22 IOMUX_PAD(0x468, 0x0d4, 1, 0x0, 0, NO_PAD_CTRL) |
118 | #define MX51_PAD_EIM_EB2__FEC_MDIO IOMUX_PAD(0x468, 0x0d4, 3, 0x0, 0, MX51_PAD_CTRL_1 | PAD_CTL_PUS_22K_UP) | ||
109 | #define MX51_PAD_EIM_EB3__GPIO_2_23 IOMUX_PAD(0x46c, 0x0d8, 1, 0x0, 0, NO_PAD_CTRL) | 119 | #define MX51_PAD_EIM_EB3__GPIO_2_23 IOMUX_PAD(0x46c, 0x0d8, 1, 0x0, 0, NO_PAD_CTRL) |
120 | #define MX51_PAD_EIM_EB3__FEC_RDAT1 IOMUX_PAD(0x46c, 0x0d8, 3, 0x0, 0, MX51_PAD_CTRL_2) | ||
110 | #define MX51_PAD_EIM_OE__GPIO_2_24 IOMUX_PAD(0x470, 0x0dc, 1, 0x0, 0, NO_PAD_CTRL) | 121 | #define MX51_PAD_EIM_OE__GPIO_2_24 IOMUX_PAD(0x470, 0x0dc, 1, 0x0, 0, NO_PAD_CTRL) |
111 | #define MX51_PAD_EIM_CS0__GPIO_2_25 IOMUX_PAD(0x474, 0x0e0, 1, 0x0, 0, NO_PAD_CTRL) | 122 | #define MX51_PAD_EIM_CS0__GPIO_2_25 IOMUX_PAD(0x474, 0x0e0, 1, 0x0, 0, NO_PAD_CTRL) |
112 | #define MX51_PAD_EIM_CS1__GPIO_2_26 IOMUX_PAD(0x478, 0x0e4, 1, 0x0, 0, NO_PAD_CTRL) | 123 | #define MX51_PAD_EIM_CS1__GPIO_2_26 IOMUX_PAD(0x478, 0x0e4, 1, 0x0, 0, NO_PAD_CTRL) |
113 | #define MX51_PAD_EIM_CS2__GPIO_2_27 IOMUX_PAD(0x47c, 0x0e8, 1, 0x0, 0, NO_PAD_CTRL) | 124 | #define MX51_PAD_EIM_CS2__GPIO_2_27 IOMUX_PAD(0x47c, 0x0e8, 1, 0x0, 0, NO_PAD_CTRL) |
125 | #define MX51_PAD_EIM_CS2__FEC_RDAT2 IOMUX_PAD(0x47c, 0x0e8, 3, 0x0, 0, MX51_PAD_CTRL_2) | ||
114 | #define MX51_PAD_EIM_CS3__GPIO_2_28 IOMUX_PAD(0x480, 0x0ec, 1, 0x0, 0, NO_PAD_CTRL) | 126 | #define MX51_PAD_EIM_CS3__GPIO_2_28 IOMUX_PAD(0x480, 0x0ec, 1, 0x0, 0, NO_PAD_CTRL) |
127 | #define MX51_PAD_EIM_CS3__FEC_RDAT3 IOMUX_PAD(0x480, 0x0ec, 3, 0x0, 0, MX51_PAD_CTRL_2) | ||
115 | #define MX51_PAD_EIM_CS4__GPIO_2_29 IOMUX_PAD(0x484, 0x0f0, 1, 0x0, 0, NO_PAD_CTRL) | 128 | #define MX51_PAD_EIM_CS4__GPIO_2_29 IOMUX_PAD(0x484, 0x0f0, 1, 0x0, 0, NO_PAD_CTRL) |
129 | #define MX51_PAD_EIM_CS4__FEC_RX_ER IOMUX_PAD(0x484, 0x0f0, 3, 0x0, 0, MX51_PAD_CTRL_2) | ||
116 | #define MX51_PAD_EIM_CS5__GPIO_2_30 IOMUX_PAD(0x488, 0x0f4, 1, 0x0, 0, NO_PAD_CTRL) | 130 | #define MX51_PAD_EIM_CS5__GPIO_2_30 IOMUX_PAD(0x488, 0x0f4, 1, 0x0, 0, NO_PAD_CTRL) |
131 | #define MX51_PAD_EIM_CS5__FEC_CRS IOMUX_PAD(0x488, 0x0f4, 3, 0x0, 0, MX51_PAD_CTRL_2) | ||
117 | #define MX51_PAD_EIM_DTACK__GPIO_2_31 IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, NO_PAD_CTRL) | 132 | #define MX51_PAD_EIM_DTACK__GPIO_2_31 IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, NO_PAD_CTRL) |
118 | #define MX51_PAD_EIM_LBA__GPIO_3_1 IOMUX_PAD(0x494, 0x0FC, 1, 0x0, 0, NO_PAD_CTRL) | 133 | #define MX51_PAD_EIM_LBA__GPIO_3_1 IOMUX_PAD(0x494, 0x0FC, 1, 0x0, 0, NO_PAD_CTRL) |
119 | #define MX51_PAD_EIM_CRE__GPIO_3_2 IOMUX_PAD(0x4A0, 0x100, 1, 0x0, 0, NO_PAD_CTRL) | 134 | #define MX51_PAD_EIM_CRE__GPIO_3_2 IOMUX_PAD(0x4A0, 0x100, 1, 0x0, 0, NO_PAD_CTRL) |
@@ -126,18 +141,32 @@ typedef enum iomux_config { | |||
126 | #define MX51_PAD_NANDF_RB0__GPIO_3_8 IOMUX_PAD(0x4F8, 0x11C, 3, 0x0, 0, NO_PAD_CTRL) | 141 | #define MX51_PAD_NANDF_RB0__GPIO_3_8 IOMUX_PAD(0x4F8, 0x11C, 3, 0x0, 0, NO_PAD_CTRL) |
127 | #define MX51_PAD_NANDF_RB1__GPIO_3_9 IOMUX_PAD(0x4FC, 0x120, 3, 0x0, 0, NO_PAD_CTRL) | 142 | #define MX51_PAD_NANDF_RB1__GPIO_3_9 IOMUX_PAD(0x4FC, 0x120, 3, 0x0, 0, NO_PAD_CTRL) |
128 | #define MX51_PAD_NANDF_RB2__GPIO_3_10 IOMUX_PAD(0x500, 0x124, 3, 0x0, 0, NO_PAD_CTRL) | 143 | #define MX51_PAD_NANDF_RB2__GPIO_3_10 IOMUX_PAD(0x500, 0x124, 3, 0x0, 0, NO_PAD_CTRL) |
144 | #define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
145 | #define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x0, 0, MX51_PAD_CTRL_2) | ||
129 | #define MX51_PAD_NANDF_RB3__GPIO_3_11 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, NO_PAD_CTRL) | 146 | #define MX51_PAD_NANDF_RB3__GPIO_3_11 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, NO_PAD_CTRL) |
147 | #define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
148 | #define MX51_PAD_NANDF_RB3__FEC_RXCLK IOMUX_PAD(0x504, 0x128, 1, 0x0, 0, MX51_PAD_CTRL_2) | ||
149 | #define MX51_PAD_NANDF_RB6__FEC_RDAT0 IOMUX_PAD(0x5DC, 0x134, 1, 0x0, 0, MX51_PAD_CTRL_4) | ||
150 | #define MX51_PAD_NANDF_RB7__FEC_TDAT0 IOMUX_PAD(0x5E0, 0x138, 1, 0x0, 0, MX51_PAD_CTRL_5) | ||
130 | #define MX51_PAD_GPIO_NAND__GPIO_3_12 IOMUX_PAD(0x514, 0x12C, 3, 0x0, 0, NO_PAD_CTRL) | 151 | #define MX51_PAD_GPIO_NAND__GPIO_3_12 IOMUX_PAD(0x514, 0x12C, 3, 0x0, 0, NO_PAD_CTRL) |
131 | #define MX51_PAD_NANDF_CS0__GPIO_3_16 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | 152 | #define MX51_PAD_NANDF_CS0__GPIO_3_16 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, NO_PAD_CTRL) |
132 | #define MX51_PAD_NANDF_CS1__GPIO_3_17 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | 153 | #define MX51_PAD_NANDF_CS1__GPIO_3_17 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, NO_PAD_CTRL) |
133 | #define MX51_PAD_NANDF_CS2__GPIO_3_18 IOMUX_PAD(0x520, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | 154 | #define MX51_PAD_NANDF_CS2__GPIO_3_18 IOMUX_PAD(0x520, 0x138, 3, 0x0, 0, NO_PAD_CTRL) |
155 | #define MX51_PAD_NANDF_CS2__FEC_TX_ER IOMUX_PAD(0x520, 0x138, 2, 0x0, 0, MX51_PAD_CTRL_5) | ||
134 | #define MX51_PAD_NANDF_CS3__GPIO_3_19 IOMUX_PAD(0x524, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) | 156 | #define MX51_PAD_NANDF_CS3__GPIO_3_19 IOMUX_PAD(0x524, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) |
157 | #define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13C, 2, 0x0, 0, MX51_PAD_CTRL_5) | ||
135 | #define MX51_PAD_NANDF_CS4__GPIO_3_20 IOMUX_PAD(0x528, 0x140, 3, 0x0, 0, NO_PAD_CTRL) | 158 | #define MX51_PAD_NANDF_CS4__GPIO_3_20 IOMUX_PAD(0x528, 0x140, 3, 0x0, 0, NO_PAD_CTRL) |
159 | #define MX51_PAD_NANDF_CS4__FEC_TDAT1 IOMUX_PAD(0x528, 0x140, 2, 0x0, 0, MX51_PAD_CTRL_5) | ||
136 | #define MX51_PAD_NANDF_CS5__GPIO_3_21 IOMUX_PAD(0x52C, 0x144, 3, 0x0, 0, NO_PAD_CTRL) | 160 | #define MX51_PAD_NANDF_CS5__GPIO_3_21 IOMUX_PAD(0x52C, 0x144, 3, 0x0, 0, NO_PAD_CTRL) |
161 | #define MX51_PAD_NANDF_CS5__FEC_TDAT2 IOMUX_PAD(0x52C, 0x144, 2, 0x0, 0, MX51_PAD_CTRL_5) | ||
137 | #define MX51_PAD_NANDF_CS6__GPIO_3_22 IOMUX_PAD(0x530, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | 162 | #define MX51_PAD_NANDF_CS6__GPIO_3_22 IOMUX_PAD(0x530, 0x148, 3, 0x0, 0, NO_PAD_CTRL) |
163 | #define MX51_PAD_NANDF_CS6__FEC_TDAT3 IOMUX_PAD(0x530, 0x148, 2, 0x0, 0, MX51_PAD_CTRL_5) | ||
138 | #define MX51_PAD_NANDF_CS7__GPIO_3_23 IOMUX_PAD(0x534, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) | 164 | #define MX51_PAD_NANDF_CS7__GPIO_3_23 IOMUX_PAD(0x534, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) |
165 | #define MX51_PAD_NANDF_CS7__FEC_TX_EN IOMUX_PAD(0x534, 0x14C, 1, 0x0, 0, MX51_PAD_CTRL_5) | ||
139 | #define MX51_PAD_NANDF_RDY_INT__GPIO_3_24 IOMUX_PAD(0x538, 0x150, 3, 0x0, 0, NO_PAD_CTRL) | 166 | #define MX51_PAD_NANDF_RDY_INT__GPIO_3_24 IOMUX_PAD(0x538, 0x150, 3, 0x0, 0, NO_PAD_CTRL) |
167 | #define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x0, 0, MX51_PAD_CTRL_4) | ||
140 | #define MX51_PAD_NANDF_D15__GPIO_3_25 IOMUX_PAD(0x53C, 0x154, 3, 0x0, 0, NO_PAD_CTRL) | 168 | #define MX51_PAD_NANDF_D15__GPIO_3_25 IOMUX_PAD(0x53C, 0x154, 3, 0x0, 0, NO_PAD_CTRL) |
169 | #define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53C, 0x154, 2, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
141 | #define MX51_PAD_NANDF_D14__GPIO_3_26 IOMUX_PAD(0x540, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | 170 | #define MX51_PAD_NANDF_D14__GPIO_3_26 IOMUX_PAD(0x540, 0x158, 3, 0x0, 0, NO_PAD_CTRL) |
142 | #define MX51_PAD_NANDF_D13__GPIO_3_27 IOMUX_PAD(0x544, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) | 171 | #define MX51_PAD_NANDF_D13__GPIO_3_27 IOMUX_PAD(0x544, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) |
143 | #define MX51_PAD_NANDF_D12__GPIO_3_28 IOMUX_PAD(0x548, 0x160, 3, 0x0, 0, NO_PAD_CTRL) | 172 | #define MX51_PAD_NANDF_D12__GPIO_3_28 IOMUX_PAD(0x548, 0x160, 3, 0x0, 0, NO_PAD_CTRL) |
@@ -185,15 +214,25 @@ typedef enum iomux_config { | |||
185 | #define MX51_PAD_I2C1_CLK__HSI2C_CLK IOMUX_PAD(0x5E8, 0x1F8, 0, 0x0, 0, NO_PAD_CTRL) | 214 | #define MX51_PAD_I2C1_CLK__HSI2C_CLK IOMUX_PAD(0x5E8, 0x1F8, 0, 0x0, 0, NO_PAD_CTRL) |
186 | #define MX51_PAD_I2C1_DAT__GPIO_4_17 IOMUX_PAD(0x5EC, 0x1FC, 3, 0x0, 0, NO_PAD_CTRL) | 215 | #define MX51_PAD_I2C1_DAT__GPIO_4_17 IOMUX_PAD(0x5EC, 0x1FC, 3, 0x0, 0, NO_PAD_CTRL) |
187 | #define MX51_PAD_I2C1_DAT__HSI2C_DAT IOMUX_PAD(0x5EC, 0x1FC, 0, 0x0, 0, NO_PAD_CTRL) | 216 | #define MX51_PAD_I2C1_DAT__HSI2C_DAT IOMUX_PAD(0x5EC, 0x1FC, 0, 0x0, 0, NO_PAD_CTRL) |
217 | #define MX51_PAD_AUD3_BB_TXD__AUD3_BB_TXD IOMUX_PAD(0x5F0, 0x200, IOMUX_CONFIG_SION, 0x0, 0, NO_PAD_CTRL) | ||
188 | #define MX51_PAD_AUD3_BB_TXD__GPIO_4_18 IOMUX_PAD(0x5F0, 0x200, 3, 0x0, 0, NO_PAD_CTRL) | 218 | #define MX51_PAD_AUD3_BB_TXD__GPIO_4_18 IOMUX_PAD(0x5F0, 0x200, 3, 0x0, 0, NO_PAD_CTRL) |
219 | #define MX51_PAD_AUD3_BB_RXD__AUD3_BB_RXD IOMUX_PAD(0x5F4, 0x204, IOMUX_CONFIG_SION, 0x0, 0, NO_PAD_CTRL) | ||
189 | #define MX51_PAD_AUD3_BB_RXD__GPIO_4_19 IOMUX_PAD(0x5F4, 0x204, 3, 0x0, 0, NO_PAD_CTRL) | 220 | #define MX51_PAD_AUD3_BB_RXD__GPIO_4_19 IOMUX_PAD(0x5F4, 0x204, 3, 0x0, 0, NO_PAD_CTRL) |
221 | #define MX51_PAD_AUD3_BB_CK__AUD3_BB_CK IOMUX_PAD(0x5F8, 0x208, IOMUX_CONFIG_SION, 0x0, 0, NO_PAD_CTRL) | ||
190 | #define MX51_PAD_AUD3_BB_CK__GPIO_4_20 IOMUX_PAD(0x5F8, 0x208, 3, 0x0, 0, NO_PAD_CTRL) | 222 | #define MX51_PAD_AUD3_BB_CK__GPIO_4_20 IOMUX_PAD(0x5F8, 0x208, 3, 0x0, 0, NO_PAD_CTRL) |
223 | #define MX51_PAD_AUD3_BB_FS__AUD3_BB_FS IOMUX_PAD(0x5FC, 0x20C, IOMUX_CONFIG_SION, 0x0, 0, NO_PAD_CTRL) | ||
191 | #define MX51_PAD_AUD3_BB_FS__GPIO_4_21 IOMUX_PAD(0x5FC, 0x20C, 3, 0x0, 0, NO_PAD_CTRL) | 224 | #define MX51_PAD_AUD3_BB_FS__GPIO_4_21 IOMUX_PAD(0x5FC, 0x20C, 3, 0x0, 0, NO_PAD_CTRL) |
225 | #define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI IOMUX_PAD(0x600, 0x210, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
192 | #define MX51_PAD_CSPI1_MOSI__GPIO_4_22 IOMUX_PAD(0x600, 0x210, 3, 0x0, 0, NO_PAD_CTRL) | 226 | #define MX51_PAD_CSPI1_MOSI__GPIO_4_22 IOMUX_PAD(0x600, 0x210, 3, 0x0, 0, NO_PAD_CTRL) |
227 | #define MX51_PAD_CSPI1_MISO__ECSPI1_MISO IOMUX_PAD(0x604, 0x214, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
193 | #define MX51_PAD_CSPI1_MISO__GPIO_4_23 IOMUX_PAD(0x604, 0x214, 3, 0x0, 0, NO_PAD_CTRL) | 228 | #define MX51_PAD_CSPI1_MISO__GPIO_4_23 IOMUX_PAD(0x604, 0x214, 3, 0x0, 0, NO_PAD_CTRL) |
229 | #define MX51_PAD_CSPI1_SS0__ECSPI1_SS0 IOMUX_PAD(0x608, 0x218, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
194 | #define MX51_PAD_CSPI1_SS0__GPIO_4_24 IOMUX_PAD(0x608, 0x218, 3, 0x0, 0, NO_PAD_CTRL) | 230 | #define MX51_PAD_CSPI1_SS0__GPIO_4_24 IOMUX_PAD(0x608, 0x218, 3, 0x0, 0, NO_PAD_CTRL) |
231 | #define MX51_PAD_CSPI1_SS1__ECSPI1_SS1 IOMUX_PAD(0x60C, 0x21C, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
195 | #define MX51_PAD_CSPI1_SS1__GPIO_4_25 IOMUX_PAD(0x60C, 0x21C, 3, 0x0, 0, NO_PAD_CTRL) | 232 | #define MX51_PAD_CSPI1_SS1__GPIO_4_25 IOMUX_PAD(0x60C, 0x21C, 3, 0x0, 0, NO_PAD_CTRL) |
233 | #define MX51_PAD_CSPI1_RDY__ECSPI1_RDY IOMUX_PAD(0x610, 0x220, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
196 | #define MX51_PAD_CSPI1_RDY__GPIO_4_26 IOMUX_PAD(0x610, 0x220, 3, 0x0, 0, NO_PAD_CTRL) | 234 | #define MX51_PAD_CSPI1_RDY__GPIO_4_26 IOMUX_PAD(0x610, 0x220, 3, 0x0, 0, NO_PAD_CTRL) |
235 | #define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK IOMUX_PAD(0x614, 0x224, 0, 0x0, 0, MX51_ECSPI_PAD_CTRL) | ||
197 | #define MX51_PAD_CSPI1_SCLK__GPIO_4_27 IOMUX_PAD(0x614, 0x224, 3, 0x0, 0, NO_PAD_CTRL) | 236 | #define MX51_PAD_CSPI1_SCLK__GPIO_4_27 IOMUX_PAD(0x614, 0x224, 3, 0x0, 0, NO_PAD_CTRL) |
198 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | 237 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) |
199 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61C, 0x22C, 0, 0x0, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | 238 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61C, 0x22C, 0, 0x0, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) |
@@ -236,14 +275,14 @@ typedef enum iomux_config { | |||
236 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6A0, 0x2A0, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 275 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6A0, 0x2A0, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
237 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6A4, 0x2A4, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 276 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6A4, 0x2A4, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
238 | #define MX51_PAD_DI1_PIN11__GPIO_3_0 IOMUX_PAD(0x6A8, 0x2A8, 4, 0x0, 0, NO_PAD_CTRL) | 277 | #define MX51_PAD_DI1_PIN11__GPIO_3_0 IOMUX_PAD(0x6A8, 0x2A8, 4, 0x0, 0, NO_PAD_CTRL) |
239 | #define MX51_PAD_DI1_PIN12__GPIO_3_1 IOMUX_PAD(0x6AC, 0x2AC, 4, 0x0, 0, NO_PAD_CTRL) | 278 | #define MX51_PAD_DI1_PIN12__GPIO_3_1 IOMUX_PAD(0x6AC, 0x2AC, 4, 0x978, 1, NO_PAD_CTRL) |
240 | #define MX51_PAD_DI1_PIN13__GPIO_3_2 IOMUX_PAD(0x6B0, 0x2B0, 4, 0x0, 0, NO_PAD_CTRL) | 279 | #define MX51_PAD_DI1_PIN13__GPIO_3_2 IOMUX_PAD(0x6B0, 0x2B0, 4, 0x97c, 1, NO_PAD_CTRL) |
241 | #define MX51_PAD_DI1_D0_CS__GPIO_3_3 IOMUX_PAD(0x6B4, 0x2B4, 4, 0x0, 0, NO_PAD_CTRL) | 280 | #define MX51_PAD_DI1_D0_CS__GPIO_3_3 IOMUX_PAD(0x6B4, 0x2B4, 4, 0x980, 1, NO_PAD_CTRL) |
242 | #define MX51_PAD_DI1_D1_CS__GPIO_3_4 IOMUX_PAD(0x6B8, 0x2B8, 4, 0x0, 0, NO_PAD_CTRL) | 281 | #define MX51_PAD_DI1_D1_CS__GPIO_3_4 IOMUX_PAD(0x6B8, 0x2B8, 4, 0x984, 1, NO_PAD_CTRL) |
243 | #define MX51_PAD_DISPB2_SER_DIN__GPIO_3_5 IOMUX_PAD(0x6BC, 0x2BC, 4, 0x0, 0, NO_PAD_CTRL) | 282 | #define MX51_PAD_DISPB2_SER_DIN__GPIO_3_5 IOMUX_PAD(0x6BC, 0x2BC, 4, 0x988, 1, NO_PAD_CTRL) |
244 | #define MX51_PAD_DISPB2_SER_DIO__GPIO_3_6 IOMUX_PAD(0x6C0, 0x2C0, 4, 0x0, 0, NO_PAD_CTRL) | 283 | #define MX51_PAD_DISPB2_SER_DIO__GPIO_3_6 IOMUX_PAD(0x6C0, 0x2C0, 4, 0x98c, 1, NO_PAD_CTRL) |
245 | #define MX51_PAD_DISPB2_SER_CLK__GPIO_3_7 IOMUX_PAD(0x6C4, 0x2C4, 4, 0x0, 0, NO_PAD_CTRL) | 284 | #define MX51_PAD_DISPB2_SER_CLK__GPIO_3_7 IOMUX_PAD(0x6C4, 0x2C4, 4, 0x990, 1, NO_PAD_CTRL) |
246 | #define MX51_PAD_DISPB2_SER_RS__GPIO_3_8 IOMUX_PAD(0x6C8, 0x2C8, 4, 0x0, 0, NO_PAD_CTRL) | 285 | #define MX51_PAD_DISPB2_SER_RS__GPIO_3_8 IOMUX_PAD(0x6C8, 0x2C8, 4, 0x994, 1, NO_PAD_CTRL) |
247 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6CC, 0x2CC, 0, 0x0, 0, NO_PAD_CTRL) | 286 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6CC, 0x2CC, 0, 0x0, 0, NO_PAD_CTRL) |
248 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6D0, 0x2D0, 0, 0x0, 0, NO_PAD_CTRL) | 287 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6D0, 0x2D0, 0, 0x0, 0, NO_PAD_CTRL) |
249 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6D4, 0x2D4, 0, 0x0, 0, NO_PAD_CTRL) | 288 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6D4, 0x2D4, 0, 0x0, 0, NO_PAD_CTRL) |
@@ -295,11 +334,17 @@ typedef enum iomux_config { | |||
295 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38C, 0, 0x0, 0, NO_PAD_CTRL) | 334 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38C, 0, 0x0, 0, NO_PAD_CTRL) |
296 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, 0x0, 0, NO_PAD_CTRL) | 335 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, 0x0, 0, NO_PAD_CTRL) |
297 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79C, 0x394, 0, 0x0, 0, NO_PAD_CTRL) | 336 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79C, 0x394, 0, 0x0, 0, NO_PAD_CTRL) |
337 | #define MX51_PAD_SD1_CMD__AUD5_RXFS IOMUX_PAD(0x79C, 0x394, 1, 0x8e0, 1, NO_PAD_CTRL) | ||
298 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7A0, 0x398, 0, 0x0, 0, NO_PAD_CTRL) | 338 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7A0, 0x398, 0, 0x0, 0, NO_PAD_CTRL) |
339 | #define MX51_PAD_SD1_CLK__AUD5_RXC IOMUX_PAD(0x7A0, 0x398, 1, 0x8dc, 1, NO_PAD_CTRL) | ||
299 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7A4, 0x39C, 0, 0x0, 0, NO_PAD_CTRL) | 340 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7A4, 0x39C, 0, 0x0, 0, NO_PAD_CTRL) |
341 | #define MX51_PAD_SD1_DATA0__AUD5_TXD IOMUX_PAD(0x7A4, 0x39C, 1, 0x8d8, 2, NO_PAD_CTRL) | ||
300 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7A8, 0x3A0, 0, 0x0, 0, NO_PAD_CTRL) | 342 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7A8, 0x3A0, 0, 0x0, 0, NO_PAD_CTRL) |
343 | #define MX51_PAD_SD1_DATA1__AUD5_RXD IOMUX_PAD(0x7A8, 0x3A0, 1, 0x8d4, 2, NO_PAD_CTRL) | ||
301 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7AC, 0x3A4, 0, 0x0, 0, NO_PAD_CTRL) | 344 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7AC, 0x3A4, 0, 0x0, 0, NO_PAD_CTRL) |
345 | #define MX51_PAD_SD1_DATA2__AUD5_TXC IOMUX_PAD(0x7AC, 0x3A4, 1, 0x8e4, 2, NO_PAD_CTRL) | ||
302 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7B0, 0x3A8, 0, 0x0, 0, NO_PAD_CTRL) | 346 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7B0, 0x3A8, 0, 0x0, 0, NO_PAD_CTRL) |
347 | #define MX51_PAD_SD1_DATA3__AUD5_TXFS IOMUX_PAD(0x7B0, 0x3A8, 1, 0x8e8, 2, NO_PAD_CTRL) | ||
303 | #define MX51_PAD_GPIO_1_0__GPIO_1_0 IOMUX_PAD(0x7B4, 0x3AC, 1, 0x0, 0, NO_PAD_CTRL) | 348 | #define MX51_PAD_GPIO_1_0__GPIO_1_0 IOMUX_PAD(0x7B4, 0x3AC, 1, 0x0, 0, NO_PAD_CTRL) |
304 | #define MX51_PAD_GPIO_1_1__GPIO_1_1 IOMUX_PAD(0x7B8, 0x3B0, 1, 0x0, 0, NO_PAD_CTRL) | 349 | #define MX51_PAD_GPIO_1_1__GPIO_1_1 IOMUX_PAD(0x7B8, 0x3B0, 1, 0x0, 0, NO_PAD_CTRL) |
305 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7BC, 0x3B4, 0, 0x0, 0, NO_PAD_CTRL) | 350 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7BC, 0x3B4, 0, 0x0, 0, NO_PAD_CTRL) |
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/plat-mxc/include/mach/mx21.h index ed98b9c9f389..8bc59720b6e4 100644 --- a/arch/arm/plat-mxc/include/mach/mx21.h +++ b/arch/arm/plat-mxc/include/mach/mx21.h | |||
@@ -120,7 +120,7 @@ | |||
120 | #define MX21_INT_GPT1 26 | 120 | #define MX21_INT_GPT1 26 |
121 | #define MX21_INT_WDOG 27 | 121 | #define MX21_INT_WDOG 27 |
122 | #define MX21_INT_PCMCIA 28 | 122 | #define MX21_INT_PCMCIA 28 |
123 | #define MX21_INT_NANDFC 29 | 123 | #define MX21_INT_NFC 29 |
124 | #define MX21_INT_BMI 30 | 124 | #define MX21_INT_BMI 30 |
125 | #define MX21_INT_CSI 31 | 125 | #define MX21_INT_CSI 31 |
126 | #define MX21_INT_DMACH0 32 | 126 | #define MX21_INT_DMACH0 32 |
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 4a6f800990f8..153dd1b2a473 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define MX25_SSI1_BASE_ADDR 0x50034000 | 50 | #define MX25_SSI1_BASE_ADDR 0x50034000 |
51 | #define MX25_NFC_BASE_ADDR 0xbb000000 | 51 | #define MX25_NFC_BASE_ADDR 0xbb000000 |
52 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 | 52 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 |
53 | #define MX25_ESDHC1_BASE_ADDR 0x53fb4000 | ||
54 | #define MX25_ESDHC2_BASE_ADDR 0x53fb8000 | ||
53 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 | 55 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 |
54 | #define MX25_KPP_BASE_ADDR 0x43fa8000 | 56 | #define MX25_KPP_BASE_ADDR 0x43fa8000 |
55 | #define MX25_OTG_BASE_ADDR 0x53ff4000 | 57 | #define MX25_OTG_BASE_ADDR 0x53ff4000 |
@@ -59,6 +61,8 @@ | |||
59 | #define MX25_INT_I2C1 3 | 61 | #define MX25_INT_I2C1 3 |
60 | #define MX25_INT_I2C2 4 | 62 | #define MX25_INT_I2C2 4 |
61 | #define MX25_INT_UART4 5 | 63 | #define MX25_INT_UART4 5 |
64 | #define MX25_INT_MMC_SDHC2 8 | ||
65 | #define MX25_INT_MMC_SDHC1 9 | ||
62 | #define MX25_INT_I2C3 10 | 66 | #define MX25_INT_I2C3 10 |
63 | #define MX25_INT_SSI2 11 | 67 | #define MX25_INT_SSI2 11 |
64 | #define MX25_INT_SSI1 12 | 68 | #define MX25_INT_SSI1 12 |
@@ -69,7 +73,7 @@ | |||
69 | #define MX25_INT_KPP 24 | 73 | #define MX25_INT_KPP 24 |
70 | #define MX25_INT_DRYICE 25 | 74 | #define MX25_INT_DRYICE 25 |
71 | #define MX25_INT_UART2 32 | 75 | #define MX25_INT_UART2 32 |
72 | #define MX25_INT_NANDFC 33 | 76 | #define MX25_INT_NFC 33 |
73 | #define MX25_INT_LCDC 39 | 77 | #define MX25_INT_LCDC 39 |
74 | #define MX25_INT_UART5 40 | 78 | #define MX25_INT_UART5 40 |
75 | #define MX25_INT_CAN1 43 | 79 | #define MX25_INT_CAN1 43 |
@@ -77,4 +81,13 @@ | |||
77 | #define MX25_INT_UART1 45 | 81 | #define MX25_INT_UART1 45 |
78 | #define MX25_INT_FEC 57 | 82 | #define MX25_INT_FEC 57 |
79 | 83 | ||
84 | #define MX25_DMA_REQ_SSI2_RX1 22 | ||
85 | #define MX25_DMA_REQ_SSI2_TX1 23 | ||
86 | #define MX25_DMA_REQ_SSI2_RX0 24 | ||
87 | #define MX25_DMA_REQ_SSI2_TX0 25 | ||
88 | #define MX25_DMA_REQ_SSI1_RX1 26 | ||
89 | #define MX25_DMA_REQ_SSI1_TX1 27 | ||
90 | #define MX25_DMA_REQ_SSI1_RX0 28 | ||
91 | #define MX25_DMA_REQ_SSI1_TX0 29 | ||
92 | |||
80 | #endif /* ifndef __MACH_MX25_H__ */ | 93 | #endif /* ifndef __MACH_MX25_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index a8ab2e02a8ca..2237ba2e5351 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h | |||
@@ -167,7 +167,7 @@ static inline void mx27_setup_weimcs(size_t cs, | |||
167 | #define MX27_INT_GPT1 26 | 167 | #define MX27_INT_GPT1 26 |
168 | #define MX27_INT_WDOG 27 | 168 | #define MX27_INT_WDOG 27 |
169 | #define MX27_INT_PCMCIA 28 | 169 | #define MX27_INT_PCMCIA 28 |
170 | #define MX27_INT_NANDFC 29 | 170 | #define MX27_INT_NFC 29 |
171 | #define MX27_INT_ATA 30 | 171 | #define MX27_INT_ATA 30 |
172 | #define MX27_INT_CSI 31 | 172 | #define MX27_INT_CSI 31 |
173 | #define MX27_INT_DMACH0 32 | 173 | #define MX27_INT_DMACH0 32 |
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index afee3ab9d62e..03e2afabc9fc 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h | |||
@@ -168,7 +168,7 @@ static inline void mx31_setup_weimcs(size_t cs, | |||
168 | #define MX31_INT_POWER_FAIL 30 | 168 | #define MX31_INT_POWER_FAIL 30 |
169 | #define MX31_INT_CCM_DVFS 31 | 169 | #define MX31_INT_CCM_DVFS 31 |
170 | #define MX31_INT_UART2 32 | 170 | #define MX31_INT_UART2 32 |
171 | #define MX31_INT_NANDFC 33 | 171 | #define MX31_INT_NFC 33 |
172 | #define MX31_INT_SDMA 34 | 172 | #define MX31_INT_SDMA 34 |
173 | #define MX31_INT_USB1 35 | 173 | #define MX31_INT_USB1 35 |
174 | #define MX31_INT_USB2 36 | 174 | #define MX31_INT_USB2 36 |
@@ -197,6 +197,15 @@ static inline void mx31_setup_weimcs(size_t cs, | |||
197 | #define MX31_INT_EXT_WDOG 62 | 197 | #define MX31_INT_EXT_WDOG 62 |
198 | #define MX31_INT_EXT_TV 63 | 198 | #define MX31_INT_EXT_TV 63 |
199 | 199 | ||
200 | #define MX31_DMA_REQ_SSI2_RX1 22 | ||
201 | #define MX31_DMA_REQ_SSI2_TX1 23 | ||
202 | #define MX31_DMA_REQ_SSI2_RX0 24 | ||
203 | #define MX31_DMA_REQ_SSI2_TX0 25 | ||
204 | #define MX31_DMA_REQ_SSI1_RX1 26 | ||
205 | #define MX31_DMA_REQ_SSI1_TX1 27 | ||
206 | #define MX31_DMA_REQ_SSI1_RX0 28 | ||
207 | #define MX31_DMA_REQ_SSI1_TX0 29 | ||
208 | |||
200 | #define MX31_PROD_SIGNATURE 0x1 /* For MX31 */ | 209 | #define MX31_PROD_SIGNATURE 0x1 /* For MX31 */ |
201 | 210 | ||
202 | /* silicon revisions specific to i.MX31 */ | 211 | /* silicon revisions specific to i.MX31 */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h index af3038c12e39..cb071b7b17e5 100644 --- a/arch/arm/plat-mxc/include/mach/mx35.h +++ b/arch/arm/plat-mxc/include/mach/mx35.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef __MACH_MX35_H__ | 1 | #ifndef __MACH_MX35_H__ |
2 | #define __MACH_MX35_H__ | 2 | #define __MACH_MX35_H__ |
3 | |||
3 | /* | 4 | /* |
4 | * IRAM | 5 | * IRAM |
5 | */ | 6 | */ |
@@ -52,6 +53,9 @@ | |||
52 | #define MX35_GPIO3_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xa4000) | 53 | #define MX35_GPIO3_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xa4000) |
53 | #define MX35_SCC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xac000) | 54 | #define MX35_SCC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xac000) |
54 | #define MX35_RNGA_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb0000) | 55 | #define MX35_RNGA_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb0000) |
56 | #define MX35_ESDHC1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb4000) | ||
57 | #define MX35_ESDHC2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb8000) | ||
58 | #define MX35_ESDHC3_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xbc000) | ||
55 | #define MX35_IPU_CTRL_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc0000) | 59 | #define MX35_IPU_CTRL_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc0000) |
56 | #define MX35_AUDMUX_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc4000) | 60 | #define MX35_AUDMUX_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc4000) |
57 | #define MX35_GPIO1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xcc000) | 61 | #define MX35_GPIO1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xcc000) |
@@ -63,6 +67,8 @@ | |||
63 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) | 67 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) |
64 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) | 68 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) |
65 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) | 69 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) |
70 | #define MX35_IIM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xf0000) | ||
71 | |||
66 | #define MX35_OTG_BASE_ADDR 0x53ff4000 | 72 | #define MX35_OTG_BASE_ADDR 0x53ff4000 |
67 | 73 | ||
68 | #define MX35_ROMP_BASE_ADDR 0x60000000 | 74 | #define MX35_ROMP_BASE_ADDR 0x60000000 |
@@ -145,7 +151,7 @@ | |||
145 | #define MX35_INT_GPT 29 | 151 | #define MX35_INT_GPT 29 |
146 | #define MX35_INT_POWER_FAIL 30 | 152 | #define MX35_INT_POWER_FAIL 30 |
147 | #define MX35_INT_UART2 32 | 153 | #define MX35_INT_UART2 32 |
148 | #define MX35_INT_NANDFC 33 | 154 | #define MX35_INT_NFC 33 |
149 | #define MX35_INT_SDMA 34 | 155 | #define MX35_INT_SDMA 34 |
150 | #define MX35_INT_USBHS 35 | 156 | #define MX35_INT_USBHS 35 |
151 | #define MX35_INT_USBOTG 37 | 157 | #define MX35_INT_USBOTG 37 |
@@ -173,22 +179,18 @@ | |||
173 | #define MX35_INT_EXT_WDOG 62 | 179 | #define MX35_INT_EXT_WDOG 62 |
174 | #define MX35_INT_EXT_TV 63 | 180 | #define MX35_INT_EXT_TV 63 |
175 | 181 | ||
182 | #define MX35_DMA_REQ_SSI2_RX1 22 | ||
183 | #define MX35_DMA_REQ_SSI2_TX1 23 | ||
184 | #define MX35_DMA_REQ_SSI2_RX0 24 | ||
185 | #define MX35_DMA_REQ_SSI2_TX0 25 | ||
186 | #define MX35_DMA_REQ_SSI1_RX1 26 | ||
187 | #define MX35_DMA_REQ_SSI1_TX1 27 | ||
188 | #define MX35_DMA_REQ_SSI1_RX0 28 | ||
189 | #define MX35_DMA_REQ_SSI1_TX0 29 | ||
190 | |||
176 | #define MX35_PROD_SIGNATURE 0x1 /* For MX31 */ | 191 | #define MX35_PROD_SIGNATURE 0x1 /* For MX31 */ |
177 | 192 | ||
178 | /* silicon revisions specific to i.MX31 */ | 193 | #define MX35_SYSTEM_REV_MIN MX3x_CHIP_REV_1_0 |
179 | #define MX35_CHIP_REV_1_0 0x10 | ||
180 | #define MX35_CHIP_REV_1_1 0x11 | ||
181 | #define MX35_CHIP_REV_1_2 0x12 | ||
182 | #define MX35_CHIP_REV_1_3 0x13 | ||
183 | #define MX35_CHIP_REV_2_0 0x20 | ||
184 | #define MX35_CHIP_REV_2_1 0x21 | ||
185 | #define MX35_CHIP_REV_2_2 0x22 | ||
186 | #define MX35_CHIP_REV_2_3 0x23 | ||
187 | #define MX35_CHIP_REV_3_0 0x30 | ||
188 | #define MX35_CHIP_REV_3_1 0x31 | ||
189 | #define MX35_CHIP_REV_3_2 0x32 | ||
190 | |||
191 | #define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0 | ||
192 | #define MX35_SYSTEM_REV_NUM 3 | 194 | #define MX35_SYSTEM_REV_NUM 3 |
193 | 195 | ||
194 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | 196 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS |
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index 7a356de385f5..d1bd26d7b8a6 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h | |||
@@ -240,7 +240,7 @@ | |||
240 | 240 | ||
241 | #define MX3x_PROD_SIGNATURE 0x1 /* For MX31 */ | 241 | #define MX3x_PROD_SIGNATURE 0x1 /* For MX31 */ |
242 | 242 | ||
243 | /* silicon revisions specific to i.MX31 */ | 243 | /* silicon revisions specific to i.MX31 and i.MX35 */ |
244 | #define MX3x_CHIP_REV_1_0 0x10 | 244 | #define MX3x_CHIP_REV_1_0 0x10 |
245 | #define MX3x_CHIP_REV_1_1 0x11 | 245 | #define MX3x_CHIP_REV_1_1 0x11 |
246 | #define MX3x_CHIP_REV_1_2 0x12 | 246 | #define MX3x_CHIP_REV_1_2 0x12 |
@@ -267,6 +267,14 @@ static inline int mx31_revision(void) | |||
267 | { | 267 | { |
268 | return mx31_cpu_rev; | 268 | return mx31_cpu_rev; |
269 | } | 269 | } |
270 | |||
271 | extern unsigned int mx35_cpu_rev; | ||
272 | extern void mx35_read_cpu_rev(void); | ||
273 | |||
274 | static inline int mx35_revision(void) | ||
275 | { | ||
276 | return mx35_cpu_rev; | ||
277 | } | ||
270 | #endif | 278 | #endif |
271 | 279 | ||
272 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | 280 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS |
@@ -389,19 +397,6 @@ static inline int mx31_revision(void) | |||
389 | #define MXC_INT_EXT_WDOG MX3x_INT_EXT_WDOG | 397 | #define MXC_INT_EXT_WDOG MX3x_INT_EXT_WDOG |
390 | #define MXC_INT_EXT_TV MX3x_INT_EXT_TV | 398 | #define MXC_INT_EXT_TV MX3x_INT_EXT_TV |
391 | #define PROD_SIGNATURE MX3x_PROD_SIGNATURE | 399 | #define PROD_SIGNATURE MX3x_PROD_SIGNATURE |
392 | #define CHIP_REV_1_0 MX3x_CHIP_REV_1_0 | ||
393 | #define CHIP_REV_1_1 MX3x_CHIP_REV_1_1 | ||
394 | #define CHIP_REV_1_2 MX3x_CHIP_REV_1_2 | ||
395 | #define CHIP_REV_1_3 MX3x_CHIP_REV_1_3 | ||
396 | #define CHIP_REV_2_0 MX3x_CHIP_REV_2_0 | ||
397 | #define CHIP_REV_2_1 MX3x_CHIP_REV_2_1 | ||
398 | #define CHIP_REV_2_2 MX3x_CHIP_REV_2_2 | ||
399 | #define CHIP_REV_2_3 MX3x_CHIP_REV_2_3 | ||
400 | #define CHIP_REV_3_0 MX3x_CHIP_REV_3_0 | ||
401 | #define CHIP_REV_3_1 MX3x_CHIP_REV_3_1 | ||
402 | #define CHIP_REV_3_2 MX3x_CHIP_REV_3_2 | ||
403 | #define SYSTEM_REV_MIN MX3x_SYSTEM_REV_MIN | ||
404 | #define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM | ||
405 | #endif | 400 | #endif |
406 | 401 | ||
407 | #endif /* ifndef __MACH_MX3x_H__ */ | 402 | #endif /* ifndef __MACH_MX3x_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 5aad344d5651..c54b5c32d82e 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_ARCH_MXC_MX51_H__ | 1 | #ifndef __MACH_MX51_H__ |
2 | #define __ASM_ARCH_MXC_MX51_H__ | 2 | #define __MACH_MX51_H__ |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * MX51 memory map: | 5 | * MX51 memory map: |
@@ -7,24 +7,23 @@ | |||
7 | * | 7 | * |
8 | * Virt Phys Size What | 8 | * Virt Phys Size What |
9 | * --------------------------------------------------------------------------- | 9 | * --------------------------------------------------------------------------- |
10 | * FA3E0000 1FFE0000 128K IRAM (SCCv2 RAM) | 10 | * fa3e0000 1ffe0000 128K IRAM (SCCv2 RAM) |
11 | * 30000000 256M GPU | 11 | * 30000000 256M GPU |
12 | * 40000000 512M IPU | 12 | * 40000000 512M IPU |
13 | * FA200000 60000000 1M DEBUG | 13 | * fa200000 60000000 1M DEBUG |
14 | * FB100000 70000000 1M SPBA 0 | 14 | * fb100000 70000000 1M SPBA 0 |
15 | * FB000000 73F00000 1M AIPS 1 | 15 | * fb000000 73f00000 1M AIPS 1 |
16 | * FB200000 83F00000 1M AIPS 2 | 16 | * fb200000 83f00000 1M AIPS 2 |
17 | * 8FFFC000 16K TZIC (interrupt controller) | 17 | * 8fffc000 16K TZIC (interrupt controller) |
18 | * 90000000 256M CSD0 SDRAM/DDR | 18 | * 90000000 256M CSD0 SDRAM/DDR |
19 | * A0000000 256M CSD1 SDRAM/DDR | 19 | * a0000000 256M CSD1 SDRAM/DDR |
20 | * B0000000 128M CS0 Flash | 20 | * b0000000 128M CS0 Flash |
21 | * B8000000 128M CS1 Flash | 21 | * b8000000 128M CS1 Flash |
22 | * C0000000 128M CS2 Flash | 22 | * c0000000 128M CS2 Flash |
23 | * C8000000 64M CS3 Flash | 23 | * c8000000 64M CS3 Flash |
24 | * CC000000 32M CS4 SRAM | 24 | * cc000000 32M CS4 SRAM |
25 | * CE000000 32M CS5 SRAM | 25 | * ce000000 32M CS5 SRAM |
26 | * CFFF0000 64K NFC (NAND Flash AXI) | 26 | * cfff0000 64K NFC (NAND Flash AXI) |
27 | * | ||
28 | */ | 27 | */ |
29 | 28 | ||
30 | /* | 29 | /* |
@@ -36,65 +35,151 @@ | |||
36 | /* | 35 | /* |
37 | * IRAM | 36 | * IRAM |
38 | */ | 37 | */ |
39 | #define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */ | 38 | #define MX51_IRAM_BASE_ADDR 0x1ffe0000 /* internal ram */ |
40 | #define MX51_IRAM_BASE_ADDR_VIRT 0xFA3E0000 | 39 | #define MX51_IRAM_BASE_ADDR_VIRT 0xfa3e0000 |
41 | #define MX51_IRAM_PARTITIONS 16 | 40 | #define MX51_IRAM_PARTITIONS 16 |
42 | #define MX51_IRAM_PARTITIONS_TO1 12 | ||
43 | #define MX51_IRAM_SIZE (MX51_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | 41 | #define MX51_IRAM_SIZE (MX51_IRAM_PARTITIONS * SZ_8K) /* 128KB */ |
44 | 42 | ||
43 | #define MX51_GPU_BASE_ADDR 0x20000000 | ||
44 | #define MX51_GPU_CTRL_BASE_ADDR 0x30000000 | ||
45 | #define MX51_IPU_CTRL_BASE_ADDR 0x40000000 | ||
46 | |||
47 | #define MX51_DEBUG_BASE_ADDR 0x60000000 | ||
48 | #define MX51_DEBUG_BASE_ADDR_VIRT 0xfa200000 | ||
49 | #define MX51_DEBUG_SIZE SZ_1M | ||
50 | |||
51 | #define MX51_ETB_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x01000) | ||
52 | #define MX51_ETM_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x02000) | ||
53 | #define MX51_TPIU_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x03000) | ||
54 | #define MX51_CTI0_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x04000) | ||
55 | #define MX51_CTI1_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x05000) | ||
56 | #define MX51_CTI2_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x06000) | ||
57 | #define MX51_CTI3_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x07000) | ||
58 | #define MX51_CORTEX_DBG_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x08000) | ||
59 | |||
45 | /* | 60 | /* |
46 | * NFC | 61 | * SPBA global module enabled #0 |
47 | */ | 62 | */ |
48 | #define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */ | 63 | #define MX51_SPBA0_BASE_ADDR 0x70000000 |
49 | #define MX51_NFC_AXI_SIZE SZ_64K | 64 | #define MX51_SPBA0_BASE_ADDR_VIRT 0xfb100000 |
65 | #define MX51_SPBA0_SIZE SZ_1M | ||
66 | |||
67 | #define MX51_MMC_SDHC1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x04000) | ||
68 | #define MX51_MMC_SDHC2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x08000) | ||
69 | #define MX51_UART3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0c000) | ||
70 | #define MX51_ECSPI1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x10000) | ||
71 | #define MX51_SSI2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x14000) | ||
72 | #define MX51_MMC_SDHC3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x20000) | ||
73 | #define MX51_MMC_SDHC4_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x24000) | ||
74 | #define MX51_SPDIF_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x28000) | ||
75 | #define MX51_ATA_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x30000) | ||
76 | #define MX51_SLIM_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x34000) | ||
77 | #define MX51_HSI2C_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x38000) | ||
78 | #define MX51_SPBA_CTRL_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x3c000) | ||
50 | 79 | ||
51 | /* | 80 | /* |
52 | * Graphics Memory of GPU | 81 | * AIPS 1 |
53 | */ | 82 | */ |
54 | #define MX51_GPU_BASE_ADDR 0x20000000 | 83 | #define MX51_AIPS1_BASE_ADDR 0x73f00000 |
55 | #define MX51_GPU2D_BASE_ADDR 0xD0000000 | 84 | #define MX51_AIPS1_BASE_ADDR_VIRT 0xfb000000 |
85 | #define MX51_AIPS1_SIZE SZ_1M | ||
86 | |||
87 | #define MX51_OTG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x80000) | ||
88 | #define MX51_GPIO1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x84000) | ||
89 | #define MX51_GPIO2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x88000) | ||
90 | #define MX51_GPIO3_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x8c000) | ||
91 | #define MX51_GPIO4_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x90000) | ||
92 | #define MX51_KPP_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x94000) | ||
93 | #define MX51_WDOG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x98000) | ||
94 | #define MX51_WDOG2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x9c000) | ||
95 | #define MX51_GPT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa0000) | ||
96 | #define MX51_SRTC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa4000) | ||
97 | #define MX51_IOMUXC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa8000) | ||
98 | #define MX51_EPIT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xac000) | ||
99 | #define MX51_EPIT2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb0000) | ||
100 | #define MX51_PWM1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb4000) | ||
101 | #define MX51_PWM2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb8000) | ||
102 | #define MX51_UART1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xbc000) | ||
103 | #define MX51_UART2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xc0000) | ||
104 | #define MX51_SRC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd0000) | ||
105 | #define MX51_CCM_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd4000) | ||
106 | #define MX51_GPC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd8000) | ||
56 | 107 | ||
57 | #define MX51_TZIC_BASE_ADDR_TO1 0x8FFFC000 | 108 | /* |
58 | #define MX51_TZIC_BASE_ADDR 0xE0000000 | 109 | * AIPS 2 |
110 | */ | ||
111 | #define MX51_AIPS2_BASE_ADDR 0x83f00000 | ||
112 | #define MX51_AIPS2_BASE_ADDR_VIRT 0xfb200000 | ||
113 | #define MX51_AIPS2_SIZE SZ_1M | ||
59 | 114 | ||
60 | #define MX51_DEBUG_BASE_ADDR 0x60000000 | 115 | #define MX51_PLL1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x80000) |
61 | #define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000 | 116 | #define MX51_PLL2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x84000) |
62 | #define MX51_DEBUG_SIZE SZ_1M | 117 | #define MX51_PLL3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x88000) |
63 | #define MX51_ETB_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00001000) | 118 | #define MX51_AHBMAX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x94000) |
64 | #define MX51_ETM_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00002000) | 119 | #define MX51_IIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x98000) |
65 | #define MX51_TPIU_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00003000) | 120 | #define MX51_CSU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x9c000) |
66 | #define MX51_CTI0_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00004000) | 121 | #define MX51_ARM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa0000) |
67 | #define MX51_CTI1_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00005000) | 122 | #define MX51_OWIRE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa4000) |
68 | #define MX51_CTI2_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00006000) | 123 | #define MX51_FIRI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa8000) |
69 | #define MX51_CTI3_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00007000) | 124 | #define MX51_ECSPI2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xac000) |
70 | #define MX51_CORTEX_DBG_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00008000) | 125 | #define MX51_SDMA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb0000) |
126 | #define MX51_SCC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb4000) | ||
127 | #define MX51_ROMCP_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb8000) | ||
128 | #define MX51_RTIC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xbc000) | ||
129 | #define MX51_CSPI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc0000) | ||
130 | #define MX51_I2C2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc4000) | ||
131 | #define MX51_I2C1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc8000) | ||
132 | #define MX51_SSI1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xcc000) | ||
133 | #define MX51_AUDMUX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd0000) | ||
134 | #define MX51_M4IF_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd8000) | ||
135 | #define MX51_ESDCTL_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd9000) | ||
136 | #define MX51_WEIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xda000) | ||
137 | #define MX51_NFC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdb000) | ||
138 | #define MX51_EMI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdbf00) | ||
139 | #define MX51_MIPI_HSC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdc000) | ||
140 | #define MX51_ATA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe0000) | ||
141 | #define MX51_SIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe4000) | ||
142 | #define MX51_SSI3BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe8000) | ||
143 | #define MX51_FEC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xec000) | ||
144 | #define MX51_TVE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf0000) | ||
145 | #define MX51_VPU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf4000) | ||
146 | #define MX51_SAHARA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf8000) | ||
147 | |||
148 | #define MX51_CSD0_BASE_ADDR 0x90000000 | ||
149 | #define MX51_CSD1_BASE_ADDR 0xa0000000 | ||
150 | #define MX51_CS0_BASE_ADDR 0xb0000000 | ||
151 | #define MX51_CS1_BASE_ADDR 0xb8000000 | ||
152 | #define MX51_CS2_BASE_ADDR 0xc0000000 | ||
153 | #define MX51_CS3_BASE_ADDR 0xc8000000 | ||
154 | #define MX51_CS4_BASE_ADDR 0xcc000000 | ||
155 | #define MX51_CS5_BASE_ADDR 0xce000000 | ||
71 | 156 | ||
72 | /* | 157 | /* |
73 | * SPBA global module enabled #0 | 158 | * NFC |
74 | */ | 159 | */ |
75 | #define MX51_SPBA0_BASE_ADDR 0x70000000 | 160 | #define MX51_NFC_AXI_BASE_ADDR 0xcfff0000 /* NAND flash AXI */ |
76 | #define MX51_SPBA0_BASE_ADDR_VIRT 0xFB100000 | 161 | #define MX51_NFC_AXI_SIZE SZ_64K |
77 | #define MX51_SPBA0_SIZE SZ_1M | 162 | |
163 | #define MX51_GPU2D_BASE_ADDR 0xd0000000 | ||
164 | #define MX51_TZIC_BASE_ADDR 0xe0000000 | ||
78 | 165 | ||
79 | #define MX51_MMC_SDHC1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00004000) | 166 | #define MX51_IO_ADDRESS(x) ( \ |
80 | #define MX51_MMC_SDHC2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00008000) | 167 | IMX_IO_ADDRESS(x, MX51_IRAM) ?: \ |
81 | #define MX51_UART3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0000C000) | 168 | IMX_IO_ADDRESS(x, MX51_DEBUG) ?: \ |
82 | #define MX51_CSPI1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00010000) | 169 | IMX_IO_ADDRESS(x, MX51_SPBA0) ?: \ |
83 | #define MX51_SSI2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00014000) | 170 | IMX_IO_ADDRESS(x, MX51_AIPS1) ?: \ |
84 | #define MX51_MMC_SDHC3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00020000) | 171 | IMX_IO_ADDRESS(x, MX51_AIPS2)) |
85 | #define MX51_MMC_SDHC4_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00024000) | 172 | |
86 | #define MX51_SPDIF_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00028000) | 173 | /* This is currently used in <mach/debug-macro.S>, but should go away */ |
87 | #define MX51_ATA_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00030000) | 174 | #define MX51_AIPS1_IO_ADDRESS(x) \ |
88 | #define MX51_SLIM_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00034000) | 175 | (((x) - MX51_AIPS1_BASE_ADDR) + MX51_AIPS1_BASE_ADDR_VIRT) |
89 | #define MX51_HSI2C_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00038000) | ||
90 | #define MX51_SPBA_CTRL_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0003C000) | ||
91 | 176 | ||
92 | /* | 177 | /* |
93 | * defines for SPBA modules | 178 | * defines for SPBA modules |
94 | */ | 179 | */ |
95 | #define MX51_SPBA_SDHC1 0x04 | 180 | #define MX51_SPBA_SDHC1 0x04 |
96 | #define MX51_SPBA_SDHC2 0x08 | 181 | #define MX51_SPBA_SDHC2 0x08 |
97 | #define MX51_SPBA_UART3 0x0C | 182 | #define MX51_SPBA_UART3 0x0c |
98 | #define MX51_SPBA_CSPI1 0x10 | 183 | #define MX51_SPBA_CSPI1 0x10 |
99 | #define MX51_SPBA_SSI2 0x14 | 184 | #define MX51_SPBA_SSI2 0x14 |
100 | #define MX51_SPBA_SDHC3 0x20 | 185 | #define MX51_SPBA_SDHC3 0x20 |
@@ -103,35 +188,7 @@ | |||
103 | #define MX51_SPBA_ATA 0x30 | 188 | #define MX51_SPBA_ATA 0x30 |
104 | #define MX51_SPBA_SLIM 0x34 | 189 | #define MX51_SPBA_SLIM 0x34 |
105 | #define MX51_SPBA_HSI2C 0x38 | 190 | #define MX51_SPBA_HSI2C 0x38 |
106 | #define MX51_SPBA_CTRL 0x3C | 191 | #define MX51_SPBA_CTRL 0x3c |
107 | |||
108 | /* | ||
109 | * AIPS 1 | ||
110 | */ | ||
111 | #define MX51_AIPS1_BASE_ADDR 0x73F00000 | ||
112 | #define MX51_AIPS1_BASE_ADDR_VIRT 0xFB000000 | ||
113 | #define MX51_AIPS1_SIZE SZ_1M | ||
114 | |||
115 | #define MX51_OTG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00080000) | ||
116 | #define MX51_GPIO1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00084000) | ||
117 | #define MX51_GPIO2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00088000) | ||
118 | #define MX51_GPIO3_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x0008C000) | ||
119 | #define MX51_GPIO4_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00090000) | ||
120 | #define MX51_KPP_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00094000) | ||
121 | #define MX51_WDOG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00098000) | ||
122 | #define MX51_WDOG2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x0009C000) | ||
123 | #define MX51_GPT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A0000) | ||
124 | #define MX51_SRTC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A4000) | ||
125 | #define MX51_IOMUXC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A8000) | ||
126 | #define MX51_EPIT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000AC000) | ||
127 | #define MX51_EPIT2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B0000) | ||
128 | #define MX51_PWM1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B4000) | ||
129 | #define MX51_PWM2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B8000) | ||
130 | #define MX51_UART1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000BC000) | ||
131 | #define MX51_UART2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000C0000) | ||
132 | #define MX51_SRC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D0000) | ||
133 | #define MX51_CCM_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D4000) | ||
134 | #define MX51_GPC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D8000) | ||
135 | 192 | ||
136 | /* | 193 | /* |
137 | * Defines for modules using static and dynamic DMA channels | 194 | * Defines for modules using static and dynamic DMA channels |
@@ -164,282 +221,186 @@ | |||
164 | #define MX51_MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL | 221 | #define MX51_MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL |
165 | #define MX51_MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL | 222 | #define MX51_MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL |
166 | 223 | ||
167 | /* | ||
168 | * AIPS 2 | ||
169 | */ | ||
170 | #define MX51_AIPS2_BASE_ADDR 0x83F00000 | ||
171 | #define MX51_AIPS2_BASE_ADDR_VIRT 0xFB200000 | ||
172 | #define MX51_AIPS2_SIZE SZ_1M | ||
173 | |||
174 | #define MX51_PLL1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00080000) | ||
175 | #define MX51_PLL2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00084000) | ||
176 | #define MX51_PLL3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00088000) | ||
177 | #define MX51_AHBMAX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00094000) | ||
178 | #define MX51_IIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00098000) | ||
179 | #define MX51_CSU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x0009C000) | ||
180 | #define MX51_ARM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A0000) | ||
181 | #define MX51_OWIRE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A4000) | ||
182 | #define MX51_FIRI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A8000) | ||
183 | #define MX51_CSPI2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000AC000) | ||
184 | #define MX51_SDMA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B0000) | ||
185 | #define MX51_SCC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B4000) | ||
186 | #define MX51_ROMCP_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B8000) | ||
187 | #define MX51_RTIC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000BC000) | ||
188 | #define MX51_CSPI3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C0000) | ||
189 | #define MX51_I2C2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C4000) | ||
190 | #define MX51_I2C1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C8000) | ||
191 | #define MX51_SSI1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000CC000) | ||
192 | #define MX51_AUDMUX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D0000) | ||
193 | #define MX51_M4IF_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D8000) | ||
194 | #define MX51_ESDCTL_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D9000) | ||
195 | #define MX51_WEIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DA000) | ||
196 | #define MX51_NFC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DB000) | ||
197 | #define MX51_EMI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DBF00) | ||
198 | #define MX51_MIPI_HSC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DC000) | ||
199 | #define MX51_ATA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E0000) | ||
200 | #define MX51_SIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E4000) | ||
201 | #define MX51_SSI3BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E8000) | ||
202 | #define MX51_MXC_FEC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000EC000) | ||
203 | #define MX51_TVE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F0000) | ||
204 | #define MX51_VPU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F4000) | ||
205 | #define MX51_SAHARA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F8000) | ||
206 | |||
207 | /* | ||
208 | * Memory regions and CS | ||
209 | */ | ||
210 | #define MX51_GPU_CTRL_BASE_ADDR 0x30000000 | ||
211 | #define MX51_IPU_CTRL_BASE_ADDR 0x40000000 | ||
212 | #define MX51_CSD0_BASE_ADDR 0x90000000 | ||
213 | #define MX51_CSD1_BASE_ADDR 0xA0000000 | ||
214 | #define MX51_CS0_BASE_ADDR 0xB0000000 | ||
215 | #define MX51_CS1_BASE_ADDR 0xB8000000 | ||
216 | #define MX51_CS2_BASE_ADDR 0xC0000000 | ||
217 | #define MX51_CS3_BASE_ADDR 0xC8000000 | ||
218 | #define MX51_CS4_BASE_ADDR 0xCC000000 | ||
219 | #define MX51_CS5_BASE_ADDR 0xCE000000 | ||
220 | |||
221 | /* Does given address belongs to the specified memory region? */ | ||
222 | #define ADDRESS_IN_REGION(addr, start, size) \ | ||
223 | (((addr) >= (start)) && ((addr) < (start)+(size))) | ||
224 | |||
225 | /* Does given address belongs to the specified named `module'? */ | ||
226 | #define MX51_IS_MODULE(addr, module) \ | ||
227 | ADDRESS_IN_REGION(addr, MX51_ ## module ## _BASE_ADDR, \ | ||
228 | MX51_ ## module ## _SIZE) | ||
229 | /* | ||
230 | * This macro defines the physical to virtual address mapping for all the | ||
231 | * peripheral modules. It is used by passing in the physical address as x | ||
232 | * and returning the virtual address. If the physical address is not mapped, | ||
233 | * it returns 0xDEADBEEF | ||
234 | */ | ||
235 | |||
236 | #define MX51_IO_ADDRESS(x) \ | ||
237 | (void __iomem *) \ | ||
238 | (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \ | ||
239 | MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \ | ||
240 | MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \ | ||
241 | MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \ | ||
242 | MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \ | ||
243 | 0xDEADBEEF) | ||
244 | |||
245 | /* | ||
246 | * define the address mapping macros: in physical address order | ||
247 | */ | ||
248 | #define MX51_IRAM_IO_ADDRESS(x) \ | ||
249 | (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT) | ||
250 | |||
251 | #define MX51_DEBUG_IO_ADDRESS(x) \ | ||
252 | (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT) | ||
253 | |||
254 | #define MX51_SPBA0_IO_ADDRESS(x) \ | ||
255 | (((x) - MX51_SPBA0_BASE_ADDR) + MX51_SPBA0_BASE_ADDR_VIRT) | ||
256 | |||
257 | #define MX51_AIPS1_IO_ADDRESS(x) \ | ||
258 | (((x) - MX51_AIPS1_BASE_ADDR) + MX51_AIPS1_BASE_ADDR_VIRT) | ||
259 | |||
260 | #define MX51_AIPS2_IO_ADDRESS(x) \ | ||
261 | (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT) | ||
262 | |||
263 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 | 224 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 |
264 | 225 | ||
265 | /* | 226 | /* |
266 | * DMA request assignments | 227 | * DMA request assignments |
267 | */ | 228 | */ |
268 | #define MX51_DMA_REQ_SSI3_TX1 47 | 229 | #define MX51_DMA_REQ_VPU 0 |
269 | #define MX51_DMA_REQ_SSI3_RX1 46 | 230 | #define MX51_DMA_REQ_GPC 1 |
270 | #define MX51_DMA_REQ_SPDIF 45 | 231 | #define MX51_DMA_REQ_ATA_RX 2 |
271 | #define MX51_DMA_REQ_UART3_TX 44 | 232 | #define MX51_DMA_REQ_ATA_TX 3 |
272 | #define MX51_DMA_REQ_UART3_RX 43 | 233 | #define MX51_DMA_REQ_ATA_TX_END 4 |
273 | #define MX51_DMA_REQ_SLIM_B_TX 42 | 234 | #define MX51_DMA_REQ_SLIM_B 5 |
274 | #define MX51_DMA_REQ_SDHC4 41 | 235 | #define MX51_DMA_REQ_CSPI1_RX 6 |
275 | #define MX51_DMA_REQ_SDHC3 40 | 236 | #define MX51_DMA_REQ_CSPI1_TX 7 |
276 | #define MX51_DMA_REQ_CSPI_TX 39 | 237 | #define MX51_DMA_REQ_CSPI2_RX 8 |
277 | #define MX51_DMA_REQ_CSPI_RX 38 | 238 | #define MX51_DMA_REQ_CSPI2_TX 9 |
278 | #define MX51_DMA_REQ_SSI3_TX2 37 | 239 | #define MX51_DMA_REQ_HS_I2C_TX 10 |
279 | #define MX51_DMA_REQ_IPU 36 | 240 | #define MX51_DMA_REQ_HS_I2C_RX 11 |
280 | #define MX51_DMA_REQ_SSI3_RX2 35 | 241 | #define MX51_DMA_REQ_FIRI_RX 12 |
281 | #define MX51_DMA_REQ_EPIT2 34 | 242 | #define MX51_DMA_REQ_FIRI_TX 13 |
282 | #define MX51_DMA_REQ_CTI2_1 33 | 243 | #define MX51_DMA_REQ_EXTREQ1 14 |
283 | #define MX51_DMA_REQ_EMI_WR 32 | 244 | #define MX51_DMA_REQ_GPU 15 |
284 | #define MX51_DMA_REQ_CTI2_0 31 | 245 | #define MX51_DMA_REQ_UART2_RX 16 |
285 | #define MX51_DMA_REQ_EMI_RD 30 | 246 | #define MX51_DMA_REQ_UART2_TX 17 |
286 | #define MX51_DMA_REQ_SSI1_TX1 29 | 247 | #define MX51_DMA_REQ_UART1_RX 18 |
287 | #define MX51_DMA_REQ_SSI1_RX1 28 | 248 | #define MX51_DMA_REQ_UART1_TX 19 |
288 | #define MX51_DMA_REQ_SSI1_TX2 27 | 249 | #define MX51_DMA_REQ_SDHC1 20 |
289 | #define MX51_DMA_REQ_SSI1_RX2 26 | 250 | #define MX51_DMA_REQ_SDHC2 21 |
290 | #define MX51_DMA_REQ_SSI2_TX1 25 | 251 | #define MX51_DMA_REQ_SSI2_RX1 22 |
291 | #define MX51_DMA_REQ_SSI2_RX1 24 | 252 | #define MX51_DMA_REQ_SSI2_TX1 23 |
292 | #define MX51_DMA_REQ_SSI2_TX2 23 | 253 | #define MX51_DMA_REQ_SSI2_RX0 24 |
293 | #define MX51_DMA_REQ_SSI2_RX2 22 | 254 | #define MX51_DMA_REQ_SSI2_TX0 25 |
294 | #define MX51_DMA_REQ_SDHC2 21 | 255 | #define MX51_DMA_REQ_SSI1_RX1 26 |
295 | #define MX51_DMA_REQ_SDHC1 20 | 256 | #define MX51_DMA_REQ_SSI1_TX1 27 |
296 | #define MX51_DMA_REQ_UART1_TX 19 | 257 | #define MX51_DMA_REQ_SSI1_RX0 28 |
297 | #define MX51_DMA_REQ_UART1_RX 18 | 258 | #define MX51_DMA_REQ_SSI1_TX0 29 |
298 | #define MX51_DMA_REQ_UART2_TX 17 | 259 | #define MX51_DMA_REQ_EMI_RD 30 |
299 | #define MX51_DMA_REQ_UART2_RX 16 | 260 | #define MX51_DMA_REQ_CTI2_0 31 |
300 | #define MX51_DMA_REQ_GPU 15 | 261 | #define MX51_DMA_REQ_EMI_WR 32 |
301 | #define MX51_DMA_REQ_EXTREQ1 14 | 262 | #define MX51_DMA_REQ_CTI2_1 33 |
302 | #define MX51_DMA_REQ_FIRI_TX 13 | 263 | #define MX51_DMA_REQ_EPIT2 34 |
303 | #define MX51_DMA_REQ_FIRI_RX 12 | 264 | #define MX51_DMA_REQ_SSI3_RX2 35 |
304 | #define MX51_DMA_REQ_HS_I2C_RX 11 | 265 | #define MX51_DMA_REQ_IPU 36 |
305 | #define MX51_DMA_REQ_HS_I2C_TX 10 | 266 | #define MX51_DMA_REQ_SSI3_TX2 37 |
306 | #define MX51_DMA_REQ_CSPI2_TX 9 | 267 | #define MX51_DMA_REQ_CSPI_RX 38 |
307 | #define MX51_DMA_REQ_CSPI2_RX 8 | 268 | #define MX51_DMA_REQ_CSPI_TX 39 |
308 | #define MX51_DMA_REQ_CSPI1_TX 7 | 269 | #define MX51_DMA_REQ_SDHC3 40 |
309 | #define MX51_DMA_REQ_CSPI1_RX 6 | 270 | #define MX51_DMA_REQ_SDHC4 41 |
310 | #define MX51_DMA_REQ_SLIM_B 5 | 271 | #define MX51_DMA_REQ_SLIM_B_TX 42 |
311 | #define MX51_DMA_REQ_ATA_TX_END 4 | 272 | #define MX51_DMA_REQ_UART3_RX 43 |
312 | #define MX51_DMA_REQ_ATA_TX 3 | 273 | #define MX51_DMA_REQ_UART3_TX 44 |
313 | #define MX51_DMA_REQ_ATA_RX 2 | 274 | #define MX51_DMA_REQ_SPDIF 45 |
314 | #define MX51_DMA_REQ_GPC 1 | 275 | #define MX51_DMA_REQ_SSI3_RX1 46 |
315 | #define MX51_DMA_REQ_VPU 0 | 276 | #define MX51_DMA_REQ_SSI3_TX1 47 |
316 | 277 | ||
317 | /* | 278 | /* |
318 | * Interrupt numbers | 279 | * Interrupt numbers |
319 | */ | 280 | */ |
320 | #define MX51_MXC_INT_BASE 0 | 281 | #define MX51_MXC_INT_BASE 0 |
321 | #define MX51_MXC_INT_RESV0 0 | 282 | #define MX51_MXC_INT_RESV0 0 |
322 | #define MX51_MXC_INT_MMC_SDHC1 1 | 283 | #define MX51_MXC_INT_MMC_SDHC1 1 |
323 | #define MX51_MXC_INT_MMC_SDHC2 2 | 284 | #define MX51_MXC_INT_MMC_SDHC2 2 |
324 | #define MX51_MXC_INT_MMC_SDHC3 3 | 285 | #define MX51_MXC_INT_MMC_SDHC3 3 |
325 | #define MX51_MXC_INT_MMC_SDHC4 4 | 286 | #define MX51_MXC_INT_MMC_SDHC4 4 |
326 | #define MX51_MXC_INT_RESV5 5 | 287 | #define MX51_MXC_INT_RESV5 5 |
327 | #define MX51_MXC_INT_SDMA 6 | 288 | #define MX51_INT_SDMA 6 |
328 | #define MX51_MXC_INT_IOMUX 7 | 289 | #define MX51_MXC_INT_IOMUX 7 |
329 | #define MX51_MXC_INT_NFC 8 | 290 | #define MX51_INT_NFC 8 |
330 | #define MX51_MXC_INT_VPU 9 | 291 | #define MX51_MXC_INT_VPU 9 |
331 | #define MX51_MXC_INT_IPU_ERR 10 | 292 | #define MX51_MXC_INT_IPU_ERR 10 |
332 | #define MX51_MXC_INT_IPU_SYN 11 | 293 | #define MX51_MXC_INT_IPU_SYN 11 |
333 | #define MX51_MXC_INT_GPU 12 | 294 | #define MX51_MXC_INT_GPU 12 |
334 | #define MX51_MXC_INT_RESV13 13 | 295 | #define MX51_MXC_INT_RESV13 13 |
335 | #define MX51_MXC_INT_USB_H1 14 | 296 | #define MX51_MXC_INT_USB_H1 14 |
336 | #define MX51_MXC_INT_EMI 15 | 297 | #define MX51_MXC_INT_EMI 15 |
337 | #define MX51_MXC_INT_USB_H2 16 | 298 | #define MX51_MXC_INT_USB_H2 16 |
338 | #define MX51_MXC_INT_USB_H3 17 | 299 | #define MX51_MXC_INT_USB_H3 17 |
339 | #define MX51_MXC_INT_USB_OTG 18 | 300 | #define MX51_MXC_INT_USB_OTG 18 |
340 | #define MX51_MXC_INT_SAHARA_H0 19 | 301 | #define MX51_MXC_INT_SAHARA_H0 19 |
341 | #define MX51_MXC_INT_SAHARA_H1 20 | 302 | #define MX51_MXC_INT_SAHARA_H1 20 |
342 | #define MX51_MXC_INT_SCC_SMN 21 | 303 | #define MX51_MXC_INT_SCC_SMN 21 |
343 | #define MX51_MXC_INT_SCC_STZ 22 | 304 | #define MX51_MXC_INT_SCC_STZ 22 |
344 | #define MX51_MXC_INT_SCC_SCM 23 | 305 | #define MX51_MXC_INT_SCC_SCM 23 |
345 | #define MX51_MXC_INT_SRTC_NTZ 24 | 306 | #define MX51_MXC_INT_SRTC_NTZ 24 |
346 | #define MX51_MXC_INT_SRTC_TZ 25 | 307 | #define MX51_MXC_INT_SRTC_TZ 25 |
347 | #define MX51_MXC_INT_RTIC 26 | 308 | #define MX51_MXC_INT_RTIC 26 |
348 | #define MX51_MXC_INT_CSU 27 | 309 | #define MX51_MXC_INT_CSU 27 |
349 | #define MX51_MXC_INT_SLIM_B 28 | 310 | #define MX51_MXC_INT_SLIM_B 28 |
350 | #define MX51_MXC_INT_SSI1 29 | 311 | #define MX51_INT_SSI1 29 |
351 | #define MX51_MXC_INT_SSI2 30 | 312 | #define MX51_INT_SSI2 30 |
352 | #define MX51_MXC_INT_UART1 31 | 313 | #define MX51_INT_UART1 31 |
353 | #define MX51_MXC_INT_UART2 32 | 314 | #define MX51_INT_UART2 32 |
354 | #define MX51_MXC_INT_UART3 33 | 315 | #define MX51_INT_UART3 33 |
355 | #define MX51_MXC_INT_RESV34 34 | 316 | #define MX51_MXC_INT_RESV34 34 |
356 | #define MX51_MXC_INT_RESV35 35 | 317 | #define MX51_MXC_INT_RESV35 35 |
357 | #define MX51_MXC_INT_CSPI1 36 | 318 | #define MX51_INT_ECSPI1 36 |
358 | #define MX51_MXC_INT_CSPI2 37 | 319 | #define MX51_INT_ECSPI2 37 |
359 | #define MX51_MXC_INT_CSPI 38 | 320 | #define MX51_INT_CSPI 38 |
360 | #define MX51_MXC_INT_GPT 39 | 321 | #define MX51_MXC_INT_GPT 39 |
361 | #define MX51_MXC_INT_EPIT1 40 | 322 | #define MX51_MXC_INT_EPIT1 40 |
362 | #define MX51_MXC_INT_EPIT2 41 | 323 | #define MX51_MXC_INT_EPIT2 41 |
363 | #define MX51_MXC_INT_GPIO1_INT7 42 | 324 | #define MX51_MXC_INT_GPIO1_INT7 42 |
364 | #define MX51_MXC_INT_GPIO1_INT6 43 | 325 | #define MX51_MXC_INT_GPIO1_INT6 43 |
365 | #define MX51_MXC_INT_GPIO1_INT5 44 | 326 | #define MX51_MXC_INT_GPIO1_INT5 44 |
366 | #define MX51_MXC_INT_GPIO1_INT4 45 | 327 | #define MX51_MXC_INT_GPIO1_INT4 45 |
367 | #define MX51_MXC_INT_GPIO1_INT3 46 | 328 | #define MX51_MXC_INT_GPIO1_INT3 46 |
368 | #define MX51_MXC_INT_GPIO1_INT2 47 | 329 | #define MX51_MXC_INT_GPIO1_INT2 47 |
369 | #define MX51_MXC_INT_GPIO1_INT1 48 | 330 | #define MX51_MXC_INT_GPIO1_INT1 48 |
370 | #define MX51_MXC_INT_GPIO1_INT0 49 | 331 | #define MX51_MXC_INT_GPIO1_INT0 49 |
371 | #define MX51_MXC_INT_GPIO1_LOW 50 | 332 | #define MX51_MXC_INT_GPIO1_LOW 50 |
372 | #define MX51_MXC_INT_GPIO1_HIGH 51 | 333 | #define MX51_MXC_INT_GPIO1_HIGH 51 |
373 | #define MX51_MXC_INT_GPIO2_LOW 52 | 334 | #define MX51_MXC_INT_GPIO2_LOW 52 |
374 | #define MX51_MXC_INT_GPIO2_HIGH 53 | 335 | #define MX51_MXC_INT_GPIO2_HIGH 53 |
375 | #define MX51_MXC_INT_GPIO3_LOW 54 | 336 | #define MX51_MXC_INT_GPIO3_LOW 54 |
376 | #define MX51_MXC_INT_GPIO3_HIGH 55 | 337 | #define MX51_MXC_INT_GPIO3_HIGH 55 |
377 | #define MX51_MXC_INT_GPIO4_LOW 56 | 338 | #define MX51_MXC_INT_GPIO4_LOW 56 |
378 | #define MX51_MXC_INT_GPIO4_HIGH 57 | 339 | #define MX51_MXC_INT_GPIO4_HIGH 57 |
379 | #define MX51_MXC_INT_WDOG1 58 | 340 | #define MX51_MXC_INT_WDOG1 58 |
380 | #define MX51_MXC_INT_WDOG2 59 | 341 | #define MX51_MXC_INT_WDOG2 59 |
381 | #define MX51_MXC_INT_KPP 60 | 342 | #define MX51_MXC_INT_KPP 60 |
382 | #define MX51_MXC_INT_PWM1 61 | 343 | #define MX51_MXC_INT_PWM1 61 |
383 | #define MX51_MXC_INT_I2C1 62 | 344 | #define MX51_INT_I2C1 62 |
384 | #define MX51_MXC_INT_I2C2 63 | 345 | #define MX51_INT_I2C2 63 |
385 | #define MX51_MXC_INT_HS_I2C 64 | 346 | #define MX51_MXC_INT_HS_I2C 64 |
386 | #define MX51_MXC_INT_RESV65 65 | 347 | #define MX51_MXC_INT_RESV65 65 |
387 | #define MX51_MXC_INT_RESV66 66 | 348 | #define MX51_MXC_INT_RESV66 66 |
388 | #define MX51_MXC_INT_SIM_IPB 67 | 349 | #define MX51_MXC_INT_SIM_IPB 67 |
389 | #define MX51_MXC_INT_SIM_DAT 68 | 350 | #define MX51_MXC_INT_SIM_DAT 68 |
390 | #define MX51_MXC_INT_IIM 69 | 351 | #define MX51_MXC_INT_IIM 69 |
391 | #define MX51_MXC_INT_ATA 70 | 352 | #define MX51_MXC_INT_ATA 70 |
392 | #define MX51_MXC_INT_CCM1 71 | 353 | #define MX51_MXC_INT_CCM1 71 |
393 | #define MX51_MXC_INT_CCM2 72 | 354 | #define MX51_MXC_INT_CCM2 72 |
394 | #define MX51_MXC_INT_GPC1 73 | 355 | #define MX51_MXC_INT_GPC1 73 |
395 | #define MX51_MXC_INT_GPC2 74 | 356 | #define MX51_MXC_INT_GPC2 74 |
396 | #define MX51_MXC_INT_SRC 75 | 357 | #define MX51_MXC_INT_SRC 75 |
397 | #define MX51_MXC_INT_NM 76 | 358 | #define MX51_MXC_INT_NM 76 |
398 | #define MX51_MXC_INT_PMU 77 | 359 | #define MX51_MXC_INT_PMU 77 |
399 | #define MX51_MXC_INT_CTI_IRQ 78 | 360 | #define MX51_MXC_INT_CTI_IRQ 78 |
400 | #define MX51_MXC_INT_CTI1_TG0 79 | 361 | #define MX51_MXC_INT_CTI1_TG0 79 |
401 | #define MX51_MXC_INT_CTI1_TG1 80 | 362 | #define MX51_MXC_INT_CTI1_TG1 80 |
402 | #define MX51_MXC_INT_MCG_ERR 81 | 363 | #define MX51_MXC_INT_MCG_ERR 81 |
403 | #define MX51_MXC_INT_MCG_TMR 82 | 364 | #define MX51_MXC_INT_MCG_TMR 82 |
404 | #define MX51_MXC_INT_MCG_FUNC 83 | 365 | #define MX51_MXC_INT_MCG_FUNC 83 |
405 | #define MX51_MXC_INT_GPU2_IRQ 84 | 366 | #define MX51_MXC_INT_GPU2_IRQ 84 |
406 | #define MX51_MXC_INT_GPU2_BUSY 85 | 367 | #define MX51_MXC_INT_GPU2_BUSY 85 |
407 | #define MX51_MXC_INT_RESV86 86 | 368 | #define MX51_MXC_INT_RESV86 86 |
408 | #define MX51_MXC_INT_FEC 87 | 369 | #define MX51_INT_FEC 87 |
409 | #define MX51_MXC_INT_OWIRE 88 | 370 | #define MX51_MXC_INT_OWIRE 88 |
410 | #define MX51_MXC_INT_CTI1_TG2 89 | 371 | #define MX51_MXC_INT_CTI1_TG2 89 |
411 | #define MX51_MXC_INT_SJC 90 | 372 | #define MX51_MXC_INT_SJC 90 |
412 | #define MX51_MXC_INT_SPDIF 91 | 373 | #define MX51_MXC_INT_SPDIF 91 |
413 | #define MX51_MXC_INT_TVE 92 | 374 | #define MX51_MXC_INT_TVE 92 |
414 | #define MX51_MXC_INT_FIRI 93 | 375 | #define MX51_MXC_INT_FIRI 93 |
415 | #define MX51_MXC_INT_PWM2 94 | 376 | #define MX51_MXC_INT_PWM2 94 |
416 | #define MX51_MXC_INT_SLIM_EXP 95 | 377 | #define MX51_MXC_INT_SLIM_EXP 95 |
417 | #define MX51_MXC_INT_SSI3 96 | 378 | #define MX51_MXC_INT_SSI3 96 |
418 | #define MX51_MXC_INT_EMI_BOOT 97 | 379 | #define MX51_MXC_INT_EMI_BOOT 97 |
419 | #define MX51_MXC_INT_CTI1_TG3 98 | 380 | #define MX51_MXC_INT_CTI1_TG3 98 |
420 | #define MX51_MXC_INT_SMC_RX 99 | 381 | #define MX51_MXC_INT_SMC_RX 99 |
421 | #define MX51_MXC_INT_VPU_IDLE 100 | 382 | #define MX51_MXC_INT_VPU_IDLE 100 |
422 | #define MX51_MXC_INT_EMI_NFC 101 | 383 | #define MX51_MXC_INT_EMI_NFC 101 |
423 | #define MX51_MXC_INT_GPU_IDLE 102 | 384 | #define MX51_MXC_INT_GPU_IDLE 102 |
424 | 385 | ||
425 | /* silicon revisions specific to i.MX51 */ | 386 | /* silicon revisions specific to i.MX51 */ |
426 | #define MX51_CHIP_REV_1_0 0x10 | 387 | #define MX51_CHIP_REV_1_0 0x10 |
427 | #define MX51_CHIP_REV_1_1 0x11 | 388 | #define MX51_CHIP_REV_1_1 0x11 |
428 | #define MX51_CHIP_REV_1_2 0x12 | 389 | #define MX51_CHIP_REV_1_2 0x12 |
429 | #define MX51_CHIP_REV_1_3 0x13 | 390 | #define MX51_CHIP_REV_1_3 0x13 |
430 | #define MX51_CHIP_REV_2_0 0x20 | 391 | #define MX51_CHIP_REV_2_0 0x20 |
431 | #define MX51_CHIP_REV_2_1 0x21 | 392 | #define MX51_CHIP_REV_2_1 0x21 |
432 | #define MX51_CHIP_REV_2_2 0x22 | 393 | #define MX51_CHIP_REV_2_2 0x22 |
433 | #define MX51_CHIP_REV_2_3 0x23 | 394 | #define MX51_CHIP_REV_2_3 0x23 |
434 | #define MX51_CHIP_REV_3_0 0x30 | 395 | #define MX51_CHIP_REV_3_0 0x30 |
435 | #define MX51_CHIP_REV_3_1 0x31 | 396 | #define MX51_CHIP_REV_3_1 0x31 |
436 | #define MX51_CHIP_REV_3_2 0x32 | 397 | #define MX51_CHIP_REV_3_2 0x32 |
437 | |||
438 | /* Mandatory defines used globally */ | ||
439 | 398 | ||
440 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | 399 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
441 | |||
442 | extern int mx51_revision(void); | 400 | extern int mx51_revision(void); |
443 | #endif | 401 | #endif |
444 | 402 | ||
445 | #endif /* __ASM_ARCH_MXC_MX51_H__ */ | 403 | /* tape-out 1 defines */ |
404 | #define MX51_TZIC_BASE_ADDR_TO1 0x8fffc000 | ||
405 | |||
406 | #endif /* ifndef __MACH_MX51_H__ */ | ||