diff options
author | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> | 2008-01-31 08:20:21 -0500 |
---|---|---|
committer | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> | 2008-03-31 02:17:00 -0400 |
commit | 210b94e864de9d50ed08603a1ff0834603f309e0 (patch) | |
tree | 7743310b311efadfdfc257b64aecd90da3a9f253 /arch/arm/mach-ns9xxx/board-a9m9750dev.c | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
ns9xxx: move registration of serial8250 to a dedicated file
Now the needed structs are allocated dynamically from __init code reducing
memory usage if the kernel runs on a board different from a9m9750dev.
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Diffstat (limited to 'arch/arm/mach-ns9xxx/board-a9m9750dev.c')
-rw-r--r-- | arch/arm/mach-ns9xxx/board-a9m9750dev.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c index 0f65177f9e5f..14a06da25ac2 100644 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c | |||
@@ -8,8 +8,6 @@ | |||
8 | * under the terms of the GNU General Public License version 2 as published by | 8 | * under the terms of the GNU General Public License version 2 as published by |
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/serial_8250.h> | ||
13 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
14 | 12 | ||
15 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
@@ -126,59 +124,6 @@ void __init board_a9m9750dev_init_irq(void) | |||
126 | a9m9750dev_fpga_demux_handler); | 124 | a9m9750dev_fpga_demux_handler); |
127 | } | 125 | } |
128 | 126 | ||
129 | static struct plat_serial8250_port board_a9m9750dev_serial8250_port[] = { | ||
130 | { | ||
131 | .iobase = FPGA_UARTA_BASE, | ||
132 | .membase = (unsigned char*)FPGA_UARTA_BASE, | ||
133 | .mapbase = FPGA_UARTA_BASE, | ||
134 | .irq = IRQ_FPGA_UARTA, | ||
135 | .iotype = UPIO_MEM, | ||
136 | .uartclk = 18432000, | ||
137 | .regshift = 0, | ||
138 | .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ, | ||
139 | }, { | ||
140 | .iobase = FPGA_UARTB_BASE, | ||
141 | .membase = (unsigned char*)FPGA_UARTB_BASE, | ||
142 | .mapbase = FPGA_UARTB_BASE, | ||
143 | .irq = IRQ_FPGA_UARTB, | ||
144 | .iotype = UPIO_MEM, | ||
145 | .uartclk = 18432000, | ||
146 | .regshift = 0, | ||
147 | .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ, | ||
148 | }, { | ||
149 | .iobase = FPGA_UARTC_BASE, | ||
150 | .membase = (unsigned char*)FPGA_UARTC_BASE, | ||
151 | .mapbase = FPGA_UARTC_BASE, | ||
152 | .irq = IRQ_FPGA_UARTC, | ||
153 | .iotype = UPIO_MEM, | ||
154 | .uartclk = 18432000, | ||
155 | .regshift = 0, | ||
156 | .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ, | ||
157 | }, { | ||
158 | .iobase = FPGA_UARTD_BASE, | ||
159 | .membase = (unsigned char*)FPGA_UARTD_BASE, | ||
160 | .mapbase = FPGA_UARTD_BASE, | ||
161 | .irq = IRQ_FPGA_UARTD, | ||
162 | .iotype = UPIO_MEM, | ||
163 | .uartclk = 18432000, | ||
164 | .regshift = 0, | ||
165 | .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ, | ||
166 | }, { | ||
167 | /* end marker */ | ||
168 | }, | ||
169 | }; | ||
170 | |||
171 | static struct platform_device board_a9m9750dev_serial_device = { | ||
172 | .name = "serial8250", | ||
173 | .dev = { | ||
174 | .platform_data = board_a9m9750dev_serial8250_port, | ||
175 | }, | ||
176 | }; | ||
177 | |||
178 | static struct platform_device *board_a9m9750dev_devices[] __initdata = { | ||
179 | &board_a9m9750dev_serial_device, | ||
180 | }; | ||
181 | |||
182 | void __init board_a9m9750dev_init_machine(void) | 127 | void __init board_a9m9750dev_init_machine(void) |
183 | { | 128 | { |
184 | u32 reg; | 129 | u32 reg; |
@@ -210,7 +155,4 @@ void __init board_a9m9750dev_init_machine(void) | |||
210 | __raw_writel(0x2, MEM_SMOED(0)); | 155 | __raw_writel(0x2, MEM_SMOED(0)); |
211 | __raw_writel(0x6, MEM_SMRD(0)); | 156 | __raw_writel(0x6, MEM_SMRD(0)); |
212 | __raw_writel(0x6, MEM_SMWD(0)); | 157 | __raw_writel(0x6, MEM_SMWD(0)); |
213 | |||
214 | platform_add_devices(board_a9m9750dev_devices, | ||
215 | ARRAY_SIZE(board_a9m9750dev_devices)); | ||
216 | } | 158 | } |