From: Will Sowerbutts Date: Mon, 5 Jan 2015 01:28:46 +0000 (+0000) Subject: n8vem-mark4: Tidy up config, make ASCI0 console again, move PropIO X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f227f53ad2b53ed18280ddfcb4dec00917f46ad6;p=FUZIX.git n8vem-mark4: Tidy up config, make ASCI0 console again, move PropIO register definitions into a new n8vem.h header file. --- diff --git a/Kernel/platform-n8vem-mark4/config.h b/Kernel/platform-n8vem-mark4/config.h index 3866b4a7..75cb75b2 100644 --- a/Kernel/platform-n8vem-mark4/config.h +++ b/Kernel/platform-n8vem-mark4/config.h @@ -45,20 +45,22 @@ #define MAX_BLKDEV 3 /* 2 IDE drives, 1 SD drive */ -#define DEVICE_IDE /* enable if IDE interface present */ +/* On-board IDE on Mark IV */ +#define DEVICE_IDE #define IDE_REG_BASE MARK4_IO_BASE #define IDE_8BIT_ONLY #define IDE_REG_CS1_FIRST +/* On-board SD on Mark IV */ #define DEVICE_SD #define SD_DRIVE_COUNT 1 -/* We have a DS1302, we can read the time of day from it */ +/* On-board DS1302 on Mark IV, we can read the time of day from it */ #define CONFIG_RTC #define CONFIG_RTC_INTERVAL 30 /* deciseconds between reading RTC seconds counter */ -/* We have a PropIOv2 board */ -#define CONFIG_PROPIO2 +/* Optional PropIOv2 board on ECB bus */ +//#define CONFIG_PROPIO2 /* #define CONFIG_PROPIO2 to enable as tty3 */ #define PROPIO2_IO_BASE 0xA8 /* Device parameters */ @@ -70,7 +72,7 @@ #else #define NUM_DEV_TTY 2 - /* ANSI0 as the console */ + /* ASCI0 as the console */ #define BOOT_TTY (512 + 1) #endif diff --git a/Kernel/platform-n8vem-mark4/devtty.c b/Kernel/platform-n8vem-mark4/devtty.c index fce0303f..0dcf11c5 100644 --- a/Kernel/platform-n8vem-mark4/devtty.c +++ b/Kernel/platform-n8vem-mark4/devtty.c @@ -4,17 +4,14 @@ #include #include #include -#include "config.h" #include +#include char tbuf1[TTYSIZ]; char tbuf2[TTYSIZ]; #ifdef CONFIG_PROPIO2 char tbufp[TTYSIZ]; - -__sfr __at (PROPIO2_IO_BASE + 0x00) PROPIO2_STAT; -__sfr __at (PROPIO2_IO_BASE + 0x01) PROPIO2_TERM; #endif struct s_queue ttyinq[NUM_DEV_TTY+1] = { /* ttyinq[0] is never used */ @@ -40,16 +37,14 @@ int tty_carrier(uint8_t minor) void tty_pollirq_asci0(void) { - while(ASCI_STAT0 & 0x80){ + while(ASCI_STAT0 & 0x80) tty_inproc(1, ASCI_RDR0); - } } void tty_pollirq_asci1(void) { - while(ASCI_STAT1 & 0x80){ + while(ASCI_STAT1 & 0x80) tty_inproc(2, ASCI_RDR1); - } } #ifdef CONFIG_PROPIO2 diff --git a/Kernel/platform-n8vem-mark4/n8vem.h b/Kernel/platform-n8vem-mark4/n8vem.h new file mode 100644 index 00000000..d2a5d421 --- /dev/null +++ b/Kernel/platform-n8vem-mark4/n8vem.h @@ -0,0 +1,9 @@ +#ifndef __N8VEM_DOT_H__ +#define __N8VEM_DOT_H__ + +#include "config.h" + +__sfr __at (PROPIO2_IO_BASE + 0x00) PROPIO2_STAT; +__sfr __at (PROPIO2_IO_BASE + 0x01) PROPIO2_TERM; + +#endif