diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-08-24 09:14:29 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:17:21 -0400 |
commit | 82906b13a6f4f42edec92f0a3e480e1bdd9b3f91 (patch) | |
tree | 7df9b785e51bc00963b9a0f9a58f053ada866b91 /include/linux | |
parent | a3b2924547a79cb6dba683d737501c01476f9fb3 (diff) |
ARM: imx: 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 imx 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: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Sascha Hauer <kernel@pengutronix.de>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Dan Williams <djbw@fb.com>
Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/platform_data/asoc-imx-ssi.h | 21 | ||||
-rw-r--r-- | include/linux/platform_data/camera-mx1.h | 35 | ||||
-rw-r--r-- | include/linux/platform_data/camera-mx2.h | 46 | ||||
-rw-r--r-- | include/linux/platform_data/camera-mx3.h | 48 | ||||
-rw-r--r-- | include/linux/platform_data/dma-imx-sdma.h | 59 | ||||
-rw-r--r-- | include/linux/platform_data/dma-imx.h | 67 | ||||
-rw-r--r-- | include/linux/platform_data/i2c-imx.h | 21 | ||||
-rw-r--r-- | include/linux/platform_data/mmc-esdhc-imx.h | 43 | ||||
-rw-r--r-- | include/linux/platform_data/mmc-mxcmmc.h | 39 | ||||
-rw-r--r-- | include/linux/platform_data/mtd-mxc_nand.h | 32 | ||||
-rw-r--r-- | include/linux/platform_data/serial-imx.h | 35 | ||||
-rw-r--r-- | include/linux/platform_data/spi-imx.h | 27 | ||||
-rw-r--r-- | include/linux/platform_data/usb-ehci-mxc.h | 59 | ||||
-rw-r--r-- | include/linux/platform_data/usb-imx_udc.h | 23 | ||||
-rw-r--r-- | include/linux/platform_data/usb-mx2.h | 38 | ||||
-rw-r--r-- | include/linux/platform_data/video-imxfb.h | 84 | ||||
-rw-r--r-- | include/linux/platform_data/video-mx3fb.h | 53 |
17 files changed, 730 insertions, 0 deletions
diff --git a/include/linux/platform_data/asoc-imx-ssi.h b/include/linux/platform_data/asoc-imx-ssi.h new file mode 100644 index 000000000000..63f3c2804239 --- /dev/null +++ b/include/linux/platform_data/asoc-imx-ssi.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __MACH_SSI_H | ||
2 | #define __MACH_SSI_H | ||
3 | |||
4 | struct snd_ac97; | ||
5 | |||
6 | extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end; | ||
7 | extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer; | ||
8 | |||
9 | struct imx_ssi_platform_data { | ||
10 | unsigned int flags; | ||
11 | #define IMX_SSI_DMA (1 << 0) | ||
12 | #define IMX_SSI_USE_AC97 (1 << 1) | ||
13 | #define IMX_SSI_NET (1 << 2) | ||
14 | #define IMX_SSI_SYN (1 << 3) | ||
15 | #define IMX_SSI_USE_I2S_SLAVE (1 << 4) | ||
16 | void (*ac97_reset) (struct snd_ac97 *ac97); | ||
17 | void (*ac97_warm_reset)(struct snd_ac97 *ac97); | ||
18 | }; | ||
19 | |||
20 | #endif /* __MACH_SSI_H */ | ||
21 | |||
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h new file mode 100644 index 000000000000..4fd6c70314b4 --- /dev/null +++ b/include/linux/platform_data/camera-mx1.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * mx1_camera.h - i.MX1/i.MXL camera driver header file | ||
3 | * | ||
4 | * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
5 | * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com> | ||
6 | * | ||
7 | * Based on PXA camera.h file: | ||
8 | * Copyright (C) 2003, Intel Corporation | ||
9 | * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
17 | #define __ASM_ARCH_CAMERA_H_ | ||
18 | |||
19 | #define MX1_CAMERA_DATA_HIGH 1 | ||
20 | #define MX1_CAMERA_PCLK_RISING 2 | ||
21 | #define MX1_CAMERA_VSYNC_HIGH 4 | ||
22 | |||
23 | extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end; | ||
24 | |||
25 | /** | ||
26 | * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data | ||
27 | * @mclk_10khz: master clock frequency in 10kHz units | ||
28 | * @flags: MX1 camera platform flags | ||
29 | */ | ||
30 | struct mx1_camera_pdata { | ||
31 | unsigned long mclk_10khz; | ||
32 | unsigned long flags; | ||
33 | }; | ||
34 | |||
35 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/include/linux/platform_data/camera-mx2.h b/include/linux/platform_data/camera-mx2.h new file mode 100644 index 000000000000..3c080a32dbf5 --- /dev/null +++ b/include/linux/platform_data/camera-mx2.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * mx2-cam.h - i.MX27/i.MX25 camera driver header file | ||
3 | * | ||
4 | * Copyright (C) 2003, Intel Corporation | ||
5 | * Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de> | ||
6 | * Copyright (C) 2010, Baruch Siach <baruch@tkos.co.il> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __MACH_MX2_CAM_H_ | ||
24 | #define __MACH_MX2_CAM_H_ | ||
25 | |||
26 | #define MX2_CAMERA_SWAP16 (1 << 0) | ||
27 | #define MX2_CAMERA_EXT_VSYNC (1 << 1) | ||
28 | #define MX2_CAMERA_CCIR (1 << 2) | ||
29 | #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) | ||
30 | #define MX2_CAMERA_HSYNC_HIGH (1 << 4) | ||
31 | #define MX2_CAMERA_GATED_CLOCK (1 << 5) | ||
32 | #define MX2_CAMERA_INV_DATA (1 << 6) | ||
33 | #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) | ||
34 | #define MX2_CAMERA_PACK_DIR_MSB (1 << 8) | ||
35 | |||
36 | /** | ||
37 | * struct mx2_camera_platform_data - optional platform data for mx2_camera | ||
38 | * @flags: any combination of MX2_CAMERA_* | ||
39 | * @clk: clock rate of the csi block / 2 | ||
40 | */ | ||
41 | struct mx2_camera_platform_data { | ||
42 | unsigned long flags; | ||
43 | unsigned long clk; | ||
44 | }; | ||
45 | |||
46 | #endif /* __MACH_MX2_CAM_H_ */ | ||
diff --git a/include/linux/platform_data/camera-mx3.h b/include/linux/platform_data/camera-mx3.h new file mode 100644 index 000000000000..f226ee3777e1 --- /dev/null +++ b/include/linux/platform_data/camera-mx3.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * mx3_camera.h - i.MX3x camera driver header file | ||
3 | * | ||
4 | * Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef _MX3_CAMERA_H_ | ||
18 | #define _MX3_CAMERA_H_ | ||
19 | |||
20 | #include <linux/device.h> | ||
21 | |||
22 | #define MX3_CAMERA_CLK_SRC 1 | ||
23 | #define MX3_CAMERA_EXT_VSYNC 2 | ||
24 | #define MX3_CAMERA_DP 4 | ||
25 | #define MX3_CAMERA_PCP 8 | ||
26 | #define MX3_CAMERA_HSP 0x10 | ||
27 | #define MX3_CAMERA_VSP 0x20 | ||
28 | #define MX3_CAMERA_DATAWIDTH_4 0x40 | ||
29 | #define MX3_CAMERA_DATAWIDTH_8 0x80 | ||
30 | #define MX3_CAMERA_DATAWIDTH_10 0x100 | ||
31 | #define MX3_CAMERA_DATAWIDTH_15 0x200 | ||
32 | |||
33 | #define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \ | ||
34 | MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15) | ||
35 | |||
36 | /** | ||
37 | * struct mx3_camera_pdata - i.MX3x camera platform data | ||
38 | * @flags: MX3_CAMERA_* flags | ||
39 | * @mclk_10khz: master clock frequency in 10kHz units | ||
40 | * @dma_dev: IPU DMA device to match against in channel allocation | ||
41 | */ | ||
42 | struct mx3_camera_pdata { | ||
43 | unsigned long flags; | ||
44 | unsigned long mclk_10khz; | ||
45 | struct device *dma_dev; | ||
46 | }; | ||
47 | |||
48 | #endif | ||
diff --git a/include/linux/platform_data/dma-imx-sdma.h b/include/linux/platform_data/dma-imx-sdma.h new file mode 100644 index 000000000000..3a3942823c20 --- /dev/null +++ b/include/linux/platform_data/dma-imx-sdma.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef __MACH_MXC_SDMA_H__ | ||
2 | #define __MACH_MXC_SDMA_H__ | ||
3 | |||
4 | /** | ||
5 | * struct sdma_script_start_addrs - SDMA script start pointers | ||
6 | * | ||
7 | * start addresses of the different functions in the physical | ||
8 | * address space of the SDMA engine. | ||
9 | */ | ||
10 | struct sdma_script_start_addrs { | ||
11 | s32 ap_2_ap_addr; | ||
12 | s32 ap_2_bp_addr; | ||
13 | s32 ap_2_ap_fixed_addr; | ||
14 | s32 bp_2_ap_addr; | ||
15 | s32 loopback_on_dsp_side_addr; | ||
16 | s32 mcu_interrupt_only_addr; | ||
17 | s32 firi_2_per_addr; | ||
18 | s32 firi_2_mcu_addr; | ||
19 | s32 per_2_firi_addr; | ||
20 | s32 mcu_2_firi_addr; | ||
21 | s32 uart_2_per_addr; | ||
22 | s32 uart_2_mcu_addr; | ||
23 | s32 per_2_app_addr; | ||
24 | s32 mcu_2_app_addr; | ||
25 | s32 per_2_per_addr; | ||
26 | s32 uartsh_2_per_addr; | ||
27 | s32 uartsh_2_mcu_addr; | ||
28 | s32 per_2_shp_addr; | ||
29 | s32 mcu_2_shp_addr; | ||
30 | s32 ata_2_mcu_addr; | ||
31 | s32 mcu_2_ata_addr; | ||
32 | s32 app_2_per_addr; | ||
33 | s32 app_2_mcu_addr; | ||
34 | s32 shp_2_per_addr; | ||
35 | s32 shp_2_mcu_addr; | ||
36 | s32 mshc_2_mcu_addr; | ||
37 | s32 mcu_2_mshc_addr; | ||
38 | s32 spdif_2_mcu_addr; | ||
39 | s32 mcu_2_spdif_addr; | ||
40 | s32 asrc_2_mcu_addr; | ||
41 | s32 ext_mem_2_ipu_addr; | ||
42 | s32 descrambler_addr; | ||
43 | s32 dptc_dvfs_addr; | ||
44 | s32 utra_addr; | ||
45 | s32 ram_code_start_addr; | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * struct sdma_platform_data - platform specific data for SDMA engine | ||
50 | * | ||
51 | * @fw_name The firmware name | ||
52 | * @script_addrs SDMA scripts addresses in SDMA ROM | ||
53 | */ | ||
54 | struct sdma_platform_data { | ||
55 | char *fw_name; | ||
56 | struct sdma_script_start_addrs *script_addrs; | ||
57 | }; | ||
58 | |||
59 | #endif /* __MACH_MXC_SDMA_H__ */ | ||
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h new file mode 100644 index 000000000000..1b9080385b46 --- /dev/null +++ b/include/linux/platform_data/dma-imx.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_MXC_DMA_H__ | ||
10 | #define __ASM_ARCH_MXC_DMA_H__ | ||
11 | |||
12 | #include <linux/scatterlist.h> | ||
13 | #include <linux/device.h> | ||
14 | #include <linux/dmaengine.h> | ||
15 | |||
16 | /* | ||
17 | * This enumerates peripheral types. Used for SDMA. | ||
18 | */ | ||
19 | enum sdma_peripheral_type { | ||
20 | IMX_DMATYPE_SSI, /* MCU domain SSI */ | ||
21 | IMX_DMATYPE_SSI_SP, /* Shared SSI */ | ||
22 | IMX_DMATYPE_MMC, /* MMC */ | ||
23 | IMX_DMATYPE_SDHC, /* SDHC */ | ||
24 | IMX_DMATYPE_UART, /* MCU domain UART */ | ||
25 | IMX_DMATYPE_UART_SP, /* Shared UART */ | ||
26 | IMX_DMATYPE_FIRI, /* FIRI */ | ||
27 | IMX_DMATYPE_CSPI, /* MCU domain CSPI */ | ||
28 | IMX_DMATYPE_CSPI_SP, /* Shared CSPI */ | ||
29 | IMX_DMATYPE_SIM, /* SIM */ | ||
30 | IMX_DMATYPE_ATA, /* ATA */ | ||
31 | IMX_DMATYPE_CCM, /* CCM */ | ||
32 | IMX_DMATYPE_EXT, /* External peripheral */ | ||
33 | IMX_DMATYPE_MSHC, /* Memory Stick Host Controller */ | ||
34 | IMX_DMATYPE_MSHC_SP, /* Shared Memory Stick Host Controller */ | ||
35 | IMX_DMATYPE_DSP, /* DSP */ | ||
36 | IMX_DMATYPE_MEMORY, /* Memory */ | ||
37 | IMX_DMATYPE_FIFO_MEMORY,/* FIFO type Memory */ | ||
38 | IMX_DMATYPE_SPDIF, /* SPDIF */ | ||
39 | IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */ | ||
40 | IMX_DMATYPE_ASRC, /* ASRC */ | ||
41 | IMX_DMATYPE_ESAI, /* ESAI */ | ||
42 | }; | ||
43 | |||
44 | enum imx_dma_prio { | ||
45 | DMA_PRIO_HIGH = 0, | ||
46 | DMA_PRIO_MEDIUM = 1, | ||
47 | DMA_PRIO_LOW = 2 | ||
48 | }; | ||
49 | |||
50 | struct imx_dma_data { | ||
51 | int dma_request; /* DMA request line */ | ||
52 | enum sdma_peripheral_type peripheral_type; | ||
53 | int priority; | ||
54 | }; | ||
55 | |||
56 | static inline int imx_dma_is_ipu(struct dma_chan *chan) | ||
57 | { | ||
58 | return !strcmp(dev_name(chan->device->dev), "ipu-core"); | ||
59 | } | ||
60 | |||
61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) | ||
62 | { | ||
63 | return strstr(dev_name(chan->device->dev), "sdma") || | ||
64 | !strcmp(dev_name(chan->device->dev), "imx-dma"); | ||
65 | } | ||
66 | |||
67 | #endif | ||
diff --git a/include/linux/platform_data/i2c-imx.h b/include/linux/platform_data/i2c-imx.h new file mode 100644 index 000000000000..8289d915e615 --- /dev/null +++ b/include/linux/platform_data/i2c-imx.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * i2c.h - i.MX I2C driver header file | ||
3 | * | ||
4 | * Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com> | ||
5 | * | ||
6 | * This file is released under the GPLv2 | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_I2C_H_ | ||
10 | #define __ASM_ARCH_I2C_H_ | ||
11 | |||
12 | /** | ||
13 | * struct imxi2c_platform_data - structure of platform data for MXC I2C driver | ||
14 | * @bitrate: Bus speed measured in Hz | ||
15 | * | ||
16 | **/ | ||
17 | struct imxi2c_platform_data { | ||
18 | u32 bitrate; | ||
19 | }; | ||
20 | |||
21 | #endif /* __ASM_ARCH_I2C_H_ */ | ||
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h new file mode 100644 index 000000000000..aaf97481f413 --- /dev/null +++ b/include/linux/platform_data/mmc-esdhc-imx.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; version 2 | ||
7 | * of the License. | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_IMX_ESDHC_H | ||
11 | #define __ASM_ARCH_IMX_ESDHC_H | ||
12 | |||
13 | enum wp_types { | ||
14 | ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ | ||
15 | ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ | ||
16 | ESDHC_WP_GPIO, /* external gpio pin for WP */ | ||
17 | }; | ||
18 | |||
19 | enum cd_types { | ||
20 | ESDHC_CD_NONE, /* no CD, neither controller nor gpio */ | ||
21 | ESDHC_CD_CONTROLLER, /* mmc controller internal CD */ | ||
22 | ESDHC_CD_GPIO, /* external gpio pin for CD */ | ||
23 | ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */ | ||
24 | }; | ||
25 | |||
26 | /** | ||
27 | * struct esdhc_platform_data - platform data for esdhc on i.MX | ||
28 | * | ||
29 | * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35. | ||
30 | * | ||
31 | * @wp_gpio: gpio for write_protect | ||
32 | * @cd_gpio: gpio for card_detect interrupt | ||
33 | * @wp_type: type of write_protect method (see wp_types enum above) | ||
34 | * @cd_type: type of card_detect method (see cd_types enum above) | ||
35 | */ | ||
36 | |||
37 | struct esdhc_platform_data { | ||
38 | unsigned int wp_gpio; | ||
39 | unsigned int cd_gpio; | ||
40 | enum wp_types wp_type; | ||
41 | enum cd_types cd_type; | ||
42 | }; | ||
43 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ | ||
diff --git a/include/linux/platform_data/mmc-mxcmmc.h b/include/linux/platform_data/mmc-mxcmmc.h new file mode 100644 index 000000000000..29115f405af9 --- /dev/null +++ b/include/linux/platform_data/mmc-mxcmmc.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef ASMARM_ARCH_MMC_H | ||
2 | #define ASMARM_ARCH_MMC_H | ||
3 | |||
4 | #include <linux/mmc/host.h> | ||
5 | |||
6 | struct device; | ||
7 | |||
8 | /* board specific SDHC data, optional. | ||
9 | * If not present, a writable card with 3,3V is assumed. | ||
10 | */ | ||
11 | struct imxmmc_platform_data { | ||
12 | /* Return values for the get_ro callback should be: | ||
13 | * 0 for a read/write card | ||
14 | * 1 for a read-only card | ||
15 | * -ENOSYS when not supported (equal to NULL callback) | ||
16 | * or a negative errno value when something bad happened | ||
17 | */ | ||
18 | int (*get_ro)(struct device *); | ||
19 | |||
20 | /* board specific hook to (de)initialize the SD slot. | ||
21 | * The board code can call 'handler' on a card detection | ||
22 | * change giving data as argument. | ||
23 | */ | ||
24 | int (*init)(struct device *dev, irq_handler_t handler, void *data); | ||
25 | void (*exit)(struct device *dev, void *data); | ||
26 | |||
27 | /* available voltages. If not given, assume | ||
28 | * MMC_VDD_32_33 | MMC_VDD_33_34 | ||
29 | */ | ||
30 | unsigned int ocr_avail; | ||
31 | |||
32 | /* adjust slot voltage */ | ||
33 | void (*setpower)(struct device *, unsigned int vdd); | ||
34 | |||
35 | /* enable card detect using DAT3 */ | ||
36 | int dat3_card_detect; | ||
37 | }; | ||
38 | |||
39 | #endif | ||
diff --git a/include/linux/platform_data/mtd-mxc_nand.h b/include/linux/platform_data/mtd-mxc_nand.h new file mode 100644 index 000000000000..6bb96ef1600b --- /dev/null +++ b/include/linux/platform_data/mtd-mxc_nand.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_NAND_H | ||
21 | #define __ASM_ARCH_NAND_H | ||
22 | |||
23 | #include <linux/mtd/partitions.h> | ||
24 | |||
25 | struct mxc_nand_platform_data { | ||
26 | unsigned int width; /* data bus width in bytes */ | ||
27 | unsigned int hw_ecc:1; /* 0 if suppress hardware ECC */ | ||
28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ | ||
29 | struct mtd_partition *parts; /* partition table */ | ||
30 | int nr_parts; /* size of parts */ | ||
31 | }; | ||
32 | #endif /* __ASM_ARCH_NAND_H */ | ||
diff --git a/include/linux/platform_data/serial-imx.h b/include/linux/platform_data/serial-imx.h new file mode 100644 index 000000000000..4adec9b154dd --- /dev/null +++ b/include/linux/platform_data/serial-imx.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef ASMARM_ARCH_UART_H | ||
20 | #define ASMARM_ARCH_UART_H | ||
21 | |||
22 | #define IMXUART_HAVE_RTSCTS (1<<0) | ||
23 | #define IMXUART_IRDA (1<<1) | ||
24 | |||
25 | struct imxuart_platform_data { | ||
26 | int (*init)(struct platform_device *pdev); | ||
27 | void (*exit)(struct platform_device *pdev); | ||
28 | unsigned int flags; | ||
29 | void (*irda_enable)(int enable); | ||
30 | unsigned int irda_inv_rx:1; | ||
31 | unsigned int irda_inv_tx:1; | ||
32 | unsigned short transceiver_delay; | ||
33 | }; | ||
34 | |||
35 | #endif | ||
diff --git a/include/linux/platform_data/spi-imx.h b/include/linux/platform_data/spi-imx.h new file mode 100644 index 000000000000..08be445e8eb8 --- /dev/null +++ b/include/linux/platform_data/spi-imx.h | |||
@@ -0,0 +1,27 @@ | |||
1 | |||
2 | #ifndef __MACH_SPI_H_ | ||
3 | #define __MACH_SPI_H_ | ||
4 | |||
5 | /* | ||
6 | * struct spi_imx_master - device.platform_data for SPI controller devices. | ||
7 | * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio | ||
8 | * pins, numbers < 0 mean internal CSPI chipselects according | ||
9 | * to MXC_SPI_CS(). Normally you want to use gpio based chip | ||
10 | * selects as the CSPI module tries to be intelligent about | ||
11 | * when to assert the chipselect: The CSPI module deasserts the | ||
12 | * chipselect once it runs out of input data. The other problem | ||
13 | * is that it is not possible to mix between high active and low | ||
14 | * active chipselects on one single bus using the internal | ||
15 | * chipselects. Unfortunately Freescale decided to put some | ||
16 | * chipselects on dedicated pins which are not usable as gpios, | ||
17 | * so we have to support the internal chipselects. | ||
18 | * @num_chipselect: ARRAY_SIZE(chipselect) | ||
19 | */ | ||
20 | struct spi_imx_master { | ||
21 | int *chipselect; | ||
22 | int num_chipselect; | ||
23 | }; | ||
24 | |||
25 | #define MXC_SPI_CS(no) ((no) - 32) | ||
26 | |||
27 | #endif /* __MACH_SPI_H_*/ | ||
diff --git a/include/linux/platform_data/usb-ehci-mxc.h b/include/linux/platform_data/usb-ehci-mxc.h new file mode 100644 index 000000000000..7eb9d1329671 --- /dev/null +++ b/include/linux/platform_data/usb-ehci-mxc.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
2 | #define __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
3 | |||
4 | /* values for portsc field */ | ||
5 | #define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23) | ||
6 | #define MXC_EHCI_FORCE_FS (1 << 24) | ||
7 | #define MXC_EHCI_UTMI_8BIT (0 << 28) | ||
8 | #define MXC_EHCI_UTMI_16BIT (1 << 28) | ||
9 | #define MXC_EHCI_SERIAL (1 << 29) | ||
10 | #define MXC_EHCI_MODE_UTMI (0 << 30) | ||
11 | #define MXC_EHCI_MODE_PHILIPS (1 << 30) | ||
12 | #define MXC_EHCI_MODE_ULPI (2 << 30) | ||
13 | #define MXC_EHCI_MODE_SERIAL (3 << 30) | ||
14 | |||
15 | /* values for flags field */ | ||
16 | #define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) | ||
17 | #define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) | ||
18 | #define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) | ||
19 | #define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) | ||
20 | #define MXC_EHCI_INTERFACE_MASK (0xf) | ||
21 | |||
22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | ||
23 | #define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6) | ||
24 | #define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7) | ||
25 | #define MXC_EHCI_TTL_ENABLED (1 << 8) | ||
26 | |||
27 | #define MXC_EHCI_INTERNAL_PHY (1 << 9) | ||
28 | #define MXC_EHCI_IPPUE_DOWN (1 << 10) | ||
29 | #define MXC_EHCI_IPPUE_UP (1 << 11) | ||
30 | #define MXC_EHCI_WAKEUP_ENABLED (1 << 12) | ||
31 | #define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13) | ||
32 | |||
33 | #define MXC_USBCTRL_OFFSET 0 | ||
34 | #define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8 | ||
35 | #define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc | ||
36 | #define MXC_USBH2CTRL_OFFSET 0x14 | ||
37 | |||
38 | #define MX5_USBOTHER_REGS_OFFSET 0x800 | ||
39 | |||
40 | /* USB_PHY_CTRL_FUNC2*/ | ||
41 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3 | ||
42 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT 0 | ||
43 | |||
44 | struct mxc_usbh_platform_data { | ||
45 | int (*init)(struct platform_device *pdev); | ||
46 | int (*exit)(struct platform_device *pdev); | ||
47 | |||
48 | unsigned int portsc; | ||
49 | struct usb_phy *otg; | ||
50 | }; | ||
51 | |||
52 | int mx51_initialize_usb_hw(int port, unsigned int flags); | ||
53 | int mx25_initialize_usb_hw(int port, unsigned int flags); | ||
54 | int mx31_initialize_usb_hw(int port, unsigned int flags); | ||
55 | int mx35_initialize_usb_hw(int port, unsigned int flags); | ||
56 | int mx27_initialize_usb_hw(int port, unsigned int flags); | ||
57 | |||
58 | #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ | ||
59 | |||
diff --git a/include/linux/platform_data/usb-imx_udc.h b/include/linux/platform_data/usb-imx_udc.h new file mode 100644 index 000000000000..be273371f34a --- /dev/null +++ b/include/linux/platform_data/usb-imx_udc.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MXC_USB | ||
16 | #define __ASM_ARCH_MXC_USB | ||
17 | |||
18 | struct imxusb_platform_data { | ||
19 | int (*init)(struct device *); | ||
20 | void (*exit)(struct device *); | ||
21 | }; | ||
22 | |||
23 | #endif /* __ASM_ARCH_MXC_USB */ | ||
diff --git a/include/linux/platform_data/usb-mx2.h b/include/linux/platform_data/usb-mx2.h new file mode 100644 index 000000000000..22d0b596262c --- /dev/null +++ b/include/linux/platform_data/usb-mx2.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Martin Fuzzey <mfuzzey@gmail.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MX21_USBH | ||
16 | #define __ASM_ARCH_MX21_USBH | ||
17 | |||
18 | enum mx21_usbh_xcvr { | ||
19 | /* Values below as used by hardware (HWMODE register) */ | ||
20 | MX21_USBXCVR_TXDIF_RXDIF = 0, | ||
21 | MX21_USBXCVR_TXDIF_RXSE = 1, | ||
22 | MX21_USBXCVR_TXSE_RXDIF = 2, | ||
23 | MX21_USBXCVR_TXSE_RXSE = 3, | ||
24 | }; | ||
25 | |||
26 | struct mx21_usbh_platform_data { | ||
27 | enum mx21_usbh_xcvr host_xcvr; /* tranceiver mode host 1,2 ports */ | ||
28 | enum mx21_usbh_xcvr otg_xcvr; /* tranceiver mode otg (as host) port */ | ||
29 | u16 enable_host1:1, | ||
30 | enable_host2:1, | ||
31 | enable_otg_host:1, /* enable "OTG" port (as host) */ | ||
32 | host1_xcverless:1, /* traceiverless host1 port */ | ||
33 | host1_txenoe:1, /* output enable host1 transmit enable */ | ||
34 | otg_ext_xcvr:1, /* external tranceiver for OTG port */ | ||
35 | unused:10; | ||
36 | }; | ||
37 | |||
38 | #endif /* __ASM_ARCH_MX21_USBH */ | ||
diff --git a/include/linux/platform_data/video-imxfb.h b/include/linux/platform_data/video-imxfb.h new file mode 100644 index 000000000000..9de8f062ad5d --- /dev/null +++ b/include/linux/platform_data/video-imxfb.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * This structure describes the machine which we are running on. | ||
3 | */ | ||
4 | #ifndef __MACH_IMXFB_H__ | ||
5 | #define __MACH_IMXFB_H__ | ||
6 | |||
7 | #include <linux/fb.h> | ||
8 | |||
9 | #define PCR_TFT (1 << 31) | ||
10 | #define PCR_COLOR (1 << 30) | ||
11 | #define PCR_PBSIZ_1 (0 << 28) | ||
12 | #define PCR_PBSIZ_2 (1 << 28) | ||
13 | #define PCR_PBSIZ_4 (2 << 28) | ||
14 | #define PCR_PBSIZ_8 (3 << 28) | ||
15 | #define PCR_BPIX_1 (0 << 25) | ||
16 | #define PCR_BPIX_2 (1 << 25) | ||
17 | #define PCR_BPIX_4 (2 << 25) | ||
18 | #define PCR_BPIX_8 (3 << 25) | ||
19 | #define PCR_BPIX_12 (4 << 25) | ||
20 | #define PCR_BPIX_16 (5 << 25) | ||
21 | #define PCR_BPIX_18 (6 << 25) | ||
22 | #define PCR_PIXPOL (1 << 24) | ||
23 | #define PCR_FLMPOL (1 << 23) | ||
24 | #define PCR_LPPOL (1 << 22) | ||
25 | #define PCR_CLKPOL (1 << 21) | ||
26 | #define PCR_OEPOL (1 << 20) | ||
27 | #define PCR_SCLKIDLE (1 << 19) | ||
28 | #define PCR_END_SEL (1 << 18) | ||
29 | #define PCR_END_BYTE_SWAP (1 << 17) | ||
30 | #define PCR_REV_VS (1 << 16) | ||
31 | #define PCR_ACD_SEL (1 << 15) | ||
32 | #define PCR_ACD(x) (((x) & 0x7f) << 8) | ||
33 | #define PCR_SCLK_SEL (1 << 7) | ||
34 | #define PCR_SHARP (1 << 6) | ||
35 | #define PCR_PCD(x) ((x) & 0x3f) | ||
36 | |||
37 | #define PWMR_CLS(x) (((x) & 0x1ff) << 16) | ||
38 | #define PWMR_LDMSK (1 << 15) | ||
39 | #define PWMR_SCR1 (1 << 10) | ||
40 | #define PWMR_SCR0 (1 << 9) | ||
41 | #define PWMR_CC_EN (1 << 8) | ||
42 | #define PWMR_PW(x) ((x) & 0xff) | ||
43 | |||
44 | #define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26) | ||
45 | #define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16) | ||
46 | #define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8) | ||
47 | #define LSCR1_GRAY2(x) (((x) & 0xf) << 4) | ||
48 | #define LSCR1_GRAY1(x) (((x) & 0xf)) | ||
49 | |||
50 | #define DMACR_BURST (1 << 31) | ||
51 | #define DMACR_HM(x) (((x) & 0xf) << 16) | ||
52 | #define DMACR_TM(x) ((x) & 0xf) | ||
53 | |||
54 | struct imx_fb_videomode { | ||
55 | struct fb_videomode mode; | ||
56 | u32 pcr; | ||
57 | unsigned char bpp; | ||
58 | }; | ||
59 | |||
60 | struct imx_fb_platform_data { | ||
61 | struct imx_fb_videomode *mode; | ||
62 | int num_modes; | ||
63 | |||
64 | u_int cmap_greyscale:1, | ||
65 | cmap_inverse:1, | ||
66 | cmap_static:1, | ||
67 | unused:29; | ||
68 | |||
69 | u_int pwmr; | ||
70 | u_int lscr1; | ||
71 | u_int dmacr; | ||
72 | |||
73 | u_char * fixed_screen_cpu; | ||
74 | dma_addr_t fixed_screen_dma; | ||
75 | |||
76 | int (*init)(struct platform_device *); | ||
77 | void (*exit)(struct platform_device *); | ||
78 | |||
79 | void (*lcd_power)(int); | ||
80 | void (*backlight_power)(int); | ||
81 | }; | ||
82 | |||
83 | void set_imx_fb_info(struct imx_fb_platform_data *); | ||
84 | #endif /* ifndef __MACH_IMXFB_H__ */ | ||
diff --git a/include/linux/platform_data/video-mx3fb.h b/include/linux/platform_data/video-mx3fb.h new file mode 100644 index 000000000000..fdbe60001542 --- /dev/null +++ b/include/linux/platform_data/video-mx3fb.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 | ||
3 | * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_MX3FB_H__ | ||
11 | #define __ASM_ARCH_MX3FB_H__ | ||
12 | |||
13 | #include <linux/device.h> | ||
14 | #include <linux/fb.h> | ||
15 | |||
16 | /* Proprietary FB_SYNC_ flags */ | ||
17 | #define FB_SYNC_OE_ACT_HIGH 0x80000000 | ||
18 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
19 | #define FB_SYNC_DATA_INVERT 0x20000000 | ||
20 | #define FB_SYNC_CLK_IDLE_EN 0x10000000 | ||
21 | #define FB_SYNC_SHARP_MODE 0x08000000 | ||
22 | #define FB_SYNC_SWAP_RGB 0x04000000 | ||
23 | #define FB_SYNC_CLK_SEL_EN 0x02000000 | ||
24 | |||
25 | /* | ||
26 | * Specify the way your display is connected. The IPU can arbitrarily | ||
27 | * map the internal colors to the external data lines. We only support | ||
28 | * the following mappings at the moment. | ||
29 | */ | ||
30 | enum disp_data_mapping { | ||
31 | /* blue -> d[0..5], green -> d[6..11], red -> d[12..17] */ | ||
32 | IPU_DISP_DATA_MAPPING_RGB666, | ||
33 | /* blue -> d[0..4], green -> d[5..10], red -> d[11..15] */ | ||
34 | IPU_DISP_DATA_MAPPING_RGB565, | ||
35 | /* blue -> d[0..7], green -> d[8..15], red -> d[16..23] */ | ||
36 | IPU_DISP_DATA_MAPPING_RGB888, | ||
37 | }; | ||
38 | |||
39 | /** | ||
40 | * struct mx3fb_platform_data - mx3fb platform data | ||
41 | * | ||
42 | * @dma_dev: pointer to the dma-device, used for dma-slave connection | ||
43 | * @mode: pointer to a platform-provided per mxc_register_fb() videomode | ||
44 | */ | ||
45 | struct mx3fb_platform_data { | ||
46 | struct device *dma_dev; | ||
47 | const char *name; | ||
48 | const struct fb_videomode *mode; | ||
49 | int num_modes; | ||
50 | enum disp_data_mapping disp_data_fmt; | ||
51 | }; | ||
52 | |||
53 | #endif | ||