@@ -49,6 +49,8 @@
struct davinci_uart_config {
/* Bit field of UARTs present; bit 0 --> UART1 */
unsigned int enabled_uarts;
+ /* Bit field of RTS/CTS disable; bit 0 --> UART1 */
+ unsigned int disable_rtscts;
};
extern int davinci_serial_init(struct davinci_uart_config *);
@@ -31,6 +31,22 @@
#include <mach/serial.h>
#include <mach/cputype.h>
+static void davinci_set_termios_noms(struct uart_port *up,
+ struct ktermios *new,
+ struct ktermios *old)
+{
+ /*
+ * disabling CLOCAL, or enabling CRTSCTS, will enable the modem status
+ * interrupts. If this routine is being called, the port in question
+ * does not have valid CTS/RTS pins (they are pinmuxed to some other
+ * function). Override any requested operation that may enable the
+ * interrupts.
+ */
+ new->c_cflag &= ~CRTSCTS;
+ new->c_cflag |= CLOCAL;
+ serial8250_do_set_termios(up, new, old);
+}
+
static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
int offset)
{
@@ -109,6 +125,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info)
if (p->membase && p->type != PORT_AR7)
davinci_serial_reset(p);
+
+ if (info->disable_rtscts & (1 << i))
+ p->set_termios = davinci_set_termios_noms;
}
return platform_device_register(soc_info->serial_dev);