atmel.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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/serial.h>
  11. /* Compact Flash */
  12. struct at91_cf_data {
  13. int irq_pin; /* I/O IRQ */
  14. int det_pin; /* Card detect */
  15. int vcc_pin; /* power switching */
  16. int rst_pin; /* card reset */
  17. u8 chipselect; /* EBI Chip Select number */
  18. u8 flags;
  19. #define AT91_CF_TRUE_IDE 0x01
  20. #define AT91_IDE_SWAP_A0_A2 0x02
  21. };
  22. /* NAND / SmartMedia */
  23. struct atmel_nand_data {
  24. int enable_pin; /* chip enable */
  25. int det_pin; /* card detect */
  26. int rdy_pin; /* ready/busy */
  27. u8 rdy_pin_active_low; /* rdy_pin value is inverted */
  28. u8 ale; /* address line number connected to ALE */
  29. u8 cle; /* address line number connected to CLE */
  30. u8 bus_width_16; /* buswidth is 16 bit */
  31. u8 ecc_mode; /* ecc mode */
  32. u8 on_flash_bbt; /* bbt on flash */
  33. struct mtd_partition *parts;
  34. unsigned int num_parts;
  35. bool has_dma; /* support dma transfer */
  36. /* default is false, only for at32ap7000 chip is true */
  37. bool need_reset_workaround;
  38. };
  39. /* Serial */
  40. struct atmel_uart_data {
  41. int num; /* port num */
  42. short use_dma_tx; /* use transmit DMA? */
  43. short use_dma_rx; /* use receive DMA? */
  44. void __iomem *regs; /* virt. base address, if any */
  45. struct serial_rs485 rs485; /* rs485 settings */
  46. };
  47. /* FIXME: this needs a better location, but gets stuff building again */
  48. extern int at91_suspend_entering_slow_clock(void);
  49. #endif /* __ATMEL_H__ */