Merge from vendor branch NTPD:
[dragonfly.git] / sys / dev / serial / si / sireg.h
1 /*
2  * Device driver for Specialix range (SI/XIO) of serial line multiplexors.
3  * 'C' definitions for Specialix serial multiplex driver.
4  *
5  * Copyright (C) 1990, 1992, 1998 Specialix International,
6  * Copyright (C) 1993, Andy Rutter <andy@acronym.co.uk>
7  * Copyright (C) 1995, Peter Wemm <peter@netplex.com.au>
8  *
9  * Derived from:        SunOS 4.x version
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notices, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notices, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  * 3. All advertising materials mentioning features or use of this software
20  *    must display the following acknowledgement:
21  *      This product includes software developed by Andy Rutter of
22  *      Advanced Methods and Tools Ltd. based on original information
23  *      from Specialix International.
24  * 4. Neither the name of Advanced Methods and Tools, nor Specialix
25  *    International may be used to endorse or promote products derived from
26  *    this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
29  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
31  * NO EVENT SHALL THE AUTHORS BE LIABLE.
32  *
33  * $FreeBSD: src/sys/dev/si/sireg.h,v 1.9 2000/01/23 22:51:49 peter Exp $
34  * $DragonFly: src/sys/dev/serial/si/sireg.h,v 1.2 2003/06/17 04:28:29 dillon Exp $
35  */
36
37 /*
38  * Hardware parameters which should be changed at your peril!
39  */
40
41 /* Base and mask for SI Host 2.x (SIHOST2) */
42 #define SIPLSIG         0x7FF8                  /* Start of control space */
43 #define SIPLCNTL        0x7FF8                  /* Ditto */
44 #define SIPLRESET       SIPLCNTL                /* 0 = reset */
45 #define SIPLIRQ11       (SIPLCNTL+1)            /* 0 = mask irq 11 */
46 #define SIPLIRQ12       (SIPLCNTL+2)            /* 0 = mask irq 12 */
47 #define SIPLIRQ15       (SIPLCNTL+3)            /* 0 = mask irq 15 */
48 #define SIPLIRQSET      (SIPLCNTL+4)            /* 0 = interrupt host */
49 #define SIPLIRQCLR      (SIPLCNTL+5)            /* 0 = clear irq */
50
51 /* SI Host 1.x */
52 #define SIRAM           0x0000                  /* Ram Starts here */
53 #define SIRESET         0x8000                  /* Set reset */
54 #define SIRESET_CL      0xc000                  /* Clear reset */
55 #define SIWAIT          0x9000                  /* Set wait */
56 #define SIWAIT_CL       0xd000                  /* Set wait */
57 #define SIINTCL         0xA000                  /* Clear host int */
58 #define SIINTCL_CL      0xE000                  /* Clear host int */
59
60 /* SI EISA */
61 #define SIEISADEVID     0x4d980411              /* EISA Device ID */
62 #define SIEISABASE      0xc00                   /* Our ports start here */
63 #define SIEISAIOSIZE    0x100                   /* XXX How many ports */
64
65 /* SI old PCI */
66 #define SIPCIBADR       0x10                    /* Which BADR to map in RAM */
67 #define SIPCI_MEMSIZE   0x100000                /* Mapping size */
68 #define SIPCIRESET      0xc0001                 /* 0 = Reset */
69 #define SIPCIINTCL      0x40001                 /* 0 = clear int */
70
71 /* SI Jet PCI */
72 #define SIJETSSIDREG    0x2c                    /* Is it an SX or RIO? */
73 #define SIJETBADR       0x18                    /* Which BADR to map in RAM */
74 /* SI Jet PCI & ISA */
75 #define SIJETIDBASE     0x7c00                  /* ID ROM base */
76 #define SISPLXID        0x984d                  /* Specialix ID */
77 #define SIUNIQID        0x7c0e                  /* & 0xf0 = 0x20 for SX */
78 #define SIJETIDSTR      0x7c20                  /* ID ROM string */
79 #define SIJETRESET      0x7d00
80 #define SIJETINTCL      0x7d80
81 #define SIJETCONFIG     0x7c00                  /* for ISA, top nibble = IRQ */
82 #define SIJETBUSEN      0x2
83 #define SIJETIRQEN      0x4
84
85 /*
86  * MEMSIZE is the total shared mem region
87  * RAMSIZE is value to use when probing
88  * PROBEALLOC is the amount to bus_resource_alloc() during probe.
89  */
90 #define SIJETPCI_MEMSIZE        0x10000
91 #define SIJETISA_MEMSIZE        0x8000
92 #define SIJET_RAMSIZE           0x7000
93 #define SIHOST_MEMSIZE          0x10000
94 #define SIHOST_RAMSIZE          0x8000
95 #define SIHOST2_MEMSIZE         0x8000
96 #define SIHOST2_RAMSIZE         0x7ff7
97 #define SIEISA_MEMSIZE          0x10000
98 #define SIEISA_RAMSIZE          0x10000
99 #define SIPROBEALLOC            0x8000