1 /*        $NetBSD: brhreg.h,v 1.2 2021/08/02 12:56:22 andvar Exp $    */
2 
3 /*
4  * Copyright (c) 2002 Wasabi Systems, Inc.
5  * All rights reserved.
6  *
7  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. All advertising materials mentioning features or use of this software
18  *    must display the following acknowledgement:
19  *        This product includes software developed for the NetBSD Project by
20  *        Wasabi Systems, Inc.
21  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22  *    or promote products derived from this software without specific prior
23  *    written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
29  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef _BRHREG_H_
39 #define   _BRHREG_H_
40 
41 /*
42  * Memory map and register definitions for the ADI Engineering
43  * Big Red Head Evaluation Board.
44  */
45 
46 /*
47  * This is arranged so that we can just use section mappings for
48  * everything.  Note the physical size of the range may be larger
49  * or smaller than the virtual size.
50  *
51  * We need to leave room near the top of the address space for the
52  * vectors.
53  */
54 
55 #define   BRH_PCI_CONF_VBASE  0xf9000000
56 #define   BRH_PCI_CONF_VSIZE  0x02000000          /* 32M */
57 
58 #define   BRH_PCI_MEM1_VBASE  0xfb000000
59 #define   BRH_PCI_MEM1_VSIZE  0x02000000          /* 32M */
60 
61 #define   BRH_PCI_MEM2_VBASE  0xfd000000
62 #define   BRH_PCI_MEM2_VSIZE  0x02000000          /* 32M */
63 
64 #define   BRH_UART1_BASE                0x03000000
65 #define   BRH_UART1_VBASE               0xff000000
66 #define   BRH_UART1_VSIZE               0x00100000          /* 1M */
67 
68 #define   BRH_UART2_BASE                0x03100000
69 #define   BRH_UART2_VBASE               0xff100000
70 #define   BRH_UART2_VSIZE               0x00100000          /* 1M */
71 
72 #define   BRH_LED_BASE                  0x03200000
73 #define   BRH_LED_VBASE                 0xff200000
74 #define   BRH_LED_VSIZE                 0x00100000          /* 1M */
75 
76 #define   BRH_PCI_IO_VBASE    0xff300000
77 #define   BRH_PCI_IO_VSIZE    0x00100000          /* 1M */
78 
79 #define   BRH_BECC_VBASE                0xff400000
80 #define   BRH_BECC_VSIZE                0x00100000          /* 1M */
81 
82           /*                            0xffff0000          high vectors */
83 
84 /*
85  * The 7-segment display looks like so:
86  *
87  *         A
88  *        +-----+
89  *        |     |
90  *    F   |     | B
91  *        |  G  |
92  *        +-----+
93  *        |     |
94  *    E   |     | C
95  *        |  D  |
96  *        +-----+ o  DP
97  *
98  * Setting a bit clears the corresponding segment on the
99  * display.
100  */
101 #define   SEG_A                         (1 << 0)
102 #define   SEG_B                         (1 << 1)
103 #define   SEG_C                         (1 << 2)
104 #define   SEG_D                         (1 << 3)
105 #define   SEG_E                         (1 << 4)
106 #define   SEG_F                         (1 << 5)
107 #define   SEG_G                         (1 << 6)
108 #define   SEG_DP                        (1 << 7)
109 
110 #endif /* _BRHREG_H_ */
111