* [patch] sb1250 serial patch
@ 2006-01-17 20:05 Mark Mason
2006-01-19 0:45 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Mark Mason @ 2006-01-17 20:05 UTC (permalink / raw)
To: linux-mips
Hello all,
The recent git import changed some of the tty datastructures, and subsequently broke the special sb1250 serial driver. This patch fixes that broken-ness, and cleans up some compilation warnings as well.
Please apply - Thanks.
[Yes - the driver needs a rewrite. It's on our to-do list. Really. I promise...]
Mark
diff --git a/drivers/char/sb1250_duart.c b/drivers/char/sb1250_duart.c
--- a/drivers/char/sb1250_duart.c
+++ b/drivers/char/sb1250_duart.c
@@ -105,14 +105,14 @@ typedef struct {
unsigned long flags;
struct tty_struct *tty;
/* CSR addresses */
- u32 *status;
- u32 *imr;
- u32 *tx_hold;
- u32 *rx_hold;
- u32 *mode_1;
- u32 *mode_2;
- u32 *clk_sel;
- u32 *cmd;
+ volatile u32 *status;
+ volatile u32 *imr;
+ volatile u32 *tx_hold;
+ volatile u32 *rx_hold;
+ volatile u32 *mode_1;
+ volatile u32 *mode_2;
+ volatile u32 *clk_sel;
+ volatile u32 *cmd;
} uart_state_t;
static uart_state_t uart_states[DUART_MAX_LINE];
@@ -130,7 +130,7 @@ static uart_state_t uart_states[DUART_MA
static unsigned int last_mode1[DUART_MAX_LINE];
#endif
-static inline u32 READ_SERCSR(u32 *addr, int line)
+static inline u32 READ_SERCSR(volatile u32 *addr, int line)
{
u32 val = csr_in32(addr);
#if SIBYTE_1956_WAR
@@ -139,7 +139,7 @@ static inline u32 READ_SERCSR(u32 *addr,
return val;
}
-static inline void WRITE_SERCSR(u32 val, u32 *addr, int line)
+static inline void WRITE_SERCSR(u32 val, volatile u32 *addr, int line)
{
csr_out32(val, addr);
#if SIBYTE_1956_WAR
@@ -258,11 +258,7 @@ static irqreturn_t duart_int(int irq, vo
if (!(READ_SERCSR(us->status, us->line) & M_DUART_RX_RDY))
break;
ch = READ_SERCSR(us->rx_hold, us->line);
- if (tty->flip.count < TTY_FLIPBUF_SIZE) {
- *tty->flip.char_buf_ptr++ = ch;
- *tty->flip.flag_buf_ptr++ = 0;
- tty->flip.count++;
- }
+ tty_insert_flip_char(tty, ch, 0);
udelay(1);
counter--;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] sb1250 serial patch
2006-01-17 20:05 [patch] sb1250 serial patch Mark Mason
@ 2006-01-19 0:45 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2006-01-19 0:45 UTC (permalink / raw)
To: Mark Mason; +Cc: linux-mips
On Tue, Jan 17, 2006 at 12:05:25PM -0800, Mark Mason wrote:
> [Yes - the driver needs a rewrite. It's on our to-do list. Really. I promise...]
Will apply.
Until that rewrite happens the Broadcom support in kernel.org kernels
won't be useful ...
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-19 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-17 20:05 [patch] sb1250 serial patch Mark Mason
2006-01-19 0:45 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox