diff options
author | Graf Yang <graf.yang@analog.com> | 2009-01-07 10:14:39 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 10:14:39 -0500 |
commit | 42bd8bcb2fa1853fda9c51d956f70bbe2329bdfb (patch) | |
tree | da6e1022ee8e19380444d026dc40e6e989489a85 /arch/blackfin/mach-bf561 | |
parent | c0948d3316eaf3fdacc461c2c9e18441022e9e63 (diff) |
Blackfin arch: Modify bfin_sir device configuration to board file
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf561')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/generic_board.c | 35 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/tepla.c | 34 |
4 files changed, 105 insertions, 12 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 2ba5975790e9..6880d1ebfe60 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -300,23 +300,33 @@ static struct platform_device bfin_uart_device = { | |||
300 | #endif | 300 | #endif |
301 | 301 | ||
302 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 302 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
303 | static struct resource bfin_sir_resources[] = { | ||
304 | #ifdef CONFIG_BFIN_SIR0 | 303 | #ifdef CONFIG_BFIN_SIR0 |
304 | static struct resource bfin_sir0_resources[] = { | ||
305 | { | 305 | { |
306 | .start = 0xFFC00400, | 306 | .start = 0xFFC00400, |
307 | .end = 0xFFC004FF, | 307 | .end = 0xFFC004FF, |
308 | .flags = IORESOURCE_MEM, | 308 | .flags = IORESOURCE_MEM, |
309 | }, | 309 | }, |
310 | #endif | 310 | { |
311 | .start = IRQ_UART0_RX, | ||
312 | .end = IRQ_UART0_RX+1, | ||
313 | .flags = IORESOURCE_IRQ, | ||
314 | }, | ||
315 | { | ||
316 | .start = CH_UART0_RX, | ||
317 | .end = CH_UART0_RX+1, | ||
318 | .flags = IORESOURCE_DMA, | ||
319 | }, | ||
311 | }; | 320 | }; |
312 | 321 | ||
313 | static struct platform_device bfin_sir_device = { | 322 | static struct platform_device bfin_sir0_device = { |
314 | .name = "bfin_sir", | 323 | .name = "bfin_sir", |
315 | .id = 0, | 324 | .id = 0, |
316 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 325 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
317 | .resource = bfin_sir_resources, | 326 | .resource = bfin_sir0_resources, |
318 | }; | 327 | }; |
319 | #endif | 328 | #endif |
329 | #endif | ||
320 | 330 | ||
321 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 331 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
322 | #define PATA_INT IRQ_PF46 | 332 | #define PATA_INT IRQ_PF46 |
@@ -395,7 +405,9 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
395 | #endif | 405 | #endif |
396 | 406 | ||
397 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 407 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
398 | &bfin_sir_device, | 408 | #ifdef CONFIG_BFIN_SIR0 |
409 | &bfin_sir0_device, | ||
410 | #endif | ||
399 | #endif | 411 | #endif |
400 | 412 | ||
401 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 413 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 1c3ab799b28d..0e2178a1aec5 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -210,23 +210,33 @@ static struct platform_device bfin_uart_device = { | |||
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 212 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
213 | static struct resource bfin_sir_resources[] = { | ||
214 | #ifdef CONFIG_BFIN_SIR0 | 213 | #ifdef CONFIG_BFIN_SIR0 |
214 | static struct resource bfin_sir0_resources[] = { | ||
215 | { | 215 | { |
216 | .start = 0xFFC00400, | 216 | .start = 0xFFC00400, |
217 | .end = 0xFFC004FF, | 217 | .end = 0xFFC004FF, |
218 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
219 | }, | 219 | }, |
220 | #endif | 220 | { |
221 | .start = IRQ_UART0_RX, | ||
222 | .end = IRQ_UART0_RX+1, | ||
223 | .flags = IORESOURCE_IRQ, | ||
224 | }, | ||
225 | { | ||
226 | .start = CH_UART0_RX, | ||
227 | .end = CH_UART0_RX+1, | ||
228 | .flags = IORESOURCE_DMA, | ||
229 | }, | ||
221 | }; | 230 | }; |
222 | 231 | ||
223 | static struct platform_device bfin_sir_device = { | 232 | static struct platform_device bfin_sir0_device = { |
224 | .name = "bfin_sir", | 233 | .name = "bfin_sir", |
225 | .id = 0, | 234 | .id = 0, |
226 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 235 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
227 | .resource = bfin_sir_resources, | 236 | .resource = bfin_sir0_resources, |
228 | }; | 237 | }; |
229 | #endif | 238 | #endif |
239 | #endif | ||
230 | 240 | ||
231 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 241 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
232 | static struct mtd_partition ezkit_partitions[] = { | 242 | static struct mtd_partition ezkit_partitions[] = { |
@@ -451,7 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
451 | #endif | 461 | #endif |
452 | 462 | ||
453 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 463 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
454 | &bfin_sir_device, | 464 | #ifdef CONFIG_BFIN_SIR0 |
465 | &bfin_sir0_device, | ||
466 | #endif | ||
455 | #endif | 467 | #endif |
456 | 468 | ||
457 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 469 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c index 2faa0072d614..0ba366a0e696 100644 --- a/arch/blackfin/mach-bf561/boards/generic_board.c +++ b/arch/blackfin/mach-bf561/boards/generic_board.c | |||
@@ -62,10 +62,45 @@ static struct platform_device smc91x_device = { | |||
62 | }; | 62 | }; |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
66 | #ifdef CONFIG_BFIN_SIR0 | ||
67 | static struct resource bfin_sir0_resources[] = { | ||
68 | { | ||
69 | .start = 0xFFC00400, | ||
70 | .end = 0xFFC004FF, | ||
71 | .flags = IORESOURCE_MEM, | ||
72 | }, | ||
73 | { | ||
74 | .start = IRQ_UART0_RX, | ||
75 | .end = IRQ_UART0_RX+1, | ||
76 | .flags = IORESOURCE_IRQ, | ||
77 | }, | ||
78 | { | ||
79 | .start = CH_UART0_RX, | ||
80 | .end = CH_UART0_RX+1, | ||
81 | .flags = IORESOURCE_DMA, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | static struct platform_device bfin_sir0_device = { | ||
86 | .name = "bfin_sir", | ||
87 | .id = 0, | ||
88 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||
89 | .resource = bfin_sir0_resources, | ||
90 | }; | ||
91 | #endif | ||
92 | #endif | ||
93 | |||
65 | static struct platform_device *generic_board_devices[] __initdata = { | 94 | static struct platform_device *generic_board_devices[] __initdata = { |
66 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 95 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
67 | &smc91x_device, | 96 | &smc91x_device, |
68 | #endif | 97 | #endif |
98 | |||
99 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
100 | #ifdef CONFIG_BFIN_SIR0 | ||
101 | &bfin_sir0_device, | ||
102 | #endif | ||
103 | #endif | ||
69 | }; | 104 | }; |
70 | 105 | ||
71 | static int __init generic_board_init(void) | 106 | static int __init generic_board_init(void) |
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index c9174b39f98d..6f77dbe952f5 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
@@ -44,8 +44,42 @@ static struct platform_device smc91x_device = { | |||
44 | .resource = smc91x_resources, | 44 | .resource = smc91x_resources, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
48 | #ifdef CONFIG_BFIN_SIR0 | ||
49 | static struct resource bfin_sir0_resources[] = { | ||
50 | { | ||
51 | .start = 0xFFC00400, | ||
52 | .end = 0xFFC004FF, | ||
53 | .flags = IORESOURCE_MEM, | ||
54 | }, | ||
55 | { | ||
56 | .start = IRQ_UART0_RX, | ||
57 | .end = IRQ_UART0_RX+1, | ||
58 | .flags = IORESOURCE_IRQ, | ||
59 | }, | ||
60 | { | ||
61 | .start = CH_UART0_RX, | ||
62 | .end = CH_UART0_RX+1, | ||
63 | .flags = IORESOURCE_DMA, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device bfin_sir0_device = { | ||
68 | .name = "bfin_sir", | ||
69 | .id = 0, | ||
70 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||
71 | .resource = bfin_sir0_resources, | ||
72 | }; | ||
73 | #endif | ||
74 | #endif | ||
75 | |||
47 | static struct platform_device *tepla_devices[] __initdata = { | 76 | static struct platform_device *tepla_devices[] __initdata = { |
48 | &smc91x_device, | 77 | &smc91x_device, |
78 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
79 | #ifdef CONFIG_BFIN_SIR0 | ||
80 | &bfin_sir0_device, | ||
81 | #endif | ||
82 | #endif | ||
49 | }; | 83 | }; |
50 | 84 | ||
51 | static int __init tepla_init(void) | 85 | static int __init tepla_init(void) |