board.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Platform data definitions.
  3. */
  4. #ifndef __ASM_ARCH_BOARD_H
  5. #define __ASM_ARCH_BOARD_H
  6. #include <linux/types.h>
  7. /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
  8. void at32_add_system_devices(void);
  9. #define ATMEL_MAX_UART 4
  10. extern struct platform_device *atmel_default_console_device;
  11. struct atmel_uart_data {
  12. short use_dma_tx; /* use transmit DMA? */
  13. short use_dma_rx; /* use receive DMA? */
  14. void __iomem *regs; /* virtual base address, if any */
  15. };
  16. void at32_map_usart(unsigned int hw_id, unsigned int line);
  17. struct platform_device *at32_add_device_usart(unsigned int id);
  18. struct eth_platform_data {
  19. u32 phy_mask;
  20. u8 is_rmii;
  21. };
  22. struct platform_device *
  23. at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
  24. struct spi_board_info;
  25. struct platform_device *
  26. at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
  27. struct atmel_lcdfb_info;
  28. struct platform_device *
  29. at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
  30. unsigned long fbmem_start, unsigned long fbmem_len);
  31. /* depending on what's hooked up, not all SSC pins will be used */
  32. #define ATMEL_SSC_TK 0x01
  33. #define ATMEL_SSC_TF 0x02
  34. #define ATMEL_SSC_TD 0x04
  35. #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
  36. #define ATMEL_SSC_RK 0x10
  37. #define ATMEL_SSC_RF 0x20
  38. #define ATMEL_SSC_RD 0x40
  39. #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
  40. struct platform_device *
  41. at32_add_device_ssc(unsigned int id, unsigned int flags);
  42. #endif /* __ASM_ARCH_BOARD_H */