+static void serial_mem_hardware_init(int port, int speed, int word_bits, int parity, int stop_bits)
+{
+ unsigned char reg;
+
+ /* We will assume 8n1 for now. Does anyone use anything else these days? */
+
+ /* Disable interrupts. */
+ writeb(0, MEMBASE + 0x01);
+
+ /* Assert RTS and DTR. */
+ writeb(3, MEMBASE + 0x04);
+
+ /* Set the divisor latch. */
+ reg = readb(MEMBASE + 0x03);
+ writeb(reg | 0x80, MEMBASE + 0x03);
+
+ /* Write the divisor. */
+ writeb(DIVISOR(speed) & 0xFF, MEMBASE);
+ writeb(DIVISOR(speed) >> 8 & 0xFF, MEMBASE + 1);
+
+ /* Restore the previous value of the divisor. */
+ writeb(reg & ~0x80, MEMBASE + 0x03);
+}
+#endif
+