serial: sh-sci: modify sci_break_ctl()
Subsystems (2)
PATCH 1/1 serial: sh-sci: modify sci_break_ctl()
SCIF modules which have SCSPTR can output the break signal. This patch supports it.
This patch tested on sh7757lcr.
Signed-off-by Yoshihiro Shimoda <[email protected]>
--- drivers/tty/serial/sh-sci.c | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-)
drivers/tty/serial/sh-sci.c +26 -4
@@ -1567,10 +1567,32 @@ static void sci_enable_ms(struct uart_port *port)static void sci_break_ctl (struct uart_port *port,int break_state) { -/* -* Not supported by hardware. Most parts couple break and rx -* interrupts together, with break detection always enabled. -*/ +struct sci_port *s =to_sci_port (port); +unsigned short scscr, scsptr; + +switch (s->cfg->regtype) { +case SCIx_SH4_SCIF_REGTYPE: + scsptr =sci_in (port,SCSPTR ); + scscr =sci_in (port,SCSCR ); + +if (break_state =-1 ) { + scsptr = (scsptr |SCSPTR_SPB2IO ) & ~SCSPTR_SPB2DT ; + scscr &= ~SCSCR_TE ; + }else { + scsptr = (scsptr |SCSPTR_SPB2DT ) & ~SCSPTR_SPB2IO ; + scscr |=SCSCR_TE ; + } + +sci_out (port,SCSPTR , scsptr); +sci_out (port,SCSCR , scscr); +break ; +default : +/* +* Not supported by hardware. Most parts couple break and rx +* interrupts together, with break detection always enabled. +*/ +break ; + } }#ifdef CONFIG_SERIAL_SH_SCI_DMA
Signature · 1 line
1.7.1
Quoted 9 lines · Yoshihiro
SCIF modules which have SCSPTR can output the break signal. This patch supports it.
This patch tested on sh7757lcr.
Signed-off-by Yoshihiro Shimoda <[email protected]>--- drivers/tty/serial/sh-sci.c | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-)
I would like to cancel this patch because I forgot to add serial_sci.h to the patch.
Best regards,
Yoshihiro Shimoda