diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-10 12:02:25 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-24 09:40:45 -0400 |
commit | 3e876935b805966f140bdae73f96bc4c3632c947 (patch) | |
tree | 54c461e530a3325459dfd32c775a98e1b3eb6ffa /arch/arm/mach-mx1/devices.c | |
parent | 8f785e8549fbf73995a7795651709b458300ed01 (diff) |
ARM: imx1: rename imx_uart[12]_device to follow a common naming scheme
Note that these devices are specific for imx1 as only here three irqs are
used.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx1/devices.c')
-rw-r--r-- | arch/arm/mach-mx1/devices.c | 81 |
1 files changed, 29 insertions, 52 deletions
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c index c770aa0a10de..a79e6132dbe5 100644 --- a/arch/arm/mach-mx1/devices.c +++ b/arch/arm/mach-mx1/devices.c | |||
@@ -73,59 +73,36 @@ struct platform_device imx_i2c_device0 = { | |||
73 | .num_resources = ARRAY_SIZE(imx_i2c_resources), | 73 | .num_resources = ARRAY_SIZE(imx_i2c_resources), |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct resource imx_uart1_resources[] = { | 76 | #define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \ |
77 | { | 77 | static struct resource imx1_uart_resources ## n[] = { \ |
78 | .start = MX1_UART1_BASE_ADDR, | 78 | { \ |
79 | .end = MX1_UART1_BASE_ADDR + 0xD0, | 79 | .start = baseaddr, \ |
80 | .flags = IORESOURCE_MEM, | 80 | .end = baseaddr + 0xd0, \ |
81 | }, { | 81 | .flags = IORESOURCE_MEM, \ |
82 | .start = MX1_UART1_MINT_RX, | 82 | }, { \ |
83 | .end = MX1_UART1_MINT_RX, | 83 | .start = irqrx, \ |
84 | .flags = IORESOURCE_IRQ, | 84 | .end = irqrx, \ |
85 | }, { | 85 | .flags = IORESOURCE_IRQ, \ |
86 | .start = MX1_UART1_MINT_TX, | 86 | }, { \ |
87 | .end = MX1_UART1_MINT_TX, | 87 | .start = irqtx, \ |
88 | .flags = IORESOURCE_IRQ, | 88 | .end = irqtx, \ |
89 | }, { | 89 | .flags = IORESOURCE_IRQ, \ |
90 | .start = MX1_UART1_MINT_RTS, | 90 | }, { \ |
91 | .end = MX1_UART1_MINT_RTS, | 91 | .start = irqrts, \ |
92 | .flags = IORESOURCE_IRQ, | 92 | .end = irqrts, \ |
93 | }, | 93 | .flags = IORESOURCE_IRQ, \ |
94 | }; | 94 | }, \ |
95 | 95 | }; \ | |
96 | struct platform_device imx_uart1_device = { | 96 | \ |
97 | .name = "imx-uart", | 97 | struct platform_device imx1_uart_device ## n = { \ |
98 | .id = 0, | 98 | .name = "imx-uart", \ |
99 | .num_resources = ARRAY_SIZE(imx_uart1_resources), | 99 | .id = n, \ |
100 | .resource = imx_uart1_resources, | 100 | .num_resources = ARRAY_SIZE(imx1_uart_resources ## n), \ |
101 | }; | 101 | .resource = imx1_uart_resources ## n, \ |
102 | 102 | } | |
103 | static struct resource imx_uart2_resources[] = { | ||
104 | { | ||
105 | .start = MX1_UART2_BASE_ADDR, | ||
106 | .end = MX1_UART2_BASE_ADDR + 0xD0, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | }, { | ||
109 | .start = MX1_UART2_MINT_RX, | ||
110 | .end = MX1_UART2_MINT_RX, | ||
111 | .flags = IORESOURCE_IRQ, | ||
112 | }, { | ||
113 | .start = MX1_UART2_MINT_TX, | ||
114 | .end = MX1_UART2_MINT_TX, | ||
115 | .flags = IORESOURCE_IRQ, | ||
116 | }, { | ||
117 | .start = MX1_UART2_MINT_RTS, | ||
118 | .end = MX1_UART2_MINT_RTS, | ||
119 | .flags = IORESOURCE_IRQ, | ||
120 | }, | ||
121 | }; | ||
122 | 103 | ||
123 | struct platform_device imx_uart2_device = { | 104 | DEFINE_IMX1_UART_DEVICE(0, MX1_UART1_BASE_ADDR, MX1_UART1_MINT_RX, MX1_UART1_MINT_TX, MX1_UART1_MINT_RTS); |
124 | .name = "imx-uart", | 105 | DEFINE_IMX1_UART_DEVICE(1, MX1_UART2_BASE_ADDR, MX1_UART2_MINT_RX, MX1_UART2_MINT_TX, MX1_UART2_MINT_RTS); |
125 | .id = 1, | ||
126 | .num_resources = ARRAY_SIZE(imx_uart2_resources), | ||
127 | .resource = imx_uart2_resources, | ||
128 | }; | ||
129 | 106 | ||
130 | static struct resource imx_rtc_resources[] = { | 107 | static struct resource imx_rtc_resources[] = { |
131 | { | 108 | { |