2 * Platform data definitions.
4 #ifndef __ASM_ARCH_BOARD_H
5 #define __ASM_ARCH_BOARD_H
7 #include <linux/types.h>
9 #define GPIO_PIN_NONE (-1)
11 /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
12 void at32_add_system_devices(void);
14 #define ATMEL_MAX_UART 4
15 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 */
22 void at32_map_usart(unsigned int hw_id
, unsigned int line
);
23 struct platform_device
*at32_add_device_usart(unsigned int id
);
25 struct eth_platform_data
{
29 struct platform_device
*
30 at32_add_device_eth(unsigned int id
, struct eth_platform_data
*data
);
32 struct spi_board_info
;
33 struct platform_device
*
34 at32_add_device_spi(unsigned int id
, struct spi_board_info
*b
, unsigned int n
);
36 struct atmel_lcdfb_info
;
37 struct platform_device
*
38 at32_add_device_lcdc(unsigned int id
, struct atmel_lcdfb_info
*data
,
39 unsigned long fbmem_start
, unsigned long fbmem_len
);
41 struct usba_platform_data
{
44 struct platform_device
*
45 at32_add_device_usba(unsigned int id
, struct usba_platform_data
*data
);
47 struct ide_platform_data
{
50 struct platform_device
*
51 at32_add_device_ide(unsigned int id
, unsigned int extint
,
52 struct ide_platform_data
*data
);
54 /* depending on what's hooked up, not all SSC pins will be used */
55 #define ATMEL_SSC_TK 0x01
56 #define ATMEL_SSC_TF 0x02
57 #define ATMEL_SSC_TD 0x04
58 #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
60 #define ATMEL_SSC_RK 0x10
61 #define ATMEL_SSC_RF 0x20
62 #define ATMEL_SSC_RD 0x40
63 #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
65 struct platform_device
*
66 at32_add_device_ssc(unsigned int id
, unsigned int flags
);
68 struct platform_device
*at32_add_device_twi(unsigned int id
);
69 struct platform_device
*at32_add_device_mci(unsigned int id
);
70 struct platform_device
*at32_add_device_ac97c(unsigned int id
);
71 struct platform_device
*at32_add_device_abdac(unsigned int id
);
73 struct cf_platform_data
{
80 struct platform_device
*
81 at32_add_device_cf(unsigned int id
, unsigned int extint
,
82 struct cf_platform_data
*data
);
84 #endif /* __ASM_ARCH_BOARD_H */