n8vem-mark4: Tidy up config, make ASCI0 console again, move PropIO
authorWill Sowerbutts <will@sowerbutts.com>
Mon, 5 Jan 2015 01:28:46 +0000 (01:28 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Mon, 5 Jan 2015 01:39:42 +0000 (01:39 +0000)
register definitions into a new n8vem.h header file.

Kernel/platform-n8vem-mark4/config.h
Kernel/platform-n8vem-mark4/devtty.c
Kernel/platform-n8vem-mark4/n8vem.h [new file with mode: 0644]

index 3866b4a..75cb75b 100644 (file)
 
 #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
 
index fce0303..0dcf11c 100644 (file)
@@ -4,17 +4,14 @@
 #include <stdbool.h>
 #include <tty.h>
 #include <devtty.h>
-#include "config.h"
 #include <z180.h>
+#include <n8vem.h>
 
 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 (file)
index 0000000..d2a5d42
--- /dev/null
@@ -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