]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/linux/platform_data/atmel.h
Merge remote-tracking branch 'tty/tty-next'
[karo-tx-linux.git] / include / linux / platform_data / atmel.h
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/serial.h>
13
14  /* USB Device */
15 struct at91_udc_data {
16         int     vbus_pin;               /* high == host powering us */
17         u8      vbus_active_low;        /* vbus polarity */
18         u8      vbus_polled;            /* Use polling, not interrupt */
19         int     pullup_pin;             /* active == D+ pulled up */
20         u8      pullup_active_low;      /* true == pullup_pin is active low */
21 };
22
23  /* Compact Flash */
24 struct at91_cf_data {
25         int     irq_pin;                /* I/O IRQ */
26         int     det_pin;                /* Card detect */
27         int     vcc_pin;                /* power switching */
28         int     rst_pin;                /* card reset */
29         u8      chipselect;             /* EBI Chip Select number */
30         u8      flags;
31 #define AT91_CF_TRUE_IDE        0x01
32 #define AT91_IDE_SWAP_A0_A2     0x02
33 };
34
35  /* NAND / SmartMedia */
36 struct atmel_nand_data {
37         int             enable_pin;             /* chip enable */
38         int             det_pin;                /* card detect */
39         int             rdy_pin;                /* ready/busy */
40         u8              rdy_pin_active_low;     /* rdy_pin value is inverted */
41         u8              ale;                    /* address line number connected to ALE */
42         u8              cle;                    /* address line number connected to CLE */
43         u8              bus_width_16;           /* buswidth is 16 bit */
44         u8              ecc_mode;               /* ecc mode */
45         u8              on_flash_bbt;           /* bbt on flash */
46         struct mtd_partition *parts;
47         unsigned int    num_parts;
48         bool            has_dma;                /* support dma transfer */
49
50         /* default is false, only for at32ap7000 chip is true */
51         bool            need_reset_workaround;
52 };
53
54  /* Serial */
55 struct atmel_uart_data {
56         int                     num;            /* port num */
57         short                   use_dma_tx;     /* use transmit DMA? */
58         short                   use_dma_rx;     /* use receive DMA? */
59         void __iomem            *regs;          /* virt. base address, if any */
60         struct serial_rs485     rs485;          /* rs485 settings */
61 };
62
63 /* FIXME: this needs a better location, but gets stuff building again */
64 extern int at91_suspend_entering_slow_clock(void);
65
66 #endif /* __ATMEL_H__ */