diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/pcmcia/yenta_socket.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/pcmcia/yenta_socket.h')
-rw-r--r-- | drivers/pcmcia/yenta_socket.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/drivers/pcmcia/yenta_socket.h b/drivers/pcmcia/yenta_socket.h new file mode 100644 index 000000000000..4e637eef2076 --- /dev/null +++ b/drivers/pcmcia/yenta_socket.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef __YENTA_H | ||
2 | #define __YENTA_H | ||
3 | |||
4 | #include <asm/io.h> | ||
5 | |||
6 | #define CB_SOCKET_EVENT 0x00 | ||
7 | #define CB_CSTSEVENT 0x00000001 /* Card status event */ | ||
8 | #define CB_CD1EVENT 0x00000002 /* Card detect 1 change event */ | ||
9 | #define CB_CD2EVENT 0x00000004 /* Card detect 2 change event */ | ||
10 | #define CB_PWREVENT 0x00000008 /* PWRCYCLE change event */ | ||
11 | |||
12 | #define CB_SOCKET_MASK 0x04 | ||
13 | #define CB_CSTSMASK 0x00000001 /* Card status mask */ | ||
14 | #define CB_CDMASK 0x00000006 /* Card detect 1&2 mask */ | ||
15 | #define CB_PWRMASK 0x00000008 /* PWRCYCLE change mask */ | ||
16 | |||
17 | #define CB_SOCKET_STATE 0x08 | ||
18 | #define CB_CARDSTS 0x00000001 /* CSTSCHG status */ | ||
19 | #define CB_CDETECT1 0x00000002 /* Card detect status 1 */ | ||
20 | #define CB_CDETECT2 0x00000004 /* Card detect status 2 */ | ||
21 | #define CB_PWRCYCLE 0x00000008 /* Socket powered */ | ||
22 | #define CB_16BITCARD 0x00000010 /* 16-bit card detected */ | ||
23 | #define CB_CBCARD 0x00000020 /* CardBus card detected */ | ||
24 | #define CB_IREQCINT 0x00000040 /* READY(xIRQ)/xCINT high */ | ||
25 | #define CB_NOTACARD 0x00000080 /* Unrecognizable PC card detected */ | ||
26 | #define CB_DATALOST 0x00000100 /* Potential data loss due to card removal */ | ||
27 | #define CB_BADVCCREQ 0x00000200 /* Invalid Vcc request by host software */ | ||
28 | #define CB_5VCARD 0x00000400 /* Card Vcc at 5.0 volts? */ | ||
29 | #define CB_3VCARD 0x00000800 /* Card Vcc at 3.3 volts? */ | ||
30 | #define CB_XVCARD 0x00001000 /* Card Vcc at X.X volts? */ | ||
31 | #define CB_YVCARD 0x00002000 /* Card Vcc at Y.Y volts? */ | ||
32 | #define CB_5VSOCKET 0x10000000 /* Socket Vcc at 5.0 volts? */ | ||
33 | #define CB_3VSOCKET 0x20000000 /* Socket Vcc at 3.3 volts? */ | ||
34 | #define CB_XVSOCKET 0x40000000 /* Socket Vcc at X.X volts? */ | ||
35 | #define CB_YVSOCKET 0x80000000 /* Socket Vcc at Y.Y volts? */ | ||
36 | |||
37 | #define CB_SOCKET_FORCE 0x0C | ||
38 | #define CB_FCARDSTS 0x00000001 /* Force CSTSCHG */ | ||
39 | #define CB_FCDETECT1 0x00000002 /* Force CD1EVENT */ | ||
40 | #define CB_FCDETECT2 0x00000004 /* Force CD2EVENT */ | ||
41 | #define CB_FPWRCYCLE 0x00000008 /* Force PWREVENT */ | ||
42 | #define CB_F16BITCARD 0x00000010 /* Force 16-bit PCMCIA card */ | ||
43 | #define CB_FCBCARD 0x00000020 /* Force CardBus line */ | ||
44 | #define CB_FNOTACARD 0x00000080 /* Force NOTACARD */ | ||
45 | #define CB_FDATALOST 0x00000100 /* Force data lost */ | ||
46 | #define CB_FBADVCCREQ 0x00000200 /* Force bad Vcc request */ | ||
47 | #define CB_F5VCARD 0x00000400 /* Force 5.0 volt card */ | ||
48 | #define CB_F3VCARD 0x00000800 /* Force 3.3 volt card */ | ||
49 | #define CB_FXVCARD 0x00001000 /* Force X.X volt card */ | ||
50 | #define CB_FYVCARD 0x00002000 /* Force Y.Y volt card */ | ||
51 | #define CB_CVSTEST 0x00004000 /* Card VS test */ | ||
52 | |||
53 | #define CB_SOCKET_CONTROL 0x10 | ||
54 | #define CB_SC_VPP_MASK 0x00000007 | ||
55 | #define CB_SC_VPP_OFF 0x00000000 | ||
56 | #define CB_SC_VPP_12V 0x00000001 | ||
57 | #define CB_SC_VPP_5V 0x00000002 | ||
58 | #define CB_SC_VPP_3V 0x00000003 | ||
59 | #define CB_SC_VPP_XV 0x00000004 | ||
60 | #define CB_SC_VPP_YV 0x00000005 | ||
61 | #define CB_SC_VCC_MASK 0x00000070 | ||
62 | #define CB_SC_VCC_OFF 0x00000000 | ||
63 | #define CB_SC_VCC_5V 0x00000020 | ||
64 | #define CB_SC_VCC_3V 0x00000030 | ||
65 | #define CB_SC_VCC_XV 0x00000040 | ||
66 | #define CB_SC_VCC_YV 0x00000050 | ||
67 | #define CB_SC_CCLK_STOP 0x00000080 | ||
68 | |||
69 | #define CB_SOCKET_POWER 0x20 | ||
70 | #define CB_SKTACCES 0x02000000 /* A PC card access has occurred (clear on read) */ | ||
71 | #define CB_SKTMODE 0x01000000 /* Clock frequency has changed (clear on read) */ | ||
72 | #define CB_CLKCTRLEN 0x00010000 /* Clock control enabled (RW) */ | ||
73 | #define CB_CLKCTRL 0x00000001 /* Stop(0) or slow(1) CB clock (RW) */ | ||
74 | |||
75 | /* | ||
76 | * Cardbus configuration space | ||
77 | */ | ||
78 | #define CB_BRIDGE_BASE(m) (0x1c + 8*(m)) | ||
79 | #define CB_BRIDGE_LIMIT(m) (0x20 + 8*(m)) | ||
80 | #define CB_BRIDGE_CONTROL 0x3e | ||
81 | #define CB_BRIDGE_CPERREN 0x00000001 | ||
82 | #define CB_BRIDGE_CSERREN 0x00000002 | ||
83 | #define CB_BRIDGE_ISAEN 0x00000004 | ||
84 | #define CB_BRIDGE_VGAEN 0x00000008 | ||
85 | #define CB_BRIDGE_MABTMODE 0x00000020 | ||
86 | #define CB_BRIDGE_CRST 0x00000040 | ||
87 | #define CB_BRIDGE_INTR 0x00000080 | ||
88 | #define CB_BRIDGE_PREFETCH0 0x00000100 | ||
89 | #define CB_BRIDGE_PREFETCH1 0x00000200 | ||
90 | #define CB_BRIDGE_POSTEN 0x00000400 | ||
91 | #define CB_LEGACY_MODE_BASE 0x44 | ||
92 | |||
93 | /* | ||
94 | * ExCA area extensions in Yenta | ||
95 | */ | ||
96 | #define CB_MEM_PAGE(map) (0x40 + (map)) | ||
97 | |||
98 | struct yenta_socket; | ||
99 | |||
100 | struct cardbus_type { | ||
101 | int (*override)(struct yenta_socket *); | ||
102 | void (*save_state)(struct yenta_socket *); | ||
103 | void (*restore_state)(struct yenta_socket *); | ||
104 | int (*sock_init)(struct yenta_socket *); | ||
105 | }; | ||
106 | |||
107 | struct yenta_socket { | ||
108 | struct pci_dev *dev; | ||
109 | int cb_irq, io_irq; | ||
110 | void __iomem *base; | ||
111 | struct timer_list poll_timer; | ||
112 | |||
113 | struct pcmcia_socket socket; | ||
114 | struct cardbus_type *type; | ||
115 | |||
116 | /* for PCI interrupt probing */ | ||
117 | unsigned int probe_status; | ||
118 | |||
119 | /* A few words of private data for special stuff of overrides... */ | ||
120 | unsigned int private[8]; | ||
121 | |||
122 | /* PCI saved state */ | ||
123 | u32 saved_state[2]; | ||
124 | }; | ||
125 | |||
126 | |||
127 | #endif | ||