diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-09-09 06:46:19 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:45 -0500 |
commit | 6bd1fbea2e8bff9346a5afb44ca948b4e4ed74a5 (patch) | |
tree | 87019fd6c4fb46bc64d6f0ddaaac32179a6af7e6 /arch/blackfin/mach-bf533/boards/blackstamp.c | |
parent | 57d54889cd00db2752994b389ba714138652e60c (diff) |
Blackfin: move on-chip UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file. This lets people easily select the specific pins/ports for
the normal UART as well as GPIOs for CTS/RTS.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/blackstamp.c')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/blackstamp.c | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index b580884848d4..50ce3ecfdcb2 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -195,21 +195,50 @@ static struct platform_device bfin_spi0_device = { | |||
195 | #endif /* spi master and devices */ | 195 | #endif /* spi master and devices */ |
196 | 196 | ||
197 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 197 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
198 | static struct resource bfin_uart_resources[] = { | 198 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
199 | static struct resource bfin_uart0_resources[] = { | ||
199 | { | 200 | { |
200 | .start = 0xFFC00400, | 201 | .start = BFIN_UART_THR, |
201 | .end = 0xFFC004FF, | 202 | .end = BFIN_UART_GCTL+2, |
202 | .flags = IORESOURCE_MEM, | 203 | .flags = IORESOURCE_MEM, |
203 | }, | 204 | }, |
205 | { | ||
206 | .start = IRQ_UART0_RX, | ||
207 | .end = IRQ_UART0_RX + 1, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | { | ||
211 | .start = IRQ_UART0_ERROR, | ||
212 | .end = IRQ_UART0_ERROR, | ||
213 | .flags = IORESOURCE_IRQ, | ||
214 | }, | ||
215 | { | ||
216 | .start = CH_UART0_TX, | ||
217 | .end = CH_UART0_TX, | ||
218 | .flags = IORESOURCE_DMA, | ||
219 | }, | ||
220 | { | ||
221 | .start = CH_UART0_RX, | ||
222 | .end = CH_UART0_RX, | ||
223 | .flags = IORESOURCE_DMA, | ||
224 | }, | ||
225 | }; | ||
226 | |||
227 | unsigned short bfin_uart0_peripherals[] = { | ||
228 | P_UART0_TX, P_UART0_RX, 0 | ||
204 | }; | 229 | }; |
205 | 230 | ||
206 | static struct platform_device bfin_uart_device = { | 231 | static struct platform_device bfin_uart0_device = { |
207 | .name = "bfin-uart", | 232 | .name = "bfin-uart", |
208 | .id = 1, | 233 | .id = 0, |
209 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 234 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
210 | .resource = bfin_uart_resources, | 235 | .resource = bfin_uart0_resources, |
236 | .dev = { | ||
237 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
238 | }, | ||
211 | }; | 239 | }; |
212 | #endif | 240 | #endif |
241 | #endif | ||
213 | 242 | ||
214 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 243 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
215 | #ifdef CONFIG_BFIN_SIR0 | 244 | #ifdef CONFIG_BFIN_SIR0 |
@@ -344,7 +373,9 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
344 | #endif | 373 | #endif |
345 | 374 | ||
346 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 375 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
347 | &bfin_uart_device, | 376 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
377 | &bfin_uart0_device, | ||
378 | #endif | ||
348 | #endif | 379 | #endif |
349 | 380 | ||
350 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 381 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |