@@ -522,10 +522,13 @@ static void sci_init_ctsrts_default(stru
if (!reg->size || hwflow_enabled)
return;
+ /* Setup CTS/RTS in the case hardware flow is disabled by user space.
+ * The CTS signal is setup as input and RTS as output with value 0.
+ */
status = serial_port_in(port, SCSPTR);
- status &= ~SCSPTR_CTSIO;
+ status &= ~(SCSPTR_CTSIO | SCSPTR_RTSDT);
status |= SCSPTR_RTSIO;
- serial_port_out(port, SCSPTR, status); /* Set RTS = 1 */
+ serial_port_out(port, SCSPTR, status); /* Set RTS = 0 */
}
static void sci_init_pins(struct uart_port *port, unsigned int cflag)
@@ -57,6 +57,7 @@
/* SCSPTR (Serial Port Register), optional */
#define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */
+#define SCSPTR_RTSDT (1 << 6) /* Serial Port RTS Pin Data */
#define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */
#define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */
#define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */