diff options
Diffstat (limited to 'arch/arm/mach-mx5')
27 files changed, 230 insertions, 384 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index b4e7c58bbb38..3d4c31306ca7 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -1,8 +1,9 @@ | |||
1 | if ARCH_MX503 || ARCH_MX51 | 1 | if ARCH_MX5 |
2 | |||
2 | # ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single | 3 | # ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single |
3 | # image. So for most time, SOC_IMX50/51/53 should be used. | 4 | # image. So for most time, SOC_IMX50/51/53 should be used. |
4 | 5 | ||
5 | config ARCH_MX5 | 6 | config ARCH_MX51 |
6 | bool | 7 | bool |
7 | 8 | ||
8 | config ARCH_MX50 | 9 | config ARCH_MX50 |
@@ -19,7 +20,6 @@ config SOC_IMX50 | |||
19 | select ARCH_MXC_IOMUX_V3 | 20 | select ARCH_MXC_IOMUX_V3 |
20 | select ARCH_MXC_AUDMUX_V2 | 21 | select ARCH_MXC_AUDMUX_V2 |
21 | select ARCH_HAS_CPUFREQ | 22 | select ARCH_HAS_CPUFREQ |
22 | select ARCH_MX5 | ||
23 | select ARCH_MX50 | 23 | select ARCH_MX50 |
24 | 24 | ||
25 | config SOC_IMX51 | 25 | config SOC_IMX51 |
@@ -30,7 +30,7 @@ config SOC_IMX51 | |||
30 | select ARCH_MXC_IOMUX_V3 | 30 | select ARCH_MXC_IOMUX_V3 |
31 | select ARCH_MXC_AUDMUX_V2 | 31 | select ARCH_MXC_AUDMUX_V2 |
32 | select ARCH_HAS_CPUFREQ | 32 | select ARCH_HAS_CPUFREQ |
33 | select ARCH_MX5 | 33 | select ARCH_MX51 |
34 | 34 | ||
35 | config SOC_IMX53 | 35 | config SOC_IMX53 |
36 | bool | 36 | bool |
@@ -38,10 +38,8 @@ config SOC_IMX53 | |||
38 | select ARM_L1_CACHE_SHIFT_6 | 38 | select ARM_L1_CACHE_SHIFT_6 |
39 | select MXC_TZIC | 39 | select MXC_TZIC |
40 | select ARCH_MXC_IOMUX_V3 | 40 | select ARCH_MXC_IOMUX_V3 |
41 | select ARCH_MX5 | ||
42 | select ARCH_MX53 | 41 | select ARCH_MX53 |
43 | 42 | ||
44 | if ARCH_MX50_SUPPORTED | ||
45 | #comment "i.MX50 machines:" | 43 | #comment "i.MX50 machines:" |
46 | 44 | ||
47 | config MACH_MX50_RDP | 45 | config MACH_MX50_RDP |
@@ -52,22 +50,20 @@ config MACH_MX50_RDP | |||
52 | select IMX_HAVE_PLATFORM_IMX_UART | 50 | select IMX_HAVE_PLATFORM_IMX_UART |
53 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 51 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
54 | select IMX_HAVE_PLATFORM_SPI_IMX | 52 | select IMX_HAVE_PLATFORM_SPI_IMX |
55 | select IMX_HAVE_PLATFORM_FEC | ||
56 | help | 53 | help |
57 | Include support for MX50 reference design platform (RDP) board. This | 54 | Include support for MX50 reference design platform (RDP) board. This |
58 | includes specific configurations for the board and its peripherals. | 55 | includes specific configurations for the board and its peripherals. |
59 | 56 | ||
60 | endif # ARCH_MX50_SUPPORTED | ||
61 | |||
62 | if ARCH_MX51 | ||
63 | comment "i.MX51 machines:" | 57 | comment "i.MX51 machines:" |
64 | 58 | ||
65 | config MACH_MX51_BABBAGE | 59 | config MACH_MX51_BABBAGE |
66 | bool "Support MX51 BABBAGE platforms" | 60 | bool "Support MX51 BABBAGE platforms" |
67 | select SOC_IMX51 | 61 | select SOC_IMX51 |
62 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
68 | select IMX_HAVE_PLATFORM_IMX2_WDT | 63 | select IMX_HAVE_PLATFORM_IMX2_WDT |
69 | select IMX_HAVE_PLATFORM_IMX_I2C | 64 | select IMX_HAVE_PLATFORM_IMX_I2C |
70 | select IMX_HAVE_PLATFORM_IMX_UART | 65 | select IMX_HAVE_PLATFORM_IMX_UART |
66 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
71 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 67 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
72 | select IMX_HAVE_PLATFORM_SPI_IMX | 68 | select IMX_HAVE_PLATFORM_SPI_IMX |
73 | help | 69 | help |
@@ -91,8 +87,10 @@ config MACH_MX51_3DS | |||
91 | config MACH_EUKREA_CPUIMX51 | 87 | config MACH_EUKREA_CPUIMX51 |
92 | bool "Support Eukrea CPUIMX51 module" | 88 | bool "Support Eukrea CPUIMX51 module" |
93 | select SOC_IMX51 | 89 | select SOC_IMX51 |
90 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
94 | select IMX_HAVE_PLATFORM_IMX_I2C | 91 | select IMX_HAVE_PLATFORM_IMX_I2C |
95 | select IMX_HAVE_PLATFORM_IMX_UART | 92 | select IMX_HAVE_PLATFORM_IMX_UART |
93 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
96 | select IMX_HAVE_PLATFORM_MXC_NAND | 94 | select IMX_HAVE_PLATFORM_MXC_NAND |
97 | select IMX_HAVE_PLATFORM_SPI_IMX | 95 | select IMX_HAVE_PLATFORM_SPI_IMX |
98 | help | 96 | help |
@@ -119,10 +117,12 @@ endchoice | |||
119 | config MACH_EUKREA_CPUIMX51SD | 117 | config MACH_EUKREA_CPUIMX51SD |
120 | bool "Support Eukrea CPUIMX51SD module" | 118 | bool "Support Eukrea CPUIMX51SD module" |
121 | select SOC_IMX51 | 119 | select SOC_IMX51 |
120 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
122 | select IMX_HAVE_PLATFORM_IMX_I2C | 121 | select IMX_HAVE_PLATFORM_IMX_I2C |
123 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
124 | select IMX_HAVE_PLATFORM_IMX_UART | 122 | select IMX_HAVE_PLATFORM_IMX_UART |
123 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
125 | select IMX_HAVE_PLATFORM_MXC_NAND | 124 | select IMX_HAVE_PLATFORM_MXC_NAND |
125 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
126 | help | 126 | help |
127 | Include support for Eukrea CPUIMX51SD platform. This includes | 127 | Include support for Eukrea CPUIMX51SD platform. This includes |
128 | specific configurations for the module and its peripherals. | 128 | specific configurations for the module and its peripherals. |
@@ -147,6 +147,8 @@ config MX51_EFIKA_COMMON | |||
147 | bool | 147 | bool |
148 | select SOC_IMX51 | 148 | select SOC_IMX51 |
149 | select IMX_HAVE_PLATFORM_IMX_UART | 149 | select IMX_HAVE_PLATFORM_IMX_UART |
150 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
151 | select IMX_HAVE_PLATFORM_PATA_IMX | ||
150 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 152 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
151 | select IMX_HAVE_PLATFORM_SPI_IMX | 153 | select IMX_HAVE_PLATFORM_SPI_IMX |
152 | select MXC_ULPI if USB_ULPI | 154 | select MXC_ULPI if USB_ULPI |
@@ -167,9 +169,6 @@ config MACH_MX51_EFIKASB | |||
167 | Include support for Genesi Efika Smartbook. This includes specific | 169 | Include support for Genesi Efika Smartbook. This includes specific |
168 | configurations for the board and its peripherals. | 170 | configurations for the board and its peripherals. |
169 | 171 | ||
170 | endif # ARCH_MX51 | ||
171 | |||
172 | if ARCH_MX53_SUPPORTED | ||
173 | comment "i.MX53 machines:" | 172 | comment "i.MX53 machines:" |
174 | 173 | ||
175 | config MACH_MX53_EVK | 174 | config MACH_MX53_EVK |
@@ -221,6 +220,4 @@ config MACH_MX53_ARD | |||
221 | Include support for MX53 ARD platform. This includes specific | 220 | Include support for MX53 ARD platform. This includes specific |
222 | configurations for the board and its peripherals. | 221 | configurations for the board and its peripherals. |
223 | 222 | ||
224 | endif # ARCH_MX53_SUPPORTED | ||
225 | |||
226 | endif | 223 | endif |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 383e7cd3fbcb..9565304b7282 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -3,8 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o | 6 | obj-y := cpu.o mm.o clock-mx51-mx53.o ehci.o system.o |
7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o | ||
8 | 7 | ||
9 | obj-$(CONFIG_PM) += pm-imx5.o | 8 | obj-$(CONFIG_PM) += pm-imx5.o |
10 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o | 9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o |
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 68934ea8725a..e28d0e165e5c 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -22,21 +22,18 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | ||
26 | 25 | ||
27 | #include <mach/eukrea-baseboards.h> | 26 | #include <mach/eukrea-baseboards.h> |
28 | #include <mach/common.h> | 27 | #include <mach/common.h> |
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
30 | #include <mach/iomux-mx51.h> | 29 | #include <mach/iomux-mx51.h> |
31 | 30 | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
34 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
37 | 35 | ||
38 | #include "devices-imx51.h" | 36 | #include "devices-imx51.h" |
39 | #include "devices.h" | ||
40 | 37 | ||
41 | #define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27) | 38 | #define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27) |
42 | #define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28) | 39 | #define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28) |
@@ -57,7 +54,7 @@ | |||
57 | static struct plat_serial8250_port serial_platform_data[] = { | 54 | static struct plat_serial8250_port serial_platform_data[] = { |
58 | { | 55 | { |
59 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), | 56 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), |
60 | .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), | 57 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO), |
61 | .irqflags = IRQF_TRIGGER_HIGH, | 58 | .irqflags = IRQF_TRIGGER_HIGH, |
62 | .uartclk = CPUIMX51_QUART_XTAL, | 59 | .uartclk = CPUIMX51_QUART_XTAL, |
63 | .regshift = CPUIMX51_QUART_REGSHIFT, | 60 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -65,7 +62,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
65 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 62 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
66 | }, { | 63 | }, { |
67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), | 64 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), |
68 | .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), | 65 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO), |
69 | .irqflags = IRQF_TRIGGER_HIGH, | 66 | .irqflags = IRQF_TRIGGER_HIGH, |
70 | .uartclk = CPUIMX51_QUART_XTAL, | 67 | .uartclk = CPUIMX51_QUART_XTAL, |
71 | .regshift = CPUIMX51_QUART_REGSHIFT, | 68 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -73,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 70 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
74 | }, { | 71 | }, { |
75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), | 72 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), |
76 | .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), | 73 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO), |
77 | .irqflags = IRQF_TRIGGER_HIGH, | 74 | .irqflags = IRQF_TRIGGER_HIGH, |
78 | .uartclk = CPUIMX51_QUART_XTAL, | 75 | .uartclk = CPUIMX51_QUART_XTAL, |
79 | .regshift = CPUIMX51_QUART_REGSHIFT, | 76 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -81,7 +78,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 78 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
82 | }, { | 79 | }, { |
83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 80 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
84 | .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), | 81 | .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO), |
85 | .irqflags = IRQF_TRIGGER_HIGH, | 82 | .irqflags = IRQF_TRIGGER_HIGH, |
86 | .uartclk = CPUIMX51_QUART_XTAL, | 83 | .uartclk = CPUIMX51_QUART_XTAL, |
87 | .regshift = CPUIMX51_QUART_REGSHIFT, | 84 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -167,7 +164,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
167 | void __iomem *usb_base; | 164 | void __iomem *usb_base; |
168 | void __iomem *usbother_base; | 165 | void __iomem *usbother_base; |
169 | 166 | ||
170 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 167 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
171 | if (!usb_base) | 168 | if (!usb_base) |
172 | return -ENOMEM; | 169 | return -ENOMEM; |
173 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 170 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -190,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
190 | void __iomem *usb_base; | 187 | void __iomem *usb_base; |
191 | void __iomem *usbother_base; | 188 | void __iomem *usbother_base; |
192 | 189 | ||
193 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 190 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
194 | if (!usb_base) | 191 | if (!usb_base) |
195 | return -ENOMEM; | 192 | return -ENOMEM; |
196 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 193 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -206,17 +203,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
206 | MXC_EHCI_ITC_NO_THRESHOLD); | 203 | MXC_EHCI_ITC_NO_THRESHOLD); |
207 | } | 204 | } |
208 | 205 | ||
209 | static struct mxc_usbh_platform_data dr_utmi_config = { | 206 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
210 | .init = initialize_otg_port, | 207 | .init = initialize_otg_port, |
211 | .portsc = MXC_EHCI_UTMI_16BIT, | 208 | .portsc = MXC_EHCI_UTMI_16BIT, |
212 | }; | 209 | }; |
213 | 210 | ||
214 | static struct fsl_usb2_platform_data usb_pdata = { | 211 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
215 | .operating_mode = FSL_USB2_DR_DEVICE, | 212 | .operating_mode = FSL_USB2_DR_DEVICE, |
216 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 213 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
217 | }; | 214 | }; |
218 | 215 | ||
219 | static struct mxc_usbh_platform_data usbh1_config = { | 216 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { |
220 | .init = initialize_usbh1_port, | 217 | .init = initialize_usbh1_port, |
221 | .portsc = MXC_EHCI_MODE_ULPI, | 218 | .portsc = MXC_EHCI_MODE_ULPI, |
222 | }; | 219 | }; |
@@ -270,12 +267,12 @@ static void __init eukrea_cpuimx51_init(void) | |||
270 | ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); | 267 | ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); |
271 | 268 | ||
272 | if (otg_mode_host) | 269 | if (otg_mode_host) |
273 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 270 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
274 | else { | 271 | else { |
275 | initialize_otg_port(NULL); | 272 | initialize_otg_port(NULL); |
276 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | 273 | imx51_add_fsl_usb2_udc(&usb_pdata); |
277 | } | 274 | } |
278 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 275 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
279 | 276 | ||
280 | #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD | 277 | #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD |
281 | eukrea_mbimx51_baseboard_init(); | 278 | eukrea_mbimx51_baseboard_init(); |
@@ -297,6 +294,7 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") | |||
297 | .map_io = mx51_map_io, | 294 | .map_io = mx51_map_io, |
298 | .init_early = imx51_init_early, | 295 | .init_early = imx51_init_early, |
299 | .init_irq = mx51_init_irq, | 296 | .init_irq = mx51_init_irq, |
297 | .handle_irq = imx51_handle_irq, | ||
300 | .timer = &mxc_timer, | 298 | .timer = &mxc_timer, |
301 | .init_machine = eukrea_cpuimx51_init, | 299 | .init_machine = eukrea_cpuimx51_init, |
302 | MACHINE_END | 300 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index ff096d587299..5276660041ad 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | ||
26 | #include <linux/i2c-gpio.h> | 25 | #include <linux/i2c-gpio.h> |
27 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
28 | #include <linux/can/platform/mcp251x.h> | 27 | #include <linux/can/platform/mcp251x.h> |
@@ -32,14 +31,12 @@ | |||
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/iomux-mx51.h> | 32 | #include <mach/iomux-mx51.h> |
34 | 33 | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
37 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
40 | 38 | ||
41 | #include "devices-imx51.h" | 39 | #include "devices-imx51.h" |
42 | #include "devices.h" | ||
43 | #include "cpu_op-mx51.h" | 40 | #include "cpu_op-mx51.h" |
44 | 41 | ||
45 | #define USBH1_RST IMX_GPIO_NR(2, 28) | 42 | #define USBH1_RST IMX_GPIO_NR(2, 28) |
@@ -108,7 +105,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { | |||
108 | 105 | ||
109 | /* Touchscreen */ | 106 | /* Touchscreen */ |
110 | /* IRQ */ | 107 | /* IRQ */ |
111 | _MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | 108 | NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP | |
112 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | 109 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | |
113 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | 110 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), |
114 | }; | 111 | }; |
@@ -129,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { | |||
129 | I2C_BOARD_INFO("tsc2007", 0x49), | 126 | I2C_BOARD_INFO("tsc2007", 0x49), |
130 | .type = "tsc2007", | 127 | .type = "tsc2007", |
131 | .platform_data = &tsc2007_info, | 128 | .platform_data = &tsc2007_info, |
132 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | 129 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
133 | }, | 130 | }, |
134 | }; | 131 | }; |
135 | 132 | ||
@@ -149,7 +146,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
149 | void __iomem *usb_base; | 146 | void __iomem *usb_base; |
150 | void __iomem *usbother_base; | 147 | void __iomem *usbother_base; |
151 | 148 | ||
152 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 149 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
153 | if (!usb_base) | 150 | if (!usb_base) |
154 | return -ENOMEM; | 151 | return -ENOMEM; |
155 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 152 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -172,7 +169,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
172 | void __iomem *usb_base; | 169 | void __iomem *usb_base; |
173 | void __iomem *usbother_base; | 170 | void __iomem *usbother_base; |
174 | 171 | ||
175 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 172 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
176 | if (!usb_base) | 173 | if (!usb_base) |
177 | return -ENOMEM; | 174 | return -ENOMEM; |
178 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 175 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -189,17 +186,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
189 | MXC_EHCI_ITC_NO_THRESHOLD); | 186 | MXC_EHCI_ITC_NO_THRESHOLD); |
190 | } | 187 | } |
191 | 188 | ||
192 | static struct mxc_usbh_platform_data dr_utmi_config = { | 189 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
193 | .init = initialize_otg_port, | 190 | .init = initialize_otg_port, |
194 | .portsc = MXC_EHCI_UTMI_16BIT, | 191 | .portsc = MXC_EHCI_UTMI_16BIT, |
195 | }; | 192 | }; |
196 | 193 | ||
197 | static struct fsl_usb2_platform_data usb_pdata = { | 194 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
198 | .operating_mode = FSL_USB2_DR_DEVICE, | 195 | .operating_mode = FSL_USB2_DR_DEVICE, |
199 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 196 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
200 | }; | 197 | }; |
201 | 198 | ||
202 | static struct mxc_usbh_platform_data usbh1_config = { | 199 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { |
203 | .init = initialize_usbh1_port, | 200 | .init = initialize_usbh1_port, |
204 | .portsc = MXC_EHCI_MODE_ULPI, | 201 | .portsc = MXC_EHCI_MODE_ULPI, |
205 | }; | 202 | }; |
@@ -245,7 +242,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { | |||
245 | .mode = SPI_MODE_0, | 242 | .mode = SPI_MODE_0, |
246 | .chip_select = 0, | 243 | .chip_select = 0, |
247 | .platform_data = &mcp251x_info, | 244 | .platform_data = &mcp251x_info, |
248 | .irq = gpio_to_irq(CAN_IRQGPIO) | 245 | .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO) |
249 | }, | 246 | }, |
250 | }; | 247 | }; |
251 | 248 | ||
@@ -303,17 +300,17 @@ static void __init eukrea_cpuimx51sd_init(void) | |||
303 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 300 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
304 | 301 | ||
305 | if (otg_mode_host) | 302 | if (otg_mode_host) |
306 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 303 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
307 | else { | 304 | else { |
308 | initialize_otg_port(NULL); | 305 | initialize_otg_port(NULL); |
309 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | 306 | imx51_add_fsl_usb2_udc(&usb_pdata); |
310 | } | 307 | } |
311 | 308 | ||
312 | gpio_request(USBH1_RST, "usb_rst"); | 309 | gpio_request(USBH1_RST, "usb_rst"); |
313 | gpio_direction_output(USBH1_RST, 0); | 310 | gpio_direction_output(USBH1_RST, 0); |
314 | msleep(20); | 311 | msleep(20); |
315 | gpio_set_value(USBH1_RST, 1); | 312 | gpio_set_value(USBH1_RST, 1); |
316 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 313 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
317 | 314 | ||
318 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD | 315 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD |
319 | eukrea_mbimxsd51_baseboard_init(); | 316 | eukrea_mbimxsd51_baseboard_init(); |
@@ -335,6 +332,7 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") | |||
335 | .map_io = mx51_map_io, | 332 | .map_io = mx51_map_io, |
336 | .init_early = imx51_init_early, | 333 | .init_early = imx51_init_early, |
337 | .init_irq = mx51_init_irq, | 334 | .init_irq = mx51_init_irq, |
335 | .handle_irq = imx51_handle_irq, | ||
338 | .timer = &mxc_timer, | 336 | .timer = &mxc_timer, |
339 | .init_machine = eukrea_cpuimx51sd_init, | 337 | .init_machine = eukrea_cpuimx51sd_init, |
340 | MACHINE_END | 338 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c index 7de25c6712eb..fc3621d90bde 100644 --- a/arch/arm/mach-mx5/board-mx50_rdp.c +++ b/arch/arm/mach-mx5/board-mx50_rdp.c | |||
@@ -219,6 +219,7 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") | |||
219 | .map_io = mx50_map_io, | 219 | .map_io = mx50_map_io, |
220 | .init_early = imx50_init_early, | 220 | .init_early = imx50_init_early, |
221 | .init_irq = mx50_init_irq, | 221 | .init_irq = mx50_init_irq, |
222 | .handle_irq = imx50_handle_irq, | ||
222 | .timer = &mx50_rdp_timer, | 223 | .timer = &mx50_rdp_timer, |
223 | .init_machine = mx50_rdp_board_init, | 224 | .init_machine = mx50_rdp_board_init, |
224 | MACHINE_END | 225 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 07a38154da21..067d8c4eb656 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <mach/3ds_debugboard.h> | 25 | #include <mach/3ds_debugboard.h> |
26 | 26 | ||
27 | #include "devices-imx51.h" | 27 | #include "devices-imx51.h" |
28 | #include "devices.h" | ||
29 | 28 | ||
30 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) | 29 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) |
31 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | 30 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) |
@@ -173,6 +172,7 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | |||
173 | .map_io = mx51_map_io, | 172 | .map_io = mx51_map_io, |
174 | .init_early = imx51_init_early, | 173 | .init_early = imx51_init_early, |
175 | .init_irq = mx51_init_irq, | 174 | .init_irq = mx51_init_irq, |
175 | .handle_irq = imx51_handle_irq, | ||
176 | .timer = &mx51_3ds_timer, | 176 | .timer = &mx51_3ds_timer, |
177 | .init_machine = mx51_3ds_init, | 177 | .init_machine = mx51_3ds_init, |
178 | MACHINE_END | 178 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 11b0ff67f89d..4231d984579c 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -24,14 +24,12 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/iomux-mx51.h> | 25 | #include <mach/iomux-mx51.h> |
26 | 26 | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
29 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
32 | 31 | ||
33 | #include "devices-imx51.h" | 32 | #include "devices-imx51.h" |
34 | #include "devices.h" | ||
35 | #include "cpu_op-mx51.h" | 33 | #include "cpu_op-mx51.h" |
36 | 34 | ||
37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | 35 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) |
@@ -176,7 +174,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = { | |||
176 | .bitrate = 100000, | 174 | .bitrate = 100000, |
177 | }; | 175 | }; |
178 | 176 | ||
179 | static struct imxi2c_platform_data babbage_hsi2c_data = { | 177 | static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = { |
180 | .bitrate = 400000, | 178 | .bitrate = 400000, |
181 | }; | 179 | }; |
182 | 180 | ||
@@ -249,7 +247,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
249 | void __iomem *usb_base; | 247 | void __iomem *usb_base; |
250 | void __iomem *usbother_base; | 248 | void __iomem *usbother_base; |
251 | 249 | ||
252 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 250 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
253 | if (!usb_base) | 251 | if (!usb_base) |
254 | return -ENOMEM; | 252 | return -ENOMEM; |
255 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 253 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -272,7 +270,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
272 | void __iomem *usb_base; | 270 | void __iomem *usb_base; |
273 | void __iomem *usbother_base; | 271 | void __iomem *usbother_base; |
274 | 272 | ||
275 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 273 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
276 | if (!usb_base) | 274 | if (!usb_base) |
277 | return -ENOMEM; | 275 | return -ENOMEM; |
278 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 276 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -288,17 +286,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
288 | MXC_EHCI_ITC_NO_THRESHOLD); | 286 | MXC_EHCI_ITC_NO_THRESHOLD); |
289 | } | 287 | } |
290 | 288 | ||
291 | static struct mxc_usbh_platform_data dr_utmi_config = { | 289 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
292 | .init = initialize_otg_port, | 290 | .init = initialize_otg_port, |
293 | .portsc = MXC_EHCI_UTMI_16BIT, | 291 | .portsc = MXC_EHCI_UTMI_16BIT, |
294 | }; | 292 | }; |
295 | 293 | ||
296 | static struct fsl_usb2_platform_data usb_pdata = { | 294 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
297 | .operating_mode = FSL_USB2_DR_DEVICE, | 295 | .operating_mode = FSL_USB2_DR_DEVICE, |
298 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 296 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
299 | }; | 297 | }; |
300 | 298 | ||
301 | static struct mxc_usbh_platform_data usbh1_config = { | 299 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { |
302 | .init = initialize_usbh1_port, | 300 | .init = initialize_usbh1_port, |
303 | .portsc = MXC_EHCI_MODE_ULPI, | 301 | .portsc = MXC_EHCI_MODE_ULPI, |
304 | }; | 302 | }; |
@@ -357,8 +355,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = { | |||
357 | static void __init mx51_babbage_init(void) | 355 | static void __init mx51_babbage_init(void) |
358 | { | 356 | { |
359 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | 357 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; |
360 | iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | | 358 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21, |
361 | MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); | 359 | PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); |
362 | 360 | ||
363 | imx51_soc_init(); | 361 | imx51_soc_init(); |
364 | 362 | ||
@@ -381,17 +379,17 @@ static void __init mx51_babbage_init(void) | |||
381 | 379 | ||
382 | imx51_add_imx_i2c(0, &babbage_i2c_data); | 380 | imx51_add_imx_i2c(0, &babbage_i2c_data); |
383 | imx51_add_imx_i2c(1, &babbage_i2c_data); | 381 | imx51_add_imx_i2c(1, &babbage_i2c_data); |
384 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); | 382 | imx51_add_hsi2c(&babbage_hsi2c_data); |
385 | 383 | ||
386 | if (otg_mode_host) | 384 | if (otg_mode_host) |
387 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 385 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
388 | else { | 386 | else { |
389 | initialize_otg_port(NULL); | 387 | initialize_otg_port(NULL); |
390 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | 388 | imx51_add_fsl_usb2_udc(&usb_pdata); |
391 | } | 389 | } |
392 | 390 | ||
393 | gpio_usbh1_active(); | 391 | gpio_usbh1_active(); |
394 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 392 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
395 | /* setback USBH1_STP to be function */ | 393 | /* setback USBH1_STP to be function */ |
396 | mxc_iomux_v3_setup_pad(usbh1stp); | 394 | mxc_iomux_v3_setup_pad(usbh1stp); |
397 | babbage_usbhub_reset(); | 395 | babbage_usbhub_reset(); |
@@ -420,6 +418,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | |||
420 | .map_io = mx51_map_io, | 418 | .map_io = mx51_map_io, |
421 | .init_early = imx51_init_early, | 419 | .init_early = imx51_init_early, |
422 | .init_irq = mx51_init_irq, | 420 | .init_irq = mx51_init_irq, |
421 | .handle_irq = imx51_handle_irq, | ||
423 | .timer = &mx51_babbage_timer, | 422 | .timer = &mx51_babbage_timer, |
424 | .init_machine = mx51_babbage_init, | 423 | .init_machine = mx51_babbage_init, |
425 | MACHINE_END | 424 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 551daf85ff8c..90ae903aaee7 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -32,14 +32,12 @@ | |||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/iomux-mx51.h> | 33 | #include <mach/iomux-mx51.h> |
34 | 34 | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
37 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
40 | 39 | ||
41 | #include "devices-imx51.h" | 40 | #include "devices-imx51.h" |
42 | #include "devices.h" | ||
43 | #include "efika.h" | 41 | #include "efika.h" |
44 | 42 | ||
45 | #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) | 43 | #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) |
@@ -163,6 +161,11 @@ static const struct gpio_led_platform_data | |||
163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | 161 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), |
164 | }; | 162 | }; |
165 | 163 | ||
164 | static struct esdhc_platform_data sd_pdata = { | ||
165 | .cd_type = ESDHC_CD_CONTROLLER, | ||
166 | .wp_type = ESDHC_WP_CONTROLLER, | ||
167 | }; | ||
168 | |||
166 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | 169 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { |
167 | { | 170 | { |
168 | .code = KEY_POWER, | 171 | .code = KEY_POWER, |
@@ -239,9 +242,11 @@ static void __init mx51_efikamx_init(void) | |||
239 | 242 | ||
240 | /* on < 1.2 boards both SD controllers are used */ | 243 | /* on < 1.2 boards both SD controllers are used */ |
241 | if (system_rev < 0x12) { | 244 | if (system_rev < 0x12) { |
242 | imx51_add_sdhci_esdhc_imx(1, NULL); | 245 | imx51_add_sdhci_esdhc_imx(0, NULL); |
246 | imx51_add_sdhci_esdhc_imx(1, &sd_pdata); | ||
243 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | 247 | mx51_efikamx_leds[2].default_trigger = "mmc1"; |
244 | } | 248 | } else |
249 | imx51_add_sdhci_esdhc_imx(0, &sd_pdata); | ||
245 | 250 | ||
246 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); | 251 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); |
247 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | 252 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); |
@@ -284,6 +289,7 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | |||
284 | .map_io = mx51_map_io, | 289 | .map_io = mx51_map_io, |
285 | .init_early = imx51_init_early, | 290 | .init_early = imx51_init_early, |
286 | .init_irq = mx51_init_irq, | 291 | .init_irq = mx51_init_irq, |
292 | .handle_irq = imx51_handle_irq, | ||
287 | .timer = &mx51_efikamx_timer, | 293 | .timer = &mx51_efikamx_timer, |
288 | .init_machine = mx51_efikamx_init, | 294 | .init_machine = mx51_efikamx_init, |
289 | MACHINE_END | 295 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 8a9bca22beb5..c26508a6708e 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -35,14 +35,12 @@ | |||
35 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
36 | #include <mach/iomux-mx51.h> | 36 | #include <mach/iomux-mx51.h> |
37 | 37 | ||
38 | #include <asm/irq.h> | ||
39 | #include <asm/setup.h> | 38 | #include <asm/setup.h> |
40 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
41 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 41 | #include <asm/mach/time.h> |
43 | 42 | ||
44 | #include "devices-imx51.h" | 43 | #include "devices-imx51.h" |
45 | #include "devices.h" | ||
46 | #include "efika.h" | 44 | #include "efika.h" |
47 | 45 | ||
48 | #define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20) | 46 | #define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20) |
@@ -56,6 +54,7 @@ | |||
56 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) | 54 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) |
57 | 55 | ||
58 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) | 56 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) |
57 | #define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
59 | 58 | ||
60 | static iomux_v3_cfg_t mx51efikasb_pads[] = { | 59 | static iomux_v3_cfg_t mx51efikasb_pads[] = { |
61 | /* USB HOST2 */ | 60 | /* USB HOST2 */ |
@@ -97,6 +96,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = { | |||
97 | 96 | ||
98 | /* BT */ | 97 | /* BT */ |
99 | MX51_PAD_EIM_A17__GPIO2_11, | 98 | MX51_PAD_EIM_A17__GPIO2_11, |
99 | |||
100 | MX51_PAD_SD1_CD, | ||
100 | }; | 101 | }; |
101 | 102 | ||
102 | static int initialize_usbh2_port(struct platform_device *pdev) | 103 | static int initialize_usbh2_port(struct platform_device *pdev) |
@@ -119,7 +120,7 @@ static int initialize_usbh2_port(struct platform_device *pdev) | |||
119 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); | 120 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); |
120 | } | 121 | } |
121 | 122 | ||
122 | static struct mxc_usbh_platform_data usbh2_config = { | 123 | static struct mxc_usbh_platform_data usbh2_config __initdata = { |
123 | .init = initialize_usbh2_port, | 124 | .init = initialize_usbh2_port, |
124 | .portsc = MXC_EHCI_MODE_ULPI, | 125 | .portsc = MXC_EHCI_MODE_ULPI, |
125 | }; | 126 | }; |
@@ -129,7 +130,7 @@ static void __init mx51_efikasb_usb(void) | |||
129 | usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | 130 | usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
130 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); | 131 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); |
131 | if (usbh2_config.otg) | 132 | if (usbh2_config.otg) |
132 | mxc_register_device(&mxc_usbh2_device, &usbh2_config); | 133 | imx51_add_mxc_ehci_hs(2, &usbh2_config); |
133 | } | 134 | } |
134 | 135 | ||
135 | static const struct gpio_led mx51_efikasb_leds[] __initconst = { | 136 | static const struct gpio_led mx51_efikasb_leds[] __initconst = { |
@@ -182,6 +183,18 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst = | |||
182 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), | 183 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), |
183 | }; | 184 | }; |
184 | 185 | ||
186 | static struct esdhc_platform_data sd0_pdata = { | ||
187 | #define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27) | ||
188 | .cd_gpio = EFIKASB_SD1_CD, | ||
189 | .cd_type = ESDHC_CD_GPIO, | ||
190 | .wp_type = ESDHC_WP_CONTROLLER, | ||
191 | }; | ||
192 | |||
193 | static struct esdhc_platform_data sd1_pdata = { | ||
194 | .cd_type = ESDHC_CD_CONTROLLER, | ||
195 | .wp_type = ESDHC_WP_CONTROLLER, | ||
196 | }; | ||
197 | |||
185 | static struct regulator *pwgt1, *pwgt2; | 198 | static struct regulator *pwgt1, *pwgt2; |
186 | 199 | ||
187 | static void mx51_efikasb_power_off(void) | 200 | static void mx51_efikasb_power_off(void) |
@@ -250,7 +263,8 @@ static void __init efikasb_board_init(void) | |||
250 | 263 | ||
251 | mx51_efikasb_board_id(); | 264 | mx51_efikasb_board_id(); |
252 | mx51_efikasb_usb(); | 265 | mx51_efikasb_usb(); |
253 | imx51_add_sdhci_esdhc_imx(1, NULL); | 266 | imx51_add_sdhci_esdhc_imx(0, &sd0_pdata); |
267 | imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); | ||
254 | 268 | ||
255 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); | 269 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); |
256 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | 270 | imx_add_gpio_keys(&mx51_efikasb_keys_data); |
@@ -270,6 +284,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") | |||
270 | .map_io = mx51_map_io, | 284 | .map_io = mx51_map_io, |
271 | .init_early = imx51_init_early, | 285 | .init_early = imx51_init_early, |
272 | .init_irq = mx51_init_irq, | 286 | .init_irq = mx51_init_irq, |
287 | .handle_irq = imx51_handle_irq, | ||
273 | .init_machine = efikasb_board_init, | 288 | .init_machine = efikasb_board_init, |
274 | .timer = &mx51_efikasb_timer, | 289 | .timer = &mx51_efikasb_timer, |
275 | MACHINE_END | 290 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index ef2039eff74c..614edcb0aa7e 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c | |||
@@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = { | |||
134 | .flags = IORESOURCE_MEM, | 134 | .flags = IORESOURCE_MEM, |
135 | }, | 135 | }, |
136 | { | 136 | { |
137 | .start = gpio_to_irq(ARD_ETHERNET_INT_B), | 137 | .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), |
138 | .end = gpio_to_irq(ARD_ETHERNET_INT_B), | 138 | .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B), |
139 | .flags = IORESOURCE_IRQ, | 139 | .flags = IORESOURCE_IRQ, |
140 | }, | 140 | }, |
141 | }; | 141 | }; |
@@ -250,6 +250,7 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") | |||
250 | .map_io = mx53_map_io, | 250 | .map_io = mx53_map_io, |
251 | .init_early = imx53_init_early, | 251 | .init_early = imx53_init_early, |
252 | .init_irq = mx53_init_irq, | 252 | .init_irq = mx53_init_irq, |
253 | .handle_irq = imx53_handle_irq, | ||
253 | .timer = &mx53_ard_timer, | 254 | .timer = &mx53_ard_timer, |
254 | .init_machine = mx53_ard_board_init, | 255 | .init_machine = mx53_ard_board_init, |
255 | MACHINE_END | 256 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 1b417b06b736..6a3e6168e322 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -167,6 +167,7 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") | |||
167 | .map_io = mx53_map_io, | 167 | .map_io = mx53_map_io, |
168 | .init_early = imx53_init_early, | 168 | .init_early = imx53_init_early, |
169 | .init_irq = mx53_init_irq, | 169 | .init_irq = mx53_init_irq, |
170 | .handle_irq = imx53_handle_irq, | ||
170 | .timer = &mx53_evk_timer, | 171 | .timer = &mx53_evk_timer, |
171 | .init_machine = mx53_evk_board_init, | 172 | .init_machine = mx53_evk_board_init, |
172 | MACHINE_END | 173 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 940aac932fa3..0af2766f8610 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/i2c.h> | ||
25 | 26 | ||
26 | #include <mach/common.h> | 27 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
@@ -42,6 +43,7 @@ | |||
42 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) | 43 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) |
43 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) | 44 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) |
44 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) | 45 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) |
46 | #define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) | ||
45 | 47 | ||
46 | static iomux_v3_cfg_t mx53_loco_pads[] = { | 48 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
47 | /* FEC */ | 49 | /* FEC */ |
@@ -64,6 +66,10 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { | |||
64 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, | 66 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, |
65 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, | 67 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, |
66 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, | 68 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, |
69 | /* I2C1 */ | ||
70 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
71 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
72 | MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */ | ||
67 | /* I2C2 */ | 73 | /* I2C2 */ |
68 | MX53_PAD_KEY_COL3__I2C2_SCL, | 74 | MX53_PAD_KEY_COL3__I2C2_SCL, |
69 | MX53_PAD_KEY_ROW3__I2C2_SDA, | 75 | MX53_PAD_KEY_ROW3__I2C2_SDA, |
@@ -257,8 +263,15 @@ static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { | |||
257 | .num_leds = ARRAY_SIZE(mx53loco_leds), | 263 | .num_leds = ARRAY_SIZE(mx53loco_leds), |
258 | }; | 264 | }; |
259 | 265 | ||
266 | static struct i2c_board_info mx53loco_i2c_devices[] = { | ||
267 | { | ||
268 | I2C_BOARD_INFO("mma8450", 0x1C), | ||
269 | }, | ||
270 | }; | ||
271 | |||
260 | static void __init mx53_loco_board_init(void) | 272 | static void __init mx53_loco_board_init(void) |
261 | { | 273 | { |
274 | int ret; | ||
262 | imx53_soc_init(); | 275 | imx53_soc_init(); |
263 | 276 | ||
264 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | 277 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, |
@@ -267,6 +280,13 @@ static void __init mx53_loco_board_init(void) | |||
267 | mx53_loco_fec_reset(); | 280 | mx53_loco_fec_reset(); |
268 | imx53_add_fec(&mx53_loco_fec_data); | 281 | imx53_add_fec(&mx53_loco_fec_data); |
269 | imx53_add_imx2_wdt(0, NULL); | 282 | imx53_add_imx2_wdt(0, NULL); |
283 | |||
284 | ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en"); | ||
285 | if (ret) | ||
286 | pr_err("Cannot request ACCEL_EN pin: %d\n", ret); | ||
287 | |||
288 | i2c_register_board_info(0, mx53loco_i2c_devices, | ||
289 | ARRAY_SIZE(mx53loco_i2c_devices)); | ||
270 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); | 290 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); |
271 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | 291 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); |
272 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); | 292 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); |
@@ -289,6 +309,7 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | |||
289 | .map_io = mx53_map_io, | 309 | .map_io = mx53_map_io, |
290 | .init_early = imx53_init_early, | 310 | .init_early = imx53_init_early, |
291 | .init_irq = mx53_init_irq, | 311 | .init_irq = mx53_init_irq, |
312 | .handle_irq = imx53_handle_irq, | ||
292 | .timer = &mx53_loco_timer, | 313 | .timer = &mx53_loco_timer, |
293 | .init_machine = mx53_loco_board_init, | 314 | .init_machine = mx53_loco_board_init, |
294 | MACHINE_END | 315 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index efcab68840ae..d12fd3043ba6 100644 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c | |||
@@ -156,6 +156,7 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") | |||
156 | .map_io = mx53_map_io, | 156 | .map_io = mx53_map_io, |
157 | .init_early = imx53_init_early, | 157 | .init_early = imx53_init_early, |
158 | .init_irq = mx53_init_irq, | 158 | .init_irq = mx53_init_irq, |
159 | .handle_irq = imx53_handle_irq, | ||
159 | .timer = &mx53_smd_timer, | 160 | .timer = &mx53_smd_timer, |
160 | .init_machine = mx53_smd_board_init, | 161 | .init_machine = mx53_smd_board_init, |
161 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 1ef7e97e0015..b94879e8679f 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1434,6 +1434,10 @@ DEFINE_CLOCK(ipu_di0_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG5_OFFSET, | |||
1434 | DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET, | 1434 | DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET, |
1435 | NULL, NULL, &pll3_sw_clk, NULL); | 1435 | NULL, NULL, &pll3_sw_clk, NULL); |
1436 | 1436 | ||
1437 | /* PATA */ | ||
1438 | DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG0_OFFSET, | ||
1439 | NULL, NULL, &ipg_clk, &spba_clk); | ||
1440 | |||
1437 | #define _REGISTER_CLOCK(d, n, c) \ | 1441 | #define _REGISTER_CLOCK(d, n, c) \ |
1438 | { \ | 1442 | { \ |
1439 | .dev_id = d, \ | 1443 | .dev_id = d, \ |
@@ -1490,6 +1494,7 @@ static struct clk_lookup mx51_lookups[] = { | |||
1490 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) | 1494 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) |
1491 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) | 1495 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) |
1492 | _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) | 1496 | _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) |
1497 | _REGISTER_CLOCK("pata_imx", NULL, pata_clk) | ||
1493 | }; | 1498 | }; |
1494 | 1499 | ||
1495 | static struct clk_lookup mx53_lookups[] = { | 1500 | static struct clk_lookup mx53_lookups[] = { |
@@ -1523,6 +1528,7 @@ static struct clk_lookup mx53_lookups[] = { | |||
1523 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | 1528 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) |
1524 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) | 1529 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) |
1525 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) | 1530 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) |
1531 | _REGISTER_CLOCK("pata_imx", NULL, pata_clk) | ||
1526 | _REGISTER_CLOCK("imx53-ahci.0", "ahci", sata_clk) | 1532 | _REGISTER_CLOCK("imx53-ahci.0", "ahci", sata_clk) |
1527 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_phy", ahci_phy_clk) | 1533 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_phy", ahci_phy_clk) |
1528 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_dma", ahci_dma_clk) | 1534 | _REGISTER_CLOCK("imx53-ahci.0", "ahci_dma", ahci_dma_clk) |
@@ -1567,9 +1573,8 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | |||
1567 | clk_enable(&main_bus_clk); | 1573 | clk_enable(&main_bus_clk); |
1568 | 1574 | ||
1569 | clk_enable(&iim_clk); | 1575 | clk_enable(&iim_clk); |
1570 | mx51_revision(); | 1576 | imx_print_silicon_rev("i.MX51", mx51_revision()); |
1571 | clk_disable(&iim_clk); | 1577 | clk_disable(&iim_clk); |
1572 | mx51_display_revision(); | ||
1573 | 1578 | ||
1574 | /* move usb_phy_clk to 24MHz */ | 1579 | /* move usb_phy_clk to 24MHz */ |
1575 | clk_set_parent(&usb_phy1_clk, &osc_clk); | 1580 | clk_set_parent(&usb_phy1_clk, &osc_clk); |
@@ -1587,7 +1592,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | |||
1587 | 1592 | ||
1588 | /* System timer */ | 1593 | /* System timer */ |
1589 | mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), | 1594 | mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), |
1590 | MX51_MXC_INT_GPT); | 1595 | MX51_INT_GPT); |
1591 | return 0; | 1596 | return 0; |
1592 | } | 1597 | } |
1593 | 1598 | ||
@@ -1611,9 +1616,8 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, | |||
1611 | clk_enable(&main_bus_clk); | 1616 | clk_enable(&main_bus_clk); |
1612 | 1617 | ||
1613 | clk_enable(&iim_clk); | 1618 | clk_enable(&iim_clk); |
1614 | mx53_revision(); | 1619 | imx_print_silicon_rev("i.MX53", mx53_revision()); |
1615 | clk_disable(&iim_clk); | 1620 | clk_disable(&iim_clk); |
1616 | mx53_display_revision(); | ||
1617 | 1621 | ||
1618 | /* Set SDHC parents to be PLL2 */ | 1622 | /* Set SDHC parents to be PLL2 */ |
1619 | clk_set_parent(&esdhc1_clk, &pll2_sw_clk); | 1623 | clk_set_parent(&esdhc1_clk, &pll2_sw_clk); |
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index 86f87da59c64..5c5328257dca 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | 20 | ||
21 | static int cpu_silicon_rev = -1; | 21 | static int mx5_cpu_rev = -1; |
22 | 22 | ||
23 | #define IIM_SREV 0x24 | 23 | #define IIM_SREV 0x24 |
24 | #define MX50_HW_ADADIG_DIGPROG 0xB0 | 24 | #define MX50_HW_ADADIG_DIGPROG 0xB0 |
@@ -28,11 +28,14 @@ static int get_mx51_srev(void) | |||
28 | void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); | 28 | void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); |
29 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; | 29 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; |
30 | 30 | ||
31 | if (rev == 0x0) | 31 | switch (rev) { |
32 | case 0x0: | ||
32 | return IMX_CHIP_REVISION_2_0; | 33 | return IMX_CHIP_REVISION_2_0; |
33 | else if (rev == 0x10) | 34 | case 0x10: |
34 | return IMX_CHIP_REVISION_3_0; | 35 | return IMX_CHIP_REVISION_3_0; |
35 | return 0; | 36 | default: |
37 | return IMX_CHIP_REVISION_UNKNOWN; | ||
38 | } | ||
36 | } | 39 | } |
37 | 40 | ||
38 | /* | 41 | /* |
@@ -45,33 +48,13 @@ int mx51_revision(void) | |||
45 | if (!cpu_is_mx51()) | 48 | if (!cpu_is_mx51()) |
46 | return -EINVAL; | 49 | return -EINVAL; |
47 | 50 | ||
48 | if (cpu_silicon_rev == -1) | 51 | if (mx5_cpu_rev == -1) |
49 | cpu_silicon_rev = get_mx51_srev(); | 52 | mx5_cpu_rev = get_mx51_srev(); |
50 | 53 | ||
51 | return cpu_silicon_rev; | 54 | return mx5_cpu_rev; |
52 | } | 55 | } |
53 | EXPORT_SYMBOL(mx51_revision); | 56 | EXPORT_SYMBOL(mx51_revision); |
54 | 57 | ||
55 | void mx51_display_revision(void) | ||
56 | { | ||
57 | int rev; | ||
58 | char *srev; | ||
59 | rev = mx51_revision(); | ||
60 | |||
61 | switch (rev) { | ||
62 | case IMX_CHIP_REVISION_2_0: | ||
63 | srev = IMX_CHIP_REVISION_2_0_STRING; | ||
64 | break; | ||
65 | case IMX_CHIP_REVISION_3_0: | ||
66 | srev = IMX_CHIP_REVISION_3_0_STRING; | ||
67 | break; | ||
68 | default: | ||
69 | srev = IMX_CHIP_REVISION_UNKNOWN_STRING; | ||
70 | } | ||
71 | printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev); | ||
72 | } | ||
73 | EXPORT_SYMBOL(mx51_display_revision); | ||
74 | |||
75 | #ifdef CONFIG_NEON | 58 | #ifdef CONFIG_NEON |
76 | 59 | ||
77 | /* | 60 | /* |
@@ -121,10 +104,10 @@ int mx53_revision(void) | |||
121 | if (!cpu_is_mx53()) | 104 | if (!cpu_is_mx53()) |
122 | return -EINVAL; | 105 | return -EINVAL; |
123 | 106 | ||
124 | if (cpu_silicon_rev == -1) | 107 | if (mx5_cpu_rev == -1) |
125 | cpu_silicon_rev = get_mx53_srev(); | 108 | mx5_cpu_rev = get_mx53_srev(); |
126 | 109 | ||
127 | return cpu_silicon_rev; | 110 | return mx5_cpu_rev; |
128 | } | 111 | } |
129 | EXPORT_SYMBOL(mx53_revision); | 112 | EXPORT_SYMBOL(mx53_revision); |
130 | 113 | ||
@@ -134,7 +117,7 @@ static int get_mx50_srev(void) | |||
134 | u32 rev; | 117 | u32 rev; |
135 | 118 | ||
136 | if (!anatop) { | 119 | if (!anatop) { |
137 | cpu_silicon_rev = -EINVAL; | 120 | mx5_cpu_rev = -EINVAL; |
138 | return 0; | 121 | return 0; |
139 | } | 122 | } |
140 | 123 | ||
@@ -159,36 +142,13 @@ int mx50_revision(void) | |||
159 | if (!cpu_is_mx50()) | 142 | if (!cpu_is_mx50()) |
160 | return -EINVAL; | 143 | return -EINVAL; |
161 | 144 | ||
162 | if (cpu_silicon_rev == -1) | 145 | if (mx5_cpu_rev == -1) |
163 | cpu_silicon_rev = get_mx50_srev(); | 146 | mx5_cpu_rev = get_mx50_srev(); |
164 | 147 | ||
165 | return cpu_silicon_rev; | 148 | return mx5_cpu_rev; |
166 | } | 149 | } |
167 | EXPORT_SYMBOL(mx50_revision); | 150 | EXPORT_SYMBOL(mx50_revision); |
168 | 151 | ||
169 | void mx53_display_revision(void) | ||
170 | { | ||
171 | int rev; | ||
172 | char *srev; | ||
173 | rev = mx53_revision(); | ||
174 | |||
175 | switch (rev) { | ||
176 | case IMX_CHIP_REVISION_1_0: | ||
177 | srev = IMX_CHIP_REVISION_1_0_STRING; | ||
178 | break; | ||
179 | case IMX_CHIP_REVISION_2_0: | ||
180 | srev = IMX_CHIP_REVISION_2_0_STRING; | ||
181 | break; | ||
182 | case IMX_CHIP_REVISION_2_1: | ||
183 | srev = IMX_CHIP_REVISION_2_1_STRING; | ||
184 | break; | ||
185 | default: | ||
186 | srev = IMX_CHIP_REVISION_UNKNOWN_STRING; | ||
187 | } | ||
188 | printk(KERN_INFO "CPU identified as i.MX53, silicon rev %s\n", srev); | ||
189 | } | ||
190 | EXPORT_SYMBOL(mx53_display_revision); | ||
191 | |||
192 | static int __init post_cpu_init(void) | 152 | static int __init post_cpu_init(void) |
193 | { | 153 | { |
194 | unsigned int reg; | 154 | unsigned int reg; |
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h index e11bc0e0ec49..af488bc0e225 100644 --- a/arch/arm/mach-mx5/devices-imx51.h +++ b/arch/arm/mach-mx5/devices-imx51.h | |||
@@ -13,9 +13,15 @@ extern const struct imx_fec_data imx51_fec_data; | |||
13 | #define imx51_add_fec(pdata) \ | 13 | #define imx51_add_fec(pdata) \ |
14 | imx_add_fec(&imx51_fec_data, pdata) | 14 | imx_add_fec(&imx51_fec_data, pdata) |
15 | 15 | ||
16 | extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data; | ||
17 | #define imx51_add_fsl_usb2_udc(pdata) \ | ||
18 | imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata) | ||
19 | |||
16 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; | 20 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; |
17 | #define imx51_add_imx_i2c(id, pdata) \ | 21 | #define imx51_add_imx_i2c(id, pdata) \ |
18 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) | 22 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) |
23 | #define imx51_add_hsi2c(pdata) \ | ||
24 | imx51_add_imx_i2c(2, pdata) | ||
19 | 25 | ||
20 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; | 26 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; |
21 | #define imx51_add_imx_ssi(id, pdata) \ | 27 | #define imx51_add_imx_ssi(id, pdata) \ |
@@ -25,6 +31,13 @@ extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[]; | |||
25 | #define imx51_add_imx_uart(id, pdata) \ | 31 | #define imx51_add_imx_uart(id, pdata) \ |
26 | imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) | 32 | imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) |
27 | 33 | ||
34 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data; | ||
35 | #define imx51_add_mxc_ehci_otg(pdata) \ | ||
36 | imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata) | ||
37 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[]; | ||
38 | #define imx51_add_mxc_ehci_hs(id, pdata) \ | ||
39 | imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata) | ||
40 | |||
28 | extern const struct imx_mxc_nand_data imx51_mxc_nand_data; | 41 | extern const struct imx_mxc_nand_data imx51_mxc_nand_data; |
29 | #define imx51_add_mxc_nand(pdata) \ | 42 | #define imx51_add_mxc_nand(pdata) \ |
30 | imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) | 43 | imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) |
@@ -52,3 +65,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[]; | |||
52 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; | 65 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; |
53 | #define imx51_add_imx_keypad(pdata) \ | 66 | #define imx51_add_imx_keypad(pdata) \ |
54 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) | 67 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) |
68 | |||
69 | extern const struct imx_pata_imx_data imx51_pata_imx_data; | ||
70 | #define imx51_add_pata_imx() \ | ||
71 | imx_add_pata_imx(&imx51_pata_imx_data) | ||
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h index 1ab399e73caa..6e1e5d1f8c3a 100644 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h | |||
@@ -41,4 +41,8 @@ extern const struct imx_imx_keypad_data imx53_imx_keypad_data; | |||
41 | #define imx53_add_imx_keypad(pdata) \ | 41 | #define imx53_add_imx_keypad(pdata) \ |
42 | imx_add_imx_keypad(&imx53_imx_keypad_data, pdata) | 42 | imx_add_imx_keypad(&imx53_imx_keypad_data, pdata) |
43 | 43 | ||
44 | extern const struct imx_pata_imx_data imx53_pata_imx_data; | ||
45 | #define imx53_add_pata_imx() \ | ||
46 | imx_add_pata_imx(&imx53_pata_imx_data) | ||
47 | |||
44 | extern struct platform_device *__init imx53_add_ahci_imx(void); | 48 | extern struct platform_device *__init imx53_add_ahci_imx(void); |
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c deleted file mode 100644 index 371ca8c8414c..000000000000 --- a/arch/arm/mach-mx5/devices.c +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/dma-mapping.h> | ||
15 | #include <mach/hardware.h> | ||
16 | #include <mach/imx-uart.h> | ||
17 | #include <mach/irqs.h> | ||
18 | |||
19 | static struct resource mxc_hsi2c_resources[] = { | ||
20 | { | ||
21 | .start = MX51_HSI2C_DMA_BASE_ADDR, | ||
22 | .end = MX51_HSI2C_DMA_BASE_ADDR + SZ_16K - 1, | ||
23 | .flags = IORESOURCE_MEM, | ||
24 | }, | ||
25 | { | ||
26 | .start = MX51_MXC_INT_HS_I2C, | ||
27 | .end = MX51_MXC_INT_HS_I2C, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | struct platform_device mxc_hsi2c_device = { | ||
33 | .name = "imx-i2c", | ||
34 | .id = 2, | ||
35 | .num_resources = ARRAY_SIZE(mxc_hsi2c_resources), | ||
36 | .resource = mxc_hsi2c_resources | ||
37 | }; | ||
38 | |||
39 | static u64 usb_dma_mask = DMA_BIT_MASK(32); | ||
40 | |||
41 | static struct resource usbotg_resources[] = { | ||
42 | { | ||
43 | .start = MX51_OTG_BASE_ADDR, | ||
44 | .end = MX51_OTG_BASE_ADDR + 0x1ff, | ||
45 | .flags = IORESOURCE_MEM, | ||
46 | }, | ||
47 | { | ||
48 | .start = MX51_MXC_INT_USB_OTG, | ||
49 | .flags = IORESOURCE_IRQ, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | /* OTG gadget device */ | ||
54 | struct platform_device mxc_usbdr_udc_device = { | ||
55 | .name = "fsl-usb2-udc", | ||
56 | .id = -1, | ||
57 | .num_resources = ARRAY_SIZE(usbotg_resources), | ||
58 | .resource = usbotg_resources, | ||
59 | .dev = { | ||
60 | .dma_mask = &usb_dma_mask, | ||
61 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | struct platform_device mxc_usbdr_host_device = { | ||
66 | .name = "mxc-ehci", | ||
67 | .id = 0, | ||
68 | .num_resources = ARRAY_SIZE(usbotg_resources), | ||
69 | .resource = usbotg_resources, | ||
70 | .dev = { | ||
71 | .dma_mask = &usb_dma_mask, | ||
72 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | static struct resource usbh1_resources[] = { | ||
77 | { | ||
78 | .start = MX51_OTG_BASE_ADDR + 0x200, | ||
79 | .end = MX51_OTG_BASE_ADDR + 0x200 + 0x1ff, | ||
80 | .flags = IORESOURCE_MEM, | ||
81 | }, | ||
82 | { | ||
83 | .start = MX51_MXC_INT_USB_H1, | ||
84 | .flags = IORESOURCE_IRQ, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | struct platform_device mxc_usbh1_device = { | ||
89 | .name = "mxc-ehci", | ||
90 | .id = 1, | ||
91 | .num_resources = ARRAY_SIZE(usbh1_resources), | ||
92 | .resource = usbh1_resources, | ||
93 | .dev = { | ||
94 | .dma_mask = &usb_dma_mask, | ||
95 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct resource usbh2_resources[] = { | ||
100 | { | ||
101 | .start = MX51_OTG_BASE_ADDR + 0x400, | ||
102 | .end = MX51_OTG_BASE_ADDR + 0x400 + 0x1ff, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }, | ||
105 | { | ||
106 | .start = MX51_MXC_INT_USB_H2, | ||
107 | .flags = IORESOURCE_IRQ, | ||
108 | }, | ||
109 | }; | ||
110 | |||
111 | struct platform_device mxc_usbh2_device = { | ||
112 | .name = "mxc-ehci", | ||
113 | .id = 2, | ||
114 | .num_resources = ARRAY_SIZE(usbh2_resources), | ||
115 | .resource = usbh2_resources, | ||
116 | .dev = { | ||
117 | .dma_mask = &usb_dma_mask, | ||
118 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
119 | }, | ||
120 | }; | ||
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h deleted file mode 100644 index 55a5129bc29f..000000000000 --- a/arch/arm/mach-mx5/devices.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | extern struct platform_device mxc_usbdr_host_device; | ||
2 | extern struct platform_device mxc_usbh1_device; | ||
3 | extern struct platform_device mxc_usbh2_device; | ||
4 | extern struct platform_device mxc_usbdr_udc_device; | ||
5 | extern struct platform_device mxc_hsi2c_device; | ||
diff --git a/arch/arm/mach-mx5/ehci.c b/arch/arm/mach-mx5/ehci.c index 7ce12c804a32..c17fa131728b 100644 --- a/arch/arm/mach-mx5/ehci.c +++ b/arch/arm/mach-mx5/ehci.c | |||
@@ -52,7 +52,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags) | |||
52 | void __iomem *usbother_base; | 52 | void __iomem *usbother_base; |
53 | int ret = 0; | 53 | int ret = 0; |
54 | 54 | ||
55 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 55 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
56 | if (!usb_base) { | 56 | if (!usb_base) { |
57 | printk(KERN_ERR "%s(): ioremap failed\n", __func__); | 57 | printk(KERN_ERR "%s(): ioremap failed\n", __func__); |
58 | return -ENOMEM; | 58 | return -ENOMEM; |
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index bbf4564bd050..a6a3ab8f1b1c 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | 29 | ||
30 | #include "devices-imx51.h" | 30 | #include "devices-imx51.h" |
31 | #include "devices.h" | ||
32 | 31 | ||
33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) | 32 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) |
34 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) | 33 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) |
@@ -160,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = { | |||
160 | static struct i2c_board_info mbimx51_i2c_devices[] = { | 159 | static struct i2c_board_info mbimx51_i2c_devices[] = { |
161 | { | 160 | { |
162 | I2C_BOARD_INFO("tsc2007", 0x49), | 161 | I2C_BOARD_INFO("tsc2007", 0x49), |
163 | .irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), | 162 | .irq = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO), |
164 | .platform_data = &tsc2007_data, | 163 | .platform_data = &tsc2007_data, |
165 | }, { | 164 | }, { |
166 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | 165 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index 261923997643..d817fc80b986 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/irq.h> | ||
28 | #include <linux/leds.h> | 27 | #include <linux/leds.h> |
29 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
30 | #include <linux/input.h> | 29 | #include <linux/input.h> |
@@ -41,13 +40,12 @@ | |||
41 | #include <mach/audmux.h> | 40 | #include <mach/audmux.h> |
42 | 41 | ||
43 | #include "devices-imx51.h" | 42 | #include "devices-imx51.h" |
44 | #include "devices.h" | ||
45 | 43 | ||
46 | static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | 44 | static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { |
47 | /* LED */ | 45 | /* LED */ |
48 | MX51_PAD_NANDF_D10__GPIO3_30, | 46 | MX51_PAD_NANDF_D10__GPIO3_30, |
49 | /* SWITCH */ | 47 | /* SWITCH */ |
50 | _MX51_PAD_NANDF_D9__GPIO3_31 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | 48 | NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP | |
51 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | 49 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | |
52 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | 50 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), |
53 | /* UART2 */ | 51 | /* UART2 */ |
@@ -66,7 +64,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
66 | MX51_PAD_SD1_DATA2__SD1_DATA2, | 64 | MX51_PAD_SD1_DATA2__SD1_DATA2, |
67 | MX51_PAD_SD1_DATA3__SD1_DATA3, | 65 | MX51_PAD_SD1_DATA3__SD1_DATA3, |
68 | /* SD1 CD */ | 66 | /* SD1 CD */ |
69 | _MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | 67 | NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP | |
70 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | 68 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | |
71 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | 69 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), |
72 | }; | 70 | }; |
diff --git a/arch/arm/mach-mx5/mm-mx50.c b/arch/arm/mach-mx5/mm-mx50.c deleted file mode 100644 index 77e374c726fa..000000000000 --- a/arch/arm/mach-mx5/mm-mx50.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | |||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | |||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | * Create static mapping between physical to virtual memory. | ||
19 | */ | ||
20 | |||
21 | #include <linux/mm.h> | ||
22 | #include <linux/init.h> | ||
23 | |||
24 | #include <asm/mach/map.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/iomux-v3.h> | ||
29 | #include <mach/irqs.h> | ||
30 | |||
31 | /* | ||
32 | * Define the MX50 memory map. | ||
33 | */ | ||
34 | static struct map_desc mx50_io_desc[] __initdata = { | ||
35 | imx_map_entry(MX50, TZIC, MT_DEVICE), | ||
36 | imx_map_entry(MX50, SPBA0, MT_DEVICE), | ||
37 | imx_map_entry(MX50, AIPS1, MT_DEVICE), | ||
38 | imx_map_entry(MX50, AIPS2, MT_DEVICE), | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * This function initializes the memory map. It is called during the | ||
43 | * system startup to create static physical to virtual memory mappings | ||
44 | * for the IO modules. | ||
45 | */ | ||
46 | void __init mx50_map_io(void) | ||
47 | { | ||
48 | iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc)); | ||
49 | } | ||
50 | |||
51 | void __init imx50_init_early(void) | ||
52 | { | ||
53 | mxc_set_cpu_type(MXC_CPU_MX50); | ||
54 | mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR)); | ||
55 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | ||
56 | } | ||
57 | |||
58 | void __init mx50_init_irq(void) | ||
59 | { | ||
60 | tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR)); | ||
61 | } | ||
62 | |||
63 | void __init imx50_soc_init(void) | ||
64 | { | ||
65 | /* i.mx50 has the i.mx31 type gpio */ | ||
66 | mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH); | ||
67 | mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH); | ||
68 | mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH); | ||
69 | mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH); | ||
70 | mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH); | ||
71 | mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH); | ||
72 | } | ||
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index baea6e5cddd9..26eacc9d0d90 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -21,12 +21,27 @@ | |||
21 | #include <mach/devices-common.h> | 21 | #include <mach/devices-common.h> |
22 | #include <mach/iomux-v3.h> | 22 | #include <mach/iomux-v3.h> |
23 | 23 | ||
24 | static void imx5_idle(void) | ||
25 | { | ||
26 | mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF); | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | * Define the MX50 memory map. | ||
31 | */ | ||
32 | static struct map_desc mx50_io_desc[] __initdata = { | ||
33 | imx_map_entry(MX50, TZIC, MT_DEVICE), | ||
34 | imx_map_entry(MX50, SPBA0, MT_DEVICE), | ||
35 | imx_map_entry(MX50, AIPS1, MT_DEVICE), | ||
36 | imx_map_entry(MX50, AIPS2, MT_DEVICE), | ||
37 | }; | ||
38 | |||
24 | /* | 39 | /* |
25 | * Define the MX51 memory map. | 40 | * Define the MX51 memory map. |
26 | */ | 41 | */ |
27 | static struct map_desc mx51_io_desc[] __initdata = { | 42 | static struct map_desc mx51_io_desc[] __initdata = { |
43 | imx_map_entry(MX51, TZIC, MT_DEVICE), | ||
28 | imx_map_entry(MX51, IRAM, MT_DEVICE), | 44 | imx_map_entry(MX51, IRAM, MT_DEVICE), |
29 | imx_map_entry(MX51, DEBUG, MT_DEVICE), | ||
30 | imx_map_entry(MX51, AIPS1, MT_DEVICE), | 45 | imx_map_entry(MX51, AIPS1, MT_DEVICE), |
31 | imx_map_entry(MX51, SPBA0, MT_DEVICE), | 46 | imx_map_entry(MX51, SPBA0, MT_DEVICE), |
32 | imx_map_entry(MX51, AIPS2, MT_DEVICE), | 47 | imx_map_entry(MX51, AIPS2, MT_DEVICE), |
@@ -36,6 +51,7 @@ static struct map_desc mx51_io_desc[] __initdata = { | |||
36 | * Define the MX53 memory map. | 51 | * Define the MX53 memory map. |
37 | */ | 52 | */ |
38 | static struct map_desc mx53_io_desc[] __initdata = { | 53 | static struct map_desc mx53_io_desc[] __initdata = { |
54 | imx_map_entry(MX53, TZIC, MT_DEVICE), | ||
39 | imx_map_entry(MX53, AIPS1, MT_DEVICE), | 55 | imx_map_entry(MX53, AIPS1, MT_DEVICE), |
40 | imx_map_entry(MX53, SPBA0, MT_DEVICE), | 56 | imx_map_entry(MX53, SPBA0, MT_DEVICE), |
41 | imx_map_entry(MX53, AIPS2, MT_DEVICE), | 57 | imx_map_entry(MX53, AIPS2, MT_DEVICE), |
@@ -46,21 +62,34 @@ static struct map_desc mx53_io_desc[] __initdata = { | |||
46 | * system startup to create static physical to virtual memory mappings | 62 | * system startup to create static physical to virtual memory mappings |
47 | * for the IO modules. | 63 | * for the IO modules. |
48 | */ | 64 | */ |
65 | void __init mx50_map_io(void) | ||
66 | { | ||
67 | iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc)); | ||
68 | } | ||
69 | |||
49 | void __init mx51_map_io(void) | 70 | void __init mx51_map_io(void) |
50 | { | 71 | { |
51 | iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); | 72 | iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); |
52 | } | 73 | } |
53 | 74 | ||
75 | void __init mx53_map_io(void) | ||
76 | { | ||
77 | iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); | ||
78 | } | ||
79 | |||
80 | void __init imx50_init_early(void) | ||
81 | { | ||
82 | mxc_set_cpu_type(MXC_CPU_MX50); | ||
83 | mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR)); | ||
84 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | ||
85 | } | ||
86 | |||
54 | void __init imx51_init_early(void) | 87 | void __init imx51_init_early(void) |
55 | { | 88 | { |
56 | mxc_set_cpu_type(MXC_CPU_MX51); | 89 | mxc_set_cpu_type(MXC_CPU_MX51); |
57 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 90 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
58 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | 91 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |
59 | } | 92 | imx_idle = imx5_idle; |
60 | |||
61 | void __init mx53_map_io(void) | ||
62 | { | ||
63 | iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); | ||
64 | } | 93 | } |
65 | 94 | ||
66 | void __init imx53_init_early(void) | 95 | void __init imx53_init_early(void) |
@@ -70,35 +99,19 @@ void __init imx53_init_early(void) | |||
70 | mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); | 99 | mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); |
71 | } | 100 | } |
72 | 101 | ||
73 | void __init mx51_init_irq(void) | 102 | void __init mx50_init_irq(void) |
74 | { | 103 | { |
75 | unsigned long tzic_addr; | 104 | tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR)); |
76 | void __iomem *tzic_virt; | 105 | } |
77 | |||
78 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) | ||
79 | tzic_addr = MX51_TZIC_BASE_ADDR_TO1; | ||
80 | else | ||
81 | tzic_addr = MX51_TZIC_BASE_ADDR; | ||
82 | |||
83 | tzic_virt = ioremap(tzic_addr, SZ_16K); | ||
84 | if (!tzic_virt) | ||
85 | panic("unable to map TZIC interrupt controller\n"); | ||
86 | 106 | ||
87 | tzic_init_irq(tzic_virt); | 107 | void __init mx51_init_irq(void) |
108 | { | ||
109 | tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); | ||
88 | } | 110 | } |
89 | 111 | ||
90 | void __init mx53_init_irq(void) | 112 | void __init mx53_init_irq(void) |
91 | { | 113 | { |
92 | unsigned long tzic_addr; | 114 | tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR)); |
93 | void __iomem *tzic_virt; | ||
94 | |||
95 | tzic_addr = MX53_TZIC_BASE_ADDR; | ||
96 | |||
97 | tzic_virt = ioremap(tzic_addr, SZ_16K); | ||
98 | if (!tzic_virt) | ||
99 | panic("unable to map TZIC interrupt controller\n"); | ||
100 | |||
101 | tzic_init_irq(tzic_virt); | ||
102 | } | 115 | } |
103 | 116 | ||
104 | static struct sdma_script_start_addrs imx51_sdma_script __initdata = { | 117 | static struct sdma_script_start_addrs imx51_sdma_script __initdata = { |
@@ -138,13 +151,24 @@ static struct sdma_platform_data imx53_sdma_pdata __initdata = { | |||
138 | .script_addrs = &imx53_sdma_script, | 151 | .script_addrs = &imx53_sdma_script, |
139 | }; | 152 | }; |
140 | 153 | ||
154 | void __init imx50_soc_init(void) | ||
155 | { | ||
156 | /* i.mx50 has the i.mx31 type gpio */ | ||
157 | mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH); | ||
158 | mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH); | ||
159 | mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH); | ||
160 | mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH); | ||
161 | mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH); | ||
162 | mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH); | ||
163 | } | ||
164 | |||
141 | void __init imx51_soc_init(void) | 165 | void __init imx51_soc_init(void) |
142 | { | 166 | { |
143 | /* i.mx51 has the i.mx31 type gpio */ | 167 | /* i.mx51 has the i.mx31 type gpio */ |
144 | mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO1_LOW, MX51_MXC_INT_GPIO1_HIGH); | 168 | mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH); |
145 | mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO2_LOW, MX51_MXC_INT_GPIO2_HIGH); | 169 | mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH); |
146 | mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO3_LOW, MX51_MXC_INT_GPIO3_HIGH); | 170 | mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH); |
147 | mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO4_LOW, MX51_MXC_INT_GPIO4_HIGH); | 171 | mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH); |
148 | 172 | ||
149 | /* i.mx51 has the i.mx35 type sdma */ | 173 | /* i.mx51 has the i.mx35 type sdma */ |
150 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); | 174 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index c9209454807a..b004e178417d 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -34,14 +34,12 @@ | |||
34 | #include <linux/usb/ulpi.h> | 34 | #include <linux/usb/ulpi.h> |
35 | #include <mach/ulpi.h> | 35 | #include <mach/ulpi.h> |
36 | 36 | ||
37 | #include <asm/irq.h> | ||
38 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
39 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
42 | 41 | ||
43 | #include "devices-imx51.h" | 42 | #include "devices-imx51.h" |
44 | #include "devices.h" | ||
45 | #include "efika.h" | 43 | #include "efika.h" |
46 | #include "cpu_op-mx51.h" | 44 | #include "cpu_op-mx51.h" |
47 | 45 | ||
@@ -133,7 +131,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
133 | u32 v; | 131 | u32 v; |
134 | void __iomem *usb_base; | 132 | void __iomem *usb_base; |
135 | void __iomem *usbother_base; | 133 | void __iomem *usbother_base; |
136 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 134 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
137 | if (!usb_base) | 135 | if (!usb_base) |
138 | return -ENOMEM; | 136 | return -ENOMEM; |
139 | usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); | 137 | usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); |
@@ -150,7 +148,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
150 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); | 148 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); |
151 | } | 149 | } |
152 | 150 | ||
153 | static struct mxc_usbh_platform_data dr_utmi_config = { | 151 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
154 | .init = initialize_otg_port, | 152 | .init = initialize_otg_port, |
155 | .portsc = MXC_EHCI_UTMI_16BIT, | 153 | .portsc = MXC_EHCI_UTMI_16BIT, |
156 | }; | 154 | }; |
@@ -170,7 +168,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
170 | gpio_set_value(EFIKAMX_USBH1_STP, 1); | 168 | gpio_set_value(EFIKAMX_USBH1_STP, 1); |
171 | msleep(1); | 169 | msleep(1); |
172 | 170 | ||
173 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 171 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
174 | socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); | 172 | socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); |
175 | 173 | ||
176 | /* The clock for the USBH1 ULPI port will come externally */ | 174 | /* The clock for the USBH1 ULPI port will come externally */ |
@@ -189,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
189 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); | 187 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); |
190 | } | 188 | } |
191 | 189 | ||
192 | static struct mxc_usbh_platform_data usbh1_config = { | 190 | static struct mxc_usbh_platform_data usbh1_config __initdata = { |
193 | .init = initialize_usbh1_port, | 191 | .init = initialize_usbh1_port, |
194 | .portsc = MXC_EHCI_MODE_ULPI, | 192 | .portsc = MXC_EHCI_MODE_ULPI, |
195 | }; | 193 | }; |
@@ -217,9 +215,9 @@ static void __init mx51_efika_usb(void) | |||
217 | usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | 215 | usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
218 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); | 216 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); |
219 | 217 | ||
220 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 218 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
221 | if (usbh1_config.otg) | 219 | if (usbh1_config.otg) |
222 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 220 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
223 | } | 221 | } |
224 | 222 | ||
225 | static struct mtd_partition mx51_efika_spi_nor_partitions[] = { | 223 | static struct mtd_partition mx51_efika_spi_nor_partitions[] = { |
@@ -589,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = { | |||
589 | .bus_num = 0, | 587 | .bus_num = 0, |
590 | .chip_select = 0, | 588 | .chip_select = 0, |
591 | .platform_data = &mx51_efika_mc13892_data, | 589 | .platform_data = &mx51_efika_mc13892_data, |
592 | .irq = gpio_to_irq(EFIKAMX_PMIC), | 590 | .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC), |
593 | }, | 591 | }, |
594 | }; | 592 | }; |
595 | 593 | ||
@@ -609,7 +607,6 @@ void __init efika_board_common_init(void) | |||
609 | ARRAY_SIZE(mx51efika_pads)); | 607 | ARRAY_SIZE(mx51efika_pads)); |
610 | imx51_add_imx_uart(0, &uart_pdata); | 608 | imx51_add_imx_uart(0, &uart_pdata); |
611 | mx51_efika_usb(); | 609 | mx51_efika_usb(); |
612 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
613 | 610 | ||
614 | /* FIXME: comes from original code. check this. */ | 611 | /* FIXME: comes from original code. check this. */ |
615 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) | 612 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) |
@@ -627,8 +624,9 @@ void __init efika_board_common_init(void) | |||
627 | ARRAY_SIZE(mx51_efika_spi_board_info)); | 624 | ARRAY_SIZE(mx51_efika_spi_board_info)); |
628 | imx51_add_ecspi(0, &mx51_efika_spi_pdata); | 625 | imx51_add_ecspi(0, &mx51_efika_spi_pdata); |
629 | 626 | ||
627 | imx51_add_pata_imx(); | ||
628 | |||
630 | #if defined(CONFIG_CPU_FREQ_IMX) | 629 | #if defined(CONFIG_CPU_FREQ_IMX) |
631 | get_cpu_op = mx51_get_cpu_op; | 630 | get_cpu_op = mx51_get_cpu_op; |
632 | #endif | 631 | #endif |
633 | } | 632 | } |
634 | |||
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c index e4529af0da72..0624fb8edffb 100644 --- a/arch/arm/mach-mx5/pm-imx5.c +++ b/arch/arm/mach-mx5/pm-imx5.c | |||
@@ -14,7 +14,8 @@ | |||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
17 | #include <mach/system.h> | 17 | #include <mach/common.h> |
18 | #include <mach/hardware.h> | ||
18 | #include "crm_regs.h" | 19 | #include "crm_regs.h" |
19 | 20 | ||
20 | static struct clk *gpc_dvfs_clk; | 21 | static struct clk *gpc_dvfs_clk; |
diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c index 76ae8dc33e00..144ebebc4a61 100644 --- a/arch/arm/mach-mx5/system.c +++ b/arch/arm/mach-mx5/system.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
16 | #include <mach/common.h> | ||
16 | #include "crm_regs.h" | 17 | #include "crm_regs.h" |
17 | 18 | ||
18 | /* set cpu low power mode before WFI instruction. This function is called | 19 | /* set cpu low power mode before WFI instruction. This function is called |