blob: d6993a6b6473b8071c42ef9c5485f7f5dbb6d95d [file] [log] [blame]
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -07001/*
2 * Platform data definitions.
3 */
4#ifndef __ASM_ARCH_BOARD_H
5#define __ASM_ARCH_BOARD_H
6
7#include <linux/types.h>
8
Haavard Skinnemoen6fcf0612007-06-14 17:37:31 +02009#define GPIO_PIN_NONE (-1)
10
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070011/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
12void at32_add_system_devices(void);
13
Haavard Skinnemoen73e27982006-10-04 16:02:04 +020014#define ATMEL_MAX_UART 4
15extern struct platform_device *atmel_default_console_device;
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070016
Haavard Skinnemoen75d35212006-10-04 16:02:08 +020017struct 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};
Haavard Skinnemoenc1945882006-10-04 16:02:10 +020022void at32_map_usart(unsigned int hw_id, unsigned int line);
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070023struct platform_device *at32_add_device_usart(unsigned int id);
24
25struct eth_platform_data {
frederic RODO6c36a702007-07-12 19:07:24 +020026 u32 phy_mask;
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070027 u8 is_rmii;
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070028};
29struct platform_device *
30at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
31
Haavard Skinnemoen41d8ca42007-02-16 13:56:11 +010032struct spi_board_info;
33struct platform_device *
34at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070035
Haavard Skinnemoend0a2b7a2007-03-21 18:08:49 +010036struct atmel_lcdfb_info;
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070037struct platform_device *
Haavard Skinnemoend0a2b7a2007-03-21 18:08:49 +010038at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
39 unsigned long fbmem_start, unsigned long fbmem_len);
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070040
Haavard Skinnemoen6fcf0612007-06-14 17:37:31 +020041struct usba_platform_data {
42 int vbus_pin;
43};
44struct platform_device *
45at32_add_device_usba(unsigned int id, struct usba_platform_data *data);
46
Kristoffer Nyborg Gregertsen48021bd2007-08-16 13:45:00 +020047struct ide_platform_data {
48 u8 cs;
49};
50struct platform_device *
51at32_add_device_ide(unsigned int id, unsigned int extint,
52 struct ide_platform_data *data);
53
Hans-Christian Egtvedt9cf6cf52007-07-06 14:31:55 +020054/* 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)
59
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)
64
65struct platform_device *
66at32_add_device_ssc(unsigned int id, unsigned int flags);
67
Haavard Skinnemoen2042c1c2007-10-22 17:42:35 +020068struct platform_device *at32_add_device_twi(unsigned int id);
69struct platform_device *at32_add_device_mci(unsigned int id);
70struct platform_device *at32_add_device_ac97c(unsigned int id);
71struct platform_device *at32_add_device_abdac(unsigned int id);
72
Haavard Skinnemoeneaf5f922007-10-22 18:32:14 +020073struct cf_platform_data {
74 int detect_pin;
75 int reset_pin;
76 int vcc_pin;
77 int ready_pin;
78 u8 cs;
79};
80struct platform_device *
81at32_add_device_cf(unsigned int id, unsigned int extint,
82 struct cf_platform_data *data);
83
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070084#endif /* __ASM_ARCH_BOARD_H */