/*
* Copyright (c) 1996, 1997 Philip L. Budne.
* Copyright (c) 1993 Philip A. Nelson.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Philip A. Nelson.
* 4. The name of Philip A. Nelson may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY PHILIP NELSON ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL PHILIP NELSON BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* scnreg.h: definitions for 2681/2692/68681 duart
*/
/*
* register offsets
*/
/* per-channel regs (channel B's at SCN_REG(8-11)) */
#define CH_MR SCN_REG(0) /* rw mode register */
#define CH_SR SCN_REG(1) /* ro status register */
#define CH_CSR SCN_REG(1) /* wo clock select reg */
#define CH_CR SCN_REG(2) /* wo command reg */
#define CH_DAT SCN_REG(3) /* rw data reg */
/* duart-wide regs */
#define DU_IPCR SCN_REG(4) /* ro input port change reg */
#define DU_ACR SCN_REG(4) /* wo aux control reg */
#define DU_ISR SCN_REG(5) /* ro interrupt stat reg */
#define DU_IMR SCN_REG(5) /* wo interrupt mask reg */
#define DU_CTUR SCN_REG(6) /* rw counter timer upper reg */
#define DU_CTLR SCN_REG(7) /* rw counter timer lower reg */
/* SCN_REG(8-11) channel b (see above) */
/* SCN_REG(12): reserved */
#define DU_IP SCN_REG(13) /* ro input port */
#define DU_OPCR SCN_REG(13) /* wo output port cfg reg */
#define DU_CSTRT SCN_REG(14) /* ro start C/T cmd */
#define DU_OPSET SCN_REG(14) /* wo output port set */
#define DU_CSTOP SCN_REG(15) /* ro stop C/T cmd */
#define DU_OPCLR SCN_REG(15) /* wo output port reset */
/*
* Data Values
*/
/*
* MR (mode register) -- per channel
*/
/* MR0 (scn26c92 only) need to use CR_CMD_MR0 before access */
#define MR0_MODE 0x07 /* extended baud rate mode (MR0A only) */
#define MR0_TXINT 0x30 /* Tx int threshold */
#define MR0_RXINT 0x40 /* Rx int threshold (along with MR1_FFULL) */
#define MR0_RXWD 0x80 /* Rx watchdog (8 byte-times after last rx) */