diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-08-24 09:12:11 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:16:55 -0400 |
commit | a3b2924547a79cb6dba683d737501c01476f9fb3 (patch) | |
tree | 5224cdbcf704e2e9b1c74c677630943c5fe3a3fb /arch/arm/mach-ep93xx | |
parent | ec2a0833e5157fab6cac5f57a49b2f31eb418a39 (diff) |
ARM: ep93xx: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.
This moves such data out of the ep93xx include directories
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Axel Lin <axel.lin@gmail.com>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/dma.h | 93 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | 35 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx_spi.h | 29 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/fb.h | 56 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/simone.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/snappercl15.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/vision_ep9307.c | 4 |
10 files changed, 10 insertions, 223 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 4afe52aaaff3..e85bf17f2d2a 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -36,9 +36,9 @@ | |||
36 | #include <linux/export.h> | 36 | #include <linux/export.h> |
37 | 37 | ||
38 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
39 | #include <mach/fb.h> | 39 | #include <linux/platform_data/video-ep93xx.h> |
40 | #include <mach/ep93xx_keypad.h> | 40 | #include <linux/platform_data/keypad-ep93xx.h> |
41 | #include <mach/ep93xx_spi.h> | 41 | #include <linux/platform_data/spi-ep93xx.h> |
42 | #include <mach/gpio-ep93xx.h> | 42 | #include <mach/gpio-ep93xx.h> |
43 | 43 | ||
44 | #include <asm/mach/map.h> | 44 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c index 16976d7bdc8a..d8bfd02f5047 100644 --- a/arch/arm/mach-ep93xx/dma.c +++ b/arch/arm/mach-ep93xx/dma.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | 27 | ||
28 | #include <mach/dma.h> | 28 | #include <linux/platform_data/dma-ep93xx.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | 30 | ||
31 | #include "soc.h" | 31 | #include "soc.h" |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 337ab7cf4c16..b8f53d57a299 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #include <sound/cs4271.h> | 35 | #include <sound/cs4271.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/fb.h> | 38 | #include <linux/platform_data/video-ep93xx.h> |
39 | #include <mach/ep93xx_spi.h> | 39 | #include <linux/platform_data/spi-ep93xx.h> |
40 | #include <mach/gpio-ep93xx.h> | 40 | #include <mach/gpio-ep93xx.h> |
41 | 41 | ||
42 | #include <asm/hardware/vic.h> | 42 | #include <asm/hardware/vic.h> |
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h deleted file mode 100644 index e82c642fa53c..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/dma.h +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | #ifndef __ASM_ARCH_DMA_H | ||
2 | #define __ASM_ARCH_DMA_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/dmaengine.h> | ||
6 | #include <linux/dma-mapping.h> | ||
7 | |||
8 | /* | ||
9 | * M2P channels. | ||
10 | * | ||
11 | * Note that these values are also directly used for setting the PPALLOC | ||
12 | * register. | ||
13 | */ | ||
14 | #define EP93XX_DMA_I2S1 0 | ||
15 | #define EP93XX_DMA_I2S2 1 | ||
16 | #define EP93XX_DMA_AAC1 2 | ||
17 | #define EP93XX_DMA_AAC2 3 | ||
18 | #define EP93XX_DMA_AAC3 4 | ||
19 | #define EP93XX_DMA_I2S3 5 | ||
20 | #define EP93XX_DMA_UART1 6 | ||
21 | #define EP93XX_DMA_UART2 7 | ||
22 | #define EP93XX_DMA_UART3 8 | ||
23 | #define EP93XX_DMA_IRDA 9 | ||
24 | /* M2M channels */ | ||
25 | #define EP93XX_DMA_SSP 10 | ||
26 | #define EP93XX_DMA_IDE 11 | ||
27 | |||
28 | /** | ||
29 | * struct ep93xx_dma_data - configuration data for the EP93xx dmaengine | ||
30 | * @port: peripheral which is requesting the channel | ||
31 | * @direction: TX/RX channel | ||
32 | * @name: optional name for the channel, this is displayed in /proc/interrupts | ||
33 | * | ||
34 | * This information is passed as private channel parameter in a filter | ||
35 | * function. Note that this is only needed for slave/cyclic channels. For | ||
36 | * memcpy channels %NULL data should be passed. | ||
37 | */ | ||
38 | struct ep93xx_dma_data { | ||
39 | int port; | ||
40 | enum dma_transfer_direction direction; | ||
41 | const char *name; | ||
42 | }; | ||
43 | |||
44 | /** | ||
45 | * struct ep93xx_dma_chan_data - platform specific data for a DMA channel | ||
46 | * @name: name of the channel, used for getting the right clock for the channel | ||
47 | * @base: mapped registers | ||
48 | * @irq: interrupt number used by this channel | ||
49 | */ | ||
50 | struct ep93xx_dma_chan_data { | ||
51 | const char *name; | ||
52 | void __iomem *base; | ||
53 | int irq; | ||
54 | }; | ||
55 | |||
56 | /** | ||
57 | * struct ep93xx_dma_platform_data - platform data for the dmaengine driver | ||
58 | * @channels: array of channels which are passed to the driver | ||
59 | * @num_channels: number of channels in the array | ||
60 | * | ||
61 | * This structure is passed to the DMA engine driver via platform data. For | ||
62 | * M2P channels, contract is that even channels are for TX and odd for RX. | ||
63 | * There is no requirement for the M2M channels. | ||
64 | */ | ||
65 | struct ep93xx_dma_platform_data { | ||
66 | struct ep93xx_dma_chan_data *channels; | ||
67 | size_t num_channels; | ||
68 | }; | ||
69 | |||
70 | static inline bool ep93xx_dma_chan_is_m2p(struct dma_chan *chan) | ||
71 | { | ||
72 | return !strcmp(dev_name(chan->device->dev), "ep93xx-dma-m2p"); | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * ep93xx_dma_chan_direction - returns direction the channel can be used | ||
77 | * @chan: channel | ||
78 | * | ||
79 | * This function can be used in filter functions to find out whether the | ||
80 | * channel supports given DMA direction. Only M2P channels have such | ||
81 | * limitation, for M2M channels the direction is configurable. | ||
82 | */ | ||
83 | static inline enum dma_transfer_direction | ||
84 | ep93xx_dma_chan_direction(struct dma_chan *chan) | ||
85 | { | ||
86 | if (!ep93xx_dma_chan_is_m2p(chan)) | ||
87 | return DMA_NONE; | ||
88 | |||
89 | /* even channels are for TX, odd for RX */ | ||
90 | return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; | ||
91 | } | ||
92 | |||
93 | #endif /* __ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h deleted file mode 100644 index 1e2f4e97f428..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_EP93XX_KEYPAD_H | ||
6 | #define __ASM_ARCH_EP93XX_KEYPAD_H | ||
7 | |||
8 | struct matrix_keymap_data; | ||
9 | |||
10 | /* flags for the ep93xx_keypad driver */ | ||
11 | #define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ | ||
12 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ | ||
13 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ | ||
14 | #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ | ||
15 | #define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ | ||
16 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ | ||
17 | |||
18 | /** | ||
19 | * struct ep93xx_keypad_platform_data - platform specific device structure | ||
20 | * @keymap_data: pointer to &matrix_keymap_data | ||
21 | * @debounce: debounce start count; terminal count is 0xff | ||
22 | * @prescale: row/column counter pre-scaler load value | ||
23 | * @flags: see above | ||
24 | */ | ||
25 | struct ep93xx_keypad_platform_data { | ||
26 | struct matrix_keymap_data *keymap_data; | ||
27 | unsigned int debounce; | ||
28 | unsigned int prescale; | ||
29 | unsigned int flags; | ||
30 | }; | ||
31 | |||
32 | #define EP93XX_MATRIX_ROWS (8) | ||
33 | #define EP93XX_MATRIX_COLS (8) | ||
34 | |||
35 | #endif /* __ASM_ARCH_EP93XX_KEYPAD_H */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx_spi.h b/arch/arm/mach-ep93xx/include/mach/ep93xx_spi.h deleted file mode 100644 index 9bb63ac13f04..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx_spi.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_EP93XX_SPI_H | ||
2 | #define __ASM_MACH_EP93XX_SPI_H | ||
3 | |||
4 | struct spi_device; | ||
5 | |||
6 | /** | ||
7 | * struct ep93xx_spi_info - EP93xx specific SPI descriptor | ||
8 | * @num_chipselect: number of chip selects on this board, must be | ||
9 | * at least one | ||
10 | * @use_dma: use DMA for the transfers | ||
11 | */ | ||
12 | struct ep93xx_spi_info { | ||
13 | int num_chipselect; | ||
14 | bool use_dma; | ||
15 | }; | ||
16 | |||
17 | /** | ||
18 | * struct ep93xx_spi_chip_ops - operation callbacks for SPI slave device | ||
19 | * @setup: setup the chip select mechanism | ||
20 | * @cleanup: cleanup the chip select mechanism | ||
21 | * @cs_control: control the device chip select | ||
22 | */ | ||
23 | struct ep93xx_spi_chip_ops { | ||
24 | int (*setup)(struct spi_device *spi); | ||
25 | void (*cleanup)(struct spi_device *spi); | ||
26 | void (*cs_control)(struct spi_device *spi, int value); | ||
27 | }; | ||
28 | |||
29 | #endif /* __ASM_MACH_EP93XX_SPI_H */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/fb.h b/arch/arm/mach-ep93xx/include/mach/fb.h deleted file mode 100644 index d5ae11d7c453..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/fb.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/fb.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_EP93XXFB_H | ||
6 | #define __ASM_ARCH_EP93XXFB_H | ||
7 | |||
8 | struct platform_device; | ||
9 | struct fb_videomode; | ||
10 | struct fb_info; | ||
11 | |||
12 | #define EP93XXFB_USE_MODEDB 0 | ||
13 | |||
14 | /* VideoAttributes flags */ | ||
15 | #define EP93XXFB_STATE_MACHINE_ENABLE (1 << 0) | ||
16 | #define EP93XXFB_PIXEL_CLOCK_ENABLE (1 << 1) | ||
17 | #define EP93XXFB_VSYNC_ENABLE (1 << 2) | ||
18 | #define EP93XXFB_PIXEL_DATA_ENABLE (1 << 3) | ||
19 | #define EP93XXFB_COMPOSITE_SYNC (1 << 4) | ||
20 | #define EP93XXFB_SYNC_VERT_HIGH (1 << 5) | ||
21 | #define EP93XXFB_SYNC_HORIZ_HIGH (1 << 6) | ||
22 | #define EP93XXFB_SYNC_BLANK_HIGH (1 << 7) | ||
23 | #define EP93XXFB_PCLK_FALLING (1 << 8) | ||
24 | #define EP93XXFB_ENABLE_AC (1 << 9) | ||
25 | #define EP93XXFB_ENABLE_LCD (1 << 10) | ||
26 | #define EP93XXFB_ENABLE_CCIR (1 << 12) | ||
27 | #define EP93XXFB_USE_PARALLEL_INTERFACE (1 << 13) | ||
28 | #define EP93XXFB_ENABLE_INTERRUPT (1 << 14) | ||
29 | #define EP93XXFB_USB_INTERLACE (1 << 16) | ||
30 | #define EP93XXFB_USE_EQUALIZATION (1 << 17) | ||
31 | #define EP93XXFB_USE_DOUBLE_HORZ (1 << 18) | ||
32 | #define EP93XXFB_USE_DOUBLE_VERT (1 << 19) | ||
33 | #define EP93XXFB_USE_BLANK_PIXEL (1 << 20) | ||
34 | #define EP93XXFB_USE_SDCSN0 (0 << 21) | ||
35 | #define EP93XXFB_USE_SDCSN1 (1 << 21) | ||
36 | #define EP93XXFB_USE_SDCSN2 (2 << 21) | ||
37 | #define EP93XXFB_USE_SDCSN3 (3 << 21) | ||
38 | |||
39 | #define EP93XXFB_ENABLE (EP93XXFB_STATE_MACHINE_ENABLE | \ | ||
40 | EP93XXFB_PIXEL_CLOCK_ENABLE | \ | ||
41 | EP93XXFB_VSYNC_ENABLE | \ | ||
42 | EP93XXFB_PIXEL_DATA_ENABLE) | ||
43 | |||
44 | struct ep93xxfb_mach_info { | ||
45 | unsigned int num_modes; | ||
46 | const struct fb_videomode *modes; | ||
47 | const struct fb_videomode *default_mode; | ||
48 | int bpp; | ||
49 | unsigned int flags; | ||
50 | |||
51 | int (*setup)(struct platform_device *pdev); | ||
52 | void (*teardown)(struct platform_device *pdev); | ||
53 | void (*blank)(int blank_mode, struct fb_info *info); | ||
54 | }; | ||
55 | |||
56 | #endif /* __ASM_ARCH_EP93XXFB_H */ | ||
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 33dc07917417..0eb3f17a6fa2 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/i2c-gpio.h> | 22 | #include <linux/i2c-gpio.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/fb.h> | 25 | #include <linux/platform_data/video-ep93xx.h> |
26 | #include <mach/gpio-ep93xx.h> | 26 | #include <mach/gpio-ep93xx.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | 28 | #include <asm/hardware/vic.h> |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index 01abd3516a77..50043eef1cf2 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/mtd/nand.h> | 28 | #include <linux/mtd/nand.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/fb.h> | 31 | #include <linux/platform_data/video-ep93xx.h> |
32 | #include <mach/gpio-ep93xx.h> | 32 | #include <mach/gpio-ep93xx.h> |
33 | 33 | ||
34 | #include <asm/hardware/vic.h> | 34 | #include <asm/hardware/vic.h> |
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index 2905a4929bdc..ba92e25e3016 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c | |||
@@ -30,8 +30,8 @@ | |||
30 | #include <linux/mmc/host.h> | 30 | #include <linux/mmc/host.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/fb.h> | 33 | #include <linux/platform_data/video-ep93xx.h> |
34 | #include <mach/ep93xx_spi.h> | 34 | #include <linux/platform_data/spi-ep93xx.h> |
35 | #include <mach/gpio-ep93xx.h> | 35 | #include <mach/gpio-ep93xx.h> |
36 | 36 | ||
37 | #include <asm/hardware/vic.h> | 37 | #include <asm/hardware/vic.h> |