diff options
author | Barry Song <barry.song@analog.com> | 2009-11-02 02:29:07 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-15 00:16:38 -0500 |
commit | 706a01b1c6d50b0940ca31d2dc21ba54f095f5af (patch) | |
tree | e51ae118ecb0f20febca0e9dea54148c57ce4d67 | |
parent | 1f13f2fdca71408ad211936b85e673b72e91911a (diff) |
Blackfin: bf537-stamp: add CAN resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 42 | ||||
-rw-r--r-- | arch/blackfin/mach-bf538/boards/ezkit.c | 42 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 42 |
3 files changed, 126 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 187e6fd76968..70349d3817e0 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -302,6 +302,44 @@ static struct platform_device isp1362_hcd_device = { | |||
302 | }; | 302 | }; |
303 | #endif | 303 | #endif |
304 | 304 | ||
305 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
306 | unsigned short bfin_can_peripherals[] = { | ||
307 | P_CAN0_RX, P_CAN0_TX, 0 | ||
308 | }; | ||
309 | |||
310 | static struct resource bfin_can_resources[] = { | ||
311 | { | ||
312 | .start = 0xFFC02A00, | ||
313 | .end = 0xFFC02FFF, | ||
314 | .flags = IORESOURCE_MEM, | ||
315 | }, | ||
316 | { | ||
317 | .start = IRQ_CAN_RX, | ||
318 | .end = IRQ_CAN_RX, | ||
319 | .flags = IORESOURCE_IRQ, | ||
320 | }, | ||
321 | { | ||
322 | .start = IRQ_CAN_TX, | ||
323 | .end = IRQ_CAN_TX, | ||
324 | .flags = IORESOURCE_IRQ, | ||
325 | }, | ||
326 | { | ||
327 | .start = IRQ_CAN_ERROR, | ||
328 | .end = IRQ_CAN_ERROR, | ||
329 | .flags = IORESOURCE_IRQ, | ||
330 | }, | ||
331 | }; | ||
332 | |||
333 | static struct platform_device bfin_can_device = { | ||
334 | .name = "bfin_can", | ||
335 | .num_resources = ARRAY_SIZE(bfin_can_resources), | ||
336 | .resource = bfin_can_resources, | ||
337 | .dev = { | ||
338 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | ||
339 | }, | ||
340 | }; | ||
341 | #endif | ||
342 | |||
305 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 343 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
306 | static struct platform_device bfin_mii_bus = { | 344 | static struct platform_device bfin_mii_bus = { |
307 | .name = "bfin_mii_bus", | 345 | .name = "bfin_mii_bus", |
@@ -1675,6 +1713,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1675 | &ax88180_device, | 1713 | &ax88180_device, |
1676 | #endif | 1714 | #endif |
1677 | 1715 | ||
1716 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
1717 | &bfin_can_device, | ||
1718 | #endif | ||
1719 | |||
1678 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 1720 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
1679 | &bfin_mii_bus, | 1721 | &bfin_mii_bus, |
1680 | &bfin_mac_device, | 1722 | &bfin_mac_device, |
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 14af5c2088d4..c296bb1ed503 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -151,6 +151,44 @@ static struct platform_device bfin_sir2_device = { | |||
151 | #endif | 151 | #endif |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
155 | unsigned short bfin_can_peripherals[] = { | ||
156 | P_CAN0_RX, P_CAN0_TX, 0 | ||
157 | }; | ||
158 | |||
159 | static struct resource bfin_can_resources[] = { | ||
160 | { | ||
161 | .start = 0xFFC02A00, | ||
162 | .end = 0xFFC02FFF, | ||
163 | .flags = IORESOURCE_MEM, | ||
164 | }, | ||
165 | { | ||
166 | .start = IRQ_CAN_RX, | ||
167 | .end = IRQ_CAN_RX, | ||
168 | .flags = IORESOURCE_IRQ, | ||
169 | }, | ||
170 | { | ||
171 | .start = IRQ_CAN_TX, | ||
172 | .end = IRQ_CAN_TX, | ||
173 | .flags = IORESOURCE_IRQ, | ||
174 | }, | ||
175 | { | ||
176 | .start = IRQ_CAN_ERROR, | ||
177 | .end = IRQ_CAN_ERROR, | ||
178 | .flags = IORESOURCE_IRQ, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | static struct platform_device bfin_can_device = { | ||
183 | .name = "bfin_can", | ||
184 | .num_resources = ARRAY_SIZE(bfin_can_resources), | ||
185 | .resource = bfin_can_resources, | ||
186 | .dev = { | ||
187 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | ||
188 | }, | ||
189 | }; | ||
190 | #endif | ||
191 | |||
154 | /* | 192 | /* |
155 | * USB-LAN EzExtender board | 193 | * USB-LAN EzExtender board |
156 | * Driver needs to know address, irq and flag pin. | 194 | * Driver needs to know address, irq and flag pin. |
@@ -610,6 +648,10 @@ static struct platform_device *cm_bf538_devices[] __initdata = { | |||
610 | #endif | 648 | #endif |
611 | #endif | 649 | #endif |
612 | 650 | ||
651 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
652 | &bfin_can_device, | ||
653 | #endif | ||
654 | |||
613 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 655 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
614 | &smc91x_device, | 656 | &smc91x_device, |
615 | #endif | 657 | #endif |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index fa44ea2a5201..60193f72777c 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -464,6 +464,44 @@ static struct platform_device musb_device = { | |||
464 | }; | 464 | }; |
465 | #endif | 465 | #endif |
466 | 466 | ||
467 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
468 | unsigned short bfin_can_peripherals[] = { | ||
469 | P_CAN0_RX, P_CAN0_TX, 0 | ||
470 | }; | ||
471 | |||
472 | static struct resource bfin_can_resources[] = { | ||
473 | { | ||
474 | .start = 0xFFC02A00, | ||
475 | .end = 0xFFC02FFF, | ||
476 | .flags = IORESOURCE_MEM, | ||
477 | }, | ||
478 | { | ||
479 | .start = IRQ_CAN0_RX, | ||
480 | .end = IRQ_CAN0_RX, | ||
481 | .flags = IORESOURCE_IRQ, | ||
482 | }, | ||
483 | { | ||
484 | .start = IRQ_CAN0_TX, | ||
485 | .end = IRQ_CAN0_TX, | ||
486 | .flags = IORESOURCE_IRQ, | ||
487 | }, | ||
488 | { | ||
489 | .start = IRQ_CAN0_ERROR, | ||
490 | .end = IRQ_CAN0_ERROR, | ||
491 | .flags = IORESOURCE_IRQ, | ||
492 | }, | ||
493 | }; | ||
494 | |||
495 | static struct platform_device bfin_can_device = { | ||
496 | .name = "bfin_can", | ||
497 | .num_resources = ARRAY_SIZE(bfin_can_resources), | ||
498 | .resource = bfin_can_resources, | ||
499 | .dev = { | ||
500 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | ||
501 | }, | ||
502 | }; | ||
503 | #endif | ||
504 | |||
467 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) | 505 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) |
468 | static struct resource bfin_atapi_resources[] = { | 506 | static struct resource bfin_atapi_resources[] = { |
469 | { | 507 | { |
@@ -956,6 +994,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
956 | &bfin_isp1760_device, | 994 | &bfin_isp1760_device, |
957 | #endif | 995 | #endif |
958 | 996 | ||
997 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
998 | &bfin_can_device, | ||
999 | #endif | ||
1000 | |||
959 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) | 1001 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) |
960 | &bfin_atapi_device, | 1002 | &bfin_atapi_device, |
961 | #endif | 1003 | #endif |