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