aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/Kconfig2
-rw-r--r--arch/arm/mach-mx3/devices-imx35.h7
-rw-r--r--arch/arm/mach-mx3/devices.c59
-rw-r--r--arch/arm/mach-mx3/devices.h5
-rw-r--r--arch/arm/mach-mx3/mach-mx35_3ds.c6
-rw-r--r--arch/arm/mach-mx3/mach-pcm043.c7
6 files changed, 15 insertions, 71 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 7f2d5a6a8e20..594502a4e574 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -116,6 +116,7 @@ config MACH_PCM043
116 bool "Support Phytec pcm043 (i.MX35) platforms" 116 bool "Support Phytec pcm043 (i.MX35) platforms"
117 select ARCH_MX35 117 select ARCH_MX35
118 select IMX_HAVE_PLATFORM_IMX_I2C 118 select IMX_HAVE_PLATFORM_IMX_I2C
119 select IMX_HAVE_PLATFORM_IMX_UART
119 select IMX_HAVE_PLATFORM_MXC_NAND 120 select IMX_HAVE_PLATFORM_MXC_NAND
120 select MXC_ULPI if USB_ULPI 121 select MXC_ULPI if USB_ULPI
121 help 122 help
@@ -136,6 +137,7 @@ config MACH_ARMADILLO5X0
136config MACH_MX35_3DS 137config MACH_MX35_3DS
137 bool "Support MX35PDK platform" 138 bool "Support MX35PDK platform"
138 select ARCH_MX35 139 select ARCH_MX35
140 select IMX_HAVE_PLATFORM_IMX_UART
139 default n 141 default n
140 help 142 help
141 Include support for MX35PDK platform. This includes specific 143 Include support for MX35PDK platform. This includes specific
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h
index b595fa641eea..536d9b9a250b 100644
--- a/arch/arm/mach-mx3/devices-imx35.h
+++ b/arch/arm/mach-mx3/devices-imx35.h
@@ -16,6 +16,13 @@
16#define imx35_add_imx_i2c2(pdata) \ 16#define imx35_add_imx_i2c2(pdata) \
17 imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata) 17 imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata)
18 18
19#define imx35_add_imx_uart0(pdata) \
20 imx_add_imx_uart_1irq(0, MX35_UART1_BASE_ADDR, SZ_16K, MX35_INT_UART1, pdata)
21#define imx35_add_imx_uart1(pdata) \
22 imx_add_imx_uart_1irq(1, MX35_UART2_BASE_ADDR, SZ_16K, MX35_INT_UART2, pdata)
23#define imx35_add_imx_uart2(pdata) \
24 imx_add_imx_uart_1irq(2, MX35_UART3_BASE_ADDR, SZ_16K, MX35_INT_UART3, pdata)
25
19#define imx35_add_mxc_nand(pdata) \ 26#define imx35_add_mxc_nand(pdata) \
20 imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata) 27 imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata)
21 28
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 5b428626c05a..a4fd1a26fc91 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -29,65 +29,6 @@
29 29
30#include "devices.h" 30#include "devices.h"
31 31
32#if defined(CONFIG_ARCH_MX35)
33static struct resource uart0[] = {
34 {
35 .start = UART1_BASE_ADDR,
36 .end = UART1_BASE_ADDR + 0x0B5,
37 .flags = IORESOURCE_MEM,
38 }, {
39 .start = MXC_INT_UART1,
40 .end = MXC_INT_UART1,
41 .flags = IORESOURCE_IRQ,
42 },
43};
44
45struct platform_device mxc_uart_device0 = {
46 .name = "imx-uart",
47 .id = 0,
48 .resource = uart0,
49 .num_resources = ARRAY_SIZE(uart0),
50};
51
52static struct resource uart1[] = {
53 {
54 .start = UART2_BASE_ADDR,
55 .end = UART2_BASE_ADDR + 0x0B5,
56 .flags = IORESOURCE_MEM,
57 }, {
58 .start = MXC_INT_UART2,
59 .end = MXC_INT_UART2,
60 .flags = IORESOURCE_IRQ,
61 },
62};
63
64struct platform_device mxc_uart_device1 = {
65 .name = "imx-uart",
66 .id = 1,
67 .resource = uart1,
68 .num_resources = ARRAY_SIZE(uart1),
69};
70
71static struct resource uart2[] = {
72 {
73 .start = UART3_BASE_ADDR,
74 .end = UART3_BASE_ADDR + 0x0B5,
75 .flags = IORESOURCE_MEM,
76 }, {
77 .start = MXC_INT_UART3,
78 .end = MXC_INT_UART3,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
83struct platform_device mxc_uart_device2 = {
84 .name = "imx-uart",
85 .id = 2,
86 .resource = uart2,
87 .num_resources = ARRAY_SIZE(uart2),
88};
89#endif
90
91/* GPIO port description */ 32/* GPIO port description */
92static struct mxc_gpio_port imx_gpio_ports[] = { 33static struct mxc_gpio_port imx_gpio_ports[] = {
93 { 34 {
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 5a156f1d3282..e5535234839f 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -1,8 +1,3 @@
1#if defined(CONFIG_ARCH_MX35)
2extern struct platform_device mxc_uart_device0;
3extern struct platform_device mxc_uart_device1;
4extern struct platform_device mxc_uart_device2;
5#endif
6extern struct platform_device mxc_w1_master_device; 1extern struct platform_device mxc_w1_master_device;
7extern struct platform_device mx3_ipu; 2extern struct platform_device mx3_ipu;
8extern struct platform_device mx3_fb; 3extern struct platform_device mx3_fb;
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index cfac7781f8b4..1c30d7212f17 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -34,12 +34,12 @@
34 34
35#include <mach/hardware.h> 35#include <mach/hardware.h>
36#include <mach/common.h> 36#include <mach/common.h>
37#include <mach/imx-uart.h>
38#include <mach/iomux-mx35.h> 37#include <mach/iomux-mx35.h>
39 38
39#include "devices-imx35.h"
40#include "devices.h" 40#include "devices.h"
41 41
42static struct imxuart_platform_data uart_pdata = { 42static const struct imxuart_platform_data uart_pdata __initconst = {
43 .flags = IMXUART_HAVE_RTSCTS, 43 .flags = IMXUART_HAVE_RTSCTS,
44}; 44};
45 45
@@ -92,7 +92,7 @@ static void __init mxc_board_init(void)
92 92
93 platform_add_devices(devices, ARRAY_SIZE(devices)); 93 platform_add_devices(devices, ARRAY_SIZE(devices));
94 94
95 mxc_register_device(&mxc_uart_device0, &uart_pdata); 95 imx35_add_imx_uart0(&uart_pdata);
96 96
97 mxc_register_device(&mxc_otg_udc_device, &usb_pdata); 97 mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
98} 98}
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index 21305c67afcf..97cc3642f805 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -36,7 +36,6 @@
36 36
37#include <mach/hardware.h> 37#include <mach/hardware.h>
38#include <mach/common.h> 38#include <mach/common.h>
39#include <mach/imx-uart.h>
40#include <mach/iomux-mx35.h> 39#include <mach/iomux-mx35.h>
41#include <mach/ipu.h> 40#include <mach/ipu.h>
42#include <mach/mx3fb.h> 41#include <mach/mx3fb.h>
@@ -115,7 +114,7 @@ static struct platform_device pcm043_flash = {
115 .num_resources = 1, 114 .num_resources = 1,
116}; 115};
117 116
118static struct imxuart_platform_data uart_pdata = { 117static const struct imxuart_platform_data uart_pdata __initconst = {
119 .flags = IMXUART_HAVE_RTSCTS, 118 .flags = IMXUART_HAVE_RTSCTS,
120}; 119};
121 120
@@ -355,11 +354,11 @@ static void __init mxc_board_init(void)
355 354
356 platform_add_devices(devices, ARRAY_SIZE(devices)); 355 platform_add_devices(devices, ARRAY_SIZE(devices));
357 356
358 mxc_register_device(&mxc_uart_device0, &uart_pdata); 357 imx35_add_imx_uart0(&uart_pdata);
359 imx35_add_mxc_nand(&pcm037_nand_board_info); 358 imx35_add_mxc_nand(&pcm037_nand_board_info);
360 mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); 359 mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata);
361 360
362 mxc_register_device(&mxc_uart_device1, &uart_pdata); 361 imx35_add_imx_uart1(&uart_pdata);
363 362
364#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE 363#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
365 i2c_register_board_info(0, pcm043_i2c_devices, 364 i2c_register_board_info(0, pcm043_i2c_devices,