From: SUGIOKA T. <su...@it...> - 2000-09-04 11:15:14
|
Index: ChangeLog =================================================================== RCS file: /cvsroot/linuxsh/kernel/ChangeLog,v retrieving revision 1.90 diff -u -r1.90 ChangeLog --- ChangeLog 2000/09/04 00:42:16 1.90 +++ ChangeLog 2000/09/04 11:08:42 @@ -1,3 +1,9 @@ +2000-09-04 SUGIOKA Toshinobu <su...@it...> + + * drivers/char/sh-sci.h (SCIF_ORER): Added. + * drivers/char/sh-sci.c (sci_er_interrupt): Handle overrun error for SH-4 SCIF. + (sci_set_baud): Set SCSMR bit0,1(clock select) every time. + 2000-09-04 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/cache.c (cache_init): Re-initialize the cache system, Index: drivers/char/sh-sci.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/char/sh-sci.c,v retrieving revision 1.19 diff -u -r1.19 sh-sci.c --- drivers/char/sh-sci.c 2000/08/28 08:49:36 1.19 +++ drivers/char/sh-sci.c 2000/09/04 10:50:05 @@ -344,6 +344,8 @@ if(t >= 256) { sci_out(port, SCSMR, (sci_in(port, SCSMR) & ~3) | 1); t >>= 2; + } else { + sci_out(port, SCSMR, sci_in(port, SCSMR) & ~3); } sci_out(port, SCBRR, t); udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */ @@ -582,6 +584,12 @@ /* Handle errors */ if (sci_in(port, SCxSR) & SCxSR_ERRORS(port)) sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port)); + +#if defined(CONFIG_CPU_SUBTYPE_SH7750) + /* Handle SCIF overrun error */ + if (port->type == PORT_SCIF && (ctrl_inw(SCLSR2) & SCIF_ORER) != 0) + ctrl_outw(0, SCLSR2); +#endif /* Kick the transmission */ sci_tx_interrupt(irq, ptr, regs); Index: drivers/char/sh-sci.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/char/sh-sci.h,v retrieving revision 1.15 diff -u -r1.15 sh-sci.h --- drivers/char/sh-sci.h 2000/08/28 08:49:36 1.15 +++ drivers/char/sh-sci.h 2000/09/04 10:50:06 @@ -54,6 +54,7 @@ # define SCSPTR1 0xffe0001c /* 8 bit SCI */ # define SCSPTR2 0xFFE80020 /* 16 bit SCIF */ # define SCLSR2 0xFFE80024 /* 16 bit SCIF */ +# define SCIF_ORER 0x0001 /* overrun error bit */ # define SCSCR_INIT(port) (((port)->type == PORT_SCI) ? \ 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \ 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ ) ---- SUGIOKA Toshinobu |