Jean-Christophe PLAGNIOL-VILLARD | bf4289c | 2011-12-29 14:43:24 +0800 | [diff] [blame] | 1 | /* |
| 2 | * atmel platform data |
| 3 | * |
| 4 | * GPL v2 Only |
| 5 | */ |
| 6 | |
Paul Gortmaker | 3d92e05 | 2012-04-01 16:38:40 -0400 | [diff] [blame] | 7 | #ifndef __ATMEL_H__ |
| 8 | #define __ATMEL_H__ |
Jean-Christophe PLAGNIOL-VILLARD | bf4289c | 2011-12-29 14:43:24 +0800 | [diff] [blame] | 9 | |
| 10 | #include <linux/mtd/nand.h> |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 11 | #include <linux/mtd/partitions.h> |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 12 | #include <linux/serial.h> |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 13 | |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 14 | /* Compact Flash */ |
| 15 | struct at91_cf_data { |
| 16 | int irq_pin; /* I/O IRQ */ |
| 17 | int det_pin; /* Card detect */ |
| 18 | int vcc_pin; /* power switching */ |
| 19 | int rst_pin; /* card reset */ |
| 20 | u8 chipselect; /* EBI Chip Select number */ |
| 21 | u8 flags; |
| 22 | #define AT91_CF_TRUE_IDE 0x01 |
| 23 | #define AT91_IDE_SWAP_A0_A2 0x02 |
| 24 | }; |
| 25 | |
Jean-Christophe PLAGNIOL-VILLARD | bf4289c | 2011-12-29 14:43:24 +0800 | [diff] [blame] | 26 | /* NAND / SmartMedia */ |
| 27 | struct atmel_nand_data { |
| 28 | int enable_pin; /* chip enable */ |
| 29 | int det_pin; /* card detect */ |
| 30 | int rdy_pin; /* ready/busy */ |
| 31 | u8 rdy_pin_active_low; /* rdy_pin value is inverted */ |
| 32 | u8 ale; /* address line number connected to ALE */ |
| 33 | u8 cle; /* address line number connected to CLE */ |
| 34 | u8 bus_width_16; /* buswidth is 16 bit */ |
| 35 | u8 ecc_mode; /* ecc mode */ |
Jean-Christophe PLAGNIOL-VILLARD | 3dcb7ea | 2011-12-29 14:59:54 +0800 | [diff] [blame] | 36 | u8 on_flash_bbt; /* bbt on flash */ |
Jean-Christophe PLAGNIOL-VILLARD | bf4289c | 2011-12-29 14:43:24 +0800 | [diff] [blame] | 37 | struct mtd_partition *parts; |
| 38 | unsigned int num_parts; |
Josh Wu | 1b71926 | 2013-05-09 15:34:55 +0800 | [diff] [blame] | 39 | bool has_dma; /* support dma transfer */ |
Josh Wu | 71b94e2 | 2013-05-09 15:34:54 +0800 | [diff] [blame] | 40 | |
| 41 | /* default is false, only for at32ap7000 chip is true */ |
| 42 | bool need_reset_workaround; |
Jean-Christophe PLAGNIOL-VILLARD | bf4289c | 2011-12-29 14:43:24 +0800 | [diff] [blame] | 43 | }; |
| 44 | |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 45 | /* Serial */ |
| 46 | struct atmel_uart_data { |
| 47 | int num; /* port num */ |
| 48 | short use_dma_tx; /* use transmit DMA? */ |
| 49 | short use_dma_rx; /* use receive DMA? */ |
| 50 | void __iomem *regs; /* virt. base address, if any */ |
| 51 | struct serial_rs485 rs485; /* rs485 settings */ |
| 52 | }; |
| 53 | |
Jean-Christophe PLAGNIOL-VILLARD | bcd2360 | 2012-10-30 05:12:23 +0800 | [diff] [blame] | 54 | /* FIXME: this needs a better location, but gets stuff building again */ |
| 55 | extern int at91_suspend_entering_slow_clock(void); |
| 56 | |
Paul Gortmaker | 3d92e05 | 2012-04-01 16:38:40 -0400 | [diff] [blame] | 57 | #endif /* __ATMEL_H__ */ |