Annotation of sys/arch/landisk/landisk/landiskreg.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: landiskreg.h,v 1.4 2007/04/29 17:53:37 miod Exp $ */
2: /* $NetBSD: landiskreg.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
3:
4: /*-
5: * Copyright (c) 2005 NONAKA Kimihiro
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: *
17: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27: * SUCH DAMAGE.
28: */
29:
30: #ifndef LANDISKREG_H__
31: #define LANDISKREG_H__
32:
33: #define LANDISK_LEDCTRL 0xb0000001
34: #define LANDISK_BTNSTAT 0xb0000002
35: #define LANDISK_PWRMNG 0xb0000003 /* write-only */
36: #define LANDISK_INTEN 0xb0000005
37: #define LANDISK_PWRSW_INTCLR 0xb0000006
38:
39: #define LED_POWER_VALUE 0x01
40: #define LED_ACCESS_VALUE 0x02
41: #define LED_POWER_CHANGE 0x04
42: #define LED_ACCESS_CHANGE 0x08
43:
44: #define BTN_SELECT_BIT (1 << 0)
45: #define BTN_COPY_BIT (1 << 1)
46: #define BTN_REMOVE_BIT (1 << 2)
47: #define BTN_POWER_BIT (1 << 4)
48: #define BTN_RESET_BIT (1 << 5)
49: #define BTN_ALL_BIT (BTN_SELECT_BIT \
50: | BTN_COPY_BIT \
51: | BTN_REMOVE_BIT \
52: | BTN_RESET_BIT)
53:
54: #define PWRMNG_POWEROFF 0x01
55: #define PWRMNG_RTC_CE 0x02
56:
57: #define INTEN_ALL_MASK 0x00
58: #define INTEN_PCI0 0x01 /* re/ehci */
59: #define INTEN_PCI1 0x02 /* pciide */
60: #define INTEN_PCI2 0x04 /* ohci0 */
61: #define INTEN_PCI3 0x08 /* ohci1 */
62: #define INTEN_ICONNECT 0x10 /* wdc1 at obio */
63: #define INTEN_CFIDE 0x20 /* wdc0 at obio */
64: #define INTEN_PWRSW 0x40 /* power at obio */
65: #define INTEN_BTN 0x80 /* btn at obio */
66:
67: #define LANDISK_INTR_PCI0 5 /* re/ehci */
68: #define LANDISK_INTR_PCI1 6 /* pciide (LANDISK) */
69: #define LANDISK_INTR_PCI2 7 /* ohci0 */
70: #define LANDISK_INTR_PCI3 8 /* ohci1 */
71: #define LANDISK_INTR_ICONNECT 9 /* wdc1 (LAN-iCN2 iConnect) */
72: #define LANDISK_INTR_CFIDE 10 /* wdc0 (LAN-iCN2/USL-5P CF) */
73: #define LANDISK_INTR_PWRSW 11 /* pwrsw */
74: #define LANDISK_INTR_BTN 12 /* btn (USL-5P) */
75:
76: #endif /* LANDISKREG_H__ */
CVSweb