1 /* $NetBSD: weaselreg.h,v 1.1 2002/01/01 16:48:34 hpeyerl Exp $ */
2
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Herb Peyerl and Jason Thorpe.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39
40 #ifndef _DEV_PCI_WEASELREG_H_
41 #define _DEV_PCI_WEASELREG_H_
42
43 /*
44 * PCI-Weasel configuration block.
45 */
46 #define CFG_VERSION_2 0x02
47 struct weasel_config_block {
48 uint8_t cfg_version; /* version of config */
49 uint8_t weasel_attn; /* attention character */
50 uint8_t debug; /* debug level */
51 uint8_t reset_pc_on_boot; /* reset PC Weasel on boot */
52 uint8_t duart_baud; /* UART baud rate */
53 uint8_t duart_parity; /* 0=none, 1=even, 2=odd */
54 uint8_t duart_bits; /* 7 or 8 */
55 uint8_t enable_duart_switching; /* UART switching mode */
56 uint8_t wdt_allow; /* WDOG is allowed */
57 uint16_t wdt_msec; /* WDOG period in msec. */
58 uint8_t duart_flow; /* RTS/CTS enabled */
59 uint8_t break_passthru; /* BRK passed through to 16550 */
60 uint8_t serial_number[10]; /* board serial number */
61 uint8_t default_partition; /* default Weasel boot image */
62 uint8_t color; /* use color */
63 uint8_t future_use[229]; /* reserved for future use */
64 uint8_t cksum; /* always last element. */
65 };
66
67 #define WEASEL_DATA_RD 0x00
68 #define OS_RET_WDT_ACTIVE 0x01
69 #define OS_RET_WDT_INACTIVE 0x02
70 #define OS_RET_PONG 0x03
71
72 #define WEASEL_DATA_WR 0x01
73 #define OS_CMD_WDT_ENABLE 0x01
74 #define OS_CMD_WDT_DISABLE 0x02
75 #define OS_CMD_WDT_QUERY 0x03
76 #define OS_CMD_SHOW_CONFIG 0x04
77 #define OS_CMD_QUERY_SW_VER 0x05
78 #define OS_CMD_QUERY_HW_VER 0x06
79 #define OS_CMD_QUERY_L_VER 0x07
80 #define OS_CMD_PING 0x08
81 #define OS_CMD_QUERY_VB_VER 0x09
82 #define OS_CMD_QUERT_BR_VER 0x0a
83 #define OS_CMD_RESET_SM 0xff
84
85 #define WEASEL_STATUS 0x02
86 #define OS_WS_HOST_WRITE 0x00
87 #define OS_WS_HOST_READ 0x01
88 #define OS_WS_WDT_RDY 0x02
89 #define OS_WS_BUSY 0xff
90
91 #define WEASEL_HOST_STATUS 0x03
92 #define OS_HS_WEASEL_WRITE 0x00
93 #define OS_HS_WEASEL_READ 0x01
94 #define OS_HS_WDT_RDY 0x02
95
96 #define WEASEL_CHALLENGE 0x04
97
98 #define WEASEL_RESPONSE 0x05
99
100 #endif /* _DEV_PCI_WEASELREG_H_ */
Cache object: 0b73bfb7f795a3819974cc65efe04bec
|