board.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Platform data definitions.
  3. */
  4. #ifndef __ASM_ARCH_BOARD_H
  5. #define __ASM_ARCH_BOARD_H
  6. #include <linux/types.h>
  7. #define GPIO_PIN_NONE (-1)
  8. /*
  9. * Clock rates for various on-board oscillators. The number of entries
  10. * in this array is chip-dependent.
  11. */
  12. extern unsigned long at32_board_osc_rates[];
  13. /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
  14. void at32_add_system_devices(void);
  15. #define ATMEL_MAX_UART 4
  16. extern struct platform_device *atmel_default_console_device;
  17. struct atmel_uart_data {
  18. short use_dma_tx; /* use transmit DMA? */
  19. short use_dma_rx; /* use receive DMA? */
  20. void __iomem *regs; /* virtual base address, if any */
  21. };
  22. void at32_map_usart(unsigned int hw_id, unsigned int line);
  23. struct platform_device *at32_add_device_usart(unsigned int id);
  24. struct eth_platform_data {
  25. u32 phy_mask;
  26. u8 is_rmii;
  27. };
  28. struct platform_device *
  29. at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
  30. struct spi_board_info;
  31. struct platform_device *
  32. at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
  33. struct atmel_lcdfb_info;
  34. struct platform_device *
  35. at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
  36. unsigned long fbmem_start, unsigned long fbmem_len,
  37. unsigned int pin_config);
  38. struct usba_platform_data;
  39. struct platform_device *
  40. at32_add_device_usba(unsigned int id, struct usba_platform_data *data);
  41. struct ide_platform_data {
  42. u8 cs;
  43. };
  44. struct platform_device *
  45. at32_add_device_ide(unsigned int id, unsigned int extint,
  46. struct ide_platform_data *data);
  47. /* mask says which PWM channels to mux */
  48. struct platform_device *at32_add_device_pwm(u32 mask);
  49. /* depending on what's hooked up, not all SSC pins will be used */
  50. #define ATMEL_SSC_TK 0x01
  51. #define ATMEL_SSC_TF 0x02
  52. #define ATMEL_SSC_TD 0x04
  53. #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
  54. #define ATMEL_SSC_RK 0x10
  55. #define ATMEL_SSC_RF 0x20
  56. #define ATMEL_SSC_RD 0x40
  57. #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
  58. struct platform_device *
  59. at32_add_device_ssc(unsigned int id, unsigned int flags);
  60. struct i2c_board_info;
  61. struct platform_device *at32_add_device_twi(unsigned int id,
  62. struct i2c_board_info *b,
  63. unsigned int n);
  64. struct platform_device *at32_add_device_mci(unsigned int id);
  65. struct platform_device *at32_add_device_ac97c(unsigned int id);
  66. struct platform_device *at32_add_device_abdac(unsigned int id);
  67. struct platform_device *at32_add_device_psif(unsigned int id);
  68. struct cf_platform_data {
  69. int detect_pin;
  70. int reset_pin;
  71. int vcc_pin;
  72. int ready_pin;
  73. u8 cs;
  74. };
  75. struct platform_device *
  76. at32_add_device_cf(unsigned int id, unsigned int extint,
  77. struct cf_platform_data *data);
  78. #endif /* __ASM_ARCH_BOARD_H */