diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/ide.h | 12 | ||||
-rw-r--r-- | include/asm-sparc64/auxio.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/floppy.h | 16 | ||||
-rw-r--r-- | include/asm-sparc64/irq.h | 7 | ||||
-rw-r--r-- | include/asm-sparc64/rwsem.h | 3 | ||||
-rw-r--r-- | include/asm-sparc64/spinlock.h | 29 | ||||
-rw-r--r-- | include/asm-sparc64/spitfire.h | 1 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 46 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/pcmcia/ciscode.h | 2 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 2 | ||||
-rw-r--r-- | include/pcmcia/device_id.h | 249 | ||||
-rw-r--r-- | include/pcmcia/ds.h | 9 | ||||
-rw-r--r-- | include/pcmcia/ss.h | 34 |
14 files changed, 375 insertions, 39 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 859ebf4da632..79dfab87135d 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h | |||
@@ -41,13 +41,17 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
41 | 41 | ||
42 | static __inline__ unsigned long ide_default_io_base(int index) | 42 | static __inline__ unsigned long ide_default_io_base(int index) |
43 | { | 43 | { |
44 | if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) { | ||
45 | switch(index) { | ||
46 | case 2: return 0x1e8; | ||
47 | case 3: return 0x168; | ||
48 | case 4: return 0x1e0; | ||
49 | case 5: return 0x160; | ||
50 | } | ||
51 | } | ||
44 | switch (index) { | 52 | switch (index) { |
45 | case 0: return 0x1f0; | 53 | case 0: return 0x1f0; |
46 | case 1: return 0x170; | 54 | case 1: return 0x170; |
47 | case 2: return 0x1e8; | ||
48 | case 3: return 0x168; | ||
49 | case 4: return 0x1e0; | ||
50 | case 5: return 0x160; | ||
51 | default: | 55 | default: |
52 | return 0; | 56 | return 0; |
53 | } | 57 | } |
diff --git a/include/asm-sparc64/auxio.h b/include/asm-sparc64/auxio.h index 5eb01dd47150..81a590a50a1f 100644 --- a/include/asm-sparc64/auxio.h +++ b/include/asm-sparc64/auxio.h | |||
@@ -75,6 +75,8 @@ | |||
75 | 75 | ||
76 | #ifndef __ASSEMBLY__ | 76 | #ifndef __ASSEMBLY__ |
77 | 77 | ||
78 | extern void __iomem *auxio_register; | ||
79 | |||
78 | #define AUXIO_LTE_ON 1 | 80 | #define AUXIO_LTE_ON 1 |
79 | #define AUXIO_LTE_OFF 0 | 81 | #define AUXIO_LTE_OFF 0 |
80 | 82 | ||
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index e071b4b4edfd..49d49a285943 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -159,7 +159,7 @@ static void sun_82077_fd_outb(unsigned char value, unsigned long port) | |||
159 | * underruns. If non-zero, doing_pdma encodes the direction of | 159 | * underruns. If non-zero, doing_pdma encodes the direction of |
160 | * the transfer for debugging. 1=read 2=write | 160 | * the transfer for debugging. 1=read 2=write |
161 | */ | 161 | */ |
162 | char *pdma_vaddr; | 162 | unsigned char *pdma_vaddr; |
163 | unsigned long pdma_size; | 163 | unsigned long pdma_size; |
164 | volatile int doing_pdma = 0; | 164 | volatile int doing_pdma = 0; |
165 | 165 | ||
@@ -209,8 +209,7 @@ static void sun_fd_enable_dma(void) | |||
209 | pdma_areasize = pdma_size; | 209 | pdma_areasize = pdma_size; |
210 | } | 210 | } |
211 | 211 | ||
212 | /* Our low-level entry point in arch/sparc/kernel/entry.S */ | 212 | extern irqreturn_t sparc_floppy_irq(int, void *, struct pt_regs *); |
213 | extern irqreturn_t floppy_hardint(int irq, void *unused, struct pt_regs *regs); | ||
214 | 213 | ||
215 | static int sun_fd_request_irq(void) | 214 | static int sun_fd_request_irq(void) |
216 | { | 215 | { |
@@ -220,8 +219,8 @@ static int sun_fd_request_irq(void) | |||
220 | if(!once) { | 219 | if(!once) { |
221 | once = 1; | 220 | once = 1; |
222 | 221 | ||
223 | error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, | 222 | error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, |
224 | SA_INTERRUPT, "floppy", NULL); | 223 | SA_INTERRUPT, "floppy", NULL); |
225 | 224 | ||
226 | return ((error == 0) ? 0 : -1); | 225 | return ((error == 0) ? 0 : -1); |
227 | } | 226 | } |
@@ -615,7 +614,7 @@ static unsigned long __init sun_floppy_init(void) | |||
615 | struct linux_ebus *ebus; | 614 | struct linux_ebus *ebus; |
616 | struct linux_ebus_device *edev = NULL; | 615 | struct linux_ebus_device *edev = NULL; |
617 | unsigned long config = 0; | 616 | unsigned long config = 0; |
618 | unsigned long auxio_reg; | 617 | void __iomem *auxio_reg; |
619 | 618 | ||
620 | for_each_ebus(ebus) { | 619 | for_each_ebus(ebus) { |
621 | for_each_ebusdev(edev, ebus) { | 620 | for_each_ebusdev(edev, ebus) { |
@@ -642,7 +641,7 @@ static unsigned long __init sun_floppy_init(void) | |||
642 | /* Make sure the high density bit is set, some systems | 641 | /* Make sure the high density bit is set, some systems |
643 | * (most notably Ultra5/Ultra10) come up with it clear. | 642 | * (most notably Ultra5/Ultra10) come up with it clear. |
644 | */ | 643 | */ |
645 | auxio_reg = edev->resource[2].start; | 644 | auxio_reg = (void __iomem *) edev->resource[2].start; |
646 | writel(readl(auxio_reg)|0x2, auxio_reg); | 645 | writel(readl(auxio_reg)|0x2, auxio_reg); |
647 | 646 | ||
648 | sun_pci_ebus_dev = ebus->self; | 647 | sun_pci_ebus_dev = ebus->self; |
@@ -650,7 +649,8 @@ static unsigned long __init sun_floppy_init(void) | |||
650 | spin_lock_init(&sun_pci_fd_ebus_dma.lock); | 649 | spin_lock_init(&sun_pci_fd_ebus_dma.lock); |
651 | 650 | ||
652 | /* XXX ioremap */ | 651 | /* XXX ioremap */ |
653 | sun_pci_fd_ebus_dma.regs = edev->resource[1].start; | 652 | sun_pci_fd_ebus_dma.regs = (void __iomem *) |
653 | edev->resource[1].start; | ||
654 | if (!sun_pci_fd_ebus_dma.regs) | 654 | if (!sun_pci_fd_ebus_dma.regs) |
655 | return 0; | 655 | return 0; |
656 | 656 | ||
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 3aef0ca67750..018e2e46082b 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -19,7 +19,7 @@ | |||
19 | /* You should not mess with this directly. That's the job of irq.c. | 19 | /* You should not mess with this directly. That's the job of irq.c. |
20 | * | 20 | * |
21 | * If you make changes here, please update hand coded assembler of | 21 | * If you make changes here, please update hand coded assembler of |
22 | * SBUS/floppy interrupt handler in entry.S -DaveM | 22 | * the vectored interrupt trap handler in entry.S -DaveM |
23 | * | 23 | * |
24 | * This is currently one DCACHE line, two buckets per L2 cache | 24 | * This is currently one DCACHE line, two buckets per L2 cache |
25 | * line. Keep this in mind please. | 25 | * line. Keep this in mind please. |
@@ -122,11 +122,6 @@ extern void enable_irq(unsigned int); | |||
122 | extern unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap); | 122 | extern unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap); |
123 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); | 123 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); |
124 | 124 | ||
125 | extern int request_fast_irq(unsigned int irq, | ||
126 | irqreturn_t (*handler)(int, void *, struct pt_regs *), | ||
127 | unsigned long flags, __const__ char *devname, | ||
128 | void *dev_id); | ||
129 | |||
130 | static __inline__ void set_softint(unsigned long bits) | 125 | static __inline__ void set_softint(unsigned long bits) |
131 | { | 126 | { |
132 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" | 127 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" |
diff --git a/include/asm-sparc64/rwsem.h b/include/asm-sparc64/rwsem.h index bf2ae90ed3df..a1cc94f95984 100644 --- a/include/asm-sparc64/rwsem.h +++ b/include/asm-sparc64/rwsem.h | |||
@@ -55,8 +55,9 @@ static __inline__ int rwsem_atomic_update(int delta, struct rw_semaphore *sem) | |||
55 | "add %%g1, %1, %%g7\n\t" | 55 | "add %%g1, %1, %%g7\n\t" |
56 | "cas [%2], %%g1, %%g7\n\t" | 56 | "cas [%2], %%g1, %%g7\n\t" |
57 | "cmp %%g1, %%g7\n\t" | 57 | "cmp %%g1, %%g7\n\t" |
58 | "membar #StoreLoad | #StoreStore\n\t" | ||
58 | "bne,pn %%icc, 1b\n\t" | 59 | "bne,pn %%icc, 1b\n\t" |
59 | " membar #StoreLoad | #StoreStore\n\t" | 60 | " nop\n\t" |
60 | "mov %%g7, %0\n\t" | 61 | "mov %%g7, %0\n\t" |
61 | : "=&r" (tmp) | 62 | : "=&r" (tmp) |
62 | : "0" (tmp), "r" (sem) | 63 | : "0" (tmp), "r" (sem) |
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index db7581bdb531..9cb93a5c2b4f 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h | |||
@@ -52,12 +52,14 @@ static inline void _raw_spin_lock(spinlock_t *lock) | |||
52 | 52 | ||
53 | __asm__ __volatile__( | 53 | __asm__ __volatile__( |
54 | "1: ldstub [%1], %0\n" | 54 | "1: ldstub [%1], %0\n" |
55 | " membar #StoreLoad | #StoreStore\n" | ||
55 | " brnz,pn %0, 2f\n" | 56 | " brnz,pn %0, 2f\n" |
56 | " membar #StoreLoad | #StoreStore\n" | 57 | " nop\n" |
57 | " .subsection 2\n" | 58 | " .subsection 2\n" |
58 | "2: ldub [%1], %0\n" | 59 | "2: ldub [%1], %0\n" |
60 | " membar #LoadLoad\n" | ||
59 | " brnz,pt %0, 2b\n" | 61 | " brnz,pt %0, 2b\n" |
60 | " membar #LoadLoad\n" | 62 | " nop\n" |
61 | " ba,a,pt %%xcc, 1b\n" | 63 | " ba,a,pt %%xcc, 1b\n" |
62 | " .previous" | 64 | " .previous" |
63 | : "=&r" (tmp) | 65 | : "=&r" (tmp) |
@@ -95,16 +97,18 @@ static inline void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags) | |||
95 | 97 | ||
96 | __asm__ __volatile__( | 98 | __asm__ __volatile__( |
97 | "1: ldstub [%2], %0\n" | 99 | "1: ldstub [%2], %0\n" |
98 | " brnz,pn %0, 2f\n" | ||
99 | " membar #StoreLoad | #StoreStore\n" | 100 | " membar #StoreLoad | #StoreStore\n" |
101 | " brnz,pn %0, 2f\n" | ||
102 | " nop\n" | ||
100 | " .subsection 2\n" | 103 | " .subsection 2\n" |
101 | "2: rdpr %%pil, %1\n" | 104 | "2: rdpr %%pil, %1\n" |
102 | " wrpr %3, %%pil\n" | 105 | " wrpr %3, %%pil\n" |
103 | "3: ldub [%2], %0\n" | 106 | "3: ldub [%2], %0\n" |
104 | " brnz,pt %0, 3b\n" | ||
105 | " membar #LoadLoad\n" | 107 | " membar #LoadLoad\n" |
108 | " brnz,pt %0, 3b\n" | ||
109 | " nop\n" | ||
106 | " ba,pt %%xcc, 1b\n" | 110 | " ba,pt %%xcc, 1b\n" |
107 | " wrpr %1, %%pil\n" | 111 | " wrpr %1, %%pil\n" |
108 | " .previous" | 112 | " .previous" |
109 | : "=&r" (tmp1), "=&r" (tmp2) | 113 | : "=&r" (tmp1), "=&r" (tmp2) |
110 | : "r"(lock), "r"(flags) | 114 | : "r"(lock), "r"(flags) |
@@ -162,12 +166,14 @@ static void inline __read_lock(rwlock_t *lock) | |||
162 | "4: add %0, 1, %1\n" | 166 | "4: add %0, 1, %1\n" |
163 | " cas [%2], %0, %1\n" | 167 | " cas [%2], %0, %1\n" |
164 | " cmp %0, %1\n" | 168 | " cmp %0, %1\n" |
169 | " membar #StoreLoad | #StoreStore\n" | ||
165 | " bne,pn %%icc, 1b\n" | 170 | " bne,pn %%icc, 1b\n" |
166 | " membar #StoreLoad | #StoreStore\n" | 171 | " nop\n" |
167 | " .subsection 2\n" | 172 | " .subsection 2\n" |
168 | "2: ldsw [%2], %0\n" | 173 | "2: ldsw [%2], %0\n" |
174 | " membar #LoadLoad\n" | ||
169 | " brlz,pt %0, 2b\n" | 175 | " brlz,pt %0, 2b\n" |
170 | " membar #LoadLoad\n" | 176 | " nop\n" |
171 | " ba,a,pt %%xcc, 4b\n" | 177 | " ba,a,pt %%xcc, 4b\n" |
172 | " .previous" | 178 | " .previous" |
173 | : "=&r" (tmp1), "=&r" (tmp2) | 179 | : "=&r" (tmp1), "=&r" (tmp2) |
@@ -204,12 +210,14 @@ static void inline __write_lock(rwlock_t *lock) | |||
204 | "4: or %0, %3, %1\n" | 210 | "4: or %0, %3, %1\n" |
205 | " cas [%2], %0, %1\n" | 211 | " cas [%2], %0, %1\n" |
206 | " cmp %0, %1\n" | 212 | " cmp %0, %1\n" |
213 | " membar #StoreLoad | #StoreStore\n" | ||
207 | " bne,pn %%icc, 1b\n" | 214 | " bne,pn %%icc, 1b\n" |
208 | " membar #StoreLoad | #StoreStore\n" | 215 | " nop\n" |
209 | " .subsection 2\n" | 216 | " .subsection 2\n" |
210 | "2: lduw [%2], %0\n" | 217 | "2: lduw [%2], %0\n" |
218 | " membar #LoadLoad\n" | ||
211 | " brnz,pt %0, 2b\n" | 219 | " brnz,pt %0, 2b\n" |
212 | " membar #LoadLoad\n" | 220 | " nop\n" |
213 | " ba,a,pt %%xcc, 4b\n" | 221 | " ba,a,pt %%xcc, 4b\n" |
214 | " .previous" | 222 | " .previous" |
215 | : "=&r" (tmp1), "=&r" (tmp2) | 223 | : "=&r" (tmp1), "=&r" (tmp2) |
@@ -240,8 +248,9 @@ static int inline __write_trylock(rwlock_t *lock) | |||
240 | " or %0, %4, %1\n" | 248 | " or %0, %4, %1\n" |
241 | " cas [%3], %0, %1\n" | 249 | " cas [%3], %0, %1\n" |
242 | " cmp %0, %1\n" | 250 | " cmp %0, %1\n" |
251 | " membar #StoreLoad | #StoreStore\n" | ||
243 | " bne,pn %%icc, 1b\n" | 252 | " bne,pn %%icc, 1b\n" |
244 | " membar #StoreLoad | #StoreStore\n" | 253 | " nop\n" |
245 | " mov 1, %2\n" | 254 | " mov 1, %2\n" |
246 | "2:" | 255 | "2:" |
247 | : "=&r" (tmp1), "=&r" (tmp2), "=&r" (result) | 256 | : "=&r" (tmp1), "=&r" (tmp2), "=&r" (result) |
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h index 9d7613eea812..1aa932773af8 100644 --- a/include/asm-sparc64/spitfire.h +++ b/include/asm-sparc64/spitfire.h | |||
@@ -111,7 +111,6 @@ static __inline__ void spitfire_put_dcache_tag(unsigned long addr, unsigned long | |||
111 | "membar #Sync" | 111 | "membar #Sync" |
112 | : /* No outputs */ | 112 | : /* No outputs */ |
113 | : "r" (tag), "r" (addr), "i" (ASI_DCACHE_TAG)); | 113 | : "r" (tag), "r" (addr), "i" (ASI_DCACHE_TAG)); |
114 | __asm__ __volatile__ ("membar #Sync" : : : "memory"); | ||
115 | } | 114 | } |
116 | 115 | ||
117 | /* The instruction cache lines are flushed with this, but note that | 116 | /* The instruction cache lines are flushed with this, but note that |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index d6eb7b2efc04..9b6d05172ed4 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -175,4 +175,50 @@ struct serio_device_id { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | 177 | ||
178 | /* PCMCIA */ | ||
179 | |||
180 | struct pcmcia_device_id { | ||
181 | __u16 match_flags; | ||
182 | |||
183 | __u16 manf_id; | ||
184 | __u16 card_id; | ||
185 | |||
186 | __u8 func_id; | ||
187 | |||
188 | /* for real multi-function devices */ | ||
189 | __u8 function; | ||
190 | |||
191 | /* for pseude multi-function devices */ | ||
192 | __u8 device_no; | ||
193 | |||
194 | __u32 prod_id_hash[4]; | ||
195 | |||
196 | /* not matched against in kernelspace*/ | ||
197 | #ifdef __KERNEL__ | ||
198 | const char * prod_id[4]; | ||
199 | #else | ||
200 | kernel_ulong_t prod_id[4]; | ||
201 | #endif | ||
202 | |||
203 | /* not matched against */ | ||
204 | kernel_ulong_t driver_info; | ||
205 | #ifdef __KERNEL__ | ||
206 | char * cisfile; | ||
207 | #else | ||
208 | kernel_ulong_t cisfile; | ||
209 | #endif | ||
210 | }; | ||
211 | |||
212 | #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001 | ||
213 | #define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002 | ||
214 | #define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004 | ||
215 | #define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008 | ||
216 | #define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010 | ||
217 | #define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020 | ||
218 | #define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040 | ||
219 | #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 | ||
220 | #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 | ||
221 | #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 | ||
222 | #define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400 | ||
223 | |||
178 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 224 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a3961e1d5183..1e0bc6a8d653 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1815,6 +1815,8 @@ | |||
1815 | #define PCI_VENDOR_ID_ITE 0x1283 | 1815 | #define PCI_VENDOR_ID_ITE 0x1283 |
1816 | #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 | 1816 | #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 |
1817 | #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 | 1817 | #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 |
1818 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | ||
1819 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | ||
1818 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1820 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
1819 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1821 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
1820 | 1822 | ||
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index 2000b43ece91..da19c297dd65 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -112,6 +112,8 @@ | |||
112 | 112 | ||
113 | #define MANFID_TDK 0x0105 | 113 | #define MANFID_TDK 0x0105 |
114 | #define PRODID_TDK_CF010 0x0900 | 114 | #define PRODID_TDK_CF010 0x0900 |
115 | #define PRODID_TDK_NP9610 0x0d0a | ||
116 | #define PRODID_TDK_MN3200 0x0e0a | ||
115 | #define PRODID_TDK_GN3410 0x4815 | 117 | #define PRODID_TDK_GN3410 0x4815 |
116 | 118 | ||
117 | #define MANFID_TOSHIBA 0x0098 | 119 | #define MANFID_TOSHIBA 0x0098 |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 8d8643adc786..b42ddc0c1143 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -396,7 +396,6 @@ struct pcmcia_socket; | |||
396 | int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg); | 396 | int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg); |
397 | int pcmcia_deregister_client(client_handle_t handle); | 397 | int pcmcia_deregister_client(client_handle_t handle); |
398 | int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); | 398 | int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); |
399 | int pcmcia_get_card_services_info(servinfo_t *info); | ||
400 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); | 399 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); |
401 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); | 400 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); |
402 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status); | 401 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status); |
@@ -417,7 +416,6 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt); | |||
417 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 416 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
418 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 417 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
419 | int pcmcia_insert_card(struct pcmcia_socket *skt); | 418 | int pcmcia_insert_card(struct pcmcia_socket *skt); |
420 | int pcmcia_report_error(client_handle_t handle, error_info_t *err); | ||
421 | 419 | ||
422 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); | 420 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); |
423 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 421 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h new file mode 100644 index 000000000000..346d81ece287 --- /dev/null +++ b/include/pcmcia/device_id.h | |||
@@ -0,0 +1,249 @@ | |||
1 | /* | ||
2 | * Copyright (2003-2004) Dominik Brodowski <linux@brodo.de> | ||
3 | * David Woodhouse | ||
4 | * | ||
5 | * License: GPL v2 | ||
6 | */ | ||
7 | |||
8 | #define PCMCIA_DEVICE_MANF_CARD(manf, card) { \ | ||
9 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
10 | PCMCIA_DEV_ID_MATCH_CARD_ID, \ | ||
11 | .manf_id = (manf), \ | ||
12 | .card_id = (card), } | ||
13 | |||
14 | #define PCMCIA_DEVICE_FUNC_ID(func) { \ | ||
15 | .match_flags = PCMCIA_DEV_ID_MATCH_FUNC_ID, \ | ||
16 | .func_id = (func), } | ||
17 | |||
18 | #define PCMCIA_DEVICE_PROD_ID1(v1, vh1) { \ | ||
19 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1, \ | ||
20 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
21 | .prod_id_hash = { (vh1), 0, 0, 0 }, } | ||
22 | |||
23 | #define PCMCIA_DEVICE_PROD_ID2(v2, vh2) { \ | ||
24 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
25 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
26 | .prod_id_hash = { 0, (vh2), 0, 0 }, } | ||
27 | |||
28 | #define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \ | ||
29 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
30 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
31 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
32 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, } | ||
33 | |||
34 | #define PCMCIA_DEVICE_PROD_ID13(v1, v3, vh1, vh3) { \ | ||
35 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
36 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
37 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
38 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, } | ||
39 | |||
40 | #define PCMCIA_DEVICE_PROD_ID14(v1, v4, vh1, vh4) { \ | ||
41 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
42 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
43 | .prod_id = { (v1), NULL, NULL, (v4) }, \ | ||
44 | .prod_id_hash = { (vh1), 0, 0, (vh4) }, } | ||
45 | |||
46 | #define PCMCIA_DEVICE_PROD_ID123(v1, v2, v3, vh1, vh2, vh3) { \ | ||
47 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
48 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
49 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
50 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
51 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, } | ||
52 | |||
53 | #define PCMCIA_DEVICE_PROD_ID124(v1, v2, v4, vh1, vh2, vh4) { \ | ||
54 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
55 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
56 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
57 | .prod_id = { (v1), (v2), NULL, (v4) }, \ | ||
58 | .prod_id_hash = { (vh1), (vh2), 0, (vh4) }, } | ||
59 | |||
60 | #define PCMCIA_DEVICE_PROD_ID134(v1, v3, v4, vh1, vh3, vh4) { \ | ||
61 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
62 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
63 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
64 | .prod_id = { (v1), NULL, (v3), (v4) }, \ | ||
65 | .prod_id_hash = { (vh1), 0, (vh3), (vh4) }, } | ||
66 | |||
67 | #define PCMCIA_DEVICE_PROD_ID1234(v1, v2, v3, v4, vh1, vh2, vh3, vh4) { \ | ||
68 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
69 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
70 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
71 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
72 | .prod_id = { (v1), (v2), (v3), (v4) }, \ | ||
73 | .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, } | ||
74 | |||
75 | |||
76 | /* multi-function devices */ | ||
77 | |||
78 | #define PCMCIA_MFC_DEVICE_MANF_CARD(mfc, manf, card) { \ | ||
79 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
80 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
81 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
82 | .manf_id = (manf), \ | ||
83 | .card_id = (card), \ | ||
84 | .function = (mfc), } | ||
85 | |||
86 | #define PCMCIA_MFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \ | ||
87 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
88 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
89 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
90 | .prod_id_hash = { (vh1), 0, 0, 0 }, \ | ||
91 | .function = (mfc), } | ||
92 | |||
93 | #define PCMCIA_MFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \ | ||
94 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
95 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
96 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
97 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
98 | .function = (mfc), } | ||
99 | |||
100 | #define PCMCIA_MFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \ | ||
101 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
102 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
103 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
104 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
105 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
106 | .function = (mfc), } | ||
107 | |||
108 | #define PCMCIA_MFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \ | ||
109 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
110 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
111 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
112 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
113 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, \ | ||
114 | .function = (mfc), } | ||
115 | |||
116 | #define PCMCIA_MFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \ | ||
117 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
118 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
119 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
120 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
121 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
122 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
123 | .function = (mfc), } | ||
124 | |||
125 | /* pseudo multi-function devices */ | ||
126 | |||
127 | #define PCMCIA_PFC_DEVICE_MANF_CARD(mfc, manf, card) { \ | ||
128 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
129 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
130 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
131 | .manf_id = (manf), \ | ||
132 | .card_id = (card), \ | ||
133 | .device_no = (mfc), } | ||
134 | |||
135 | #define PCMCIA_PFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \ | ||
136 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
137 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
138 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
139 | .prod_id_hash = { (vh1), 0, 0, 0 }, \ | ||
140 | .device_no = (mfc), } | ||
141 | |||
142 | #define PCMCIA_PFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \ | ||
143 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
144 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
145 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
146 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
147 | .device_no = (mfc), } | ||
148 | |||
149 | #define PCMCIA_PFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \ | ||
150 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
151 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
152 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
153 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
154 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
155 | .device_no = (mfc), } | ||
156 | |||
157 | #define PCMCIA_PFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \ | ||
158 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
159 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
160 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
161 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
162 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, \ | ||
163 | .device_no = (mfc), } | ||
164 | |||
165 | #define PCMCIA_PFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \ | ||
166 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
167 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
168 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
169 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
170 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
171 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
172 | .device_no = (mfc), } | ||
173 | |||
174 | /* cards needing a CIS override */ | ||
175 | |||
176 | #define PCMCIA_DEVICE_CIS_MANF_CARD(manf, card, _cisfile) { \ | ||
177 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
178 | PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
179 | PCMCIA_DEV_ID_MATCH_CARD_ID, \ | ||
180 | .manf_id = (manf), \ | ||
181 | .card_id = (card), \ | ||
182 | .cisfile = (_cisfile)} | ||
183 | |||
184 | #define PCMCIA_DEVICE_CIS_PROD_ID12(v1, v2, vh1, vh2, _cisfile) { \ | ||
185 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
186 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
187 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
188 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
189 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
190 | .cisfile = (_cisfile)} | ||
191 | |||
192 | #define PCMCIA_DEVICE_CIS_PROD_ID123(v1, v2, v3, vh1, vh2, vh3, _cisfile) { \ | ||
193 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
194 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
195 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
196 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
197 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
198 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
199 | .cisfile = (_cisfile)} | ||
200 | |||
201 | |||
202 | #define PCMCIA_DEVICE_CIS_PROD_ID2(v2, vh2, _cisfile) { \ | ||
203 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
204 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
205 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
206 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
207 | .cisfile = (_cisfile)} | ||
208 | |||
209 | #define PCMCIA_PFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \ | ||
210 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
211 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
212 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
213 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
214 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
215 | .prod_id_hash = { (vh1), (vh2), 0, 0 },\ | ||
216 | .device_no = (mfc), \ | ||
217 | .cisfile = (_cisfile)} | ||
218 | |||
219 | #define PCMCIA_MFC_DEVICE_CIS_MANF_CARD(mfc, manf, card, _cisfile) { \ | ||
220 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
221 | PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
222 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
223 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
224 | .manf_id = (manf), \ | ||
225 | .card_id = (card), \ | ||
226 | .function = (mfc), \ | ||
227 | .cisfile = (_cisfile)} | ||
228 | |||
229 | #define PCMCIA_MFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \ | ||
230 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
231 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
232 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
233 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
234 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
235 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
236 | .function = (mfc), \ | ||
237 | .cisfile = (_cisfile)} | ||
238 | |||
239 | #define PCMCIA_MFC_DEVICE_CIS_PROD_ID4(mfc, v4, vh4, _cisfile) { \ | ||
240 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
241 | PCMCIA_DEV_ID_MATCH_PROD_ID4| \ | ||
242 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
243 | .prod_id = { NULL, NULL, NULL, (v4) }, \ | ||
244 | .prod_id_hash = { 0, 0, 0, (vh4) }, \ | ||
245 | .function = (mfc), \ | ||
246 | .cisfile = (_cisfile)} | ||
247 | |||
248 | |||
249 | #define PCMCIA_DEVICE_NULL { .match_flags = 0, } | ||
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 312fd958c901..2b52553f2d94 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | #include <pcmcia/bulkmem.h> | 19 | #include <pcmcia/bulkmem.h> |
20 | #include <pcmcia/cs_types.h> | 20 | #include <pcmcia/cs_types.h> |
21 | #include <pcmcia/device_id.h> | ||
22 | #include <linux/mod_devicetable.h> | ||
21 | 23 | ||
22 | typedef struct tuple_parse_t { | 24 | typedef struct tuple_parse_t { |
23 | tuple_t tuple; | 25 | tuple_t tuple; |
@@ -129,12 +131,11 @@ typedef struct dev_link_t { | |||
129 | 131 | ||
130 | struct pcmcia_socket; | 132 | struct pcmcia_socket; |
131 | 133 | ||
132 | extern struct bus_type pcmcia_bus_type; | ||
133 | |||
134 | struct pcmcia_driver { | 134 | struct pcmcia_driver { |
135 | dev_link_t *(*attach)(void); | 135 | dev_link_t *(*attach)(void); |
136 | void (*detach)(dev_link_t *); | 136 | void (*detach)(dev_link_t *); |
137 | struct module *owner; | 137 | struct module *owner; |
138 | struct pcmcia_device_id *id_table; | ||
138 | struct device_driver drv; | 139 | struct device_driver drv; |
139 | }; | 140 | }; |
140 | 141 | ||
@@ -173,7 +174,9 @@ struct pcmcia_device { | |||
173 | u8 has_manf_id:1; | 174 | u8 has_manf_id:1; |
174 | u8 has_card_id:1; | 175 | u8 has_card_id:1; |
175 | u8 has_func_id:1; | 176 | u8 has_func_id:1; |
176 | u8 reserved:5; | 177 | |
178 | u8 allow_func_id_match:1; | ||
179 | u8 reserved:4; | ||
177 | 180 | ||
178 | u8 func_id; | 181 | u8 func_id; |
179 | u16 manf_id; | 182 | u16 manf_id; |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 67b867f31fe4..0f7aacc33fe9 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -15,10 +15,12 @@ | |||
15 | #ifndef _LINUX_SS_H | 15 | #ifndef _LINUX_SS_H |
16 | #define _LINUX_SS_H | 16 | #define _LINUX_SS_H |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/device.h> | ||
20 | |||
18 | #include <pcmcia/cs_types.h> | 21 | #include <pcmcia/cs_types.h> |
19 | #include <pcmcia/cs.h> | 22 | #include <pcmcia/cs.h> |
20 | #include <pcmcia/bulkmem.h> | 23 | #include <pcmcia/bulkmem.h> |
21 | #include <linux/device.h> | ||
22 | 24 | ||
23 | /* Definitions for card status flags for GetStatus */ | 25 | /* Definitions for card status flags for GetStatus */ |
24 | #define SS_WRPROT 0x0001 | 26 | #define SS_WRPROT 0x0001 |
@@ -171,7 +173,7 @@ typedef struct window_t { | |||
171 | 173 | ||
172 | struct config_t; | 174 | struct config_t; |
173 | struct pcmcia_callback; | 175 | struct pcmcia_callback; |
174 | 176 | struct user_info_t; | |
175 | 177 | ||
176 | struct pcmcia_socket { | 178 | struct pcmcia_socket { |
177 | struct module *owner; | 179 | struct module *owner; |
@@ -216,8 +218,9 @@ struct pcmcia_socket { | |||
216 | 218 | ||
217 | /* is set to one if resource setup is done using adjust_resource_info() */ | 219 | /* is set to one if resource setup is done using adjust_resource_info() */ |
218 | u8 resource_setup_old:1; | 220 | u8 resource_setup_old:1; |
221 | u8 resource_setup_new:1; | ||
219 | 222 | ||
220 | u8 reserved:6; | 223 | u8 reserved:5; |
221 | 224 | ||
222 | /* socket operations */ | 225 | /* socket operations */ |
223 | struct pccard_operations * ops; | 226 | struct pccard_operations * ops; |
@@ -241,9 +244,32 @@ struct pcmcia_socket { | |||
241 | unsigned int thread_events; | 244 | unsigned int thread_events; |
242 | 245 | ||
243 | /* pcmcia (16-bit) */ | 246 | /* pcmcia (16-bit) */ |
244 | struct pcmcia_bus_socket *pcmcia; | ||
245 | struct pcmcia_callback *callback; | 247 | struct pcmcia_callback *callback; |
246 | 248 | ||
249 | #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) | ||
250 | struct list_head devices_list; /* PCMCIA devices */ | ||
251 | u8 device_count; /* the number of devices, used | ||
252 | * only internally and subject | ||
253 | * to incorrectness and change */ | ||
254 | |||
255 | struct { | ||
256 | u8 present:1, /* PCMCIA card is present in socket */ | ||
257 | busy:1, /* "master" ioctl is used */ | ||
258 | dead:1, /* pcmcia module is being unloaded */ | ||
259 | device_add_pending:1, /* a pseudo-multifunction-device | ||
260 | * add event is pending */ | ||
261 | reserved:4; | ||
262 | } pcmcia_state; | ||
263 | |||
264 | struct work_struct device_add; /* for adding further pseudo-multifunction | ||
265 | * devices */ | ||
266 | |||
267 | #ifdef CONFIG_PCMCIA_IOCTL | ||
268 | struct user_info_t *user; | ||
269 | wait_queue_head_t queue; | ||
270 | #endif | ||
271 | #endif | ||
272 | |||
247 | /* cardbus (32-bit) */ | 273 | /* cardbus (32-bit) */ |
248 | #ifdef CONFIG_CARDBUS | 274 | #ifdef CONFIG_CARDBUS |
249 | struct resource * cb_cis_res; | 275 | struct resource * cb_cis_res; |