Add a slightly modified dev/ic/com.c that supports the Alchemy
Semiconductor Au1x00 series on-chip UARTs. Will be merged with the original com.c driver once a few issues are tidied up. Main differences from a standard 16550 UART are: - separate rxdata and txdata registers - single 16-bit register for the clock divisor - "enable uart" register
This commit is contained in:
parent
ca42af5e80
commit
223e50d28e
2515
sys/arch/mips/alchemy/dev/aucom.c
Normal file
2515
sys/arch/mips/alchemy/dev/aucom.c
Normal file
File diff suppressed because it is too large
Load Diff
41
sys/arch/mips/alchemy/dev/aucomreg.h
Normal file
41
sys/arch/mips/alchemy/dev/aucomreg.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* $NetBSD: aucomreg.h,v 1.1 2002/07/29 15:42:42 simonb Exp $ */
|
||||
|
||||
/* copyright */
|
||||
|
||||
#include <dev/ic/comreg.h>
|
||||
|
||||
#undef com_data /* XXX ... */
|
||||
#undef com_dlbl
|
||||
#undef com_dlbh
|
||||
#undef com_ier
|
||||
#undef com_iir
|
||||
#undef com_fifo
|
||||
#undef com_lctl
|
||||
#undef com_cfcr
|
||||
#undef com_mcr
|
||||
#undef com_lsr
|
||||
#undef com_msr
|
||||
#undef com_scratch
|
||||
|
||||
#undef COM_FREQ /* relative to CPU clock speed on Au1X00 */
|
||||
|
||||
/*
|
||||
* Alchemy Semi Au1X00 UART registers
|
||||
*/
|
||||
|
||||
#define com_rxdata 0x00 /* receive data register (R) */
|
||||
#define com_txdata 0x04 /* transmit data register (W) */
|
||||
#define com_ier 0x08 /* interrupt enable (R/W) */
|
||||
#define com_iir 0x0c /* interrupt identification (R) */
|
||||
#define com_fifo 0x10 /* FIFO control (R/W) */
|
||||
#define com_lctl 0x14 /* line control register (R/W) */
|
||||
#define com_cfcr 0x14 /* line control register (R/W) */
|
||||
#define com_mcr 0x18 /* modem control register (R/W) */
|
||||
#define com_lsr 0x1c /* line status register (R) */
|
||||
#define com_msr 0x20 /* modem status register (R) */
|
||||
#define com_dlb 0x28 /* divisor latch (16bit) (R/W) */
|
||||
#define com_modctl 0x100 /* module control register (R/W) */
|
||||
|
||||
/* XXX ISA-specific. */
|
||||
#undef COM_NPORTS
|
||||
#define COM_NPORTS 0x104
|
29
sys/arch/mips/alchemy/dev/aucomvar.h
Normal file
29
sys/arch/mips/alchemy/dev/aucomvar.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* $NetBSD: aucomvar.h,v 1.1 2002/07/29 15:42:42 simonb Exp $ */
|
||||
|
||||
/* copyright */
|
||||
|
||||
/* Renamed externally visible functions */
|
||||
#define com_attach_subr aucom_attach_subr
|
||||
#define comintr aucomintr
|
||||
#define comcnattach aucomcnattach
|
||||
#define com_is_console aucom_is_console
|
||||
#define com_kgdb_attach aucom_kgdb_attach
|
||||
|
||||
#define comprobe1 xxx_aucomprobe1 /* unused */
|
||||
#define com_detach xxx_aucom_detach /* unused */
|
||||
#define com_activate xxx_aucom_activate /* unused */
|
||||
|
||||
/* Renamed externally visible variables */
|
||||
#define comcons aucomcons
|
||||
#define com_cd aucom_cd
|
||||
#define com_rbuf_size aucom_rbuf_size
|
||||
#define com_rbuf_hiwat aucom_rbuf_hiwat
|
||||
#define com_rbuf_lowat aucom_rbuf_lowat
|
||||
#define com_debug aucom_debug
|
||||
|
||||
#include <dev/ic/comvar.h>
|
||||
|
||||
#undef COM_MPLOCK /* just in case... */
|
||||
#undef COM_DEBUG
|
||||
#undef COM_HAYESP
|
||||
#undef COM16650
|
Loading…
Reference in New Issue
Block a user