blob: 3c8825b67298fafe60f22c803206f9f0789fc8f7 [file] [log] [blame]
Jean-Christophe PLAGNIOL-VILLARDbf4289c2011-12-29 14:43:24 +08001/*
2 * atmel platform data
3 *
4 * GPL v2 Only
5 */
6
Paul Gortmaker3d92e052012-04-01 16:38:40 -04007#ifndef __ATMEL_H__
8#define __ATMEL_H__
Jean-Christophe PLAGNIOL-VILLARDbf4289c2011-12-29 14:43:24 +08009
10#include <linux/mtd/nand.h>
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080011#include <linux/mtd/partitions.h>
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080012#include <linux/serial.h>
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080013
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080014 /* Compact Flash */
15struct 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-VILLARDbf4289c2011-12-29 14:43:24 +080026 /* NAND / SmartMedia */
27struct 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-VILLARD3dcb7ea2011-12-29 14:59:54 +080036 u8 on_flash_bbt; /* bbt on flash */
Jean-Christophe PLAGNIOL-VILLARDbf4289c2011-12-29 14:43:24 +080037 struct mtd_partition *parts;
38 unsigned int num_parts;
Josh Wu1b719262013-05-09 15:34:55 +080039 bool has_dma; /* support dma transfer */
Josh Wu71b94e22013-05-09 15:34:54 +080040
41 /* default is false, only for at32ap7000 chip is true */
42 bool need_reset_workaround;
Jean-Christophe PLAGNIOL-VILLARDbf4289c2011-12-29 14:43:24 +080043};
44
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080045 /* Serial */
46struct 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-VILLARDbcd23602012-10-30 05:12:23 +080054/* FIXME: this needs a better location, but gets stuff building again */
55extern int at91_suspend_entering_slow_clock(void);
56
Paul Gortmaker3d92e052012-04-01 16:38:40 -040057#endif /* __ATMEL_H__ */