atmel.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * atmel platform data
  3. *
  4. * GPL v2 Only
  5. */
  6. #ifndef __ATMEL_H__
  7. #define __ATMEL_H__
  8. #include <linux/mtd/nand.h>
  9. #include <linux/mtd/partitions.h>
  10. #include <linux/device.h>
  11. #include <linux/i2c.h>
  12. #include <linux/leds.h>
  13. #include <linux/spi/spi.h>
  14. #include <linux/usb/atmel_usba_udc.h>
  15. #include <linux/atmel-mci.h>
  16. #include <sound/atmel-ac97c.h>
  17. #include <linux/serial.h>
  18. #include <linux/platform_data/macb.h>
  19. /*
  20. * at91: 6 USARTs and one DBGU port (SAM9260)
  21. * avr32: 4
  22. */
  23. #define ATMEL_MAX_UART 7
  24. /* USB Device */
  25. struct at91_udc_data {
  26. int vbus_pin; /* high == host powering us */
  27. u8 vbus_active_low; /* vbus polarity */
  28. u8 vbus_polled; /* Use polling, not interrupt */
  29. int pullup_pin; /* active == D+ pulled up */
  30. u8 pullup_active_low; /* true == pullup_pin is active low */
  31. };
  32. /* Compact Flash */
  33. struct at91_cf_data {
  34. int irq_pin; /* I/O IRQ */
  35. int det_pin; /* Card detect */
  36. int vcc_pin; /* power switching */
  37. int rst_pin; /* card reset */
  38. u8 chipselect; /* EBI Chip Select number */
  39. u8 flags;
  40. #define AT91_CF_TRUE_IDE 0x01
  41. #define AT91_IDE_SWAP_A0_A2 0x02
  42. };
  43. /* USB Host */
  44. #define AT91_MAX_USBH_PORTS 3
  45. struct at91_usbh_data {
  46. int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
  47. int overcurrent_pin[AT91_MAX_USBH_PORTS];
  48. u8 ports; /* number of ports on root hub */
  49. u8 overcurrent_supported;
  50. u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
  51. u8 overcurrent_status[AT91_MAX_USBH_PORTS];
  52. u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
  53. };
  54. /* NAND / SmartMedia */
  55. struct atmel_nand_data {
  56. int enable_pin; /* chip enable */
  57. int det_pin; /* card detect */
  58. int rdy_pin; /* ready/busy */
  59. u8 rdy_pin_active_low; /* rdy_pin value is inverted */
  60. u8 ale; /* address line number connected to ALE */
  61. u8 cle; /* address line number connected to CLE */
  62. u8 bus_width_16; /* buswidth is 16 bit */
  63. u8 ecc_mode; /* ecc mode */
  64. u8 on_flash_bbt; /* bbt on flash */
  65. struct mtd_partition *parts;
  66. unsigned int num_parts;
  67. };
  68. /* Serial */
  69. struct atmel_uart_data {
  70. int num; /* port num */
  71. short use_dma_tx; /* use transmit DMA? */
  72. short use_dma_rx; /* use receive DMA? */
  73. void __iomem *regs; /* virt. base address, if any */
  74. struct serial_rs485 rs485; /* rs485 settings */
  75. };
  76. /* Touchscreen Controller */
  77. struct at91_tsadcc_data {
  78. unsigned int adc_clock;
  79. u8 pendet_debounce;
  80. u8 ts_sample_hold_time;
  81. };
  82. /* CAN */
  83. struct at91_can_data {
  84. void (*transceiver_switch)(int on);
  85. };
  86. /* FIXME: this needs a better location, but gets stuff building again */
  87. extern int at91_suspend_entering_slow_clock(void);
  88. #endif /* __ATMEL_H__ */