diff options
author | Maxime Bizon <mbizon@freebox.fr> | 2009-09-28 08:49:43 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-30 15:47:01 -0400 |
commit | 553d6d5f5b84f11fad8043688137dac96df1a06d (patch) | |
tree | 39613a02feb6617d619c84045d3c41e479a566b5 /drivers/pcmcia/bcm63xx_pcmcia.h | |
parent | 971842677c5a6c1dd15d9a80b67bf0085686e574 (diff) |
MIPS: BCM63xx: Add PCMCIA & Cardbus support.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/pcmcia/bcm63xx_pcmcia.h')
-rw-r--r-- | drivers/pcmcia/bcm63xx_pcmcia.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/pcmcia/bcm63xx_pcmcia.h b/drivers/pcmcia/bcm63xx_pcmcia.h new file mode 100644 index 000000000000..ed957399d863 --- /dev/null +++ b/drivers/pcmcia/bcm63xx_pcmcia.h | |||
@@ -0,0 +1,60 @@ | |||
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 | CARD_PCCARD = (1 << 1), | ||
15 | CARD_5V = (1 << 2), | ||
16 | CARD_3V = (1 << 3), | ||
17 | CARD_XV = (1 << 4), | ||
18 | CARD_YV = (1 << 5), | ||
19 | }; | ||
20 | |||
21 | struct bcm63xx_pcmcia_socket { | ||
22 | struct pcmcia_socket socket; | ||
23 | |||
24 | /* platform specific data */ | ||
25 | struct bcm63xx_pcmcia_platform_data *pd; | ||
26 | |||
27 | /* all regs access are protected by this spinlock */ | ||
28 | spinlock_t lock; | ||
29 | |||
30 | /* pcmcia registers resource */ | ||
31 | struct resource *reg_res; | ||
32 | |||
33 | /* base remapped address of registers */ | ||
34 | void __iomem *base; | ||
35 | |||
36 | /* whether a card is detected at the moment */ | ||
37 | int card_detected; | ||
38 | |||
39 | /* type of detected card (mask of above enum) */ | ||
40 | u8 card_type; | ||
41 | |||
42 | /* keep last socket status to implement event reporting */ | ||
43 | unsigned int old_status; | ||
44 | |||
45 | /* backup of requested socket state */ | ||
46 | socket_state_t requested_state; | ||
47 | |||
48 | /* timer used for socket status polling */ | ||
49 | struct timer_list timer; | ||
50 | |||
51 | /* attribute/common memory resources */ | ||
52 | struct resource *attr_res; | ||
53 | struct resource *common_res; | ||
54 | struct resource *io_res; | ||
55 | |||
56 | /* base address of io memory */ | ||
57 | void __iomem *io_base; | ||
58 | }; | ||
59 | |||
60 | #endif /* BCM63XX_PCMCIA_H_ */ | ||