summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 16:16:31 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 16:16:31 -0700
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 @@
#elif defined(CONFIG_BFIN)
#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH
+#define RPC_LSA_DEFAULT RPC_LED_100_10
+#define RPC_LSB_DEFAULT RPC_LED_TX_RX
# if defined (CONFIG_BFIN561_EZKIT)
#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)
uart->port.icount.brk++;
if (uart_handle_break(&uart->port))
goto ignore_char;
+ status &= ~(PE | FE);
}
if (status & PE)
uart->port.icount.parity++;
@@ -341,6 +342,7 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
uart->port.icount.brk++;
if (uart_handle_break(&uart->port))
goto dma_ignore_char;
+ status &= ~(PE | FE);
}
if (status & PE)
uart->port.icount.parity++;
@@ -517,6 +519,14 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
*/
static void bfin_serial_break_ctl(struct uart_port *port, int break_state)
{
+ struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
+ u16 lcr = UART_GET_LCR(uart);
+ if (break_state)
+ lcr |= SB;
+ else
+ lcr &= ~SB;
+ UART_PUT_LCR(uart, lcr);
+ SSYNC();
}
static int bfin_serial_startup(struct uart_port *port)
@@ -625,11 +635,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
if (termios->c_cflag & CSTOPB)
lcr |= STB;
- if (termios->c_cflag & PARENB) {
+ if (termios->c_cflag & PARENB)
lcr |= PEN;
- if (!(termios->c_cflag & PARODD))
- lcr |= EPS;
- }
+ if (!(termios->c_cflag & PARODD))
+ lcr |= EPS;
+ if (termios->c_cflag & CMSPAR)
+ lcr |= STP;
port->read_status_mask = OE;
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)
dev_dbg(&drv_data->pdev->dev, "in dma_irq_handler\n");
clear_dma_irqstat(CH_SPI);
+ /* Wait for DMA to complete */
+ while (get_dma_curr_irqstat(CH_SPI) & DMA_RUN)
+ continue;
+
/*
- * wait for the last transaction shifted out. yes, these two
- * while loops are supposed to be the same (see the HRM).
+ * wait for the last transaction shifted out. HRM states:
+ * at this point there may still be data in the SPI DMA FIFO waiting
+ * to be transmitted ... software needs to poll TXS in the SPI_STAT
+ * register until it goes low for 2 successive reads
*/
if (drv_data->tx != NULL) {
- while (bfin_read_SPI_STAT() & TXS)
- continue;
- while (bfin_read_SPI_STAT() & TXS)
+ while ((bfin_read_SPI_STAT() & TXS) ||
+ (bfin_read_SPI_STAT() & TXS))
continue;
}
@@ -1082,7 +1087,7 @@ static int setup(struct spi_device *spi)
*/
static void cleanup(struct spi_device *spi)
{
- struct chip_data *chip = spi_get_ctldata((struct spi_device *)spi);
+ struct chip_data *chip = spi_get_ctldata(spi);
kfree(chip);
}