rc2014-sbc64: align types and fix a Makefile ordering bug
authorAlan Cox <alan@linux.intel.com>
Thu, 14 Mar 2019 14:09:50 +0000 (14:09 +0000)
committerAlan Cox <alan@linux.intel.com>
Thu, 14 Mar 2019 14:10:02 +0000 (14:10 +0000)
We need boot to be built to generate loader.inc, not to depend on boot.s

Kernel/platform-rc2014-sbc64/Makefile
Kernel/platform-rc2014-sbc64/devtty.c
Kernel/platform-rc2014-sbc64/devtty.h

index d27ae68..8c1cb0f 100644 (file)
@@ -62,4 +62,4 @@ loader:       loader.s loader.inc
        sdasz80 -o loader.s
        sdldz80 -i loader.rel
 
-loader.inc: boot.s
+loader.inc: boot
index 893236d..119e1b7 100644 (file)
@@ -9,11 +9,11 @@
 __sfr __at 0xf8 cpld_status;
 __sfr __at 0xf9 cpld_data;
 
-static char tbuf1[TTYSIZ];
-static char tbuf2[TTYSIZ];
-static char tbuf3[TTYSIZ];
-static char tbuf4[TTYSIZ];
-static char tbuf5[TTYSIZ];
+static uint8_t tbuf1[TTYSIZ];
+static uint8_t tbuf2[TTYSIZ];
+static uint8_t tbuf3[TTYSIZ];
+static uint8_t tbuf4[TTYSIZ];
+static uint8_t tbuf5[TTYSIZ];
 
 static uint8_t sleeping;
 
@@ -83,7 +83,7 @@ static uint16_t siobaud[] = {
        0x02    /* 115200 */
 };
 
-static void sio2_setup(uint8_t minor, uint8_t flags)
+static void sio2_setup(uint_fast8_t minor, uint_fast8_t flags)
 {
        struct termios *t = &ttydata[minor].termios;
        uint8_t r;
@@ -120,7 +120,7 @@ static void sio2_setup(uint8_t minor, uint8_t flags)
        sio_r[5] = 0x8A | ((t->c_cflag & CSIZE) << 1);
 }
 
-void tty_setup(uint8_t minor, uint8_t flags)
+void tty_setup(uint_fast8_t minor, uint_fast8_t flags)
 {
        if (minor == 1)
                return;
@@ -142,7 +142,7 @@ void tty_resume(void)
        }
 }
 
-int tty_carrier(uint8_t minor)
+int tty_carrier(uint_fast8_t minor)
 {
         uint8_t c;
         uint8_t port;
@@ -281,7 +281,7 @@ void tty_poll_cpld(void)
                tty_inproc(1, cpld_data);
 }
 
-void tty_putc(uint8_t minor, unsigned char c)
+void tty_putc(uint_fast8_t minor, uint_fast8_t c)
 {
        if (minor == 1) {
                irqflags_t irq = di();
@@ -295,7 +295,7 @@ void tty_putc(uint8_t minor, unsigned char c)
 }
 
 /* We will need this for SIO once we implement flow control signals */
-void tty_sleeping(uint8_t minor)
+void tty_sleeping(uint_fast8_t minor)
 {
        sleeping |= (1 << minor);
 }
@@ -308,7 +308,7 @@ void tty_sleeping(uint8_t minor)
 
    Need to review this we should be ok as the IRQ handler always leaves
    us pointing at RR0 */
-ttyready_t tty_writeready(uint8_t minor)
+ttyready_t tty_writeready(uint_fast8_t minor)
 {
        irqflags_t irq;
        uint8_t c;
@@ -328,13 +328,13 @@ ttyready_t tty_writeready(uint8_t minor)
        return TTY_READY_SOON;
 }
 
-void tty_data_consumed(uint8_t minor)
+void tty_data_consumed(uint_fast8_t minor)
 {
        used(minor);
 }
 
 /* kernel writes to system console -- never sleep! */
-void kputchar(char c)
+void kputchar(uint_fast8_t c)
 {
        /* Always use the bitbang port - no need for write waits therefore */
        if (c == '\n')
@@ -342,7 +342,7 @@ void kputchar(char c)
        tty_putc(TTYDEV - 512, c);
 }
 
-int rctty_open(uint8_t minor, uint16_t flag)
+int rctty_open(uint_fast8_t minor, uint16_t flag)
 {
        if ((minor == 2 || minor == 3) && !sio_present) {
                udata.u_error = ENODEV;
index 2df666f..e7cf9b3 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef __DEVTTY_DOT_H__
 #define __DEVTTY_DOT_H__
 
-void tty_putc(uint8_t minor, unsigned char c);
+void tty_putc(uint_fast8_t minor, uint_fast8_t c);
 void tty_pollirq_sio0(void);
 void tty_pollirq_sio1(void);
 void tty_poll_cpld(void);
-int rctty_open(uint8_t minor, uint16_t flag);
+int rctty_open(uint_fast8_t minor, uint16_t flag);
 
 #endif