aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 19:16:31 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 19:16:31 -0400
commit902233ee494f9d9da6dbb818316fcbf892bebbed (patch)
treeb3fcfbd1c757851a562ef0921cab4e1b3e2d9f19 /drivers
parente871e3c268a26c35ad805196a01d84a55bb755c6 (diff)
parentc5760abde715dcd9ead66769e45d1896332e9d9c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits) Blackfin SMC91X ethernet supporting driver: SMC91C111 LEDs are note drived in the kernel like in uboot Blackfin SPI driver: fix bug SPI DMA incomplete transmission Blackfin SPI driver: tweak spi cleanup function to match newer kernel changes Blackfin RTC drivers: update MAINTAINERS information Blackfin serial driver: decouple PARODD and CMSPAR checking from PARENB Blackfin serial driver: actually implement the break_ctl() function Blackfin serial driver: ignore framing and parity errors Blackfin serial driver: hook up our UARTs STP bit with userspaces CMSPAR Blackfin arch: move HI/LO macros into blackfin.h and punt the rest of macros.h as it includes VDSP macros we never use Blackfin arch: redo our linker script a bit Blackfin arch: make sure we initialize our L1 Data B section properly based on the linked kernel Blackfin arch: fix bug can not wakeup from sleep via push buttons Blackfin arch: add support for Alon Bar-Lev's dynamic kernel command-line Blackfin arch: add missing gpio.h header to fix compiling in some pm configurations Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1 Blackfin arch: fix spelling typo in output Blackfin arch: try to split up functions like this into smaller units according to LKML review Blackfin arch: add proper ENDPROC() Blackfin arch: move more of our startup code to .init so it can be freed once we are up and running Blackfin arch: unify differences between our diff head.S files -- no functional changes ...
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}