Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 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 | |
Haavard Skinnemoen | 6fcf061 | 2007-06-14 17:37:31 +0200 | [diff] [blame] | 9 | #define GPIO_PIN_NONE (-1) |
| 10 | |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 11 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ |
| 12 | void at32_add_system_devices(void); |
| 13 | |
Haavard Skinnemoen | 73e2798 | 2006-10-04 16:02:04 +0200 | [diff] [blame] | 14 | #define ATMEL_MAX_UART 4 |
| 15 | extern struct platform_device *atmel_default_console_device; |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 16 | |
Haavard Skinnemoen | 75d3521 | 2006-10-04 16:02:08 +0200 | [diff] [blame] | 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 */ |
| 21 | }; |
Haavard Skinnemoen | c194588 | 2006-10-04 16:02:10 +0200 | [diff] [blame] | 22 | void at32_map_usart(unsigned int hw_id, unsigned int line); |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 23 | struct platform_device *at32_add_device_usart(unsigned int id); |
| 24 | |
| 25 | struct eth_platform_data { |
frederic RODO | 6c36a70 | 2007-07-12 19:07:24 +0200 | [diff] [blame] | 26 | u32 phy_mask; |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 27 | u8 is_rmii; |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 28 | }; |
| 29 | struct platform_device * |
| 30 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); |
| 31 | |
Haavard Skinnemoen | 41d8ca4 | 2007-02-16 13:56:11 +0100 | [diff] [blame] | 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); |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 35 | |
Haavard Skinnemoen | d0a2b7a | 2007-03-21 18:08:49 +0100 | [diff] [blame] | 36 | struct atmel_lcdfb_info; |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 37 | struct platform_device * |
Haavard Skinnemoen | d0a2b7a | 2007-03-21 18:08:49 +0100 | [diff] [blame] | 38 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, |
| 39 | unsigned long fbmem_start, unsigned long fbmem_len); |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 40 | |
Haavard Skinnemoen | 6fcf061 | 2007-06-14 17:37:31 +0200 | [diff] [blame] | 41 | struct usba_platform_data { |
| 42 | int vbus_pin; |
| 43 | }; |
| 44 | struct platform_device * |
| 45 | at32_add_device_usba(unsigned int id, struct usba_platform_data *data); |
| 46 | |
Hans-Christian Egtvedt | 9cf6cf5 | 2007-07-06 14:31:55 +0200 | [diff] [blame] | 47 | /* depending on what's hooked up, not all SSC pins will be used */ |
| 48 | #define ATMEL_SSC_TK 0x01 |
| 49 | #define ATMEL_SSC_TF 0x02 |
| 50 | #define ATMEL_SSC_TD 0x04 |
| 51 | #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD) |
| 52 | |
| 53 | #define ATMEL_SSC_RK 0x10 |
| 54 | #define ATMEL_SSC_RF 0x20 |
| 55 | #define ATMEL_SSC_RD 0x40 |
| 56 | #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD) |
| 57 | |
| 58 | struct platform_device * |
| 59 | at32_add_device_ssc(unsigned int id, unsigned int flags); |
| 60 | |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 61 | #endif /* __ASM_ARCH_BOARD_H */ |