1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef BCM63XX_PCMCIA_H_
3 #define BCM63XX_PCMCIA_H_
5 #include <linux/types.h>
6 #include <linux/timer.h>
8 #include <bcm63xx_dev_pcmcia.h>
10 /* socket polling rate in ms */
11 #define BCM63XX_PCMCIA_POLL_RATE 500
14 CARD_CARDBUS
= (1 << 0),
15 CARD_PCCARD
= (1 << 1),
22 struct bcm63xx_pcmcia_socket
{
23 struct pcmcia_socket socket
;
25 /* platform specific data */
26 struct bcm63xx_pcmcia_platform_data
*pd
;
28 /* all regs access are protected by this spinlock */
31 /* pcmcia registers resource */
32 struct resource
*reg_res
;
34 /* base remapped address of registers */
37 /* whether a card is detected at the moment */
40 /* type of detected card (mask of above enum) */
43 /* keep last socket status to implement event reporting */
44 unsigned int old_status
;
46 /* backup of requested socket state */
47 socket_state_t requested_state
;
49 /* timer used for socket status polling */
50 struct timer_list timer
;
52 /* attribute/common memory resources */
53 struct resource
*attr_res
;
54 struct resource
*common_res
;
55 struct resource
*io_res
;
57 /* base address of io memory */
58 void __iomem
*io_base
;
61 #endif /* BCM63XX_PCMCIA_H_ */