bcm63xx_pcmcia.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef BCM63XX_PCMCIA_H_
  2. #define BCM63XX_PCMCIA_H_
  3. #include <linux/types.h>
  4. #include <linux/timer.h>
  5. #include <pcmcia/ss.h>
  6. #include <bcm63xx_dev_pcmcia.h>
  7. /* socket polling rate in ms */
  8. #define BCM63XX_PCMCIA_POLL_RATE 500
  9. enum {
  10. CARD_CARDBUS = (1 << 0),
  11. CARD_PCCARD = (1 << 1),
  12. CARD_5V = (1 << 2),
  13. CARD_3V = (1 << 3),
  14. CARD_XV = (1 << 4),
  15. CARD_YV = (1 << 5),
  16. };
  17. struct bcm63xx_pcmcia_socket {
  18. struct pcmcia_socket socket;
  19. /* platform specific data */
  20. struct bcm63xx_pcmcia_platform_data *pd;
  21. /* all regs access are protected by this spinlock */
  22. spinlock_t lock;
  23. /* pcmcia registers resource */
  24. struct resource *reg_res;
  25. /* base remapped address of registers */
  26. void __iomem *base;
  27. /* whether a card is detected at the moment */
  28. int card_detected;
  29. /* type of detected card (mask of above enum) */
  30. u8 card_type;
  31. /* keep last socket status to implement event reporting */
  32. unsigned int old_status;
  33. /* backup of requested socket state */
  34. socket_state_t requested_state;
  35. /* timer used for socket status polling */
  36. struct timer_list timer;
  37. /* attribute/common memory resources */
  38. struct resource *attr_res;
  39. struct resource *common_res;
  40. struct resource *io_res;
  41. /* base address of io memory */
  42. void __iomem *io_base;
  43. };
  44. #endif /* BCM63XX_PCMCIA_H_ */