From: Alan Cox Date: Sun, 6 Jan 2019 21:17:20 +0000 (+0000) Subject: rc2014 sio: Fix incorrect calculation causing junk and bad sio setup X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=58d93e5473da7396ea3d309445d46ff6c355287e;p=FUZIX.git rc2014 sio: Fix incorrect calculation causing junk and bad sio setup --- diff --git a/Kernel/platform-rc2014-tiny/devtty.c b/Kernel/platform-rc2014-tiny/devtty.c index e73e2c62..eca0f0a8 100644 --- a/Kernel/platform-rc2014-tiny/devtty.c +++ b/Kernel/platform-rc2014-tiny/devtty.c @@ -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 */ } diff --git a/Kernel/platform-rc2014/devtty.c b/Kernel/platform-rc2014/devtty.c index af897152..25e6c904 100644 --- a/Kernel/platform-rc2014/devtty.c +++ b/Kernel/platform-rc2014/devtty.c @@ -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 */ } diff --git a/Kernel/platform-sc108/devtty.c b/Kernel/platform-sc108/devtty.c index e50d1287..abf995ee 100644 --- a/Kernel/platform-sc108/devtty.c +++ b/Kernel/platform-sc108/devtty.c @@ -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 */ }