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
;
42 struct platform_device
*
43 at32_add_device_usba(unsigned int id
, struct usba_platform_data
*data
);
45 struct ide_platform_data
{
48 struct platform_device
*
49 at32_add_device_ide(unsigned int id
, unsigned int extint
,
50 struct ide_platform_data
*data
);
52 /* mask says which PWM channels to mux */
53 struct platform_device
*at32_add_device_pwm(u32 mask
);
55 /* depending on what's hooked up, not all SSC pins will be used */
56 #define ATMEL_SSC_TK 0x01
57 #define ATMEL_SSC_TF 0x02
58 #define ATMEL_SSC_TD 0x04
59 #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
61 #define ATMEL_SSC_RK 0x10
62 #define ATMEL_SSC_RF 0x20
63 #define ATMEL_SSC_RD 0x40
64 #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
66 struct platform_device
*
67 at32_add_device_ssc(unsigned int id
, unsigned int flags
);
69 struct i2c_board_info
;
70 struct platform_device
*at32_add_device_twi(unsigned int id
,
71 struct i2c_board_info
*b
,
73 struct platform_device
*at32_add_device_mci(unsigned int id
);
74 struct platform_device
*at32_add_device_ac97c(unsigned int id
);
75 struct platform_device
*at32_add_device_abdac(unsigned int id
);
77 struct cf_platform_data
{
84 struct platform_device
*
85 at32_add_device_cf(unsigned int id
, unsigned int extint
,
86 struct cf_platform_data
*data
);
88 #endif /* __ASM_ARCH_BOARD_H */