Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354747
b: refs/heads/master
c: 5425e03
h: refs/heads/master
i:
  354745: be4e938
  354743: 67bd659
v: v3
  • Loading branch information
Barry Song authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent ed0b0b9 commit 1abff85
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92b336f6af9aafddda9e81c0c66c36e61cf2dc47
refs/heads/master: 5425e03f97d1e5847372aae0b895d8d1c9bf2741
19 changes: 19 additions & 0 deletions trunk/drivers/tty/serial/sirfsoc_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ static struct sirfsoc_uart_port sirfsoc_uart_ports[SIRFSOC_UART_NR] = {
.line = 2,
},
},
[3] = {
.port = {
.iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF,
.line = 3,
},
},
[4] = {
.port = {
.iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF,
.line = 4,
},
},
};

static inline struct sirfsoc_uart_port *to_sirfport(struct uart_port *port)
Expand Down Expand Up @@ -245,6 +259,7 @@ static irqreturn_t sirfsoc_uart_isr(int irq, void *dev_id)
struct uart_port *port = &sirfport->port;
struct uart_state *state = port->state;
struct circ_buf *xmit = &port->state->xmit;
spin_lock(&port->lock);
intr_status = rd_regl(port, SIRFUART_INT_STATUS);
wr_regl(port, SIRFUART_INT_STATUS, intr_status);
intr_status &= rd_regl(port, SIRFUART_INT_EN);
Expand All @@ -254,6 +269,7 @@ static irqreturn_t sirfsoc_uart_isr(int irq, void *dev_id)
goto recv_char;
uart_insert_char(port, intr_status,
SIRFUART_RX_OFLOW, 0, TTY_BREAK);
spin_unlock(&port->lock);
return IRQ_HANDLED;
}
if (intr_status & SIRFUART_RX_OFLOW)
Expand Down Expand Up @@ -286,6 +302,7 @@ static irqreturn_t sirfsoc_uart_isr(int irq, void *dev_id)
sirfsoc_uart_pio_rx_chars(port, SIRFSOC_UART_IO_RX_MAX_CNT);
if (intr_status & SIRFUART_TX_INT_EN) {
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
spin_unlock(&port->lock);
return IRQ_HANDLED;
} else {
sirfsoc_uart_pio_tx_chars(sirfport,
Expand All @@ -296,6 +313,7 @@ static irqreturn_t sirfsoc_uart_isr(int irq, void *dev_id)
sirfsoc_uart_stop_tx(port);
}
}
spin_unlock(&port->lock);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -729,6 +747,7 @@ static int sirfsoc_uart_resume(struct platform_device *pdev)

static struct of_device_id sirfsoc_uart_ids[] = {
{ .compatible = "sirf,prima2-uart", },
{ .compatible = "sirf,marco-uart", },
{}
};
MODULE_DEVICE_TABLE(of, sirfsoc_serial_of_match);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/tty/serial/sirfsoc_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
#define SIRFSOC_UART_MINOR 0
#define SIRFUART_PORT_NAME "sirfsoc-uart"
#define SIRFUART_MAP_SIZE 0x200
#define SIRFSOC_UART_NR 3
#define SIRFSOC_UART_NR 5
#define SIRFSOC_PORT_TYPE 0xa5

/* Baud Rate Calculation */
Expand Down

0 comments on commit 1abff85

Please sign in to comment.