aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards/tcm_bf537.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/tcm_bf537.c')
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c63
1 files changed, 56 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index d5ff705a5129..2f4b066153c5 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -308,6 +308,19 @@ static struct platform_device net2272_bfin_device = {
308}; 308};
309#endif 309#endif
310 310
311static struct resource bfin_gpios_resources = {
312 .start = 0,
313 .end = MAX_BLACKFIN_GPIOS - 1,
314 .flags = IORESOURCE_IRQ,
315};
316
317static struct platform_device bfin_gpios_device = {
318 .name = "simple-gpio",
319 .id = -1,
320 .num_resources = 1,
321 .resource = &bfin_gpios_resources,
322};
323
311#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 324#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
312static struct mtd_partition cm_partitions[] = { 325static struct mtd_partition cm_partitions[] = {
313 { 326 {
@@ -379,30 +392,59 @@ static struct platform_device bfin_uart_device = {
379#endif 392#endif
380 393
381#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 394#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
382static struct resource bfin_sir_resources[] = {
383#ifdef CONFIG_BFIN_SIR0 395#ifdef CONFIG_BFIN_SIR0
396static struct resource bfin_sir0_resources[] = {
384 { 397 {
385 .start = 0xFFC00400, 398 .start = 0xFFC00400,
386 .end = 0xFFC004FF, 399 .end = 0xFFC004FF,
387 .flags = IORESOURCE_MEM, 400 .flags = IORESOURCE_MEM,
388 }, 401 },
402 {
403 .start = IRQ_UART0_RX,
404 .end = IRQ_UART0_RX+1,
405 .flags = IORESOURCE_IRQ,
406 },
407 {
408 .start = CH_UART0_RX,
409 .end = CH_UART0_RX+1,
410 .flags = IORESOURCE_DMA,
411 },
412};
413
414static struct platform_device bfin_sir0_device = {
415 .name = "bfin_sir",
416 .id = 0,
417 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
418 .resource = bfin_sir0_resources,
419};
389#endif 420#endif
390#ifdef CONFIG_BFIN_SIR1 421#ifdef CONFIG_BFIN_SIR1
422static struct resource bfin_sir1_resources[] = {
391 { 423 {
392 .start = 0xFFC02000, 424 .start = 0xFFC02000,
393 .end = 0xFFC020FF, 425 .end = 0xFFC020FF,
394 .flags = IORESOURCE_MEM, 426 .flags = IORESOURCE_MEM,
395 }, 427 },
396#endif 428 {
429 .start = IRQ_UART1_RX,
430 .end = IRQ_UART1_RX+1,
431 .flags = IORESOURCE_IRQ,
432 },
433 {
434 .start = CH_UART1_RX,
435 .end = CH_UART1_RX+1,
436 .flags = IORESOURCE_DMA,
437 },
397}; 438};
398 439
399static struct platform_device bfin_sir_device = { 440static struct platform_device bfin_sir1_device = {
400 .name = "bfin_sir", 441 .name = "bfin_sir",
401 .id = 0, 442 .id = 1,
402 .num_resources = ARRAY_SIZE(bfin_sir_resources), 443 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
403 .resource = bfin_sir_resources, 444 .resource = bfin_sir1_resources,
404}; 445};
405#endif 446#endif
447#endif
406 448
407#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 449#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
408static struct resource bfin_twi0_resource[] = { 450static struct resource bfin_twi0_resource[] = {
@@ -525,7 +567,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
525#endif 567#endif
526 568
527#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 569#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
528 &bfin_sir_device, 570#ifdef CONFIG_BFIN_SIR0
571 &bfin_sir0_device,
572#endif
573#ifdef CONFIG_BFIN_SIR1
574 &bfin_sir1_device,
575#endif
529#endif 576#endif
530 577
531#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
@@ -564,6 +611,8 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
564#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 611#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
565 &cm_flash_device, 612 &cm_flash_device,
566#endif 613#endif
614
615 &bfin_gpios_device,
567}; 616};
568 617
569static int __init cm_bf537_init(void) 618static int __init cm_bf537_init(void)