aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/smc91x.h2
-rw-r--r--drivers/serial/bfin_5xx.c19
-rw-r--r--drivers/spi/spi_bfin5xx.c17
3 files changed, 28 insertions, 10 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 506bffcbc6dc..f8429449dc1e 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -58,6 +58,8 @@
58#elif defined(CONFIG_BFIN) 58#elif defined(CONFIG_BFIN)
59 59
60#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH 60#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH
61#define RPC_LSA_DEFAULT RPC_LED_100_10
62#define RPC_LSB_DEFAULT RPC_LED_TX_RX
61 63
62# if defined (CONFIG_BFIN561_EZKIT) 64# if defined (CONFIG_BFIN561_EZKIT)
63#define SMC_CAN_USE_8BIT 0 65#define SMC_CAN_USE_8BIT 0
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 787dc7168f3e..22569bd5d821 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -185,6 +185,7 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
185 uart->port.icount.brk++; 185 uart->port.icount.brk++;
186 if (uart_handle_break(&uart->port)) 186 if (uart_handle_break(&uart->port))
187 goto ignore_char; 187 goto ignore_char;
188 status &= ~(PE | FE);
188 } 189 }
189 if (status & PE) 190 if (status & PE)
190 uart->port.icount.parity++; 191 uart->port.icount.parity++;
@@ -341,6 +342,7 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
341 uart->port.icount.brk++; 342 uart->port.icount.brk++;
342 if (uart_handle_break(&uart->port)) 343 if (uart_handle_break(&uart->port))
343 goto dma_ignore_char; 344 goto dma_ignore_char;
345 status &= ~(PE | FE);
344 } 346 }
345 if (status & PE) 347 if (status & PE)
346 uart->port.icount.parity++; 348 uart->port.icount.parity++;
@@ -517,6 +519,14 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
517 */ 519 */
518static void bfin_serial_break_ctl(struct uart_port *port, int break_state) 520static void bfin_serial_break_ctl(struct uart_port *port, int break_state)
519{ 521{
522 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
523 u16 lcr = UART_GET_LCR(uart);
524 if (break_state)
525 lcr |= SB;
526 else
527 lcr &= ~SB;
528 UART_PUT_LCR(uart, lcr);
529 SSYNC();
520} 530}
521 531
522static int bfin_serial_startup(struct uart_port *port) 532static int bfin_serial_startup(struct uart_port *port)
@@ -625,11 +635,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
625 635
626 if (termios->c_cflag & CSTOPB) 636 if (termios->c_cflag & CSTOPB)
627 lcr |= STB; 637 lcr |= STB;
628 if (termios->c_cflag & PARENB) { 638 if (termios->c_cflag & PARENB)
629 lcr |= PEN; 639 lcr |= PEN;
630 if (!(termios->c_cflag & PARODD)) 640 if (!(termios->c_cflag & PARODD))
631 lcr |= EPS; 641 lcr |= EPS;
632 } 642 if (termios->c_cflag & CMSPAR)
643 lcr |= STP;
633 644
634 port->read_status_mask = OE; 645 port->read_status_mask = OE;
635 if (termios->c_iflag & INPCK) 646 if (termios->c_iflag & INPCK)
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 7d2d9ec6cac3..48587c27050d 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -582,14 +582,19 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
582 dev_dbg(&drv_data->pdev->dev, "in dma_irq_handler\n"); 582 dev_dbg(&drv_data->pdev->dev, "in dma_irq_handler\n");
583 clear_dma_irqstat(CH_SPI); 583 clear_dma_irqstat(CH_SPI);
584 584
585 /* Wait for DMA to complete */
586 while (get_dma_curr_irqstat(CH_SPI) & DMA_RUN)
587 continue;
588
585 /* 589 /*
586 * wait for the last transaction shifted out. yes, these two 590 * wait for the last transaction shifted out. HRM states:
587 * while loops are supposed to be the same (see the HRM). 591 * at this point there may still be data in the SPI DMA FIFO waiting
592 * to be transmitted ... software needs to poll TXS in the SPI_STAT
593 * register until it goes low for 2 successive reads
588 */ 594 */
589 if (drv_data->tx != NULL) { 595 if (drv_data->tx != NULL) {
590 while (bfin_read_SPI_STAT() & TXS) 596 while ((bfin_read_SPI_STAT() & TXS) ||
591 continue; 597 (bfin_read_SPI_STAT() & TXS))
592 while (bfin_read_SPI_STAT() & TXS)
593 continue; 598 continue;
594 } 599 }
595 600
@@ -1082,7 +1087,7 @@ static int setup(struct spi_device *spi)
1082 */ 1087 */
1083static void cleanup(struct spi_device *spi) 1088static void cleanup(struct spi_device *spi)
1084{ 1089{
1085 struct chip_data *chip = spi_get_ctldata((struct spi_device *)spi); 1090 struct chip_data *chip = spi_get_ctldata(spi);
1086 1091
1087 kfree(chip); 1092 kfree(chip);
1088} 1093}