rc2014 sio: Fix incorrect calculation causing junk and bad sio setup
authorAlan Cox <alan@linux.intel.com>
Sun, 6 Jan 2019 21:17:20 +0000 (21:17 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 6 Jan 2019 21:17:20 +0000 (21:17 +0000)
Kernel/platform-rc2014-tiny/devtty.c
Kernel/platform-rc2014/devtty.c
Kernel/platform-sc108/devtty.c

index e73e2c6..eca0f0a 100644 (file)
@@ -66,7 +66,7 @@ void tty_setup(uint8_t minor, uint8_t flags)
 {
        if (ser_type == 1) {
                sio2_setup(minor, flags);
-               sio2_otir(SIO0_BASE + 2 * minor);
+               sio2_otir(SIO0_BASE + 2 * (minor - 1));
                /* We need to do CTS/RTS support and baud setting on channel 2
                   yet */
        }
index af89715..25e6c90 100644 (file)
@@ -68,7 +68,7 @@ void tty_setup(uint8_t minor, uint8_t flags)
 {
        if (ser_type == 1) {
                sio2_setup(minor, flags);
-               sio2_otir(SIO0_BASE + 2 * minor);
+               sio2_otir(SIO0_BASE + 2 * (minor - 1));
                /* We need to do CTS/RTS support and baud setting on channel 2
                   yet */
        }
index e50d128..abf995e 100644 (file)
@@ -66,7 +66,7 @@ void tty_setup(uint8_t minor, uint8_t flags)
 {
        if (ser_type == 1) {
                sio2_setup(minor, flags);
-               sio2_otir(SIO0_BASE + 2 * minor);
+               sio2_otir(SIO0_BASE + 2 * (minor - 1));
                /* We need to do CTS/RTS support and baud setting on channel 2
                   yet */
        }