Commit d5301a0e authored by Linus Torvalds's avatar Linus Torvalds

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.
parents cc55875e 3b8458a9
...@@ -67,7 +67,7 @@ void __init trap_init(void) ...@@ -67,7 +67,7 @@ void __init trap_init(void)
CSYNC(); CSYNC();
} }
void *saved_icplb_fault_addr, *saved_dcplb_fault_addr; unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr;
int kstack_depth_to_print = 48; int kstack_depth_to_print = 48;
...@@ -366,7 +366,7 @@ asmlinkage void trap_c(struct pt_regs *fp) ...@@ -366,7 +366,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
info.si_code = ILL_CPLB_MULHIT; info.si_code = ILL_CPLB_MULHIT;
sig = SIGSEGV; sig = SIGSEGV;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START) if (saved_dcplb_fault_addr < FIXED_CODE_START)
printk(KERN_NOTICE "NULL pointer access\n"); printk(KERN_NOTICE "NULL pointer access\n");
else else
#endif #endif
...@@ -421,7 +421,7 @@ asmlinkage void trap_c(struct pt_regs *fp) ...@@ -421,7 +421,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
info.si_code = ILL_CPLB_MULHIT; info.si_code = ILL_CPLB_MULHIT;
sig = SIGSEGV; sig = SIGSEGV;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
if (saved_icplb_fault_addr < (void *)FIXED_CODE_START) if (saved_icplb_fault_addr < FIXED_CODE_START)
printk(KERN_NOTICE "Jump to NULL address\n"); printk(KERN_NOTICE "Jump to NULL address\n");
else else
#endif #endif
...@@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) ...@@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
oops_in_progress = 1; oops_in_progress = 1;
printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr);
printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr);
dump_bfin_process(fp); dump_bfin_process(fp);
dump_bfin_mem(fp); dump_bfin_mem(fp);
show_regs(fp); show_regs(fp);
......
...@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = { ...@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
...@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -1018,10 +1016,7 @@ static int __init stamp_init(void) ...@@ -1018,10 +1016,7 @@ static int __init stamp_init(void)
#endif #endif
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = { ...@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -425,9 +423,7 @@ static int __init ezkit_init(void) ...@@ -425,9 +423,7 @@ static int __init ezkit_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = { ...@@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -626,10 +624,8 @@ static int __init stamp_init(void) ...@@ -626,10 +624,8 @@ static int __init stamp_init(void)
SSYNC(); SSYNC();
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
#endif #endif
......
...@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = { ...@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
...@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -939,10 +937,7 @@ static int __init stamp_init(void) ...@@ -939,10 +937,7 @@ static int __init stamp_init(void)
#endif #endif
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = { ...@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (m25p16) */ /* SPI flash chip (m25p16) */
...@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { ...@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
}; };
#endif #endif
static struct spi_board_info bf54x_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
{ {
...@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { ...@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -800,10 +799,7 @@ static int __init ezkit_init(void) ...@@ -800,10 +799,7 @@ static int __init ezkit_init(void)
platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bf54x_spi_board_info,
ARRAY_SIZE(bf54x_spi_board_info));
#endif
return 0; return 0;
} }
......
...@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = { ...@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#ifdef CONFIG_SPI_BFIN
#if defined(CONFIG_SND_BLACKFIN_AD1836) \ #if defined(CONFIG_SND_BLACKFIN_AD1836) \
|| defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = { static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
...@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = { ...@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
.bits_per_word = 8, .bits_per_word = 8,
}; };
#endif #endif
#endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = {
.platform_data = &bfin_spi0_info, /* Passed to driver */ .platform_data = &bfin_spi0_info, /* Passed to driver */
}, },
}; };
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_SND_BLACKFIN_AD1836) \ #if defined(CONFIG_SND_BLACKFIN_AD1836) \
...@@ -537,10 +537,7 @@ static int __init ezkit_init(void) ...@@ -537,10 +537,7 @@ static int __init ezkit_init(void)
SSYNC(); SSYNC();
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -530,11 +530,7 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port) ...@@ -530,11 +530,7 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
if (uart->cts_pin < 0) if (uart->cts_pin < 0)
return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
# ifdef BF54x if (UART_GET_CTS(uart))
if (UART_GET_MSR(uart) & CTS)
# else
if (gpio_get_value(uart->cts_pin))
# endif
return TIOCM_DSR | TIOCM_CAR; return TIOCM_DSR | TIOCM_CAR;
else else
#endif #endif
...@@ -549,17 +545,9 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) ...@@ -549,17 +545,9 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
return; return;
if (mctrl & TIOCM_RTS) if (mctrl & TIOCM_RTS)
# ifdef BF54x UART_CLEAR_RTS(uart);
UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS);
# else
gpio_set_value(uart->rts_pin, 0);
# endif
else else
# ifdef BF54x UART_SET_RTS(uart);
UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS);
# else
gpio_set_value(uart->rts_pin, 1);
# endif
#endif #endif
} }
...@@ -752,11 +740,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -752,11 +740,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
/* Disable UART */ /* Disable UART */
ier = UART_GET_IER(uart); ier = UART_GET_IER(uart);
#ifdef CONFIG_BF54x UART_DISABLE_INTS(uart);
UART_CLEAR_IER(uart, 0xF);
#else
UART_PUT_IER(uart, 0);
#endif
/* Set DLAB in LCR to Access DLL and DLH */ /* Set DLAB in LCR to Access DLL and DLH */
UART_SET_DLAB(uart); UART_SET_DLAB(uart);
...@@ -771,11 +755,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -771,11 +755,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
UART_PUT_LCR(uart, lcr); UART_PUT_LCR(uart, lcr);
/* Enable UART */ /* Enable UART */
#ifdef CONFIG_BF54x UART_ENABLE_INTS(uart, ier);
UART_SET_IER(uart, ier);
#else
UART_PUT_IER(uart, ier);
#endif
val = UART_GET_GCTL(uart); val = UART_GET_GCTL(uart);
val |= UCEN; val |= UCEN;
...@@ -833,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser) ...@@ -833,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
* Enable the IrDA function if tty->ldisc.num is N_IRDA. * Enable the IrDA function if tty->ldisc.num is N_IRDA.
* In other cases, disable IrDA function. * In other cases, disable IrDA function.
*/ */
static void bfin_set_ldisc(struct tty_struct *tty) static void bfin_serial_set_ldisc(struct uart_port *port)
{ {
int line = tty->index; int line = port->line;
unsigned short val; unsigned short val;
if (line >= tty->driver->num) if (line >= port->info->tty->driver->num)
return; return;
switch (tty->ldisc.num) { switch (port->info->tty->ldisc.num) {
case N_IRDA: case N_IRDA:
val = UART_GET_GCTL(&bfin_serial_ports[line]); val = UART_GET_GCTL(&bfin_serial_ports[line]);
val |= (IREN | RPOLC); val |= (IREN | RPOLC);
...@@ -866,6 +846,7 @@ static struct uart_ops bfin_serial_pops = { ...@@ -866,6 +846,7 @@ static struct uart_ops bfin_serial_pops = {
.startup = bfin_serial_startup, .startup = bfin_serial_startup,
.shutdown = bfin_serial_shutdown, .shutdown = bfin_serial_shutdown,
.set_termios = bfin_serial_set_termios, .set_termios = bfin_serial_set_termios,
.set_ldisc = bfin_serial_set_ldisc,
.type = bfin_serial_type, .type = bfin_serial_type,
.release_port = bfin_serial_release_port, .release_port = bfin_serial_release_port,
.request_port = bfin_serial_request_port, .request_port = bfin_serial_request_port,
...@@ -1206,7 +1187,6 @@ static int __init bfin_serial_init(void) ...@@ -1206,7 +1187,6 @@ static int __init bfin_serial_init(void)
ret = uart_register_driver(&bfin_serial_reg); ret = uart_register_driver(&bfin_serial_reg);
if (ret == 0) { if (ret == 0) {
bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc;
ret = platform_driver_register(&bfin_serial_driver); ret = platform_driver_register(&bfin_serial_driver);
if (ret) { if (ret) {
pr_debug("uart register failed\n"); pr_debug("uart register failed\n");
......
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
# define CONFIG_SERIAL_BFIN_CTSRTS # define CONFIG_SERIAL_BFIN_CTSRTS
......
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
#ifdef CONFIG_BFIN_UART0_CTSRTS #ifdef CONFIG_BFIN_UART0_CTSRTS
# define CONFIG_SERIAL_BFIN_CTSRTS # define CONFIG_SERIAL_BFIN_CTSRTS
# ifndef CONFIG_UART0_CTS_PIN # ifndef CONFIG_UART0_CTS_PIN
......
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
# define CONFIG_SERIAL_BFIN_CTSRTS # define CONFIG_SERIAL_BFIN_CTSRTS
......
...@@ -57,6 +57,12 @@ ...@@ -57,6 +57,12 @@
#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
# define CONFIG_SERIAL_BFIN_CTSRTS # define CONFIG_SERIAL_BFIN_CTSRTS
......
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
#ifdef CONFIG_BFIN_UART0_CTSRTS #ifdef CONFIG_BFIN_UART0_CTSRTS
# define CONFIG_SERIAL_BFIN_CTSRTS # define CONFIG_SERIAL_BFIN_CTSRTS
# ifndef CONFIG_UART0_CTS_PIN # ifndef CONFIG_UART0_CTS_PIN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment