@@ -49,6 +49,8 @@
struct davinci_uart_config {
/* Bit field of UARTs present; bit 0 --> UART1 */
unsigned int enabled_uarts;
+ /* Bit field of modem status interrupt disables; bit 0 -> UART1 */
+ unsigned int disable_msi;
};
extern int davinci_serial_init(struct davinci_uart_config *);
@@ -31,6 +31,22 @@
#include <mach/serial.h>
#include <mach/cputype.h>
+static void davinci_serial_out_nomsi(struct uart_port *p, int offset, int value)
+{
+ int lcr, lcr_off;
+
+ if (offset == UART_IER) {
+ lcr_off = UART_LCR << p->regshift;
+ lcr = readb(p->membase + lcr_off);
+ /* don't override DLM setting, or probing operations */
+ if (!(lcr & UART_LCR_DLAB) && p->type != PORT_UNKNOWN)
+ value &= ~UART_IER_MSI;
+ }
+
+ offset <<= p->regshift;
+ writeb(value, p->membase + offset);
+}
+
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_msi & (1 << i))
+ p->serial_out = davinci_serial_out_nomsi;
}
return platform_device_register(soc_info->serial_dev);