[brcm63xx] move files to files-2.6.30, to ease newer kernel integration
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / files-2.6.30 / drivers / pcmcia / bcm63xx_pcmcia.h
1 #ifndef BCM63XX_PCMCIA_H_
2 #define BCM63XX_PCMCIA_H_
3
4 #include <linux/types.h>
5 #include <linux/timer.h>
6 #include <pcmcia/ss.h>
7 #include <bcm63xx_dev_pcmcia.h>
8
9 /* socket polling rate in ms */
10 #define BCM63XX_PCMCIA_POLL_RATE 500
11
12 enum {
13 CARD_CARDBUS = (1 << 0),
14
15 CARD_PCCARD = (1 << 1),
16
17 CARD_5V = (1 << 2),
18
19 CARD_3V = (1 << 3),
20
21 CARD_XV = (1 << 4),
22
23 CARD_YV = (1 << 5),
24 };
25
26 struct bcm63xx_pcmcia_socket {
27 struct pcmcia_socket socket;
28
29 /* platform specific data */
30 struct bcm63xx_pcmcia_platform_data *pd;
31
32 /* all regs access are protected by this spinlock */
33 spinlock_t lock;
34
35 /* pcmcia registers resource */
36 struct resource *reg_res;
37
38 /* base remapped address of registers */
39 void __iomem *base;
40
41 /* whether a card is detected at the moment */
42 int card_detected;
43
44 /* type of detected card (mask of above enum) */
45 u8 card_type;
46
47 /* keep last socket status to implement event reporting */
48 unsigned int old_status;
49
50 /* backup of requested socket state */
51 socket_state_t requested_state;
52
53 /* timer used for socket status polling */
54 struct timer_list timer;
55
56 /* attribute/common memory resources */
57 struct resource *attr_res;
58 struct resource *common_res;
59 struct resource *io_res;
60
61 /* base address of io memory */
62 void __iomem *io_base;
63 };
64
65 #endif /* BCM63XX_PCMCIA_H_ */