aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-14 09:56:58 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-30 02:59:44 -0400
commit074694956b547de9a6b85b919c0bb13853b88c2d (patch)
tree3abf7837bdb3c03a76f0d4d8b41a6bb1b06797e2 /arch/arm
parent551823e7e031978b990e952c70ae01f8eba8d2c4 (diff)
ARM: imx: move mx1 support to mach-imx
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/mach-imx/Kconfig19
-rw-r--r--arch/arm/mach-imx/Makefile8
-rw-r--r--arch/arm/mach-imx/Makefile.boot4
-rw-r--r--arch/arm/mach-imx/clock-imx1.c (renamed from arch/arm/mach-mx1/clock.c)0
-rw-r--r--arch/arm/mach-imx/devices.c197
-rw-r--r--arch/arm/mach-imx/devices.h12
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c (renamed from arch/arm/mach-mx1/mach-mx1ads.c)0
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c (renamed from arch/arm/mach-mx1/mach-scb9328.c)0
-rw-r--r--arch/arm/mach-imx/mm-imx1.c (renamed from arch/arm/mach-mx1/generic.c)2
-rw-r--r--arch/arm/mach-imx/mx1-camera-fiq-ksym.c (renamed from arch/arm/mach-mx1/ksym_mx1.c)0
-rw-r--r--arch/arm/mach-imx/mx1-camera-fiq.S (renamed from arch/arm/mach-mx1/mx1_camera_fiq.S)0
-rw-r--r--arch/arm/mach-mx1/Kconfig19
-rw-r--r--arch/arm/mach-mx1/Makefile14
-rw-r--r--arch/arm/mach-mx1/Makefile.boot4
-rw-r--r--arch/arm/mach-mx1/devices.c220
-rw-r--r--arch/arm/mach-mx1/devices.h7
-rw-r--r--arch/arm/plat-mxc/Kconfig1
18 files changed, 242 insertions, 267 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index c60d604b2ef4..ad81ece7f826 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -145,7 +145,7 @@ machine-$(CONFIG_ARCH_LOKI) := loki
145machine-$(CONFIG_ARCH_MMP) := mmp 145machine-$(CONFIG_ARCH_MMP) := mmp
146machine-$(CONFIG_ARCH_MSM) := msm 146machine-$(CONFIG_ARCH_MSM) := msm
147machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 147machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
148machine-$(CONFIG_ARCH_MX1) := mx1 148machine-$(CONFIG_ARCH_MX1) := imx
149machine-$(CONFIG_ARCH_MX2) := imx 149machine-$(CONFIG_ARCH_MX2) := imx
150machine-$(CONFIG_ARCH_MX25) := mx25 150machine-$(CONFIG_ARCH_MX25) := mx25
151machine-$(CONFIG_ARCH_MX3) := mx3 151machine-$(CONFIG_ARCH_MX3) := mx3
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 742fd4e6dcb9..c6eddd7f68c9 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,3 +1,22 @@
1if ARCH_MX1
2
3comment "MX1 platforms:"
4config MACH_MXLADS
5 bool
6
7config ARCH_MX1ADS
8 bool "MX1ADS platform"
9 select MACH_MXLADS
10 help
11 Say Y here if you are using Motorola MX1ADS/MXLADS boards
12
13config MACH_SCB9328
14 bool "Synertronixx scb9328"
15 help
16 Say Y here if you are using a Synertronixx scb9328 board
17
18endif
19
1if ARCH_MX2 20if ARCH_MX2
2 21
3choice 22choice
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 9d57ba65d973..e56a1191c9df 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -6,12 +6,20 @@
6 6
7obj-y := devices.o 7obj-y := devices.o
8 8
9obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
9obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o 10obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o
10 11
11obj-$(CONFIG_MACH_MX27) += cpu-imx27.o 12obj-$(CONFIG_MACH_MX27) += cpu-imx27.o
12obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o 13obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o
13 14
15# Support for CMOS sensor interface
16obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
17
18obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
19obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
20
14obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o 21obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
22
15obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o 23obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
16obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o 24obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
17obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o 25obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index e867398a8fdb..7988a85cf07d 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -1,3 +1,7 @@
1zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000
2params_phys-$(CONFIG_ARCH_MX1) := 0x08000100
3initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000
4
1zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 5zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000
2params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 6params_phys-$(CONFIG_MACH_MX21) := 0xC0000100
3initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 7initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000
diff --git a/arch/arm/mach-mx1/clock.c b/arch/arm/mach-imx/clock-imx1.c
index c05096c38301..c05096c38301 100644
--- a/arch/arm/mach-mx1/clock.c
+++ b/arch/arm/mach-imx/clock-imx1.c
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index b37280561a3f..ceae6413d4c6 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -11,6 +11,9 @@
11 * 11 *
12 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. 12 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
13 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de 13 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
14 * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
15 * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
16 * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt>
14 * 17 *
15 * This program is free software; you can redistribute it and/or 18 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License 19 * modify it under the terms of the GNU General Public License
@@ -41,6 +44,199 @@
41 44
42#include "devices.h" 45#include "devices.h"
43 46
47#if defined(CONFIG_ARCH_MX1)
48static struct resource imx1_camera_resources[] = {
49 {
50 .start = 0x00224000,
51 .end = 0x00224010,
52 .flags = IORESOURCE_MEM,
53 }, {
54 .start = MX1_CSI_INT,
55 .end = MX1_CSI_INT,
56 .flags = IORESOURCE_IRQ,
57 },
58};
59
60static u64 imx1_camera_dmamask = DMA_BIT_MASK(32);
61
62struct platform_device imx1_camera_device = {
63 .name = "mx1-camera",
64 .id = 0, /* This is used to put cameras on this interface */
65 .dev = {
66 .dma_mask = &imx1_camera_dmamask,
67 .coherent_dma_mask = DMA_BIT_MASK(32),
68 },
69 .resource = imx1_camera_resources,
70 .num_resources = ARRAY_SIZE(imx1_camera_resources),
71};
72
73static struct resource imx_i2c_resources[] = {
74 {
75 .start = 0x00217000,
76 .end = 0x00217010,
77 .flags = IORESOURCE_MEM,
78 }, {
79 .start = MX1_I2C_INT,
80 .end = MX1_I2C_INT,
81 .flags = IORESOURCE_IRQ,
82 },
83};
84
85struct platform_device imx_i2c_device0 = {
86 .name = "imx-i2c",
87 .id = 0,
88 .resource = imx_i2c_resources,
89 .num_resources = ARRAY_SIZE(imx_i2c_resources),
90};
91
92#define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \
93 static struct resource imx1_uart_resources ## n[] = { \
94 { \
95 .start = baseaddr, \
96 .end = baseaddr + 0xd0, \
97 .flags = IORESOURCE_MEM, \
98 }, { \
99 .start = irqrx, \
100 .end = irqrx, \
101 .flags = IORESOURCE_IRQ, \
102 }, { \
103 .start = irqtx, \
104 .end = irqtx, \
105 .flags = IORESOURCE_IRQ, \
106 }, { \
107 .start = irqrts, \
108 .end = irqrts, \
109 .flags = IORESOURCE_IRQ, \
110 }, \
111 }; \
112 \
113 struct platform_device imx1_uart_device ## n = { \
114 .name = "imx-uart", \
115 .id = n, \
116 .num_resources = ARRAY_SIZE(imx1_uart_resources ## n), \
117 .resource = imx1_uart_resources ## n, \
118 }
119
120DEFINE_IMX1_UART_DEVICE(0, MX1_UART1_BASE_ADDR, MX1_UART1_MINT_RX, MX1_UART1_MINT_TX, MX1_UART1_MINT_RTS);
121DEFINE_IMX1_UART_DEVICE(1, MX1_UART2_BASE_ADDR, MX1_UART2_MINT_RX, MX1_UART2_MINT_TX, MX1_UART2_MINT_RTS);
122
123static struct resource imx_rtc_resources[] = {
124 {
125 .start = 0x00204000,
126 .end = 0x00204024,
127 .flags = IORESOURCE_MEM,
128 }, {
129 .start = MX1_RTC_INT,
130 .end = MX1_RTC_INT,
131 .flags = IORESOURCE_IRQ,
132 }, {
133 .start = MX1_RTC_SAMINT,
134 .end = MX1_RTC_SAMINT,
135 .flags = IORESOURCE_IRQ,
136 },
137};
138
139struct platform_device imx_rtc_device = {
140 .name = "rtc-imx",
141 .id = 0,
142 .resource = imx_rtc_resources,
143 .num_resources = ARRAY_SIZE(imx_rtc_resources),
144};
145
146static struct resource imx_wdt_resources[] = {
147 {
148 .start = 0x00201000,
149 .end = 0x00201008,
150 .flags = IORESOURCE_MEM,
151 }, {
152 .start = MX1_WDT_INT,
153 .end = MX1_WDT_INT,
154 .flags = IORESOURCE_IRQ,
155 },
156};
157
158struct platform_device imx_wdt_device = {
159 .name = "imx-wdt",
160 .id = 0,
161 .resource = imx_wdt_resources,
162 .num_resources = ARRAY_SIZE(imx_wdt_resources),
163};
164
165static struct resource imx_usb_resources[] = {
166 {
167 .start = 0x00212000,
168 .end = 0x00212148,
169 .flags = IORESOURCE_MEM,
170 }, {
171 .start = MX1_USBD_INT0,
172 .end = MX1_USBD_INT0,
173 .flags = IORESOURCE_IRQ,
174 }, {
175 .start = MX1_USBD_INT1,
176 .end = MX1_USBD_INT1,
177 .flags = IORESOURCE_IRQ,
178 }, {
179 .start = MX1_USBD_INT2,
180 .end = MX1_USBD_INT2,
181 .flags = IORESOURCE_IRQ,
182 }, {
183 .start = MX1_USBD_INT3,
184 .end = MX1_USBD_INT3,
185 .flags = IORESOURCE_IRQ,
186 }, {
187 .start = MX1_USBD_INT4,
188 .end = MX1_USBD_INT4,
189 .flags = IORESOURCE_IRQ,
190 }, {
191 .start = MX1_USBD_INT5,
192 .end = MX1_USBD_INT5,
193 .flags = IORESOURCE_IRQ,
194 }, {
195 .start = MX1_USBD_INT6,
196 .end = MX1_USBD_INT6,
197 .flags = IORESOURCE_IRQ,
198 },
199};
200
201struct platform_device imx_usb_device = {
202 .name = "imx_udc",
203 .id = 0,
204 .num_resources = ARRAY_SIZE(imx_usb_resources),
205 .resource = imx_usb_resources,
206};
207
208/* GPIO port description */
209static struct mxc_gpio_port imx_gpio_ports[] = {
210 {
211 .chip.label = "gpio-0",
212 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
213 .irq = MX1_GPIO_INT_PORTA,
214 .virtual_irq_start = MXC_GPIO_IRQ_START,
215 }, {
216 .chip.label = "gpio-1",
217 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100),
218 .irq = MX1_GPIO_INT_PORTB,
219 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
220 }, {
221 .chip.label = "gpio-2",
222 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200),
223 .irq = MX1_GPIO_INT_PORTC,
224 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
225 }, {
226 .chip.label = "gpio-3",
227 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300),
228 .irq = MX1_GPIO_INT_PORTD,
229 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
230 }
231};
232
233int __init imx1_register_gpios(void)
234{
235 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
236}
237#endif
238
239#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
44/* 240/*
45 * SPI master controller 241 * SPI master controller
46 * 242 *
@@ -526,3 +722,4 @@ struct platform_device mx21_usbhc_device = {
526 .resource = mx21_usbhc_resources, 722 .resource = mx21_usbhc_resources,
527}; 723};
528#endif 724#endif
725#endif
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h
index 65c4a435b956..5c1a0dcb7511 100644
--- a/arch/arm/mach-imx/devices.h
+++ b/arch/arm/mach-imx/devices.h
@@ -1,3 +1,14 @@
1#ifdef CONFIG_ARCH_MX1
2extern struct platform_device imx1_camera_device;
3extern struct platform_device imx_i2c_device0;
4extern struct platform_device imx1_uart_device0;
5extern struct platform_device imx1_uart_device1;
6extern struct platform_device imx_rtc_device;
7extern struct platform_device imx_wdt_device;
8extern struct platform_device imx_usb_device;
9#endif
10
11#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
1extern struct platform_device mxc_gpt1; 12extern struct platform_device mxc_gpt1;
2extern struct platform_device mxc_gpt2; 13extern struct platform_device mxc_gpt2;
3#ifdef CONFIG_MACH_MX27 14#ifdef CONFIG_MACH_MX27
@@ -42,3 +53,4 @@ extern struct platform_device mxc_spi_device2;
42extern struct platform_device mx21_usbhc_device; 53extern struct platform_device mx21_usbhc_device;
43extern struct platform_device imx_ssi_device0; 54extern struct platform_device imx_ssi_device0;
44extern struct platform_device imx_ssi_device1; 55extern struct platform_device imx_ssi_device1;
56#endif
diff --git a/arch/arm/mach-mx1/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 5d7c85f8aaf5..5d7c85f8aaf5 100644
--- a/arch/arm/mach-mx1/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
diff --git a/arch/arm/mach-mx1/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index 482b24df4624..482b24df4624 100644
--- a/arch/arm/mach-mx1/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
diff --git a/arch/arm/mach-mx1/generic.c b/arch/arm/mach-imx/mm-imx1.c
index a9be5f14bd9d..396d0a5f71b1 100644
--- a/arch/arm/mach-mx1/generic.c
+++ b/arch/arm/mach-imx/mm-imx1.c
@@ -3,7 +3,7 @@
3 * Created: april 20th, 2004 3 * Created: april 20th, 2004
4 * Copyright: Synertronixx GmbH 4 * Copyright: Synertronixx GmbH
5 * 5 *
6 * Common code for i.MX machines 6 * Common code for i.MX1 machines
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
index b09ee12a4ff0..b09ee12a4ff0 100644
--- a/arch/arm/mach-mx1/ksym_mx1.c
+++ b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S
index 9c69aa65bf17..9c69aa65bf17 100644
--- a/arch/arm/mach-mx1/mx1_camera_fiq.S
+++ b/arch/arm/mach-imx/mx1-camera-fiq.S
diff --git a/arch/arm/mach-mx1/Kconfig b/arch/arm/mach-mx1/Kconfig
deleted file mode 100644
index eb7660f5d4b7..000000000000
--- a/arch/arm/mach-mx1/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
1if ARCH_MX1
2
3comment "MX1 platforms:"
4
5config MACH_MXLADS
6 bool
7
8config ARCH_MX1ADS
9 bool "MX1ADS platform"
10 select MACH_MXLADS
11 help
12 Say Y here if you are using Motorola MX1ADS/MXLADS boards
13
14config MACH_SCB9328
15 bool "Synertronixx scb9328"
16 help
17 Say Y here if you are using a Synertronixx scb9328 board
18
19endif
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile
deleted file mode 100644
index 297d17210e11..000000000000
--- a/arch/arm/mach-mx1/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Object file lists.
6
7obj-y += generic.o clock.o devices.o
8
9# Support for CMOS sensor interface
10obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o
11
12# Specific board support
13obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
14obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
diff --git a/arch/arm/mach-mx1/Makefile.boot b/arch/arm/mach-mx1/Makefile.boot
deleted file mode 100644
index 8ed1492288a2..000000000000
--- a/arch/arm/mach-mx1/Makefile.boot
+++ /dev/null
@@ -1,4 +0,0 @@
1 zreladdr-y := 0x08008000
2params_phys-y := 0x08000100
3initrd_phys-y := 0x08800000
4
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c
deleted file mode 100644
index a79e6132dbe5..000000000000
--- a/arch/arm/mach-mx1/devices.c
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
4 * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#include <linux/kernel.h>
23#include <linux/init.h>
24#include <linux/dma-mapping.h>
25#include <linux/platform_device.h>
26#include <linux/gpio.h>
27#include <mach/irqs.h>
28#include <mach/hardware.h>
29
30#include "devices.h"
31
32static struct resource imx1_camera_resources[] = {
33 {
34 .start = 0x00224000,
35 .end = 0x00224010,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = MX1_CSI_INT,
39 .end = MX1_CSI_INT,
40 .flags = IORESOURCE_IRQ,
41 },
42};
43
44static u64 imx1_camera_dmamask = DMA_BIT_MASK(32);
45
46struct platform_device imx1_camera_device = {
47 .name = "mx1-camera",
48 .id = 0, /* This is used to put cameras on this interface */
49 .dev = {
50 .dma_mask = &imx1_camera_dmamask,
51 .coherent_dma_mask = DMA_BIT_MASK(32),
52 },
53 .resource = imx1_camera_resources,
54 .num_resources = ARRAY_SIZE(imx1_camera_resources),
55};
56
57static struct resource imx_i2c_resources[] = {
58 {
59 .start = 0x00217000,
60 .end = 0x00217010,
61 .flags = IORESOURCE_MEM,
62 }, {
63 .start = MX1_I2C_INT,
64 .end = MX1_I2C_INT,
65 .flags = IORESOURCE_IRQ,
66 },
67};
68
69struct platform_device imx_i2c_device0 = {
70 .name = "imx-i2c",
71 .id = 0,
72 .resource = imx_i2c_resources,
73 .num_resources = ARRAY_SIZE(imx_i2c_resources),
74};
75
76#define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \
77 static struct resource imx1_uart_resources ## n[] = { \
78 { \
79 .start = baseaddr, \
80 .end = baseaddr + 0xd0, \
81 .flags = IORESOURCE_MEM, \
82 }, { \
83 .start = irqrx, \
84 .end = irqrx, \
85 .flags = IORESOURCE_IRQ, \
86 }, { \
87 .start = irqtx, \
88 .end = irqtx, \
89 .flags = IORESOURCE_IRQ, \
90 }, { \
91 .start = irqrts, \
92 .end = irqrts, \
93 .flags = IORESOURCE_IRQ, \
94 }, \
95 }; \
96 \
97 struct platform_device imx1_uart_device ## n = { \
98 .name = "imx-uart", \
99 .id = n, \
100 .num_resources = ARRAY_SIZE(imx1_uart_resources ## n), \
101 .resource = imx1_uart_resources ## n, \
102 }
103
104DEFINE_IMX1_UART_DEVICE(0, MX1_UART1_BASE_ADDR, MX1_UART1_MINT_RX, MX1_UART1_MINT_TX, MX1_UART1_MINT_RTS);
105DEFINE_IMX1_UART_DEVICE(1, MX1_UART2_BASE_ADDR, MX1_UART2_MINT_RX, MX1_UART2_MINT_TX, MX1_UART2_MINT_RTS);
106
107static struct resource imx_rtc_resources[] = {
108 {
109 .start = 0x00204000,
110 .end = 0x00204024,
111 .flags = IORESOURCE_MEM,
112 }, {
113 .start = MX1_RTC_INT,
114 .end = MX1_RTC_INT,
115 .flags = IORESOURCE_IRQ,
116 }, {
117 .start = MX1_RTC_SAMINT,
118 .end = MX1_RTC_SAMINT,
119 .flags = IORESOURCE_IRQ,
120 },
121};
122
123struct platform_device imx_rtc_device = {
124 .name = "rtc-imx",
125 .id = 0,
126 .resource = imx_rtc_resources,
127 .num_resources = ARRAY_SIZE(imx_rtc_resources),
128};
129
130static struct resource imx_wdt_resources[] = {
131 {
132 .start = 0x00201000,
133 .end = 0x00201008,
134 .flags = IORESOURCE_MEM,
135 }, {
136 .start = MX1_WDT_INT,
137 .end = MX1_WDT_INT,
138 .flags = IORESOURCE_IRQ,
139 },
140};
141
142struct platform_device imx_wdt_device = {
143 .name = "imx-wdt",
144 .id = 0,
145 .resource = imx_wdt_resources,
146 .num_resources = ARRAY_SIZE(imx_wdt_resources),
147};
148
149static struct resource imx_usb_resources[] = {
150 {
151 .start = 0x00212000,
152 .end = 0x00212148,
153 .flags = IORESOURCE_MEM,
154 }, {
155 .start = MX1_USBD_INT0,
156 .end = MX1_USBD_INT0,
157 .flags = IORESOURCE_IRQ,
158 }, {
159 .start = MX1_USBD_INT1,
160 .end = MX1_USBD_INT1,
161 .flags = IORESOURCE_IRQ,
162 }, {
163 .start = MX1_USBD_INT2,
164 .end = MX1_USBD_INT2,
165 .flags = IORESOURCE_IRQ,
166 }, {
167 .start = MX1_USBD_INT3,
168 .end = MX1_USBD_INT3,
169 .flags = IORESOURCE_IRQ,
170 }, {
171 .start = MX1_USBD_INT4,
172 .end = MX1_USBD_INT4,
173 .flags = IORESOURCE_IRQ,
174 }, {
175 .start = MX1_USBD_INT5,
176 .end = MX1_USBD_INT5,
177 .flags = IORESOURCE_IRQ,
178 }, {
179 .start = MX1_USBD_INT6,
180 .end = MX1_USBD_INT6,
181 .flags = IORESOURCE_IRQ,
182 },
183};
184
185struct platform_device imx_usb_device = {
186 .name = "imx_udc",
187 .id = 0,
188 .num_resources = ARRAY_SIZE(imx_usb_resources),
189 .resource = imx_usb_resources,
190};
191
192/* GPIO port description */
193static struct mxc_gpio_port imx_gpio_ports[] = {
194 {
195 .chip.label = "gpio-0",
196 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
197 .irq = MX1_GPIO_INT_PORTA,
198 .virtual_irq_start = MXC_GPIO_IRQ_START,
199 }, {
200 .chip.label = "gpio-1",
201 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100),
202 .irq = MX1_GPIO_INT_PORTB,
203 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
204 }, {
205 .chip.label = "gpio-2",
206 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200),
207 .irq = MX1_GPIO_INT_PORTC,
208 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
209 }, {
210 .chip.label = "gpio-3",
211 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300),
212 .irq = MX1_GPIO_INT_PORTD,
213 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
214 }
215};
216
217int __init imx1_register_gpios(void)
218{
219 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
220}
diff --git a/arch/arm/mach-mx1/devices.h b/arch/arm/mach-mx1/devices.h
deleted file mode 100644
index 13325166f639..000000000000
--- a/arch/arm/mach-mx1/devices.h
+++ /dev/null
@@ -1,7 +0,0 @@
1extern struct platform_device imx1_camera_device;
2extern struct platform_device imx_i2c_device0;
3extern struct platform_device imx1_uart_device0;
4extern struct platform_device imx1_uart_device1;
5extern struct platform_device imx_rtc_device;
6extern struct platform_device imx_wdt_device;
7extern struct platform_device imx_usb_device;
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index 4974fcc06735..3adad3822279 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -48,7 +48,6 @@ config ARCH_MX5
48 48
49endchoice 49endchoice
50 50
51source "arch/arm/mach-mx1/Kconfig"
52source "arch/arm/mach-imx/Kconfig" 51source "arch/arm/mach-imx/Kconfig"
53source "arch/arm/mach-mx3/Kconfig" 52source "arch/arm/mach-mx3/Kconfig"
54source "arch/arm/mach-mx25/Kconfig" 53source "arch/arm/mach-mx25/Kconfig"