File: bcm63xx_pcmcia.h

package info (click to toggle)
linux 4.19.20-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 954,852 kB
  • sloc: ansic: 16,749,828; asm: 271,286; makefile: 38,257; sh: 32,808; perl: 27,671; python: 21,022; cpp: 5,063; yacc: 4,648; lex: 2,585; awk: 1,385; ruby: 25; sed: 5
file content (61 lines) | stat: -rw-r--r-- 1,332 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BCM63XX_PCMCIA_H_
#define BCM63XX_PCMCIA_H_

#include <linux/types.h>
#include <linux/timer.h>
#include <pcmcia/ss.h>
#include <bcm63xx_dev_pcmcia.h>

/* socket polling rate in ms */
#define BCM63XX_PCMCIA_POLL_RATE	500

enum {
	CARD_CARDBUS = (1 << 0),
	CARD_PCCARD = (1 << 1),
	CARD_5V = (1 << 2),
	CARD_3V = (1 << 3),
	CARD_XV = (1 << 4),
	CARD_YV = (1 << 5),
};

struct bcm63xx_pcmcia_socket {
	struct pcmcia_socket socket;

	/* platform specific data */
	struct bcm63xx_pcmcia_platform_data *pd;

	/* all regs access are protected by this spinlock */
	spinlock_t lock;

	/* pcmcia registers resource */
	struct resource *reg_res;

	/* base remapped address of registers */
	void __iomem *base;

	/* whether a card is detected at the moment */
	int card_detected;

	/* type of detected card (mask of above enum) */
	u8 card_type;

	/* keep last socket status to implement event reporting */
	unsigned int old_status;

	/* backup of requested socket state */
	socket_state_t requested_state;

	/* timer used for socket status polling */
	struct timer_list timer;

	/* attribute/common memory resources */
	struct resource *attr_res;
	struct resource *common_res;
	struct resource *io_res;

	/* base address of io memory */
	void __iomem *io_base;
};

#endif /* BCM63XX_PCMCIA_H_ */