Refactor and cleanup sio (uPD7201) drivers.
- remove confusing syscn*() functions (and its header) and prepare explicit siottycninit(), siottycnget() and siottycnput() functions - use exported struct consdev and cn_tab to initialize siotty console - enable and handle E/S interrupts to make BREAK signal detected properly - make CSR (status regsiters) access functions inline static - make single byte read/write (i.e. cnputc() and cngetc()) functions static inline and take struct sio_register rather than sio channel - use proper integer type (uint16_t) for getsiocsr() as siotty.c - handle channel dependent CR2A and CR2B registers properly - use more explicit definitions for RR_* macro used by getsiocsr() - define and use proper RR0 (read register) values (there is no isStatusReg(r) macro used on 4.4BSD/luna68k)
Tested on LUNA with both wscons console and serial console.
|