This driver supports the console device found on SUN4V Sparc
systems. Say Y if you want to be able to use this device.
+config SERIAL_SUNHV_POLLING
+ bool "Sun4v Hypervisor Console polling support"
+ depends on SERIAL_SUNHV=y
+ help
+ If you would like the sunhv driver to support polling when
+ interrupts are not available you can do so by answering Y
+ to this option.
+
config SERIAL_IP22_ZILOG
tristate "SGI Zilog8530 serial support"
depends on SGI_HAS_ZILOG
static char *con_write_page;
static char *con_read_page;
+#ifdef CONFIG_SERIAL_SUNHV_POLLING
+static struct timer_list con_timer;
+static unsigned long con_interrupt_timeout;
+#endif
+
+
static int hung_up = 0;
static void transmit_chars_putchar(struct uart_port *port, struct circ_buf *xmit)
return IRQ_HANDLED;
}
+#ifdef CONFIG_SERIAL_SUNHV_POLLING
+static void sun4v_timer_poll(unsigned long data)
+{
+ struct uart_port *port = (struct uart_port *)data;
+
+ if (!port)
+ return;
+
+ (void) sunhv_interrupt(0, port);
+ mod_timer(&con_timer, jiffies + con_interrupt_timeout);
+}
+#endif
+
/* port->lock is not held. */
static unsigned int sunhv_tx_empty(struct uart_port *port)
{
if (err)
goto out_remove_port;
+#ifdef CONFIG_SERIAL_SUNHV_POLLING
+ /*
+ * If "qcn" is in compatible then this is running on legion
+ * and probably needs polling.
+ */
+ if (of_device_is_compatible(op->dev.of_node, "qcn")) {
+ printk(KERN_INFO "%s%u: polling\n", sunhv_console.name,
+ port->line);
+ init_timer(&con_timer);
+ con_timer.function = sun4v_timer_poll;
+ con_timer.data = (unsigned long)port;
+ con_interrupt_timeout = 6;
+ mod_timer(&con_timer, jiffies + con_interrupt_timeout);
+ } else {
+ con_interrupt_timeout = 0;
+ }
+#endif
+
platform_set_drvdata(op, port);
return 0;
{
struct uart_port *port = platform_get_drvdata(dev);
+#ifdef CONFIG_SERIAL_SUNHV_POLLING
+ if (con_interrupt_timeout)
+ del_timer_sync(&con_timer);
+#endif
+
free_irq(port->irq, port);
uart_remove_one_port(&sunhv_reg, port);