Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Blackfin serial driver: fix up tty core set_ldisc API change breakage bug
Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN
Blackfin arch: fixup warnings with the new cplb saved values
Blackfin Serial Driver: Clean up BF54x macro in blackfin UART driver.

+57 -74
+3 -5
arch/blackfin/kernel/traps.c
··· 67 67 CSYNC(); 68 68 } 69 69 70 - void *saved_icplb_fault_addr, *saved_dcplb_fault_addr; 70 + unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr; 71 71 72 72 int kstack_depth_to_print = 48; 73 73 ··· 366 366 info.si_code = ILL_CPLB_MULHIT; 367 367 sig = SIGSEGV; 368 368 #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 369 - if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START) 369 + if (saved_dcplb_fault_addr < FIXED_CODE_START) 370 370 printk(KERN_NOTICE "NULL pointer access\n"); 371 371 else 372 372 #endif ··· 421 421 info.si_code = ILL_CPLB_MULHIT; 422 422 sig = SIGSEGV; 423 423 #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 424 - if (saved_icplb_fault_addr < (void *)FIXED_CODE_START) 424 + if (saved_icplb_fault_addr < FIXED_CODE_START) 425 425 printk(KERN_NOTICE "Jump to NULL address\n"); 426 426 else 427 427 #endif ··· 939 939 940 940 oops_in_progress = 1; 941 941 942 - printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr); 943 - printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr); 944 942 dump_bfin_process(fp); 945 943 dump_bfin_mem(fp); 946 944 show_regs(fp);
+2 -7
arch/blackfin/mach-bf527/boards/ezkit.c
··· 451 451 }; 452 452 #endif 453 453 454 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 455 - /* all SPI peripherals info goes here */ 456 - 457 454 #if defined(CONFIG_MTD_M25P80) \ 458 455 || defined(CONFIG_MTD_M25P80_MODULE) 459 456 static struct mtd_partition bfin_spi_flash_partitions[] = { ··· 673 676 #endif 674 677 }; 675 678 679 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 676 680 /* SPI controller data */ 677 681 static struct bfin5xx_spi_master bfin_spi0_info = { 678 682 .num_chipselect = 8, ··· 1016 1018 #endif 1017 1019 1018 1020 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1019 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1020 - spi_register_board_info(bfin_spi_board_info, 1021 - ARRAY_SIZE(bfin_spi_board_info)); 1022 - #endif 1021 + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 1023 1022 1024 1023 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1025 1024 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
+1 -5
arch/blackfin/mach-bf533/boards/ezkit.c
··· 87 87 }; 88 88 #endif 89 89 90 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 91 - /* all SPI peripherals info goes here */ 92 - 93 90 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 94 91 static struct mtd_partition bfin_spi_flash_partitions[] = { 95 92 { ··· 186 189 #endif 187 190 }; 188 191 192 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 189 193 /* SPI (0) */ 190 194 static struct resource bfin_spi0_resource[] = { 191 195 [0] = { ··· 423 425 { 424 426 printk(KERN_INFO "%s(): registering device resources\n", __func__); 425 427 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 426 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 427 428 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 428 - #endif 429 429 430 430 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 431 431 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
+3 -7
arch/blackfin/mach-bf533/boards/stamp.c
··· 161 161 }; 162 162 #endif 163 163 164 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 165 - /* all SPI peripherals info goes here */ 166 - 167 164 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 168 165 static struct mtd_partition bfin_spi_flash_partitions[] = { 169 166 { ··· 317 320 #endif 318 321 }; 319 322 323 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 320 324 /* SPI (0) */ 321 325 static struct resource bfin_spi0_resource[] = { 322 326 [0] = { ··· 624 626 SSYNC(); 625 627 #endif 626 628 627 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 628 - spi_register_board_info(bfin_spi_board_info, 629 - ARRAY_SIZE(bfin_spi_board_info)); 630 - #endif 629 + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 630 + 631 631 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 632 632 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 633 633 #endif
+2 -7
arch/blackfin/mach-bf537/boards/stamp.c
··· 400 400 }; 401 401 #endif 402 402 403 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 404 - /* all SPI peripherals info goes here */ 405 - 406 403 #if defined(CONFIG_MTD_M25P80) \ 407 404 || defined(CONFIG_MTD_M25P80_MODULE) 408 405 static struct mtd_partition bfin_spi_flash_partitions[] = { ··· 626 629 #endif 627 630 }; 628 631 632 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 629 633 /* SPI controller data */ 630 634 static struct bfin5xx_spi_master bfin_spi0_info = { 631 635 .num_chipselect = 8, ··· 937 939 #endif 938 940 939 941 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 940 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 941 - spi_register_board_info(bfin_spi_board_info, 942 - ARRAY_SIZE(bfin_spi_board_info)); 943 - #endif 942 + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 944 943 945 944 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 946 945 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
+3 -7
arch/blackfin/mach-bf548/boards/ezkit.c
··· 412 412 }; 413 413 #endif 414 414 415 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 416 - /* all SPI peripherals info goes here */ 417 415 #if defined(CONFIG_MTD_M25P80) \ 418 416 || defined(CONFIG_MTD_M25P80_MODULE) 419 417 /* SPI flash chip (m25p16) */ ··· 479 481 }; 480 482 #endif 481 483 482 - static struct spi_board_info bf54x_spi_board_info[] __initdata = { 484 + static struct spi_board_info bfin_spi_board_info[] __initdata = { 483 485 #if defined(CONFIG_MTD_M25P80) \ 484 486 || defined(CONFIG_MTD_M25P80_MODULE) 485 487 { ··· 525 527 #endif 526 528 }; 527 529 530 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 528 531 /* SPI (0) */ 529 532 static struct resource bfin_spi0_resource[] = { 530 533 [0] = { ··· 799 800 800 801 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 801 802 802 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 803 - spi_register_board_info(bf54x_spi_board_info, 804 - ARRAY_SIZE(bf54x_spi_board_info)); 805 - #endif 803 + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 806 804 807 805 return 0; 808 806 }
+3 -6
arch/blackfin/mach-bf561/boards/ezkit.c
··· 280 280 }; 281 281 #endif 282 282 283 - #ifdef CONFIG_SPI_BFIN 284 283 #if defined(CONFIG_SND_BLACKFIN_AD1836) \ 285 284 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 286 285 static struct bfin5xx_spi_chip ad1836_spi_chip_info = { ··· 294 295 .bits_per_word = 8, 295 296 }; 296 297 #endif 297 - #endif 298 298 299 + #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 299 300 /* SPI (0) */ 300 301 static struct resource bfin_spi0_resource[] = { 301 302 [0] = { ··· 326 327 .platform_data = &bfin_spi0_info, /* Passed to driver */ 327 328 }, 328 329 }; 330 + #endif 329 331 330 332 static struct spi_board_info bfin_spi_board_info[] __initdata = { 331 333 #if defined(CONFIG_SND_BLACKFIN_AD1836) \ ··· 537 537 SSYNC(); 538 538 #endif 539 539 540 - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 541 - spi_register_board_info(bfin_spi_board_info, 542 - ARRAY_SIZE(bfin_spi_board_info)); 543 - #endif 540 + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 544 541 545 542 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 546 543 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
+10 -30
drivers/serial/bfin_5xx.c
··· 530 530 if (uart->cts_pin < 0) 531 531 return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; 532 532 533 - # ifdef BF54x 534 - if (UART_GET_MSR(uart) & CTS) 535 - # else 536 - if (gpio_get_value(uart->cts_pin)) 537 - # endif 533 + if (UART_GET_CTS(uart)) 538 534 return TIOCM_DSR | TIOCM_CAR; 539 535 else 540 536 #endif ··· 545 549 return; 546 550 547 551 if (mctrl & TIOCM_RTS) 548 - # ifdef BF54x 549 - UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS); 550 - # else 551 - gpio_set_value(uart->rts_pin, 0); 552 - # endif 552 + UART_CLEAR_RTS(uart); 553 553 else 554 - # ifdef BF54x 555 - UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS); 556 - # else 557 - gpio_set_value(uart->rts_pin, 1); 558 - # endif 554 + UART_SET_RTS(uart); 559 555 #endif 560 556 } 561 557 ··· 740 752 741 753 /* Disable UART */ 742 754 ier = UART_GET_IER(uart); 743 - #ifdef CONFIG_BF54x 744 - UART_CLEAR_IER(uart, 0xF); 745 - #else 746 - UART_PUT_IER(uart, 0); 747 - #endif 755 + UART_DISABLE_INTS(uart); 748 756 749 757 /* Set DLAB in LCR to Access DLL and DLH */ 750 758 UART_SET_DLAB(uart); ··· 755 771 UART_PUT_LCR(uart, lcr); 756 772 757 773 /* Enable UART */ 758 - #ifdef CONFIG_BF54x 759 - UART_SET_IER(uart, ier); 760 - #else 761 - UART_PUT_IER(uart, ier); 762 - #endif 774 + UART_ENABLE_INTS(uart, ier); 763 775 764 776 val = UART_GET_GCTL(uart); 765 777 val |= UCEN; ··· 813 833 * Enable the IrDA function if tty->ldisc.num is N_IRDA. 814 834 * In other cases, disable IrDA function. 815 835 */ 816 - static void bfin_set_ldisc(struct tty_struct *tty) 836 + static void bfin_serial_set_ldisc(struct uart_port *port) 817 837 { 818 - int line = tty->index; 838 + int line = port->line; 819 839 unsigned short val; 820 840 821 - if (line >= tty->driver->num) 841 + if (line >= port->info->tty->driver->num) 822 842 return; 823 843 824 - switch (tty->ldisc.num) { 844 + switch (port->info->tty->ldisc.num) { 825 845 case N_IRDA: 826 846 val = UART_GET_GCTL(&bfin_serial_ports[line]); 827 847 val |= (IREN | RPOLC); ··· 846 866 .startup = bfin_serial_startup, 847 867 .shutdown = bfin_serial_shutdown, 848 868 .set_termios = bfin_serial_set_termios, 869 + .set_ldisc = bfin_serial_set_ldisc, 849 870 .type = bfin_serial_type, 850 871 .release_port = bfin_serial_release_port, 851 872 .request_port = bfin_serial_request_port, ··· 1187 1206 1188 1207 ret = uart_register_driver(&bfin_serial_reg); 1189 1208 if (ret == 0) { 1190 - bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc; 1191 1209 ret = platform_driver_register(&bfin_serial_driver); 1192 1210 if (ret) { 1193 1211 pr_debug("uart register failed\n");
+6
include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
··· 53 53 #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 54 54 #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 55 55 56 + #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 57 + #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 58 + #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 59 + #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 60 + #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 61 + 56 62 #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 57 63 # define CONFIG_SERIAL_BFIN_CTSRTS 58 64
+6
include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
··· 53 53 #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 54 54 #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 55 55 56 + #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 57 + #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 58 + #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 59 + #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 60 + #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 61 + 56 62 #ifdef CONFIG_BFIN_UART0_CTSRTS 57 63 # define CONFIG_SERIAL_BFIN_CTSRTS 58 64 # ifndef CONFIG_UART0_CTS_PIN
+6
include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
··· 53 53 #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 54 54 #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 55 55 56 + #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 57 + #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 58 + #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 59 + #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 60 + #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 61 + 56 62 #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 57 63 # define CONFIG_SERIAL_BFIN_CTSRTS 58 64
+6
include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
··· 57 57 #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ 58 58 #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ 59 59 60 + #define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS) 61 + #define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS)) 62 + #define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS)) 63 + #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v) 64 + #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF) 65 + 60 66 #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 61 67 # define CONFIG_SERIAL_BFIN_CTSRTS 62 68
+6
include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
··· 53 53 #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 54 54 #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 55 55 56 + #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 57 + #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 58 + #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 59 + #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 60 + #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 61 + 56 62 #ifdef CONFIG_BFIN_UART0_CTSRTS 57 63 # define CONFIG_SERIAL_BFIN_CTSRTS 58 64 # ifndef CONFIG_UART0_CTS_PIN