Skip to contentSkip to conversation

Add support for word-length UART registers.

PATCH In review Deepak Saxena 1 participant 2 messages Sep 9, 2004 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for word-length UART registers.

UARTS on several Intel IXP2000 systems are connected in such a way that they can only be addressed using full word accesses instead of bytes. Following patch adds a UPIO_MEM32 io-type to identify these UARTs.

Please apply,
~Deepak

===== drivers/serial/8250.c 1.57 vs edited =====

drivers/serial/8250.c +7 -0
@@ -187,6 +187,9 @@
 	case UPIO_MEM:
 		return readb(up->port.membase + offset);
 
+	case UPIO_MEM32:
+		return readl(up->port.membase + offset);
+
 	default:
 		return inb(up->port.iobase + offset);
 	}
@@ -205,6 +208,10 @@
 
 	case UPIO_MEM:
 		writeb(value, up->port.membase + offset);
+		break;
+
+	case UPIO_MEM32:
+		writel(value, up->port.membase + offset);
 		break;
 
 	default:

===== drivers/serial/serial_core.c 1.87 vs edited =====

drivers/serial/serial_core.c +1 -0
@@ -1978,6 +1978,7 @@
 		printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
 		break;
 	case UPIO_MEM:
+	case UPIO_MEM32:
 		printk("MMIO 0x%lx", port->mapbase);
 		break;
 	}

===== include/linux/serial_core.h 1.42 vs edited =====

include/linux/serial_core.h +1 -0
@@ -176,6 +176,7 @@
 #define UPIO_PORT		(0)
 #define UPIO_HUB6		(1)
 #define UPIO_MEM		(2)
+#define UPIO_MEM32		(3)
 
 	unsigned int		read_status_mask;	/* driver specific */
 	unsigned int		ignore_status_mask;	/* driver specific */
Signature · 4 lines
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/

"Unlike me, many of you have accepted the situation of your imprisonment
and will die here like rotten cabbages." - Number 6
#1 lore raw

On Sep 09 2004, at 16:19, Deepak Saxena was caught saying:

Quoted 4 lines

UARTS on several Intel IXP2000 systems are connected in such a way that they can only be addressed using full word accesses

s/word/long/ in linux-speak.

~Deepak

Signature · 4 lines
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/

"Unlike me, many of you have accepted the situation of your imprisonment
and will die here like rotten cabbages." - Number 6