atmel.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. /* USB Device */
  20. struct at91_udc_data {
  21. int vbus_pin; /* high == host powering us */
  22. u8 vbus_active_low; /* vbus polarity */
  23. u8 vbus_polled; /* Use polling, not interrupt */
  24. int pullup_pin; /* active == D+ pulled up */
  25. u8 pullup_active_low; /* true == pullup_pin is active low */
  26. };
  27. /* Compact Flash */
  28. struct at91_cf_data {
  29. int irq_pin; /* I/O IRQ */
  30. int det_pin; /* Card detect */
  31. int vcc_pin; /* power switching */
  32. int rst_pin; /* card reset */
  33. u8 chipselect; /* EBI Chip Select number */
  34. u8 flags;
  35. #define AT91_CF_TRUE_IDE 0x01
  36. #define AT91_IDE_SWAP_A0_A2 0x02
  37. };
  38. /* NAND / SmartMedia */
  39. struct atmel_nand_data {
  40. int enable_pin; /* chip enable */
  41. int det_pin; /* card detect */
  42. int rdy_pin; /* ready/busy */
  43. u8 rdy_pin_active_low; /* rdy_pin value is inverted */
  44. u8 ale; /* address line number connected to ALE */
  45. u8 cle; /* address line number connected to CLE */
  46. u8 bus_width_16; /* buswidth is 16 bit */
  47. u8 ecc_mode; /* ecc mode */
  48. u8 on_flash_bbt; /* bbt on flash */
  49. struct mtd_partition *parts;
  50. unsigned int num_parts;
  51. bool has_dma; /* support dma transfer */
  52. /* default is false, only for at32ap7000 chip is true */
  53. bool need_reset_workaround;
  54. };
  55. /* Serial */
  56. struct atmel_uart_data {
  57. int num; /* port num */
  58. short use_dma_tx; /* use transmit DMA? */
  59. short use_dma_rx; /* use receive DMA? */
  60. void __iomem *regs; /* virt. base address, if any */
  61. struct serial_rs485 rs485; /* rs485 settings */
  62. };
  63. /* CAN */
  64. struct at91_can_data {
  65. void (*transceiver_switch)(int on);
  66. };
  67. /* FIXME: this needs a better location, but gets stuff building again */
  68. extern int at91_suspend_entering_slow_clock(void);
  69. #endif /* __ATMEL_H__ */