aboutsummaryrefslogtreecommitdiff
path: root/drivers/pcmcia/bcm63xx_pcmcia.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-30 13:46:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-30 13:46:56 -0700
commite399835c349b7d8339775a004a86a492a444e230 (patch)
tree6e07f8d53e58a6442bf850097179d0202db4766c /drivers/pcmcia/bcm63xx_pcmcia.h
parent9abf47f11b38f5ecf411b9a44437cad5016631ad (diff)
parentda3a7a2b9f9776f2d44ed9a4b40eabeb17c6e886 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: MIPS: Avoid spurious make includecheck message MIPS: VPE: Get rid of BKL. MIPS: VPE: Fix build after the credential changes a while ago. MIPS: Excite: Get rid of BKL. MIPS: Sibyte: Get rid of BKL. MIPS: BCM63xx: Add PCMCIA & Cardbus support. MIPS: MSP71xx: request_irq() failure ignored in msp_pcibios_config_access() MIPS: Decrease size of au1xxx_dbdma_pm_regs[][] MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask} MIPS: SMP: Fix build. MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines. MIPS: Sibyte: Fix compilation error. MIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict. MIPS: BCM63xx: Add serial driver for bcm63xx integrated UART. MIPS: Loongson2: Fix typo "enalbe" -> "enable" MIPS: SMTC: Remove duplicate structure field initialization MIPS: Remove duplicated #include MIPS: BCM63xx: Remove duplicated #include
Diffstat (limited to 'drivers/pcmcia/bcm63xx_pcmcia.h')
-rw-r--r--drivers/pcmcia/bcm63xx_pcmcia.h60
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 00000000000..ed957399d86
--- /dev/null
+++ b/drivers/pcmcia/bcm63xx_pcmcia.h
@@ -0,0 +1,60 @@
+#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_ */