aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-10-29 17:12:23 -0400
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-11-06 07:29:33 -0500
commitbcd2360c1ff9fff69eb45bedc5fba7240c6da875 (patch)
tree230db16d269d8baad9f2cae5b823cefaf9bbd396
parent2484575268e22f10395a9975c023301b23cdea6e (diff)
arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r--arch/arm/mach-at91/include/mach/board.h55
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h7
-rw-r--r--drivers/ata/pata_at91.c2
-rw-r--r--drivers/input/touchscreen/atmel_tsadcc.c2
-rw-r--r--drivers/mmc/host/atmel-mci.c2
-rw-r--r--drivers/net/can/at91_can.c3
-rw-r--r--drivers/net/ethernet/cadence/at91_ether.c2
-rw-r--r--drivers/pcmcia/at91_cf.c2
-rw-r--r--drivers/rtc/rtc-at91sam9.c2
-rw-r--r--drivers/spi/spi-atmel.c2
-rw-r--r--drivers/tty/serial/atmel_serial.c2
-rw-r--r--drivers/usb/gadget/at91_udc.c2
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c2
-rw-r--r--drivers/usb/host/ohci-at91.c2
-rw-r--r--drivers/video/atmel_lcdfb.c2
-rw-r--r--include/linux/platform_data/atmel.h67
16 files changed, 80 insertions, 76 deletions
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index c55a4364ffb4..662451d85fc9 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -31,42 +31,15 @@
31#ifndef __ASM_ARCH_BOARD_H 31#ifndef __ASM_ARCH_BOARD_H
32#define __ASM_ARCH_BOARD_H 32#define __ASM_ARCH_BOARD_H
33 33
34#include <linux/mtd/partitions.h>
35#include <linux/device.h>
36#include <linux/i2c.h>
37#include <linux/leds.h>
38#include <linux/spi/spi.h>
39#include <linux/usb/atmel_usba_udc.h>
40#include <linux/atmel-mci.h>
41#include <sound/atmel-ac97c.h>
42#include <linux/serial.h>
43#include <linux/platform_data/macb.h>
44#include <linux/platform_data/atmel.h> 34#include <linux/platform_data/atmel.h>
45 35
46 /* USB Device */ 36 /* USB Device */
47struct at91_udc_data {
48 int vbus_pin; /* high == host powering us */
49 u8 vbus_active_low; /* vbus polarity */
50 u8 vbus_polled; /* Use polling, not interrupt */
51 int pullup_pin; /* active == D+ pulled up */
52 u8 pullup_active_low; /* true == pullup_pin is active low */
53};
54extern void __init at91_add_device_udc(struct at91_udc_data *data); 37extern void __init at91_add_device_udc(struct at91_udc_data *data);
55 38
56 /* USB High Speed Device */ 39 /* USB High Speed Device */
57extern void __init at91_add_device_usba(struct usba_platform_data *data); 40extern void __init at91_add_device_usba(struct usba_platform_data *data);
58 41
59 /* Compact Flash */ 42 /* Compact Flash */
60struct at91_cf_data {
61 int irq_pin; /* I/O IRQ */
62 int det_pin; /* Card detect */
63 int vcc_pin; /* power switching */
64 int rst_pin; /* card reset */
65 u8 chipselect; /* EBI Chip Select number */
66 u8 flags;
67#define AT91_CF_TRUE_IDE 0x01
68#define AT91_IDE_SWAP_A0_A2 0x02
69};
70extern void __init at91_add_device_cf(struct at91_cf_data *data); 43extern void __init at91_add_device_cf(struct at91_cf_data *data);
71 44
72 /* MMC / SD */ 45 /* MMC / SD */
@@ -86,16 +59,6 @@ extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *d
86extern void __init at91_add_device_eth(struct macb_platform_data *data); 59extern void __init at91_add_device_eth(struct macb_platform_data *data);
87 60
88 /* USB Host */ 61 /* USB Host */
89#define AT91_MAX_USBH_PORTS 3
90struct at91_usbh_data {
91 int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
92 int overcurrent_pin[AT91_MAX_USBH_PORTS];
93 u8 ports; /* number of ports on root hub */
94 u8 overcurrent_supported;
95 u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
96 u8 overcurrent_status[AT91_MAX_USBH_PORTS];
97 u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
98};
99extern void __init at91_add_device_usbh(struct at91_usbh_data *data); 62extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
100extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); 63extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
101extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); 64extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data);
@@ -124,13 +87,6 @@ extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pin
124 87
125extern struct platform_device *atmel_default_console_device; 88extern struct platform_device *atmel_default_console_device;
126 89
127struct atmel_uart_data {
128 int num; /* port num */
129 short use_dma_tx; /* use transmit DMA? */
130 short use_dma_rx; /* use receive DMA? */
131 void __iomem *regs; /* virt. base address, if any */
132 struct serial_rs485 rs485; /* rs485 settings */
133};
134extern void __init at91_add_device_serial(void); 90extern void __init at91_add_device_serial(void);
135 91
136/* 92/*
@@ -173,24 +129,13 @@ extern void __init at91_add_device_isi(struct isi_platform_data *data,
173 bool use_pck_as_mck); 129 bool use_pck_as_mck);
174 130
175 /* Touchscreen Controller */ 131 /* Touchscreen Controller */
176struct at91_tsadcc_data {
177 unsigned int adc_clock;
178 u8 pendet_debounce;
179 u8 ts_sample_hold_time;
180};
181extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data); 132extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data);
182 133
183/* CAN */ 134/* CAN */
184struct at91_can_data {
185 void (*transceiver_switch)(int on);
186};
187extern void __init at91_add_device_can(struct at91_can_data *data); 135extern void __init at91_add_device_can(struct at91_can_data *data);
188 136
189 /* LEDs */ 137 /* LEDs */
190extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); 138extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
191extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); 139extern void __init at91_pwm_leds(struct gpio_led *leds, int nr);
192 140
193/* FIXME: this needs a better location, but gets stuff building again */
194extern int at91_suspend_entering_slow_clock(void);
195
196#endif 141#endif
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index 70742ec997f8..dca93450cb0e 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -34,13 +34,6 @@ extern struct platform_device *atmel_default_console_device;
34#define ATMEL_USART_CTS 0x02 34#define ATMEL_USART_CTS 0x02
35#define ATMEL_USART_CLK 0x04 35#define ATMEL_USART_CLK 0x04
36 36
37struct atmel_uart_data {
38 int num; /* port num */
39 short use_dma_tx; /* use transmit DMA? */
40 short use_dma_rx; /* use receive DMA? */
41 void __iomem *regs; /* virtual base address, if any */
42 struct serial_rs485 rs485; /* rs485 settings */
43};
44void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); 37void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);
45struct platform_device *at32_add_device_usart(unsigned int id); 38struct platform_device *at32_add_device_usart(unsigned int id);
46 39
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 53d3770a0b1b..2a96bb2c53ee 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -27,9 +27,9 @@
27#include <linux/libata.h> 27#include <linux/libata.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/ata_platform.h> 29#include <linux/ata_platform.h>
30#include <linux/platform_data/atmel.h>
30 31
31#include <mach/at91sam9_smc.h> 32#include <mach/at91sam9_smc.h>
32#include <mach/board.h>
33#include <asm/gpio.h> 33#include <asm/gpio.h>
34 34
35#define DRV_NAME "pata_at91" 35#define DRV_NAME "pata_at91"
diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c
index 201b2d2ec1b3..ea392ee138ed 100644
--- a/drivers/input/touchscreen/atmel_tsadcc.c
+++ b/drivers/input/touchscreen/atmel_tsadcc.c
@@ -22,7 +22,7 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <mach/board.h> 25#include <linux/platform_data/atmel.h>
26#include <mach/cpu.h> 26#include <mach/cpu.h>
27 27
28/* Register definitions based on AT91SAM9RL64 preliminary draft datasheet */ 28/* Register definitions based on AT91SAM9RL64 preliminary draft datasheet */
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index ddf096e3803f..868998925826 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -28,6 +28,7 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/stat.h> 29#include <linux/stat.h>
30#include <linux/types.h> 30#include <linux/types.h>
31#include <linux/platform_data/atmel.h>
31 32
32#include <linux/mmc/host.h> 33#include <linux/mmc/host.h>
33#include <linux/mmc/sdio.h> 34#include <linux/mmc/sdio.h>
@@ -40,7 +41,6 @@
40#include <asm/unaligned.h> 41#include <asm/unaligned.h>
41 42
42#include <mach/cpu.h> 43#include <mach/cpu.h>
43#include <mach/board.h>
44 44
45#include "atmel-mci-regs.h" 45#include "atmel-mci-regs.h"
46 46
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index fcff73a73b1d..994b6acd65f4 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -33,12 +33,11 @@
33#include <linux/spinlock.h> 33#include <linux/spinlock.h>
34#include <linux/string.h> 34#include <linux/string.h>
35#include <linux/types.h> 35#include <linux/types.h>
36#include <linux/platform_data/atmel.h>
36 37
37#include <linux/can/dev.h> 38#include <linux/can/dev.h>
38#include <linux/can/error.h> 39#include <linux/can/error.h>
39 40
40#include <mach/board.h>
41
42#define AT91_MB_MASK(i) ((1 << (i)) - 1) 41#define AT91_MB_MASK(i) ((1 << (i)) - 1)
43 42
44/* Common registers */ 43/* Common registers */
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
index 4e980a7886fb..35fc6edbacf8 100644
--- a/drivers/net/ethernet/cadence/at91_ether.c
+++ b/drivers/net/ethernet/cadence/at91_ether.c
@@ -31,6 +31,7 @@
31#include <linux/clk.h> 31#include <linux/clk.h>
32#include <linux/gfp.h> 32#include <linux/gfp.h>
33#include <linux/phy.h> 33#include <linux/phy.h>
34#include <linux/platform_data/atmel.h>
34 35
35#include <asm/io.h> 36#include <asm/io.h>
36#include <asm/uaccess.h> 37#include <asm/uaccess.h>
@@ -38,7 +39,6 @@
38 39
39#include <mach/at91rm9200_emac.h> 40#include <mach/at91rm9200_emac.h>
40#include <asm/gpio.h> 41#include <asm/gpio.h>
41#include <mach/board.h>
42 42
43#include "at91_ether.h" 43#include "at91_ether.h"
44 44
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 9694c1e783a5..01463c781847 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -17,6 +17,7 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/platform_data/atmel.h>
20 21
21#include <pcmcia/ss.h> 22#include <pcmcia/ss.h>
22 23
@@ -24,7 +25,6 @@
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/sizes.h> 26#include <asm/sizes.h>
26 27
27#include <mach/board.h>
28#include <mach/at91rm9200_mc.h> 28#include <mach/at91rm9200_mc.h>
29#include <mach/at91_ramc.h> 29#include <mach/at91_ramc.h>
30 30
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 2dfe7a2fb998..e981798e9a9b 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -19,8 +19,8 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/ioctl.h> 20#include <linux/ioctl.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/platform_data/atmel.h>
22 23
23#include <mach/board.h>
24#include <mach/at91_rtt.h> 24#include <mach/at91_rtt.h>
25#include <mach/cpu.h> 25#include <mach/cpu.h>
26 26
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 16d6a839c7fa..61fb0ec26f06 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -19,9 +19,9 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/platform_data/atmel.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <mach/board.h>
25#include <asm/gpio.h> 25#include <asm/gpio.h>
26#include <mach/cpu.h> 26#include <mach/cpu.h>
27 27
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 3d7e1ee2fa57..5660ec2618a3 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -39,12 +39,12 @@
39#include <linux/atmel_pdc.h> 39#include <linux/atmel_pdc.h>
40#include <linux/atmel_serial.h> 40#include <linux/atmel_serial.h>
41#include <linux/uaccess.h> 41#include <linux/uaccess.h>
42#include <linux/platform_data/atmel.h>
42 43
43#include <asm/io.h> 44#include <asm/io.h>
44#include <asm/ioctls.h> 45#include <asm/ioctls.h>
45 46
46#include <asm/mach/serial_at91.h> 47#include <asm/mach/serial_at91.h>
47#include <mach/board.h>
48 48
49#ifdef CONFIG_ARM 49#ifdef CONFIG_ARM
50#include <mach/cpu.h> 50#include <mach/cpu.h>
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 89d90b5fb787..a7b042b781d5 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -31,6 +31,7 @@
31#include <linux/usb/gadget.h> 31#include <linux/usb/gadget.h>
32#include <linux/of.h> 32#include <linux/of.h>
33#include <linux/of_gpio.h> 33#include <linux/of_gpio.h>
34#include <linux/platform_data/atmel.h>
34 35
35#include <asm/byteorder.h> 36#include <asm/byteorder.h>
36#include <mach/hardware.h> 37#include <mach/hardware.h>
@@ -38,7 +39,6 @@
38#include <asm/irq.h> 39#include <asm/irq.h>
39#include <asm/gpio.h> 40#include <asm/gpio.h>
40 41
41#include <mach/board.h>
42#include <mach/cpu.h> 42#include <mach/cpu.h>
43#include <mach/at91sam9261_matrix.h> 43#include <mach/at91sam9261_matrix.h>
44#include <mach/at91_matrix.h> 44#include <mach/at91_matrix.h>
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 9a9bced813ed..a7aed84d98c9 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -21,9 +21,9 @@
21#include <linux/usb/gadget.h> 21#include <linux/usb/gadget.h>
22#include <linux/usb/atmel_usba_udc.h> 22#include <linux/usb/atmel_usba_udc.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/platform_data/atmel.h>
24 25
25#include <asm/gpio.h> 26#include <asm/gpio.h>
26#include <mach/board.h>
27 27
28#include "atmel_usba_udc.h" 28#include "atmel_usba_udc.h"
29 29
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 0bf72f943b00..8e62f81ae1ed 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -16,11 +16,11 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/of_platform.h> 17#include <linux/of_platform.h>
18#include <linux/of_gpio.h> 18#include <linux/of_gpio.h>
19#include <linux/platform_data/atmel.h>
19 20
20#include <mach/hardware.h> 21#include <mach/hardware.h>
21#include <asm/gpio.h> 22#include <asm/gpio.h>
22 23
23#include <mach/board.h>
24#include <mach/cpu.h> 24#include <mach/cpu.h>
25 25
26#ifndef CONFIG_ARCH_AT91 26#ifndef CONFIG_ARCH_AT91
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 94cac9f9919f..12cf5f31ee8f 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -19,8 +19,8 @@
19#include <linux/backlight.h> 19#include <linux/backlight.h>
20#include <linux/gfp.h> 20#include <linux/gfp.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/platform_data/atmel.h>
22 23
23#include <mach/board.h>
24#include <mach/cpu.h> 24#include <mach/cpu.h>
25#include <asm/gpio.h> 25#include <asm/gpio.h>
26 26
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index b0f2c56a8ea2..dbd6d53cc270 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -8,6 +8,49 @@
8#define __ATMEL_H__ 8#define __ATMEL_H__
9 9
10#include <linux/mtd/nand.h> 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 /* USB Device */
23struct at91_udc_data {
24 int vbus_pin; /* high == host powering us */
25 u8 vbus_active_low; /* vbus polarity */
26 u8 vbus_polled; /* Use polling, not interrupt */
27 int pullup_pin; /* active == D+ pulled up */
28 u8 pullup_active_low; /* true == pullup_pin is active low */
29};
30
31 /* Compact Flash */
32struct at91_cf_data {
33 int irq_pin; /* I/O IRQ */
34 int det_pin; /* Card detect */
35 int vcc_pin; /* power switching */
36 int rst_pin; /* card reset */
37 u8 chipselect; /* EBI Chip Select number */
38 u8 flags;
39#define AT91_CF_TRUE_IDE 0x01
40#define AT91_IDE_SWAP_A0_A2 0x02
41};
42
43 /* USB Host */
44#define AT91_MAX_USBH_PORTS 3
45struct at91_usbh_data {
46 int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
47 int overcurrent_pin[AT91_MAX_USBH_PORTS];
48 u8 ports; /* number of ports on root hub */
49 u8 overcurrent_supported;
50 u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
51 u8 overcurrent_status[AT91_MAX_USBH_PORTS];
52 u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
53};
11 54
12 /* NAND / SmartMedia */ 55 /* NAND / SmartMedia */
13struct atmel_nand_data { 56struct atmel_nand_data {
@@ -24,4 +67,28 @@ struct atmel_nand_data {
24 unsigned int num_parts; 67 unsigned int num_parts;
25}; 68};
26 69
70 /* Serial */
71struct atmel_uart_data {
72 int num; /* port num */
73 short use_dma_tx; /* use transmit DMA? */
74 short use_dma_rx; /* use receive DMA? */
75 void __iomem *regs; /* virt. base address, if any */
76 struct serial_rs485 rs485; /* rs485 settings */
77};
78
79 /* Touchscreen Controller */
80struct at91_tsadcc_data {
81 unsigned int adc_clock;
82 u8 pendet_debounce;
83 u8 ts_sample_hold_time;
84};
85
86/* CAN */
87struct at91_can_data {
88 void (*transceiver_switch)(int on);
89};
90
91/* FIXME: this needs a better location, but gets stuff building again */
92extern int at91_suspend_entering_slow_clock(void);
93
27#endif /* __ATMEL_H__ */ 94#endif /* __ATMEL_H__ */