aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap/include/mach/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/mach-at32ap/include/mach/board.h')
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h121
1 files changed, 121 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
new file mode 100644
index 000000000000..e60e9076544d
--- /dev/null
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -0,0 +1,121 @@
1/*
2 * Platform data definitions.
3 */
4#ifndef __ASM_ARCH_BOARD_H
5#define __ASM_ARCH_BOARD_H
6
7#include <linux/types.h>
8
9#define GPIO_PIN_NONE (-1)
10
11/*
12 * Clock rates for various on-board oscillators. The number of entries
13 * in this array is chip-dependent.
14 */
15extern unsigned long at32_board_osc_rates[];
16
17/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
18void at32_add_system_devices(void);
19
20#define ATMEL_MAX_UART 4
21extern struct platform_device *atmel_default_console_device;
22
23struct atmel_uart_data {
24 short use_dma_tx; /* use transmit DMA? */
25 short use_dma_rx; /* use receive DMA? */
26 void __iomem *regs; /* virtual base address, if any */
27};
28void at32_map_usart(unsigned int hw_id, unsigned int line);
29struct platform_device *at32_add_device_usart(unsigned int id);
30
31struct eth_platform_data {
32 u32 phy_mask;
33 u8 is_rmii;
34};
35struct platform_device *
36at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
37
38struct spi_board_info;
39struct platform_device *
40at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
41
42struct atmel_lcdfb_info;
43struct platform_device *
44at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
45 unsigned long fbmem_start, unsigned long fbmem_len,
46 unsigned int pin_config);
47
48struct usba_platform_data;
49struct platform_device *
50at32_add_device_usba(unsigned int id, struct usba_platform_data *data);
51
52struct ide_platform_data {
53 u8 cs;
54};
55struct platform_device *
56at32_add_device_ide(unsigned int id, unsigned int extint,
57 struct ide_platform_data *data);
58
59/* mask says which PWM channels to mux */
60struct platform_device *at32_add_device_pwm(u32 mask);
61
62/* depending on what's hooked up, not all SSC pins will be used */
63#define ATMEL_SSC_TK 0x01
64#define ATMEL_SSC_TF 0x02
65#define ATMEL_SSC_TD 0x04
66#define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
67
68#define ATMEL_SSC_RK 0x10
69#define ATMEL_SSC_RF 0x20
70#define ATMEL_SSC_RD 0x40
71#define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
72
73struct platform_device *
74at32_add_device_ssc(unsigned int id, unsigned int flags);
75
76struct i2c_board_info;
77struct platform_device *at32_add_device_twi(unsigned int id,
78 struct i2c_board_info *b,
79 unsigned int n);
80
81struct mci_platform_data;
82struct platform_device *
83at32_add_device_mci(unsigned int id, struct mci_platform_data *data);
84
85struct ac97c_platform_data {
86 unsigned short dma_rx_periph_id;
87 unsigned short dma_tx_periph_id;
88 unsigned short dma_controller_id;
89 int reset_pin;
90};
91struct platform_device *
92at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data);
93
94struct platform_device *at32_add_device_abdac(unsigned int id);
95struct platform_device *at32_add_device_psif(unsigned int id);
96
97struct cf_platform_data {
98 int detect_pin;
99 int reset_pin;
100 int vcc_pin;
101 int ready_pin;
102 u8 cs;
103};
104struct platform_device *
105at32_add_device_cf(unsigned int id, unsigned int extint,
106 struct cf_platform_data *data);
107
108/* NAND / SmartMedia */
109struct atmel_nand_data {
110 int enable_pin; /* chip enable */
111 int det_pin; /* card detect */
112 int rdy_pin; /* ready/busy */
113 u8 ale; /* address line number connected to ALE */
114 u8 cle; /* address line number connected to CLE */
115 u8 bus_width_16; /* buswidth is 16 bit */
116 struct mtd_partition *(*partition_info)(int size, int *num_partitions);
117};
118struct platform_device *
119at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
120
121#endif /* __ASM_ARCH_BOARD_H */