|
|
1.1 root 1: /*
2: * topic.h 1.15 2002/02/27 01:21:09
3: *
4: * The contents of this file are subject to the Mozilla Public License
5: * Version 1.1 (the "License"); you may not use this file except in
6: * compliance with the License. You may obtain a copy of the License
7: * at http://www.mozilla.org/MPL/
8: *
9: * Software distributed under the License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11: * the License for the specific language governing rights and
12: * limitations under the License.
13: *
14: * The initial developer of the original code is David A. Hinds
15: * <[email protected]>. Portions created by David A. Hinds
16: * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
17: *
18: * Alternatively, the contents of this file may be used under the
19: * terms of the GNU General Public License version 2 (the "GPL"), in
20: * which case the provisions of the GPL are applicable instead of the
21: * above. If you wish to allow the use of your version of this file
22: * only under the terms of the GPL and not to allow others to use
23: * your version of this file under the MPL, indicate your decision by
24: * deleting the provisions above and replace them with the notice and
25: * other provisions required by the GPL. If you do not delete the
26: * provisions above, a recipient may use your version of this file
27: * under either the MPL or the GPL.
28: * topic.h $Release$ 2002/02/27 01:21:09
29: */
30:
31: #ifndef _LINUX_TOPIC_H
32: #define _LINUX_TOPIC_H
33:
34: #ifndef PCI_VENDOR_ID_TOSHIBA
35: #define PCI_VENDOR_ID_TOSHIBA 0x1179
36: #endif
37: #ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC95_A
38: #define PCI_DEVICE_ID_TOSHIBA_TOPIC95_A 0x0603
39: #endif
40: #ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC95_B
41: #define PCI_DEVICE_ID_TOSHIBA_TOPIC95_B 0x060a
42: #endif
43: #ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC97
44: #define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
45: #endif
46: #ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC100
47: #define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
48: #endif
49:
50: /* Register definitions for Toshiba ToPIC95 controllers */
51:
52: #define TOPIC_SOCKET_CONTROL 0x0090 /* 32 bit */
53: #define TOPIC_SCR_IRQSEL 0x00000001
54:
55: #define TOPIC_SLOT_CONTROL 0x00a0 /* 8 bit */
56: #define TOPIC_SLOT_SLOTON 0x80
57: #define TOPIC_SLOT_SLOTEN 0x40
58: #define TOPIC_SLOT_ID_LOCK 0x20
59: #define TOPIC_SLOT_ID_WP 0x10
60: #define TOPIC_SLOT_PORT_MASK 0x0c
61: #define TOPIC_SLOT_PORT_SHIFT 2
62: #define TOPIC_SLOT_OFS_MASK 0x03
63:
64: #define TOPIC_CARD_CONTROL 0x00a1 /* 8 bit */
65: #define TOPIC_CCR_INTB 0x20
66: #define TOPIC_CCR_INTA 0x10
67: #define TOPIC_CCR_CLOCK 0x0c
68: #define TOPIC_CCR_PCICLK 0x0c
69: #define TOPIC_CCR_PCICLK_2 0x08
70: #define TOPIC_CCR_CCLK 0x04
71:
72: #define TOPIC97_INT_CONTROL 0x00a1 /* 8 bit */
73: #define TOPIC97_ICR_INTB 0x20
74: #define TOPIC97_ICR_INTA 0x10
75: #define TOPIC97_ICR_STSIRQNP 0x04
76: #define TOPIC97_ICR_IRQNP 0x02
77: #define TOPIC97_ICR_IRQSEL 0x01
78:
79: #define TOPIC_CARD_DETECT 0x00a3 /* 8 bit */
80: #define TOPIC_CDR_MODE_PC32 0x80
81: #define TOPIC_CDR_VS1 0x04
82: #define TOPIC_CDR_VS2 0x02
83: #define TOPIC_CDR_SW_DETECT 0x01
84:
85: #define TOPIC_REGISTER_CONTROL 0x00a4 /* 32 bit */
86: #define TOPIC_RCR_RESUME_RESET 0x80000000
87: #define TOPIC_RCR_REMOVE_RESET 0x40000000
88: #define TOPIC97_RCR_CLKRUN_ENA 0x20000000
89: #define TOPIC97_RCR_TESTMODE 0x10000000
90: #define TOPIC97_RCR_IOPLUP 0x08000000
91: #define TOPIC_RCR_BUFOFF_PWROFF 0x02000000
92: #define TOPIC_RCR_BUFOFF_SIGOFF 0x01000000
93: #define TOPIC97_RCR_CB_DEV_MASK 0x0000f800
94: #define TOPIC97_RCR_CB_DEV_SHIFT 11
95: #define TOPIC97_RCR_RI_DISABLE 0x00000004
96: #define TOPIC97_RCR_CAUDIO_OFF 0x00000002
97: #define TOPIC_RCR_CAUDIO_INVERT 0x00000001
98:
99: #define TOPIC_FUNCTION_CONTROL 0x3e
100: #define TOPIC_FCR_PWR_BUF_ENA 0x40
101: #define TOPIC_FCR_CTR_ENA 0x08
102: #define TOPIC_FCR_VS_ENA 0x02
103: #define TOPIC_FCR_3V_ENA 0x01
104:
105: /* Data structure for tracking vendor-specific state */
106: typedef struct topic_state_t {
107: u_char slot; /* TOPIC_SLOT_CONTROL */
108: u_char ccr; /* TOPIC_CARD_CONTROL */
109: u_char cdr; /* TOPIC_CARD_DETECT */
110: u_int rcr; /* TOPIC_REGISTER_CONTROL */
111: u_char fcr; /* TOPIC_FUNCTION_CONTROL */
112: } topic_state_t;
113:
114: #define TOPIC_PCIC_ID \
115: IS_TOPIC95_A, IS_TOPIC95_B, IS_TOPIC97, IS_TOPIC100
116:
117: #define TOPIC_PCIC_INFO \
118: { "Toshiba ToPIC95-A", IS_CARDBUS|IS_TOPIC, ID(TOSHIBA, TOPIC95_A) }, \
119: { "Toshiba ToPIC95-B", IS_CARDBUS|IS_TOPIC, ID(TOSHIBA, TOPIC95_B) }, \
120: { "Toshiba ToPIC97", IS_CARDBUS|IS_TOPIC, ID(TOSHIBA, TOPIC97) }, \
121: { "Toshiba ToPIC100", IS_CARDBUS|IS_TOPIC, ID(TOSHIBA, TOPIC100) }
122:
123: #endif /* _LINUX_TOPIC_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.