aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/ad5755.h103
-rw-r--r--include/linux/platform_data/ad7791.h17
-rw-r--r--include/linux/platform_data/asoc-imx-ssi.h21
-rw-r--r--include/linux/platform_data/asoc-kirkwood.h7
-rw-r--r--include/linux/platform_data/asoc-palm27x.h8
-rw-r--r--include/linux/platform_data/asoc-s3c.h59
-rw-r--r--include/linux/platform_data/asoc-s3c24xx_simtec.h34
-rw-r--r--include/linux/platform_data/asoc-ti-mcbsp.h62
-rw-r--r--include/linux/platform_data/ata-pxa.h33
-rw-r--r--include/linux/platform_data/ata-samsung_cf.h36
-rw-r--r--include/linux/platform_data/atmel-aes.h2
-rw-r--r--include/linux/platform_data/camera-mx1.h35
-rw-r--r--include/linux/platform_data/camera-mx2.h44
-rw-r--r--include/linux/platform_data/camera-mx3.h48
-rw-r--r--include/linux/platform_data/camera-pxa.h44
-rw-r--r--include/linux/platform_data/clk-realview.h1
-rw-r--r--include/linux/platform_data/clk-ux500.h17
-rw-r--r--include/linux/platform_data/crypto-ux500.h22
-rw-r--r--include/linux/platform_data/dma-atmel.h61
-rw-r--r--include/linux/platform_data/dma-ep93xx.h93
-rw-r--r--include/linux/platform_data/dma-imx-sdma.h59
-rw-r--r--include/linux/platform_data/dma-imx.h67
-rw-r--r--include/linux/platform_data/dma-mmp_tdma.h35
-rw-r--r--include/linux/platform_data/dma-mv_xor.h24
-rw-r--r--include/linux/platform_data/dsp-omap.h34
-rw-r--r--include/linux/platform_data/eth-netx.h27
-rw-r--r--include/linux/platform_data/gpio-omap.h217
-rw-r--r--include/linux/platform_data/hwmon-s3c.h51
-rw-r--r--include/linux/platform_data/i2c-davinci.h26
-rw-r--r--include/linux/platform_data/i2c-imx.h21
-rw-r--r--include/linux/platform_data/i2c-nuc900.h9
-rw-r--r--include/linux/platform_data/i2c-s3c2410.h77
-rw-r--r--include/linux/platform_data/irda-pxaficp.h25
-rw-r--r--include/linux/platform_data/keyboard-pxa930_rotary.h20
-rw-r--r--include/linux/platform_data/keyboard-spear.h164
-rw-r--r--include/linux/platform_data/keypad-ep93xx.h35
-rw-r--r--include/linux/platform_data/keypad-nomadik-ske.h50
-rw-r--r--include/linux/platform_data/keypad-omap.h52
-rw-r--r--include/linux/platform_data/keypad-pxa27x.h73
-rw-r--r--include/linux/platform_data/keypad-w90p910.h15
-rw-r--r--include/linux/platform_data/keyscan-davinci.h42
-rw-r--r--include/linux/platform_data/lcd-mipid.h29
-rw-r--r--include/linux/platform_data/leds-kirkwood-netxbig.h55
-rw-r--r--include/linux/platform_data/leds-kirkwood-ns2.h26
-rw-r--r--include/linux/platform_data/leds-s3c24xx.h28
-rw-r--r--include/linux/platform_data/max197.h21
-rw-r--r--include/linux/platform_data/max310x.h67
-rw-r--r--include/linux/platform_data/mfd-mcp-sa11x0.h22
-rw-r--r--include/linux/platform_data/mipi-csis.h43
-rw-r--r--include/linux/platform_data/mmc-davinci.h39
-rw-r--r--include/linux/platform_data/mmc-esdhc-imx.h43
-rw-r--r--include/linux/platform_data/mmc-msm_sdcc.h30
-rw-r--r--include/linux/platform_data/mmc-mvsdio.h20
-rw-r--r--include/linux/platform_data/mmc-mxcmmc.h39
-rw-r--r--include/linux/platform_data/mmc-pxamci.h28
-rw-r--r--include/linux/platform_data/mmc-s3cmci.h52
-rw-r--r--include/linux/platform_data/mmc-sdhci-tegra.h28
-rw-r--r--include/linux/platform_data/mouse-pxa930_trkball.h10
-rw-r--r--include/linux/platform_data/mtd-davinci-aemif.h36
-rw-r--r--include/linux/platform_data/mtd-davinci.h90
-rw-r--r--include/linux/platform_data/mtd-mxc_nand.h32
-rw-r--r--include/linux/platform_data/mtd-nand-omap2.h43
-rw-r--r--include/linux/platform_data/mtd-nand-pxa3xx.h79
-rw-r--r--include/linux/platform_data/mtd-nand-s3c2410.h67
-rw-r--r--include/linux/platform_data/mtd-nomadik-nand.h16
-rw-r--r--include/linux/platform_data/mtd-onenand-omap2.h53
-rw-r--r--include/linux/platform_data/mtd-orion_nand.h26
-rw-r--r--include/linux/platform_data/omap1_bl.h11
-rw-r--r--include/linux/platform_data/pcmcia-pxa2xx_viper.h11
-rw-r--r--include/linux/platform_data/pinctrl-coh901.h26
-rw-r--r--include/linux/platform_data/remoteproc-omap.h59
-rw-r--r--include/linux/platform_data/sc18is602.h19
-rw-r--r--include/linux/platform_data/sccnxp.h93
-rw-r--r--include/linux/platform_data/serial-imx.h35
-rw-r--r--include/linux/platform_data/shmob_drm.h99
-rw-r--r--include/linux/platform_data/sht15.h33
-rw-r--r--include/linux/platform_data/spi-davinci.h89
-rw-r--r--include/linux/platform_data/spi-ep93xx.h29
-rw-r--r--include/linux/platform_data/spi-imx.h27
-rw-r--r--include/linux/platform_data/spi-nuc900.h35
-rw-r--r--include/linux/platform_data/spi-omap2-mcspi.h23
-rw-r--r--include/linux/platform_data/spi-s3c64xx.h68
-rw-r--r--include/linux/platform_data/touchscreen-s3c2410.h25
-rw-r--r--include/linux/platform_data/usb-davinci.h59
-rw-r--r--include/linux/platform_data/usb-ehci-mxc.h59
-rw-r--r--include/linux/platform_data/usb-ehci-orion.h26
-rw-r--r--include/linux/platform_data/usb-ehci-s5p.h21
-rw-r--r--include/linux/platform_data/usb-exynos.h21
-rw-r--r--include/linux/platform_data/usb-imx_udc.h23
-rw-r--r--include/linux/platform_data/usb-musb-ux500.h25
-rw-r--r--include/linux/platform_data/usb-mx2.h38
-rw-r--r--include/linux/platform_data/usb-ohci-pxa27x.h36
-rw-r--r--include/linux/platform_data/usb-ohci-s3c2410.h43
-rw-r--r--include/linux/platform_data/usb-pxa3xx-ulpi.h35
-rw-r--r--include/linux/platform_data/usb-s3c2410_udc.h44
-rw-r--r--include/linux/platform_data/video-ep93xx.h56
-rw-r--r--include/linux/platform_data/video-imxfb.h84
-rw-r--r--include/linux/platform_data/video-msm_fb.h147
-rw-r--r--include/linux/platform_data/video-mx3fb.h53
-rw-r--r--include/linux/platform_data/video-nuc900fb.h83
-rw-r--r--include/linux/platform_data/video-pxafb.h175
-rw-r--r--include/linux/platform_data/video-vt8500lcdfb.h31
-rw-r--r--include/linux/platform_data/voltage-omap.h39
103 files changed, 4671 insertions, 1 deletions
diff --git a/include/linux/platform_data/ad5755.h b/include/linux/platform_data/ad5755.h
new file mode 100644
index 000000000000..a5a1cb751874
--- /dev/null
+++ b/include/linux/platform_data/ad5755.h
@@ -0,0 +1,103 @@
1/*
2 * Copyright 2012 Analog Devices Inc.
3 *
4 * Licensed under the GPL-2.
5 */
6#ifndef __LINUX_PLATFORM_DATA_AD5755_H__
7#define __LINUX_PLATFORM_DATA_AD5755_H__
8
9enum ad5755_mode {
10 AD5755_MODE_VOLTAGE_0V_5V = 0,
11 AD5755_MODE_VOLTAGE_0V_10V = 1,
12 AD5755_MODE_VOLTAGE_PLUSMINUS_5V = 2,
13 AD5755_MODE_VOLTAGE_PLUSMINUS_10V = 3,
14 AD5755_MODE_CURRENT_4mA_20mA = 4,
15 AD5755_MODE_CURRENT_0mA_20mA = 5,
16 AD5755_MODE_CURRENT_0mA_24mA = 6,
17};
18
19enum ad5755_dc_dc_phase {
20 AD5755_DC_DC_PHASE_ALL_SAME_EDGE = 0,
21 AD5755_DC_DC_PHASE_A_B_SAME_EDGE_C_D_OPP_EDGE = 1,
22 AD5755_DC_DC_PHASE_A_C_SAME_EDGE_B_D_OPP_EDGE = 2,
23 AD5755_DC_DC_PHASE_90_DEGREE = 3,
24};
25
26enum ad5755_dc_dc_freq {
27 AD5755_DC_DC_FREQ_250kHZ = 0,
28 AD5755_DC_DC_FREQ_410kHZ = 1,
29 AD5755_DC_DC_FREQ_650kHZ = 2,
30};
31
32enum ad5755_dc_dc_maxv {
33 AD5755_DC_DC_MAXV_23V = 0,
34 AD5755_DC_DC_MAXV_24V5 = 1,
35 AD5755_DC_DC_MAXV_27V = 2,
36 AD5755_DC_DC_MAXV_29V5 = 3,
37};
38
39enum ad5755_slew_rate {
40 AD5755_SLEW_RATE_64k = 0,
41 AD5755_SLEW_RATE_32k = 1,
42 AD5755_SLEW_RATE_16k = 2,
43 AD5755_SLEW_RATE_8k = 3,
44 AD5755_SLEW_RATE_4k = 4,
45 AD5755_SLEW_RATE_2k = 5,
46 AD5755_SLEW_RATE_1k = 6,
47 AD5755_SLEW_RATE_500 = 7,
48 AD5755_SLEW_RATE_250 = 8,
49 AD5755_SLEW_RATE_125 = 9,
50 AD5755_SLEW_RATE_64 = 10,
51 AD5755_SLEW_RATE_32 = 11,
52 AD5755_SLEW_RATE_16 = 12,
53 AD5755_SLEW_RATE_8 = 13,
54 AD5755_SLEW_RATE_4 = 14,
55 AD5755_SLEW_RATE_0_5 = 15,
56};
57
58enum ad5755_slew_step_size {
59 AD5755_SLEW_STEP_SIZE_1 = 0,
60 AD5755_SLEW_STEP_SIZE_2 = 1,
61 AD5755_SLEW_STEP_SIZE_4 = 2,
62 AD5755_SLEW_STEP_SIZE_8 = 3,
63 AD5755_SLEW_STEP_SIZE_16 = 4,
64 AD5755_SLEW_STEP_SIZE_32 = 5,
65 AD5755_SLEW_STEP_SIZE_64 = 6,
66 AD5755_SLEW_STEP_SIZE_128 = 7,
67 AD5755_SLEW_STEP_SIZE_256 = 8,
68};
69
70/**
71 * struct ad5755_platform_data - AD5755 DAC driver platform data
72 * @ext_dc_dc_compenstation_resistor: Whether an external DC-DC converter
73 * compensation register is used.
74 * @dc_dc_phase: DC-DC converter phase.
75 * @dc_dc_freq: DC-DC converter frequency.
76 * @dc_dc_maxv: DC-DC maximum allowed boost voltage.
77 * @dac.mode: The mode to be used for the DAC output.
78 * @dac.ext_current_sense_resistor: Whether an external current sense resistor
79 * is used.
80 * @dac.enable_voltage_overrange: Whether to enable 20% voltage output overrange.
81 * @dac.slew.enable: Whether to enable digital slew.
82 * @dac.slew.rate: Slew rate of the digital slew.
83 * @dac.slew.step_size: Slew step size of the digital slew.
84 **/
85struct ad5755_platform_data {
86 bool ext_dc_dc_compenstation_resistor;
87 enum ad5755_dc_dc_phase dc_dc_phase;
88 enum ad5755_dc_dc_freq dc_dc_freq;
89 enum ad5755_dc_dc_maxv dc_dc_maxv;
90
91 struct {
92 enum ad5755_mode mode;
93 bool ext_current_sense_resistor;
94 bool enable_voltage_overrange;
95 struct {
96 bool enable;
97 enum ad5755_slew_rate rate;
98 enum ad5755_slew_step_size step_size;
99 } slew;
100 } dac[4];
101};
102
103#endif
diff --git a/include/linux/platform_data/ad7791.h b/include/linux/platform_data/ad7791.h
new file mode 100644
index 000000000000..f9e4db1b82ae
--- /dev/null
+++ b/include/linux/platform_data/ad7791.h
@@ -0,0 +1,17 @@
1#ifndef __LINUX_PLATFORM_DATA_AD7791__
2#define __LINUX_PLATFORM_DATA_AD7791__
3
4/**
5 * struct ad7791_platform_data - AD7791 device platform data
6 * @buffered: If set to true configure the device for buffered input mode.
7 * @burnout_current: If set to true the 100mA burnout current is enabled.
8 * @unipolar: If set to true sample in unipolar mode, if set to false sample in
9 * bipolar mode.
10 */
11struct ad7791_platform_data {
12 bool buffered;
13 bool burnout_current;
14 bool unipolar;
15};
16
17#endif
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
4struct snd_ac97;
5
6extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end;
7extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer;
8
9struct 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/asoc-kirkwood.h b/include/linux/platform_data/asoc-kirkwood.h
new file mode 100644
index 000000000000..d6a55bd2e578
--- /dev/null
+++ b/include/linux/platform_data/asoc-kirkwood.h
@@ -0,0 +1,7 @@
1#ifndef __PLAT_AUDIO_H
2#define __PLAT_AUDIO_H
3
4struct kirkwood_asoc_platform_data {
5 int burst;
6};
7#endif
diff --git a/include/linux/platform_data/asoc-palm27x.h b/include/linux/platform_data/asoc-palm27x.h
new file mode 100644
index 000000000000..58afb30d5298
--- /dev/null
+++ b/include/linux/platform_data/asoc-palm27x.h
@@ -0,0 +1,8 @@
1#ifndef _INCLUDE_PALMASOC_H_
2#define _INCLUDE_PALMASOC_H_
3
4struct palm27x_asoc_info {
5 int jack_gpio;
6};
7
8#endif
diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h
new file mode 100644
index 000000000000..aa9875f77c40
--- /dev/null
+++ b/include/linux/platform_data/asoc-s3c.h
@@ -0,0 +1,59 @@
1/* arch/arm/plat-samsung/include/plat/audio.h
2 *
3 * Copyright (c) 2009 Samsung Electronics Co. Ltd
4 * Author: Jaswinder Singh <jassi.brar@samsung.com>
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/* The machine init code calls s3c*_ac97_setup_gpio with
12 * one of these defines in order to select appropriate bank
13 * of GPIO for AC97 pins
14 */
15#define S3C64XX_AC97_GPD 0
16#define S3C64XX_AC97_GPE 1
17extern void s3c64xx_ac97_setup_gpio(int);
18
19/*
20 * The machine init code calls s5p*_spdif_setup_gpio with
21 * one of these defines in order to select appropriate bank
22 * of GPIO for S/PDIF pins
23 */
24#define S5PC100_SPDIF_GPD 0
25#define S5PC100_SPDIF_GPG3 1
26extern void s5pc100_spdif_setup_gpio(int);
27
28struct samsung_i2s {
29/* If the Primary DAI has 5.1 Channels */
30#define QUIRK_PRI_6CHAN (1 << 0)
31/* If the I2S block has a Stereo Overlay Channel */
32#define QUIRK_SEC_DAI (1 << 1)
33/*
34 * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit)
35 * The Machine driver must provide suitably set clock to the I2S block.
36 */
37#define QUIRK_NO_MUXPSR (1 << 2)
38#define QUIRK_NEED_RSTCLR (1 << 3)
39 /* Quirks of the I2S controller */
40 u32 quirks;
41
42 /*
43 * Array of clock names that can be used to generate I2S signals.
44 * Also corresponds to clocks of I2SMOD[10]
45 */
46 const char **src_clk;
47 dma_addr_t idma_addr;
48};
49
50/**
51 * struct s3c_audio_pdata - common platform data for audio device drivers
52 * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
53 */
54struct s3c_audio_pdata {
55 int (*cfg_gpio)(struct platform_device *);
56 union {
57 struct samsung_i2s i2s;
58 } type;
59};
diff --git a/include/linux/platform_data/asoc-s3c24xx_simtec.h b/include/linux/platform_data/asoc-s3c24xx_simtec.h
new file mode 100644
index 000000000000..376af5286a3e
--- /dev/null
+++ b/include/linux/platform_data/asoc-s3c24xx_simtec.h
@@ -0,0 +1,34 @@
1/* arch/arm/plat-samsung/include/plat/audio-simtec.h
2 *
3 * Copyright 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Simtec Audio support.
12*/
13
14/**
15 * struct s3c24xx_audio_simtec_pdata - platform data for simtec audio
16 * @use_mpllin: Select codec clock from MPLLin
17 * @output_cdclk: Need to output CDCLK to the codec
18 * @have_mic: Set if we have a MIC socket
19 * @have_lout: Set if we have a LineOut socket
20 * @amp_gpio: GPIO pin to enable the AMP
21 * @amp_gain: Option GPIO to control AMP gain
22 */
23struct s3c24xx_audio_simtec_pdata {
24 unsigned int use_mpllin:1;
25 unsigned int output_cdclk:1;
26
27 unsigned int have_mic:1;
28 unsigned int have_lout:1;
29
30 int amp_gpio;
31 int amp_gain[2];
32
33 void (*startup)(void);
34};
diff --git a/include/linux/platform_data/asoc-ti-mcbsp.h b/include/linux/platform_data/asoc-ti-mcbsp.h
new file mode 100644
index 000000000000..18814127809a
--- /dev/null
+++ b/include/linux/platform_data/asoc-ti-mcbsp.h
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/plat-omap/include/mach/mcbsp.h
3 *
4 * Defines for Multi-Channel Buffered Serial Port
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24#ifndef __ASM_ARCH_OMAP_MCBSP_H
25#define __ASM_ARCH_OMAP_MCBSP_H
26
27#include <linux/spinlock.h>
28#include <linux/clk.h>
29
30#define MCBSP_CONFIG_TYPE2 0x2
31#define MCBSP_CONFIG_TYPE3 0x3
32#define MCBSP_CONFIG_TYPE4 0x4
33
34/* Platform specific configuration */
35struct omap_mcbsp_ops {
36 void (*request)(unsigned int);
37 void (*free)(unsigned int);
38};
39
40struct omap_mcbsp_platform_data {
41 struct omap_mcbsp_ops *ops;
42 u16 buffer_size;
43 u8 reg_size;
44 u8 reg_step;
45
46 /* McBSP platform and instance specific features */
47 bool has_wakeup; /* Wakeup capability */
48 bool has_ccr; /* Transceiver has configuration control registers */
49 int (*enable_st_clock)(unsigned int, bool);
50 int (*set_clk_src)(struct device *dev, struct clk *clk, const char *src);
51 int (*mux_signal)(struct device *dev, const char *signal, const char *src);
52};
53
54/**
55 * omap_mcbsp_dev_attr - OMAP McBSP device attributes for omap_hwmod
56 * @sidetone: name of the sidetone device
57 */
58struct omap_mcbsp_dev_attr {
59 const char *sidetone;
60};
61
62#endif
diff --git a/include/linux/platform_data/ata-pxa.h b/include/linux/platform_data/ata-pxa.h
new file mode 100644
index 000000000000..6cf7df1d5830
--- /dev/null
+++ b/include/linux/platform_data/ata-pxa.h
@@ -0,0 +1,33 @@
1/*
2 * Generic PXA PATA driver
3 *
4 * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
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, or (at your option)
9 * 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 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef __MACH_PATA_PXA_H__
22#define __MACH_PATA_PXA_H__
23
24struct pata_pxa_pdata {
25 /* PXA DMA DREQ<0:2> pin */
26 uint32_t dma_dreq;
27 /* Register shift */
28 uint32_t reg_shift;
29 /* IRQ flags */
30 uint32_t irq_flags;
31};
32
33#endif /* __MACH_PATA_PXA_H__ */
diff --git a/include/linux/platform_data/ata-samsung_cf.h b/include/linux/platform_data/ata-samsung_cf.h
new file mode 100644
index 000000000000..2a3855a8372a
--- /dev/null
+++ b/include/linux/platform_data/ata-samsung_cf.h
@@ -0,0 +1,36 @@
1/* linux/arch/arm/plat-samsung/include/plat/ata.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Samsung CF-ATA platform_device info
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 version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_PLAT_ATA_H
14#define __ASM_PLAT_ATA_H __FILE__
15
16/**
17 * struct s3c_ide_platdata - S3C IDE driver platform data.
18 * @setup_gpio: Setup the external GPIO pins to the right state for data
19 * transfer in true-ide mode.
20 */
21struct s3c_ide_platdata {
22 void (*setup_gpio)(void);
23};
24
25/*
26 * s3c_ide_set_platdata() - Setup the platform specifc data for IDE driver.
27 * @pdata: Platform data for IDE driver.
28 */
29extern void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata);
30
31/* architecture-specific IDE configuration */
32extern void s3c64xx_ide_setup_gpio(void);
33extern void s5pc100_ide_setup_gpio(void);
34extern void s5pv210_ide_setup_gpio(void);
35
36#endif /*__ASM_PLAT_ATA_H */
diff --git a/include/linux/platform_data/atmel-aes.h b/include/linux/platform_data/atmel-aes.h
index e7a1949bad26..ab68082fbcb0 100644
--- a/include/linux/platform_data/atmel-aes.h
+++ b/include/linux/platform_data/atmel-aes.h
@@ -1,7 +1,7 @@
1#ifndef __LINUX_ATMEL_AES_H 1#ifndef __LINUX_ATMEL_AES_H
2#define __LINUX_ATMEL_AES_H 2#define __LINUX_ATMEL_AES_H
3 3
4#include <mach/at_hdmac.h> 4#include <linux/platform_data/dma-atmel.h>
5 5
6/** 6/**
7 * struct aes_dma_data - DMA data for AES 7 * struct aes_dma_data - DMA data for AES
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
23extern 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 */
30struct 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..7ded6f1f74bc
--- /dev/null
+++ b/include/linux/platform_data/camera-mx2.h
@@ -0,0 +1,44 @@
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_EXT_VSYNC (1 << 1)
27#define MX2_CAMERA_CCIR (1 << 2)
28#define MX2_CAMERA_CCIR_INTERLACE (1 << 3)
29#define MX2_CAMERA_HSYNC_HIGH (1 << 4)
30#define MX2_CAMERA_GATED_CLOCK (1 << 5)
31#define MX2_CAMERA_INV_DATA (1 << 6)
32#define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7)
33
34/**
35 * struct mx2_camera_platform_data - optional platform data for mx2_camera
36 * @flags: any combination of MX2_CAMERA_*
37 * @clk: clock rate of the csi block / 2
38 */
39struct mx2_camera_platform_data {
40 unsigned long flags;
41 unsigned long clk;
42};
43
44#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 */
42struct 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/camera-pxa.h b/include/linux/platform_data/camera-pxa.h
new file mode 100644
index 000000000000..6709b1cd7c77
--- /dev/null
+++ b/include/linux/platform_data/camera-pxa.h
@@ -0,0 +1,44 @@
1/*
2 camera.h - PXA camera driver header file
3
4 Copyright (C) 2003, Intel Corporation
5 Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/
21
22#ifndef __ASM_ARCH_CAMERA_H_
23#define __ASM_ARCH_CAMERA_H_
24
25#define PXA_CAMERA_MASTER 1
26#define PXA_CAMERA_DATAWIDTH_4 2
27#define PXA_CAMERA_DATAWIDTH_5 4
28#define PXA_CAMERA_DATAWIDTH_8 8
29#define PXA_CAMERA_DATAWIDTH_9 0x10
30#define PXA_CAMERA_DATAWIDTH_10 0x20
31#define PXA_CAMERA_PCLK_EN 0x40
32#define PXA_CAMERA_MCLK_EN 0x80
33#define PXA_CAMERA_PCP 0x100
34#define PXA_CAMERA_HSP 0x200
35#define PXA_CAMERA_VSP 0x400
36
37struct pxacamera_platform_data {
38 unsigned long flags;
39 unsigned long mclk_10khz;
40};
41
42extern void pxa_set_camera_info(struct pxacamera_platform_data *);
43
44#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/include/linux/platform_data/clk-realview.h b/include/linux/platform_data/clk-realview.h
new file mode 100644
index 000000000000..2e426a7dbc51
--- /dev/null
+++ b/include/linux/platform_data/clk-realview.h
@@ -0,0 +1 @@
void realview_clk_init(void __iomem *sysbase, bool is_pb1176);
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h
new file mode 100644
index 000000000000..3af0da1f3be5
--- /dev/null
+++ b/include/linux/platform_data/clk-ux500.h
@@ -0,0 +1,17 @@
1/*
2 * Clock definitions for ux500 platforms
3 *
4 * Copyright (C) 2012 ST-Ericsson SA
5 * Author: Ulf Hansson <ulf.hansson@linaro.org>
6 *
7 * License terms: GNU General Public License (GPL) version 2
8 */
9
10#ifndef __CLK_UX500_H
11#define __CLK_UX500_H
12
13void u8500_clk_init(void);
14void u9540_clk_init(void);
15void u8540_clk_init(void);
16
17#endif /* __CLK_UX500_H */
diff --git a/include/linux/platform_data/crypto-ux500.h b/include/linux/platform_data/crypto-ux500.h
new file mode 100644
index 000000000000..5b2d0817e26a
--- /dev/null
+++ b/include/linux/platform_data/crypto-ux500.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2011
3 *
4 * Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
6 */
7#ifndef _CRYPTO_UX500_H
8#define _CRYPTO_UX500_H
9#include <linux/dmaengine.h>
10#include <plat/ste_dma40.h>
11
12struct hash_platform_data {
13 void *mem_to_engine;
14 bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
15};
16
17struct cryp_platform_data {
18 struct stedma40_chan_cfg mem_to_engine;
19 struct stedma40_chan_cfg engine_to_mem;
20};
21
22#endif
diff --git a/include/linux/platform_data/dma-atmel.h b/include/linux/platform_data/dma-atmel.h
new file mode 100644
index 000000000000..cab0997be3de
--- /dev/null
+++ b/include/linux/platform_data/dma-atmel.h
@@ -0,0 +1,61 @@
1/*
2 * Header file for the Atmel AHB DMA Controller driver
3 *
4 * Copyright (C) 2008 Atmel Corporation
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#ifndef AT_HDMAC_H
12#define AT_HDMAC_H
13
14#include <linux/dmaengine.h>
15
16/**
17 * struct at_dma_platform_data - Controller configuration parameters
18 * @nr_channels: Number of channels supported by hardware (max 8)
19 * @cap_mask: dma_capability flags supported by the platform
20 */
21struct at_dma_platform_data {
22 unsigned int nr_channels;
23 dma_cap_mask_t cap_mask;
24};
25
26/**
27 * struct at_dma_slave - Controller-specific information about a slave
28 * @dma_dev: required DMA master device
29 * @cfg: Platform-specific initializer for the CFG register
30 */
31struct at_dma_slave {
32 struct device *dma_dev;
33 u32 cfg;
34};
35
36
37/* Platform-configurable bits in CFG */
38#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
39#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
40#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
41#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
42#define ATC_SRC_H2SEL_SW (0x0 << 9)
43#define ATC_SRC_H2SEL_HW (0x1 << 9)
44#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
45#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
46#define ATC_DST_H2SEL_SW (0x0 << 13)
47#define ATC_DST_H2SEL_HW (0x1 << 13)
48#define ATC_SOD (0x1 << 16) /* Stop On Done */
49#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
50#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
51#define ATC_LOCK_IF_L (0x1 << 22) /* Master Interface Arbiter Lock */
52#define ATC_LOCK_IF_L_CHUNK (0x0 << 22)
53#define ATC_LOCK_IF_L_BUFFER (0x1 << 22)
54#define ATC_AHB_PROT_MASK (0x7 << 24) /* AHB Protection */
55#define ATC_FIFOCFG_MASK (0x3 << 28) /* FIFO Request Configuration */
56#define ATC_FIFOCFG_LARGESTBURST (0x0 << 28)
57#define ATC_FIFOCFG_HALFFIFO (0x1 << 28)
58#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28)
59
60
61#endif /* AT_HDMAC_H */
diff --git a/include/linux/platform_data/dma-ep93xx.h b/include/linux/platform_data/dma-ep93xx.h
new file mode 100644
index 000000000000..e82c642fa53c
--- /dev/null
+++ b/include/linux/platform_data/dma-ep93xx.h
@@ -0,0 +1,93 @@
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 */
38struct 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 */
50struct 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 */
65struct ep93xx_dma_platform_data {
66 struct ep93xx_dma_chan_data *channels;
67 size_t num_channels;
68};
69
70static 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 */
83static inline enum dma_transfer_direction
84ep93xx_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/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 */
10struct 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 */
54struct 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 */
19enum 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
44enum imx_dma_prio {
45 DMA_PRIO_HIGH = 0,
46 DMA_PRIO_MEDIUM = 1,
47 DMA_PRIO_LOW = 2
48};
49
50struct imx_dma_data {
51 int dma_request; /* DMA request line */
52 enum sdma_peripheral_type peripheral_type;
53 int priority;
54};
55
56static inline int imx_dma_is_ipu(struct dma_chan *chan)
57{
58 return !strcmp(dev_name(chan->device->dev), "ipu-core");
59}
60
61static 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/dma-mmp_tdma.h b/include/linux/platform_data/dma-mmp_tdma.h
new file mode 100644
index 000000000000..239e0fc1bb1f
--- /dev/null
+++ b/include/linux/platform_data/dma-mmp_tdma.h
@@ -0,0 +1,35 @@
1/*
2 * linux/arch/arm/mach-mmp/include/mach/sram.h
3 *
4 * SRAM Memory Management
5 *
6 * Copyright (c) 2011 Marvell Semiconductors Inc.
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#ifndef __ASM_ARCH_SRAM_H
15#define __ASM_ARCH_SRAM_H
16
17#include <linux/genalloc.h>
18
19/* ARBITRARY: SRAM allocations are multiples of this 2^N size */
20#define SRAM_GRANULARITY 512
21
22enum sram_type {
23 MMP_SRAM_UNDEFINED = 0,
24 MMP_ASRAM,
25 MMP_ISRAM,
26};
27
28struct sram_platdata {
29 char *pool_name;
30 int granularity;
31};
32
33extern struct gen_pool *sram_get_gpool(char *pool_name);
34
35#endif /* __ASM_ARCH_SRAM_H */
diff --git a/include/linux/platform_data/dma-mv_xor.h b/include/linux/platform_data/dma-mv_xor.h
new file mode 100644
index 000000000000..2ba1f7d76eef
--- /dev/null
+++ b/include/linux/platform_data/dma-mv_xor.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/plat-orion/include/plat/mv_xor.h
3 *
4 * Marvell XOR platform device data definition file.
5 */
6
7#ifndef __PLAT_MV_XOR_H
8#define __PLAT_MV_XOR_H
9
10#include <linux/dmaengine.h>
11#include <linux/mbus.h>
12
13#define MV_XOR_SHARED_NAME "mv_xor_shared"
14#define MV_XOR_NAME "mv_xor"
15
16struct mv_xor_platform_data {
17 struct platform_device *shared;
18 int hw_id;
19 dma_cap_mask_t cap_mask;
20 size_t pool_size;
21};
22
23
24#endif
diff --git a/include/linux/platform_data/dsp-omap.h b/include/linux/platform_data/dsp-omap.h
new file mode 100644
index 000000000000..5927709b1908
--- /dev/null
+++ b/include/linux/platform_data/dsp-omap.h
@@ -0,0 +1,34 @@
1#ifndef __OMAP_DSP_H__
2#define __OMAP_DSP_H__
3
4#include <linux/types.h>
5
6struct omap_dsp_platform_data {
7 void (*dsp_set_min_opp) (u8 opp_id);
8 u8 (*dsp_get_opp) (void);
9 void (*cpu_set_freq) (unsigned long f);
10 unsigned long (*cpu_get_freq) (void);
11 unsigned long mpu_speed[6];
12
13 /* functions to write and read PRCM registers */
14 void (*dsp_prm_write)(u32, s16 , u16);
15 u32 (*dsp_prm_read)(s16 , u16);
16 u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16);
17 void (*dsp_cm_write)(u32, s16 , u16);
18 u32 (*dsp_cm_read)(s16 , u16);
19 u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16);
20
21 void (*set_bootaddr)(u32);
22 void (*set_bootmode)(u8);
23
24 phys_addr_t phys_mempool_base;
25 phys_addr_t phys_mempool_size;
26};
27
28#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE)
29extern void omap_dsp_reserve_sdram_memblock(void);
30#else
31static inline void omap_dsp_reserve_sdram_memblock(void) { }
32#endif
33
34#endif
diff --git a/include/linux/platform_data/eth-netx.h b/include/linux/platform_data/eth-netx.h
new file mode 100644
index 000000000000..88af1ac28ead
--- /dev/null
+++ b/include/linux/platform_data/eth-netx.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-netx/include/mach/eth.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
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 version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef ASMARM_ARCH_ETH_H
21#define ASMARM_ARCH_ETH_H
22
23struct netxeth_platform_data {
24 unsigned int xcno; /* number of xmac/xpec engine this eth uses */
25};
26
27#endif
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h
new file mode 100644
index 000000000000..e8741c2678d5
--- /dev/null
+++ b/include/linux/platform_data/gpio-omap.h
@@ -0,0 +1,217 @@
1/*
2 * OMAP GPIO handling defines and functions
3 *
4 * Copyright (C) 2003-2005 Nokia Corporation
5 *
6 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_OMAP_GPIO_H
25#define __ASM_ARCH_OMAP_GPIO_H
26
27#include <linux/io.h>
28#include <linux/platform_device.h>
29#include <mach/irqs.h>
30
31#define OMAP1_MPUIO_BASE 0xfffb5000
32
33/*
34 * These are the omap15xx/16xx offsets. The omap7xx offset are
35 * OMAP_MPUIO_ / 2 offsets below.
36 */
37#define OMAP_MPUIO_INPUT_LATCH 0x00
38#define OMAP_MPUIO_OUTPUT 0x04
39#define OMAP_MPUIO_IO_CNTL 0x08
40#define OMAP_MPUIO_KBR_LATCH 0x10
41#define OMAP_MPUIO_KBC 0x14
42#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
43#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
44#define OMAP_MPUIO_KBD_INT 0x20
45#define OMAP_MPUIO_GPIO_INT 0x24
46#define OMAP_MPUIO_KBD_MASKIT 0x28
47#define OMAP_MPUIO_GPIO_MASKIT 0x2c
48#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
49#define OMAP_MPUIO_LATCH 0x34
50
51#define OMAP34XX_NR_GPIOS 6
52
53/*
54 * OMAP1510 GPIO registers
55 */
56#define OMAP1510_GPIO_DATA_INPUT 0x00
57#define OMAP1510_GPIO_DATA_OUTPUT 0x04
58#define OMAP1510_GPIO_DIR_CONTROL 0x08
59#define OMAP1510_GPIO_INT_CONTROL 0x0c
60#define OMAP1510_GPIO_INT_MASK 0x10
61#define OMAP1510_GPIO_INT_STATUS 0x14
62#define OMAP1510_GPIO_PIN_CONTROL 0x18
63
64#define OMAP1510_IH_GPIO_BASE 64
65
66/*
67 * OMAP1610 specific GPIO registers
68 */
69#define OMAP1610_GPIO_REVISION 0x0000
70#define OMAP1610_GPIO_SYSCONFIG 0x0010
71#define OMAP1610_GPIO_SYSSTATUS 0x0014
72#define OMAP1610_GPIO_IRQSTATUS1 0x0018
73#define OMAP1610_GPIO_IRQENABLE1 0x001c
74#define OMAP1610_GPIO_WAKEUPENABLE 0x0028
75#define OMAP1610_GPIO_DATAIN 0x002c
76#define OMAP1610_GPIO_DATAOUT 0x0030
77#define OMAP1610_GPIO_DIRECTION 0x0034
78#define OMAP1610_GPIO_EDGE_CTRL1 0x0038
79#define OMAP1610_GPIO_EDGE_CTRL2 0x003c
80#define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c
81#define OMAP1610_GPIO_CLEAR_WAKEUPENA 0x00a8
82#define OMAP1610_GPIO_CLEAR_DATAOUT 0x00b0
83#define OMAP1610_GPIO_SET_IRQENABLE1 0x00dc
84#define OMAP1610_GPIO_SET_WAKEUPENA 0x00e8
85#define OMAP1610_GPIO_SET_DATAOUT 0x00f0
86
87/*
88 * OMAP7XX specific GPIO registers
89 */
90#define OMAP7XX_GPIO_DATA_INPUT 0x00
91#define OMAP7XX_GPIO_DATA_OUTPUT 0x04
92#define OMAP7XX_GPIO_DIR_CONTROL 0x08
93#define OMAP7XX_GPIO_INT_CONTROL 0x0c
94#define OMAP7XX_GPIO_INT_MASK 0x10
95#define OMAP7XX_GPIO_INT_STATUS 0x14
96
97/*
98 * omap2+ specific GPIO registers
99 */
100#define OMAP24XX_GPIO_REVISION 0x0000
101#define OMAP24XX_GPIO_IRQSTATUS1 0x0018
102#define OMAP24XX_GPIO_IRQSTATUS2 0x0028
103#define OMAP24XX_GPIO_IRQENABLE2 0x002c
104#define OMAP24XX_GPIO_IRQENABLE1 0x001c
105#define OMAP24XX_GPIO_WAKE_EN 0x0020
106#define OMAP24XX_GPIO_CTRL 0x0030
107#define OMAP24XX_GPIO_OE 0x0034
108#define OMAP24XX_GPIO_DATAIN 0x0038
109#define OMAP24XX_GPIO_DATAOUT 0x003c
110#define OMAP24XX_GPIO_LEVELDETECT0 0x0040
111#define OMAP24XX_GPIO_LEVELDETECT1 0x0044
112#define OMAP24XX_GPIO_RISINGDETECT 0x0048
113#define OMAP24XX_GPIO_FALLINGDETECT 0x004c
114#define OMAP24XX_GPIO_DEBOUNCE_EN 0x0050
115#define OMAP24XX_GPIO_DEBOUNCE_VAL 0x0054
116#define OMAP24XX_GPIO_CLEARIRQENABLE1 0x0060
117#define OMAP24XX_GPIO_SETIRQENABLE1 0x0064
118#define OMAP24XX_GPIO_CLEARWKUENA 0x0080
119#define OMAP24XX_GPIO_SETWKUENA 0x0084
120#define OMAP24XX_GPIO_CLEARDATAOUT 0x0090
121#define OMAP24XX_GPIO_SETDATAOUT 0x0094
122
123#define OMAP4_GPIO_REVISION 0x0000
124#define OMAP4_GPIO_EOI 0x0020
125#define OMAP4_GPIO_IRQSTATUSRAW0 0x0024
126#define OMAP4_GPIO_IRQSTATUSRAW1 0x0028
127#define OMAP4_GPIO_IRQSTATUS0 0x002c
128#define OMAP4_GPIO_IRQSTATUS1 0x0030
129#define OMAP4_GPIO_IRQSTATUSSET0 0x0034
130#define OMAP4_GPIO_IRQSTATUSSET1 0x0038
131#define OMAP4_GPIO_IRQSTATUSCLR0 0x003c
132#define OMAP4_GPIO_IRQSTATUSCLR1 0x0040
133#define OMAP4_GPIO_IRQWAKEN0 0x0044
134#define OMAP4_GPIO_IRQWAKEN1 0x0048
135#define OMAP4_GPIO_IRQENABLE1 0x011c
136#define OMAP4_GPIO_WAKE_EN 0x0120
137#define OMAP4_GPIO_IRQSTATUS2 0x0128
138#define OMAP4_GPIO_IRQENABLE2 0x012c
139#define OMAP4_GPIO_CTRL 0x0130
140#define OMAP4_GPIO_OE 0x0134
141#define OMAP4_GPIO_DATAIN 0x0138
142#define OMAP4_GPIO_DATAOUT 0x013c
143#define OMAP4_GPIO_LEVELDETECT0 0x0140
144#define OMAP4_GPIO_LEVELDETECT1 0x0144
145#define OMAP4_GPIO_RISINGDETECT 0x0148
146#define OMAP4_GPIO_FALLINGDETECT 0x014c
147#define OMAP4_GPIO_DEBOUNCENABLE 0x0150
148#define OMAP4_GPIO_DEBOUNCINGTIME 0x0154
149#define OMAP4_GPIO_CLEARIRQENABLE1 0x0160
150#define OMAP4_GPIO_SETIRQENABLE1 0x0164
151#define OMAP4_GPIO_CLEARWKUENA 0x0180
152#define OMAP4_GPIO_SETWKUENA 0x0184
153#define OMAP4_GPIO_CLEARDATAOUT 0x0190
154#define OMAP4_GPIO_SETDATAOUT 0x0194
155
156#define OMAP_MAX_GPIO_LINES 192
157
158#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
159#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
160
161struct omap_gpio_dev_attr {
162 int bank_width; /* GPIO bank width */
163 bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
164};
165
166struct omap_gpio_reg_offs {
167 u16 revision;
168 u16 direction;
169 u16 datain;
170 u16 dataout;
171 u16 set_dataout;
172 u16 clr_dataout;
173 u16 irqstatus;
174 u16 irqstatus2;
175 u16 irqstatus_raw0;
176 u16 irqstatus_raw1;
177 u16 irqenable;
178 u16 irqenable2;
179 u16 set_irqenable;
180 u16 clr_irqenable;
181 u16 debounce;
182 u16 debounce_en;
183 u16 ctrl;
184 u16 wkup_en;
185 u16 leveldetect0;
186 u16 leveldetect1;
187 u16 risingdetect;
188 u16 fallingdetect;
189 u16 irqctrl;
190 u16 edgectrl1;
191 u16 edgectrl2;
192 u16 pinctrl;
193
194 bool irqenable_inv;
195};
196
197struct omap_gpio_platform_data {
198 int bank_type;
199 int bank_width; /* GPIO bank width */
200 int bank_stride; /* Only needed for omap1 MPUIO */
201 bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
202 bool loses_context; /* whether the bank would ever lose context */
203 bool is_mpuio; /* whether the bank is of type MPUIO */
204 u32 non_wakeup_gpios;
205
206 struct omap_gpio_reg_offs *regs;
207
208 /* Return context loss count due to PM states changing */
209 int (*get_context_loss_count)(struct device *dev);
210};
211
212extern void omap2_gpio_prepare_for_idle(int off_mode);
213extern void omap2_gpio_resume_after_idle(void);
214extern void omap_set_gpio_debounce(int gpio, int enable);
215extern void omap_set_gpio_debounce_time(int gpio, int enable);
216
217#endif
diff --git a/include/linux/platform_data/hwmon-s3c.h b/include/linux/platform_data/hwmon-s3c.h
new file mode 100644
index 000000000000..c167e4429bc7
--- /dev/null
+++ b/include/linux/platform_data/hwmon-s3c.h
@@ -0,0 +1,51 @@
1/* linux/arch/arm/plat-s3c/include/plat/hwmon.h
2 *
3 * Copyright 2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * S3C - HWMon interface for ADC
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ADC_HWMON_H
15#define __ASM_ARCH_ADC_HWMON_H __FILE__
16
17/**
18 * s3c_hwmon_chcfg - channel configuration
19 * @name: The name to give this channel.
20 * @mult: Multiply the ADC value read by this.
21 * @div: Divide the value from the ADC by this.
22 *
23 * The value read from the ADC is converted to a value that
24 * hwmon expects (mV) by result = (value_read * @mult) / @div.
25 */
26struct s3c_hwmon_chcfg {
27 const char *name;
28 unsigned int mult;
29 unsigned int div;
30};
31
32/**
33 * s3c_hwmon_pdata - HWMON platform data
34 * @in: One configuration for each possible channel used.
35 */
36struct s3c_hwmon_pdata {
37 struct s3c_hwmon_chcfg *in[8];
38};
39
40/**
41 * s3c_hwmon_set_platdata - Set platform data for S3C HWMON device
42 * @pd: Platform data to register to device.
43 *
44 * Register the given platform data for use with the S3C HWMON device.
45 * The call will copy the platform data, so the board definitions can
46 * make the structure itself __initdata.
47 */
48extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd);
49
50#endif /* __ASM_ARCH_ADC_HWMON_H */
51
diff --git a/include/linux/platform_data/i2c-davinci.h b/include/linux/platform_data/i2c-davinci.h
new file mode 100644
index 000000000000..2312d197dfb7
--- /dev/null
+++ b/include/linux/platform_data/i2c-davinci.h
@@ -0,0 +1,26 @@
1/*
2 * DaVinci I2C controller platform_device info
3 *
4 * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10*/
11
12#ifndef __ASM_ARCH_I2C_H
13#define __ASM_ARCH_I2C_H
14
15/* All frequencies are expressed in kHz */
16struct davinci_i2c_platform_data {
17 unsigned int bus_freq; /* standard bus frequency (kHz) */
18 unsigned int bus_delay; /* post-transaction delay (usec) */
19 unsigned int sda_pin; /* GPIO pin ID to use for SDA */
20 unsigned int scl_pin; /* GPIO pin ID to use for SCL */
21};
22
23/* for board setup code */
24void davinci_init_i2c(struct davinci_i2c_platform_data *);
25
26#endif /* __ASM_ARCH_I2C_H */
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 **/
17struct imxi2c_platform_data {
18 u32 bitrate;
19};
20
21#endif /* __ASM_ARCH_I2C_H_ */
diff --git a/include/linux/platform_data/i2c-nuc900.h b/include/linux/platform_data/i2c-nuc900.h
new file mode 100644
index 000000000000..9ffb12d06e91
--- /dev/null
+++ b/include/linux/platform_data/i2c-nuc900.h
@@ -0,0 +1,9 @@
1#ifndef __ASM_ARCH_NUC900_I2C_H
2#define __ASM_ARCH_NUC900_I2C_H
3
4struct nuc900_platform_i2c {
5 int bus_num;
6 unsigned long bus_freq;
7};
8
9#endif /* __ASM_ARCH_NUC900_I2C_H */
diff --git a/include/linux/platform_data/i2c-s3c2410.h b/include/linux/platform_data/i2c-s3c2410.h
new file mode 100644
index 000000000000..51d52e767a19
--- /dev/null
+++ b/include/linux/platform_data/i2c-s3c2410.h
@@ -0,0 +1,77 @@
1/* arch/arm/plat-s3c/include/plat/iic.h
2 *
3 * Copyright 2004-2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C - I2C Controller platform_device info
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 version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_IIC_H
14#define __ASM_ARCH_IIC_H __FILE__
15
16#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
17
18/**
19 * struct s3c2410_platform_i2c - Platform data for s3c I2C.
20 * @bus_num: The bus number to use (if possible).
21 * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
22 * @slave_addr: The I2C address for the slave device (if enabled).
23 * @frequency: The desired frequency in Hz of the bus. This is
24 * guaranteed to not be exceeded. If the caller does
25 * not care, use zero and the driver will select a
26 * useful default.
27 * @sda_delay: The delay (in ns) applied to SDA edges.
28 * @cfg_gpio: A callback to configure the pins for I2C operation.
29 */
30struct s3c2410_platform_i2c {
31 int bus_num;
32 unsigned int flags;
33 unsigned int slave_addr;
34 unsigned long frequency;
35 unsigned int sda_delay;
36
37 void (*cfg_gpio)(struct platform_device *dev);
38};
39
40/**
41 * s3c_i2c0_set_platdata - set platform data for i2c0 device
42 * @i2c: The platform data to set, or NULL for default data.
43 *
44 * Register the given platform data for use with the i2c0 device. This
45 * call copies the platform data, so the caller can use __initdata for
46 * their copy.
47 *
48 * This call will set cfg_gpio if is null to the default platform
49 * implementation.
50 *
51 * Any user of s3c_device_i2c0 should call this, even if it is with
52 * NULL to ensure that the device is given the default platform data
53 * as the driver will no longer carry defaults.
54 */
55extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c);
56extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c);
57extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c);
58extern void s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *i2c);
59extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c);
60extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c);
61extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c);
62extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c);
63extern void s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *i2c);
64
65/* defined by architecture to configure gpio */
66extern void s3c_i2c0_cfg_gpio(struct platform_device *dev);
67extern void s3c_i2c1_cfg_gpio(struct platform_device *dev);
68extern void s3c_i2c2_cfg_gpio(struct platform_device *dev);
69extern void s3c_i2c3_cfg_gpio(struct platform_device *dev);
70extern void s3c_i2c4_cfg_gpio(struct platform_device *dev);
71extern void s3c_i2c5_cfg_gpio(struct platform_device *dev);
72extern void s3c_i2c6_cfg_gpio(struct platform_device *dev);
73extern void s3c_i2c7_cfg_gpio(struct platform_device *dev);
74
75extern struct s3c2410_platform_i2c default_i2c_data;
76
77#endif /* __ASM_ARCH_IIC_H */
diff --git a/include/linux/platform_data/irda-pxaficp.h b/include/linux/platform_data/irda-pxaficp.h
new file mode 100644
index 000000000000..3cd41f77dda4
--- /dev/null
+++ b/include/linux/platform_data/irda-pxaficp.h
@@ -0,0 +1,25 @@
1#ifndef ASMARM_ARCH_IRDA_H
2#define ASMARM_ARCH_IRDA_H
3
4/* board specific transceiver capabilities */
5
6#define IR_OFF 1
7#define IR_SIRMODE 2
8#define IR_FIRMODE 4
9
10struct pxaficp_platform_data {
11 int transceiver_cap;
12 void (*transceiver_mode)(struct device *dev, int mode);
13 int (*startup)(struct device *dev);
14 void (*shutdown)(struct device *dev);
15 int gpio_pwdown; /* powerdown GPIO for the IrDA chip */
16 bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */
17};
18
19extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
20
21#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
22void pxa2xx_transceiver_mode(struct device *dev, int mode);
23#endif
24
25#endif
diff --git a/include/linux/platform_data/keyboard-pxa930_rotary.h b/include/linux/platform_data/keyboard-pxa930_rotary.h
new file mode 100644
index 000000000000..053587caffdd
--- /dev/null
+++ b/include/linux/platform_data/keyboard-pxa930_rotary.h
@@ -0,0 +1,20 @@
1#ifndef __ASM_ARCH_PXA930_ROTARY_H
2#define __ASM_ARCH_PXA930_ROTARY_H
3
4/* NOTE:
5 *
6 * rotary can be either interpreted as a ralative input event (e.g.
7 * REL_WHEEL or REL_HWHEEL) or a specific key event (e.g. UP/DOWN
8 * or LEFT/RIGHT), depending on if up_key & down_key are assigned
9 * or rel_code is assigned a non-zero value. When all are non-zero,
10 * up_key and down_key will be preferred.
11 */
12struct pxa930_rotary_platform_data {
13 int up_key;
14 int down_key;
15 int rel_code;
16};
17
18void __init pxa930_set_rotarykey_info(struct pxa930_rotary_platform_data *info);
19
20#endif /* __ASM_ARCH_PXA930_ROTARY_H */
diff --git a/include/linux/platform_data/keyboard-spear.h b/include/linux/platform_data/keyboard-spear.h
new file mode 100644
index 000000000000..9248e3a7e333
--- /dev/null
+++ b/include/linux/platform_data/keyboard-spear.h
@@ -0,0 +1,164 @@
1/*
2 * Copyright (C) 2010 ST Microelectronics
3 * Rajeev Kumar<rajeev-dlh.kumar@st.com>
4 *
5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any
7 * warranty of any kind, whether express or implied.
8 */
9
10#ifndef __PLAT_KEYBOARD_H
11#define __PLAT_KEYBOARD_H
12
13#include <linux/bitops.h>
14#include <linux/input.h>
15#include <linux/input/matrix_keypad.h>
16#include <linux/types.h>
17
18#define DECLARE_9x9_KEYMAP(_name) \
19int _name[] = { \
20 KEY(0, 0, KEY_ESC), \
21 KEY(0, 1, KEY_1), \
22 KEY(0, 2, KEY_2), \
23 KEY(0, 3, KEY_3), \
24 KEY(0, 4, KEY_4), \
25 KEY(0, 5, KEY_5), \
26 KEY(0, 6, KEY_6), \
27 KEY(0, 7, KEY_7), \
28 KEY(0, 8, KEY_8), \
29 KEY(1, 0, KEY_9), \
30 KEY(1, 1, KEY_MINUS), \
31 KEY(1, 2, KEY_EQUAL), \
32 KEY(1, 3, KEY_BACKSPACE), \
33 KEY(1, 4, KEY_TAB), \
34 KEY(1, 5, KEY_Q), \
35 KEY(1, 6, KEY_W), \
36 KEY(1, 7, KEY_E), \
37 KEY(1, 8, KEY_R), \
38 KEY(2, 0, KEY_T), \
39 KEY(2, 1, KEY_Y), \
40 KEY(2, 2, KEY_U), \
41 KEY(2, 3, KEY_I), \
42 KEY(2, 4, KEY_O), \
43 KEY(2, 5, KEY_P), \
44 KEY(2, 6, KEY_LEFTBRACE), \
45 KEY(2, 7, KEY_RIGHTBRACE), \
46 KEY(2, 8, KEY_ENTER), \
47 KEY(3, 0, KEY_LEFTCTRL), \
48 KEY(3, 1, KEY_A), \
49 KEY(3, 2, KEY_S), \
50 KEY(3, 3, KEY_D), \
51 KEY(3, 4, KEY_F), \
52 KEY(3, 5, KEY_G), \
53 KEY(3, 6, KEY_H), \
54 KEY(3, 7, KEY_J), \
55 KEY(3, 8, KEY_K), \
56 KEY(4, 0, KEY_L), \
57 KEY(4, 1, KEY_SEMICOLON), \
58 KEY(4, 2, KEY_APOSTROPHE), \
59 KEY(4, 3, KEY_GRAVE), \
60 KEY(4, 4, KEY_LEFTSHIFT), \
61 KEY(4, 5, KEY_BACKSLASH), \
62 KEY(4, 6, KEY_Z), \
63 KEY(4, 7, KEY_X), \
64 KEY(4, 8, KEY_C), \
65 KEY(5, 0, KEY_V), \
66 KEY(5, 1, KEY_B), \
67 KEY(5, 2, KEY_N), \
68 KEY(5, 3, KEY_M), \
69 KEY(5, 4, KEY_COMMA), \
70 KEY(5, 5, KEY_DOT), \
71 KEY(5, 6, KEY_SLASH), \
72 KEY(5, 7, KEY_RIGHTSHIFT), \
73 KEY(5, 8, KEY_KPASTERISK), \
74 KEY(6, 0, KEY_LEFTALT), \
75 KEY(6, 1, KEY_SPACE), \
76 KEY(6, 2, KEY_CAPSLOCK), \
77 KEY(6, 3, KEY_F1), \
78 KEY(6, 4, KEY_F2), \
79 KEY(6, 5, KEY_F3), \
80 KEY(6, 6, KEY_F4), \
81 KEY(6, 7, KEY_F5), \
82 KEY(6, 8, KEY_F6), \
83 KEY(7, 0, KEY_F7), \
84 KEY(7, 1, KEY_F8), \
85 KEY(7, 2, KEY_F9), \
86 KEY(7, 3, KEY_F10), \
87 KEY(7, 4, KEY_NUMLOCK), \
88 KEY(7, 5, KEY_SCROLLLOCK), \
89 KEY(7, 6, KEY_KP7), \
90 KEY(7, 7, KEY_KP8), \
91 KEY(7, 8, KEY_KP9), \
92 KEY(8, 0, KEY_KPMINUS), \
93 KEY(8, 1, KEY_KP4), \
94 KEY(8, 2, KEY_KP5), \
95 KEY(8, 3, KEY_KP6), \
96 KEY(8, 4, KEY_KPPLUS), \
97 KEY(8, 5, KEY_KP1), \
98 KEY(8, 6, KEY_KP2), \
99 KEY(8, 7, KEY_KP3), \
100 KEY(8, 8, KEY_KP0), \
101}
102
103#define DECLARE_6x6_KEYMAP(_name) \
104int _name[] = { \
105 KEY(0, 0, KEY_RESERVED), \
106 KEY(0, 1, KEY_1), \
107 KEY(0, 2, KEY_2), \
108 KEY(0, 3, KEY_3), \
109 KEY(0, 4, KEY_4), \
110 KEY(0, 5, KEY_5), \
111 KEY(1, 0, KEY_Q), \
112 KEY(1, 1, KEY_W), \
113 KEY(1, 2, KEY_E), \
114 KEY(1, 3, KEY_R), \
115 KEY(1, 4, KEY_T), \
116 KEY(1, 5, KEY_Y), \
117 KEY(2, 0, KEY_D), \
118 KEY(2, 1, KEY_F), \
119 KEY(2, 2, KEY_G), \
120 KEY(2, 3, KEY_H), \
121 KEY(2, 4, KEY_J), \
122 KEY(2, 5, KEY_K), \
123 KEY(3, 0, KEY_B), \
124 KEY(3, 1, KEY_N), \
125 KEY(3, 2, KEY_M), \
126 KEY(3, 3, KEY_COMMA), \
127 KEY(3, 4, KEY_DOT), \
128 KEY(3, 5, KEY_SLASH), \
129 KEY(4, 0, KEY_F6), \
130 KEY(4, 1, KEY_F7), \
131 KEY(4, 2, KEY_F8), \
132 KEY(4, 3, KEY_F9), \
133 KEY(4, 4, KEY_F10), \
134 KEY(4, 5, KEY_NUMLOCK), \
135 KEY(5, 0, KEY_KP2), \
136 KEY(5, 1, KEY_KP3), \
137 KEY(5, 2, KEY_KP0), \
138 KEY(5, 3, KEY_KPDOT), \
139 KEY(5, 4, KEY_RO), \
140 KEY(5, 5, KEY_ZENKAKUHANKAKU), \
141}
142
143#define KEYPAD_9x9 0
144#define KEYPAD_6x6 1
145#define KEYPAD_2x2 2
146
147/**
148 * struct kbd_platform_data - spear keyboard platform data
149 * keymap: pointer to keymap data (table and size)
150 * rep: enables key autorepeat
151 * mode: choose keyboard support(9x9, 6x6, 2x2)
152 * suspended_rate: rate at which keyboard would operate in suspended mode
153 *
154 * This structure is supposed to be used by platform code to supply
155 * keymaps to drivers that implement keyboards.
156 */
157struct kbd_platform_data {
158 const struct matrix_keymap_data *keymap;
159 bool rep;
160 unsigned int mode;
161 unsigned int suspended_rate;
162};
163
164#endif /* __PLAT_KEYBOARD_H */
diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h
new file mode 100644
index 000000000000..1e2f4e97f428
--- /dev/null
+++ b/include/linux/platform_data/keypad-ep93xx.h
@@ -0,0 +1,35 @@
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
8struct 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 */
25struct 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/include/linux/platform_data/keypad-nomadik-ske.h b/include/linux/platform_data/keypad-nomadik-ske.h
new file mode 100644
index 000000000000..31382fbc07dc
--- /dev/null
+++ b/include/linux/platform_data/keypad-nomadik-ske.h
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 * Author: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
6 *
7 * ux500 Scroll key and Keypad Encoder (SKE) header
8 */
9
10#ifndef __SKE_H
11#define __SKE_H
12
13#include <linux/input/matrix_keypad.h>
14
15/* register definitions for SKE peripheral */
16#define SKE_CR 0x00
17#define SKE_VAL0 0x04
18#define SKE_VAL1 0x08
19#define SKE_DBCR 0x0C
20#define SKE_IMSC 0x10
21#define SKE_RIS 0x14
22#define SKE_MIS 0x18
23#define SKE_ICR 0x1C
24
25/*
26 * Keypad module
27 */
28
29/**
30 * struct keypad_platform_data - structure for platform specific data
31 * @init: pointer to keypad init function
32 * @exit: pointer to keypad deinitialisation function
33 * @keymap_data: matrix scan code table for keycodes
34 * @krow: maximum number of rows
35 * @kcol: maximum number of columns
36 * @debounce_ms: platform specific debounce time
37 * @no_autorepeat: flag for auto repetition
38 * @wakeup_enable: allow waking up the system
39 */
40struct ske_keypad_platform_data {
41 int (*init)(void);
42 int (*exit)(void);
43 const struct matrix_keymap_data *keymap_data;
44 u8 krow;
45 u8 kcol;
46 u8 debounce_ms;
47 bool no_autorepeat;
48 bool wakeup_enable;
49};
50#endif /*__SKE_KPD_H*/
diff --git a/include/linux/platform_data/keypad-omap.h b/include/linux/platform_data/keypad-omap.h
new file mode 100644
index 000000000000..a6b21eddb212
--- /dev/null
+++ b/include/linux/platform_data/keypad-omap.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/plat-omap/include/mach/keypad.h
3 *
4 * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com>
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_KEYPAD_H
11#define ASMARM_ARCH_KEYPAD_H
12
13#ifndef CONFIG_ARCH_OMAP1
14#warning Please update the board to use matrix-keypad driver
15#define omap_readw(reg) 0
16#define omap_writew(val, reg) do {} while (0)
17#endif
18#include <linux/input/matrix_keypad.h>
19
20struct omap_kp_platform_data {
21 int rows;
22 int cols;
23 const struct matrix_keymap_data *keymap_data;
24 bool rep;
25 unsigned long delay;
26 bool dbounce;
27 /* specific to OMAP242x*/
28 unsigned int *row_gpios;
29 unsigned int *col_gpios;
30};
31
32/* Group (0..3) -- when multiple keys are pressed, only the
33 * keys pressed in the same group are considered as pressed. This is
34 * in order to workaround certain crappy HW designs that produce ghost
35 * keypresses. Two free bits, not used by neither row/col nor keynum,
36 * must be available for use as group bits. The below GROUP_SHIFT
37 * macro definition is based on some prior knowledge of the
38 * matrix_keypad defined KEY() macro internals.
39 */
40#define GROUP_SHIFT 14
41#define GROUP_0 (0 << GROUP_SHIFT)
42#define GROUP_1 (1 << GROUP_SHIFT)
43#define GROUP_2 (2 << GROUP_SHIFT)
44#define GROUP_3 (3 << GROUP_SHIFT)
45#define GROUP_MASK GROUP_3
46#if KEY_MAX & GROUP_MASK
47#error Group bits in conflict with keynum bits
48#endif
49
50
51#endif
52
diff --git a/include/linux/platform_data/keypad-pxa27x.h b/include/linux/platform_data/keypad-pxa27x.h
new file mode 100644
index 000000000000..5ce8d5e6ea51
--- /dev/null
+++ b/include/linux/platform_data/keypad-pxa27x.h
@@ -0,0 +1,73 @@
1#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
2#define __ASM_ARCH_PXA27x_KEYPAD_H
3
4#include <linux/input.h>
5#include <linux/input/matrix_keypad.h>
6
7#define MAX_MATRIX_KEY_ROWS (8)
8#define MAX_MATRIX_KEY_COLS (8)
9#define MATRIX_ROW_SHIFT (3)
10#define MAX_DIRECT_KEY_NUM (8)
11
12/* pxa3xx keypad platform specific parameters
13 *
14 * NOTE:
15 * 1. direct_key_num indicates the number of keys in the direct keypad
16 * _plus_ the number of rotary-encoder sensor inputs, this can be
17 * left as 0 if only rotary encoders are enabled, the driver will
18 * automatically calculate this
19 *
20 * 2. direct_key_map is the key code map for the direct keys, if rotary
21 * encoder(s) are enabled, direct key 0/1(2/3) will be ignored
22 *
23 * 3. rotary can be either interpreted as a relative input event (e.g.
24 * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
25 *
26 * 4. matrix key and direct key will use the same debounce_interval by
27 * default, which should be sufficient in most cases
28 *
29 * pxa168 keypad platform specific parameter
30 *
31 * NOTE:
32 * clear_wakeup_event callback is a workaround required to clear the
33 * keypad interrupt. The keypad wake must be cleared in addition to
34 * reading the MI/DI bits in the KPC register.
35 */
36struct pxa27x_keypad_platform_data {
37
38 /* code map for the matrix keys */
39 unsigned int matrix_key_rows;
40 unsigned int matrix_key_cols;
41 unsigned int *matrix_key_map;
42 int matrix_key_map_size;
43
44 /* direct keys */
45 int direct_key_num;
46 unsigned int direct_key_map[MAX_DIRECT_KEY_NUM];
47 /* the key output may be low active */
48 int direct_key_low_active;
49 /* give board a chance to choose the start direct key */
50 unsigned int direct_key_mask;
51
52 /* rotary encoders 0 */
53 int enable_rotary0;
54 int rotary0_rel_code;
55 int rotary0_up_key;
56 int rotary0_down_key;
57
58 /* rotary encoders 1 */
59 int enable_rotary1;
60 int rotary1_rel_code;
61 int rotary1_up_key;
62 int rotary1_down_key;
63
64 /* key debounce interval */
65 unsigned int debounce_interval;
66
67 /* clear wakeup event requirement for pxa168 */
68 void (*clear_wakeup_event)(void);
69};
70
71extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
72
73#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
diff --git a/include/linux/platform_data/keypad-w90p910.h b/include/linux/platform_data/keypad-w90p910.h
new file mode 100644
index 000000000000..556778e8ddaa
--- /dev/null
+++ b/include/linux/platform_data/keypad-w90p910.h
@@ -0,0 +1,15 @@
1#ifndef __ASM_ARCH_W90P910_KEYPAD_H
2#define __ASM_ARCH_W90P910_KEYPAD_H
3
4#include <linux/input/matrix_keypad.h>
5
6extern void mfp_set_groupi(struct device *dev);
7
8struct w90p910_keypad_platform_data {
9 const struct matrix_keymap_data *keymap_data;
10
11 unsigned int prescale;
12 unsigned int debounce;
13};
14
15#endif /* __ASM_ARCH_W90P910_KEYPAD_H */
diff --git a/include/linux/platform_data/keyscan-davinci.h b/include/linux/platform_data/keyscan-davinci.h
new file mode 100644
index 000000000000..7a560e05bda8
--- /dev/null
+++ b/include/linux/platform_data/keyscan-davinci.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) 2009 Texas Instruments, Inc
3 *
4 * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
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 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef DAVINCI_KEYSCAN_H
22#define DAVINCI_KEYSCAN_H
23
24#include <linux/io.h>
25
26enum davinci_matrix_types {
27 DAVINCI_KEYSCAN_MATRIX_4X4,
28 DAVINCI_KEYSCAN_MATRIX_5X3,
29};
30
31struct davinci_ks_platform_data {
32 int (*device_enable)(struct device *dev);
33 unsigned short *keymap;
34 u32 keymapsize;
35 u8 rep:1;
36 u8 strobe;
37 u8 interval;
38 u8 matrix_type;
39};
40
41#endif
42
diff --git a/include/linux/platform_data/lcd-mipid.h b/include/linux/platform_data/lcd-mipid.h
new file mode 100644
index 000000000000..8e52c6572281
--- /dev/null
+++ b/include/linux/platform_data/lcd-mipid.h
@@ -0,0 +1,29 @@
1#ifndef __LCD_MIPID_H
2#define __LCD_MIPID_H
3
4enum mipid_test_num {
5 MIPID_TEST_RGB_LINES,
6};
7
8enum mipid_test_result {
9 MIPID_TEST_SUCCESS,
10 MIPID_TEST_INVALID,
11 MIPID_TEST_FAILED,
12};
13
14#ifdef __KERNEL__
15
16struct mipid_platform_data {
17 int nreset_gpio;
18 int data_lines;
19
20 void (*shutdown)(struct mipid_platform_data *pdata);
21 void (*set_bklight_level)(struct mipid_platform_data *pdata,
22 int level);
23 int (*get_bklight_level)(struct mipid_platform_data *pdata);
24 int (*get_bklight_max)(struct mipid_platform_data *pdata);
25};
26
27#endif
28
29#endif
diff --git a/include/linux/platform_data/leds-kirkwood-netxbig.h b/include/linux/platform_data/leds-kirkwood-netxbig.h
new file mode 100644
index 000000000000..24b536ebdf13
--- /dev/null
+++ b/include/linux/platform_data/leds-kirkwood-netxbig.h
@@ -0,0 +1,55 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/leds-netxbig.h
3 *
4 * Platform data structure for netxbig LED driver
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __MACH_LEDS_NETXBIG_H
12#define __MACH_LEDS_NETXBIG_H
13
14struct netxbig_gpio_ext {
15 unsigned *addr;
16 int num_addr;
17 unsigned *data;
18 int num_data;
19 unsigned enable;
20};
21
22enum netxbig_led_mode {
23 NETXBIG_LED_OFF,
24 NETXBIG_LED_ON,
25 NETXBIG_LED_SATA,
26 NETXBIG_LED_TIMER1,
27 NETXBIG_LED_TIMER2,
28 NETXBIG_LED_MODE_NUM,
29};
30
31#define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM
32
33struct netxbig_led_timer {
34 unsigned long delay_on;
35 unsigned long delay_off;
36 enum netxbig_led_mode mode;
37};
38
39struct netxbig_led {
40 const char *name;
41 const char *default_trigger;
42 int mode_addr;
43 int *mode_val;
44 int bright_addr;
45};
46
47struct netxbig_led_platform_data {
48 struct netxbig_gpio_ext *gpio_ext;
49 struct netxbig_led_timer *timer;
50 int num_timer;
51 struct netxbig_led *leds;
52 int num_leds;
53};
54
55#endif /* __MACH_LEDS_NETXBIG_H */
diff --git a/include/linux/platform_data/leds-kirkwood-ns2.h b/include/linux/platform_data/leds-kirkwood-ns2.h
new file mode 100644
index 000000000000..e21272e5f668
--- /dev/null
+++ b/include/linux/platform_data/leds-kirkwood-ns2.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/leds-ns2.h
3 *
4 * Platform data structure for Network Space v2 LED driver
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __MACH_LEDS_NS2_H
12#define __MACH_LEDS_NS2_H
13
14struct ns2_led {
15 const char *name;
16 const char *default_trigger;
17 unsigned cmd;
18 unsigned slow;
19};
20
21struct ns2_led_platform_data {
22 int num_leds;
23 struct ns2_led *leds;
24};
25
26#endif /* __MACH_LEDS_NS2_H */
diff --git a/include/linux/platform_data/leds-s3c24xx.h b/include/linux/platform_data/leds-s3c24xx.h
new file mode 100644
index 000000000000..d8a7672519b6
--- /dev/null
+++ b/include/linux/platform_data/leds-s3c24xx.h
@@ -0,0 +1,28 @@
1/* arch/arm/mach-s3c2410/include/mach/leds-gpio.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - LEDs GPIO connector
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_LEDSGPIO_H
15#define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h"
16
17#define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */
18#define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */
19
20struct s3c24xx_led_platdata {
21 unsigned int gpio;
22 unsigned int flags;
23
24 char *name;
25 char *def_trigger;
26};
27
28#endif /* __ASM_ARCH_LEDSGPIO_H */
diff --git a/include/linux/platform_data/max197.h b/include/linux/platform_data/max197.h
new file mode 100644
index 000000000000..e2a41dd7690c
--- /dev/null
+++ b/include/linux/platform_data/max197.h
@@ -0,0 +1,21 @@
1/*
2 * Maxim MAX197 A/D Converter Driver
3 *
4 * Copyright (c) 2012 Savoir-faire Linux Inc.
5 * Vivien Didelot <vivien.didelot@savoirfairelinux.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * For further information, see the Documentation/hwmon/max197 file.
12 */
13
14/**
15 * struct max197_platform_data - MAX197 connectivity info
16 * @convert: Function used to start a conversion with control byte ctrl.
17 * It must return the raw data, or a negative error code.
18 */
19struct max197_platform_data {
20 int (*convert)(u8 ctrl);
21};
diff --git a/include/linux/platform_data/max310x.h b/include/linux/platform_data/max310x.h
new file mode 100644
index 000000000000..91648bf5fc5c
--- /dev/null
+++ b/include/linux/platform_data/max310x.h
@@ -0,0 +1,67 @@
1/*
2 * Maxim (Dallas) MAX3107/8 serial driver
3 *
4 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
5 *
6 * Based on max3100.c, by Christian Pellegrin <chripell@evolware.org>
7 * Based on max3110.c, by Feng Tang <feng.tang@intel.com>
8 * Based on max3107.c, by Aavamobile
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _MAX310X_H_
17#define _MAX310X_H_
18
19/*
20 * Example board initialization data:
21 *
22 * static struct max310x_pdata max3107_pdata = {
23 * .driver_flags = MAX310X_EXT_CLK,
24 * .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL,
25 * .frequency = 3686400,
26 * .gpio_base = -1,
27 * };
28 *
29 * static struct spi_board_info spi_device_max3107[] = {
30 * {
31 * .modalias = "max3107",
32 * .irq = IRQ_EINT3,
33 * .bus_num = 1,
34 * .chip_select = 1,
35 * .platform_data = &max3107_pdata,
36 * },
37 * };
38 */
39
40#define MAX310X_MAX_UARTS 1
41
42/* MAX310X platform data structure */
43struct max310x_pdata {
44 /* Flags global to driver */
45 const u8 driver_flags:2;
46#define MAX310X_EXT_CLK (0x00000001) /* External clock enable */
47#define MAX310X_AUTOSLEEP (0x00000002) /* Enable AutoSleep mode */
48 /* Flags global to UART port */
49 const u8 uart_flags[MAX310X_MAX_UARTS];
50#define MAX310X_LOOPBACK (0x00000001) /* Loopback mode enable */
51#define MAX310X_ECHO_SUPRESS (0x00000002) /* Enable echo supress */
52#define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction
53 * control (RS-485)
54 */
55 /* Frequency (extrenal clock or crystal) */
56 const int frequency;
57 /* GPIO base number (can be negative) */
58 const int gpio_base;
59 /* Called during startup */
60 void (*init)(void);
61 /* Called before finish */
62 void (*exit)(void);
63 /* Suspend callback */
64 void (*suspend)(int do_suspend);
65};
66
67#endif
diff --git a/include/linux/platform_data/mfd-mcp-sa11x0.h b/include/linux/platform_data/mfd-mcp-sa11x0.h
new file mode 100644
index 000000000000..4b2860ae3828
--- /dev/null
+++ b/include/linux/platform_data/mfd-mcp-sa11x0.h
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/mcp.h
3 *
4 * Copyright (C) 2005 Russell King.
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_ARCH_MCP_H
11#define __ASM_ARM_ARCH_MCP_H
12
13#include <linux/types.h>
14
15struct mcp_plat_data {
16 u32 mccr0;
17 u32 mccr1;
18 unsigned int sclk_rate;
19 void *codec_pdata;
20};
21
22#endif
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h
new file mode 100644
index 000000000000..c45b1e8d4c2e
--- /dev/null
+++ b/include/linux/platform_data/mipi-csis.h
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
3 *
4 * S5P series MIPI CSI slave device support
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_
12#define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__
13
14struct platform_device;
15
16/**
17 * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
18 * @clk_rate: bus clock frequency
19 * @lanes: number of data lanes used
20 * @alignment: data alignment in bits
21 * @hs_settle: HS-RX settle time
22 * @fixed_phy_vdd: false to enable external D-PHY regulator management in the
23 * driver or true in case this regulator has no enable function
24 * @phy_enable: pointer to a callback controlling D-PHY enable/reset
25 */
26struct s5p_platform_mipi_csis {
27 unsigned long clk_rate;
28 u8 lanes;
29 u8 alignment;
30 u8 hs_settle;
31 bool fixed_phy_vdd;
32 int (*phy_enable)(struct platform_device *pdev, bool on);
33};
34
35/**
36 * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control
37 * @pdev: MIPI-CSIS platform device
38 * @on: true to enable D-PHY and deassert its reset
39 * false to disable D-PHY
40 */
41int s5p_csis_phy_enable(struct platform_device *pdev, bool on);
42
43#endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */
diff --git a/include/linux/platform_data/mmc-davinci.h b/include/linux/platform_data/mmc-davinci.h
new file mode 100644
index 000000000000..5ba6b22ce338
--- /dev/null
+++ b/include/linux/platform_data/mmc-davinci.h
@@ -0,0 +1,39 @@
1/*
2 * Board-specific MMC configuration
3 */
4
5#ifndef _DAVINCI_MMC_H
6#define _DAVINCI_MMC_H
7
8#include <linux/types.h>
9#include <linux/mmc/host.h>
10
11struct davinci_mmc_config {
12 /* get_cd()/get_wp() may sleep */
13 int (*get_cd)(int module);
14 int (*get_ro)(int module);
15
16 void (*set_power)(int module, bool on);
17
18 /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
19 u8 wires;
20
21 u32 max_freq;
22
23 /* any additional host capabilities: OR'd in to mmc->f_caps */
24 u32 caps;
25
26 /* Version of the MMC/SD controller */
27 u8 version;
28
29 /* Number of sg segments */
30 u8 nr_sg;
31};
32void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
33
34enum {
35 MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
36 MMC_CTLR_VERSION_2, /* DA830 */
37};
38
39#endif
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
13enum 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
19enum 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
37struct 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-msm_sdcc.h b/include/linux/platform_data/mmc-msm_sdcc.h
new file mode 100644
index 000000000000..ffcd9e3a6a7e
--- /dev/null
+++ b/include/linux/platform_data/mmc-msm_sdcc.h
@@ -0,0 +1,30 @@
1/*
2 * arch/arm/include/asm/mach/mmc.h
3 */
4#ifndef ASMARM_MACH_MMC_H
5#define ASMARM_MACH_MMC_H
6
7#include <linux/mmc/host.h>
8#include <linux/mmc/card.h>
9#include <linux/mmc/sdio_func.h>
10
11struct msm_mmc_gpio {
12 unsigned no;
13 const char *name;
14};
15
16struct msm_mmc_gpio_data {
17 struct msm_mmc_gpio *gpio;
18 u8 size;
19};
20
21struct msm_mmc_platform_data {
22 unsigned int ocr_mask; /* available voltages */
23 u32 (*translate_vdd)(struct device *, unsigned int);
24 unsigned int (*status)(struct device *);
25 int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
26 struct msm_mmc_gpio_data *gpio_data;
27 void (*init_card)(struct mmc_card *card);
28};
29
30#endif
diff --git a/include/linux/platform_data/mmc-mvsdio.h b/include/linux/platform_data/mmc-mvsdio.h
new file mode 100644
index 000000000000..1190efedcb94
--- /dev/null
+++ b/include/linux/platform_data/mmc-mvsdio.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/plat-orion/include/plat/mvsdio.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __MACH_MVSDIO_H
10#define __MACH_MVSDIO_H
11
12#include <linux/mbus.h>
13
14struct mvsdio_platform_data {
15 unsigned int clock;
16 int gpio_card_detect;
17 int gpio_write_protect;
18};
19
20#endif
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
6struct device;
7
8/* board specific SDHC data, optional.
9 * If not present, a writable card with 3,3V is assumed.
10 */
11struct 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/mmc-pxamci.h b/include/linux/platform_data/mmc-pxamci.h
new file mode 100644
index 000000000000..9eb515bb799d
--- /dev/null
+++ b/include/linux/platform_data/mmc-pxamci.h
@@ -0,0 +1,28 @@
1#ifndef ASMARM_ARCH_MMC_H
2#define ASMARM_ARCH_MMC_H
3
4#include <linux/mmc/host.h>
5#include <linux/interrupt.h>
6
7struct device;
8struct mmc_host;
9
10struct pxamci_platform_data {
11 unsigned int ocr_mask; /* available voltages */
12 unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */
13 int (*init)(struct device *, irq_handler_t , void *);
14 int (*get_ro)(struct device *);
15 void (*setpower)(struct device *, unsigned int);
16 void (*exit)(struct device *, void *);
17 int gpio_card_detect; /* gpio detecting card insertion */
18 int gpio_card_ro; /* gpio detecting read only toggle */
19 bool gpio_card_ro_invert; /* gpio ro is inverted */
20 int gpio_power; /* gpio powering up MMC bus */
21 bool gpio_power_invert; /* gpio power is inverted */
22};
23
24extern void pxa_set_mci_info(struct pxamci_platform_data *info);
25extern void pxa3xx_set_mci2_info(struct pxamci_platform_data *info);
26extern void pxa3xx_set_mci3_info(struct pxamci_platform_data *info);
27
28#endif
diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h
new file mode 100644
index 000000000000..c42d31711944
--- /dev/null
+++ b/include/linux/platform_data/mmc-s3cmci.h
@@ -0,0 +1,52 @@
1#ifndef _ARCH_MCI_H
2#define _ARCH_MCI_H
3
4/**
5 * struct s3c24xx_mci_pdata - sd/mmc controller platform data
6 * @no_wprotect: Set this to indicate there is no write-protect switch.
7 * @no_detect: Set this if there is no detect switch.
8 * @wprotect_invert: Invert the default sense of the write protect switch.
9 * @detect_invert: Invert the default sense of the write protect switch.
10 * @use_dma: Set to allow the use of DMA.
11 * @gpio_detect: GPIO number for the card detect line.
12 * @gpio_wprotect: GPIO number for the write protect line.
13 * @ocr_avail: The mask of the available power states, non-zero to use.
14 * @set_power: Callback to control the power mode.
15 *
16 * The @gpio_detect is used for card detection when @no_wprotect is unset,
17 * and the default sense is that 0 returned from gpio_get_value() means
18 * that a card is inserted. If @detect_invert is set, then the value from
19 * gpio_get_value() is inverted, which makes 1 mean card inserted.
20 *
21 * The driver will use @gpio_wprotect to signal whether the card is write
22 * protected if @no_wprotect is not set. A 0 returned from gpio_get_value()
23 * means the card is read/write, and 1 means read-only. The @wprotect_invert
24 * will invert the value returned from gpio_get_value().
25 *
26 * Card power is set by @ocr_availa, using MCC_VDD_ constants if it is set
27 * to a non-zero value, otherwise the default of 3.2-3.4V is used.
28 */
29struct s3c24xx_mci_pdata {
30 unsigned int no_wprotect:1;
31 unsigned int no_detect:1;
32 unsigned int wprotect_invert:1;
33 unsigned int detect_invert:1; /* set => detect active high */
34 unsigned int use_dma:1;
35
36 unsigned int gpio_detect;
37 unsigned int gpio_wprotect;
38 unsigned long ocr_avail;
39 void (*set_power)(unsigned char power_mode,
40 unsigned short vdd);
41};
42
43/**
44 * s3c24xx_mci_set_platdata - set platform data for mmc/sdi device
45 * @pdata: The platform data
46 *
47 * Copy the platform data supplied by @pdata so that this can be marked
48 * __initdata.
49 */
50extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata);
51
52#endif /* _ARCH_NCI_H */
diff --git a/include/linux/platform_data/mmc-sdhci-tegra.h b/include/linux/platform_data/mmc-sdhci-tegra.h
new file mode 100644
index 000000000000..8f8430697686
--- /dev/null
+++ b/include/linux/platform_data/mmc-sdhci-tegra.h
@@ -0,0 +1,28 @@
1/*
2 * Copyright (C) 2009 Palm, Inc.
3 * Author: Yvonne Yip <y@palm.com>
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
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 __PLATFORM_DATA_TEGRA_SDHCI_H
16#define __PLATFORM_DATA_TEGRA_SDHCI_H
17
18#include <linux/mmc/host.h>
19
20struct tegra_sdhci_platform_data {
21 int cd_gpio;
22 int wp_gpio;
23 int power_gpio;
24 int is_8bit;
25 int pm_flags;
26};
27
28#endif
diff --git a/include/linux/platform_data/mouse-pxa930_trkball.h b/include/linux/platform_data/mouse-pxa930_trkball.h
new file mode 100644
index 000000000000..5e0789bc4729
--- /dev/null
+++ b/include/linux/platform_data/mouse-pxa930_trkball.h
@@ -0,0 +1,10 @@
1#ifndef __ASM_ARCH_PXA930_TRKBALL_H
2#define __ASM_ARCH_PXA930_TRKBALL_H
3
4struct pxa930_trkball_platform_data {
5 int x_filter;
6 int y_filter;
7};
8
9#endif /* __ASM_ARCH_PXA930_TRKBALL_H */
10
diff --git a/include/linux/platform_data/mtd-davinci-aemif.h b/include/linux/platform_data/mtd-davinci-aemif.h
new file mode 100644
index 000000000000..05b293443097
--- /dev/null
+++ b/include/linux/platform_data/mtd-davinci-aemif.h
@@ -0,0 +1,36 @@
1/*
2 * TI DaVinci AEMIF support
3 *
4 * Copyright 2010 (C) Texas Instruments, Inc. http://www.ti.com/
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10#ifndef _MACH_DAVINCI_AEMIF_H
11#define _MACH_DAVINCI_AEMIF_H
12
13#define NRCSR_OFFSET 0x00
14#define AWCCR_OFFSET 0x04
15#define A1CR_OFFSET 0x10
16
17#define ACR_ASIZE_MASK 0x3
18#define ACR_EW_MASK BIT(30)
19#define ACR_SS_MASK BIT(31)
20
21/* All timings in nanoseconds */
22struct davinci_aemif_timing {
23 u8 wsetup;
24 u8 wstrobe;
25 u8 whold;
26
27 u8 rsetup;
28 u8 rstrobe;
29 u8 rhold;
30
31 u8 ta;
32};
33
34int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
35 void __iomem *base, unsigned cs);
36#endif
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h
new file mode 100644
index 000000000000..1cf555aef896
--- /dev/null
+++ b/include/linux/platform_data/mtd-davinci.h
@@ -0,0 +1,90 @@
1/*
2 * mach-davinci/nand.h
3 *
4 * Copyright © 2006 Texas Instruments.
5 *
6 * Ported to 2.6.23 Copyright © 2008 by
7 * Sander Huijsen <Shuijsen@optelecom-nkf.com>
8 * Troy Kisky <troy.kisky@boundarydevices.com>
9 * Dirk Behme <Dirk.Behme@gmail.com>
10 *
11 * --------------------------------------------------------------------------
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ARCH_ARM_DAVINCI_NAND_H
29#define __ARCH_ARM_DAVINCI_NAND_H
30
31#include <linux/mtd/nand.h>
32
33#define NANDFCR_OFFSET 0x60
34#define NANDFSR_OFFSET 0x64
35#define NANDF1ECC_OFFSET 0x70
36
37/* 4-bit ECC syndrome registers */
38#define NAND_4BIT_ECC_LOAD_OFFSET 0xbc
39#define NAND_4BIT_ECC1_OFFSET 0xc0
40#define NAND_4BIT_ECC2_OFFSET 0xc4
41#define NAND_4BIT_ECC3_OFFSET 0xc8
42#define NAND_4BIT_ECC4_OFFSET 0xcc
43#define NAND_ERR_ADD1_OFFSET 0xd0
44#define NAND_ERR_ADD2_OFFSET 0xd4
45#define NAND_ERR_ERRVAL1_OFFSET 0xd8
46#define NAND_ERR_ERRVAL2_OFFSET 0xdc
47
48/* NOTE: boards don't need to use these address bits
49 * for ALE/CLE unless they support booting from NAND.
50 * They're used unless platform data overrides them.
51 */
52#define MASK_ALE 0x08
53#define MASK_CLE 0x10
54
55struct davinci_nand_pdata { /* platform_data */
56 uint32_t mask_ale;
57 uint32_t mask_cle;
58
59 /* for packages using two chipselects */
60 uint32_t mask_chipsel;
61
62 /* board's default static partition info */
63 struct mtd_partition *parts;
64 unsigned nr_parts;
65
66 /* none == NAND_ECC_NONE (strongly *not* advised!!)
67 * soft == NAND_ECC_SOFT
68 * else == NAND_ECC_HW, according to ecc_bits
69 *
70 * All DaVinci-family chips support 1-bit hardware ECC.
71 * Newer ones also support 4-bit ECC, but are awkward
72 * using it with large page chips.
73 */
74 nand_ecc_modes_t ecc_mode;
75 u8 ecc_bits;
76
77 /* e.g. NAND_BUSWIDTH_16 */
78 unsigned options;
79 /* e.g. NAND_BBT_USE_FLASH */
80 unsigned bbt_options;
81
82 /* Main and mirror bbt descriptor overrides */
83 struct nand_bbt_descr *bbt_td;
84 struct nand_bbt_descr *bbt_md;
85
86 /* Access timings */
87 struct davinci_aemif_timing *timing;
88};
89
90#endif /* __ARCH_ARM_DAVINCI_NAND_H */
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
25struct 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/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h
new file mode 100644
index 000000000000..1a68c1e5fe53
--- /dev/null
+++ b/include/linux/platform_data/mtd-nand-omap2.h
@@ -0,0 +1,43 @@
1/*
2 * arch/arm/plat-omap/include/mach/nand.h
3 *
4 * Copyright (C) 2006 Micron Technology Inc.
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <plat/gpmc.h>
12#include <linux/mtd/partitions.h>
13
14enum nand_io {
15 NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */
16 NAND_OMAP_POLLED, /* polled mode, without prefetch */
17 NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */
18 NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */
19};
20
21struct omap_nand_platform_data {
22 int cs;
23 struct mtd_partition *parts;
24 struct gpmc_timings *gpmc_t;
25 int nr_parts;
26 bool dev_ready;
27 enum nand_io xfer_type;
28 int devsize;
29 enum omap_ecc ecc_opt;
30 struct gpmc_nand_regs reg;
31};
32
33/* minimum size for IO mapping */
34#define NAND_IO_SIZE 4
35
36#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
37extern int gpmc_nand_init(struct omap_nand_platform_data *d);
38#else
39static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
40{
41 return 0;
42}
43#endif
diff --git a/include/linux/platform_data/mtd-nand-pxa3xx.h b/include/linux/platform_data/mtd-nand-pxa3xx.h
new file mode 100644
index 000000000000..c42f39f20195
--- /dev/null
+++ b/include/linux/platform_data/mtd-nand-pxa3xx.h
@@ -0,0 +1,79 @@
1#ifndef __ASM_ARCH_PXA3XX_NAND_H
2#define __ASM_ARCH_PXA3XX_NAND_H
3
4#include <linux/mtd/mtd.h>
5#include <linux/mtd/partitions.h>
6
7struct pxa3xx_nand_timing {
8 unsigned int tCH; /* Enable signal hold time */
9 unsigned int tCS; /* Enable signal setup time */
10 unsigned int tWH; /* ND_nWE high duration */
11 unsigned int tWP; /* ND_nWE pulse time */
12 unsigned int tRH; /* ND_nRE high duration */
13 unsigned int tRP; /* ND_nRE pulse width */
14 unsigned int tR; /* ND_nWE high to ND_nRE low for read */
15 unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */
16 unsigned int tAR; /* ND_ALE low to ND_nRE low delay */
17};
18
19struct pxa3xx_nand_cmdset {
20 uint16_t read1;
21 uint16_t read2;
22 uint16_t program;
23 uint16_t read_status;
24 uint16_t read_id;
25 uint16_t erase;
26 uint16_t reset;
27 uint16_t lock;
28 uint16_t unlock;
29 uint16_t lock_status;
30};
31
32struct pxa3xx_nand_flash {
33 char *name;
34 uint32_t chip_id;
35 unsigned int page_per_block; /* Pages per block (PG_PER_BLK) */
36 unsigned int page_size; /* Page size in bytes (PAGE_SZ) */
37 unsigned int flash_width; /* Width of Flash memory (DWIDTH_M) */
38 unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */
39 unsigned int num_blocks; /* Number of physical blocks in Flash */
40
41 struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
42};
43
44/*
45 * Current pxa3xx_nand controller has two chip select which
46 * both be workable.
47 *
48 * Notice should be taken that:
49 * When you want to use this feature, you should not enable the
50 * keep configuration feature, for two chip select could be
51 * attached with different nand chip. The different page size
52 * and timing requirement make the keep configuration impossible.
53 */
54
55/* The max num of chip select current support */
56#define NUM_CHIP_SELECT (2)
57struct pxa3xx_nand_platform_data {
58
59 /* the data flash bus is shared between the Static Memory
60 * Controller and the Data Flash Controller, the arbiter
61 * controls the ownership of the bus
62 */
63 int enable_arbiter;
64
65 /* allow platform code to keep OBM/bootloader defined NFC config */
66 int keep_config;
67
68 /* indicate how many chip selects will be used */
69 int num_cs;
70
71 const struct mtd_partition *parts[NUM_CHIP_SELECT];
72 unsigned int nr_parts[NUM_CHIP_SELECT];
73
74 const struct pxa3xx_nand_flash * flash;
75 size_t num_flash;
76};
77
78extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
79#endif /* __ASM_ARCH_PXA3XX_NAND_H */
diff --git a/include/linux/platform_data/mtd-nand-s3c2410.h b/include/linux/platform_data/mtd-nand-s3c2410.h
new file mode 100644
index 000000000000..b64115fa93a4
--- /dev/null
+++ b/include/linux/platform_data/mtd-nand-s3c2410.h
@@ -0,0 +1,67 @@
1/* arch/arm/mach-s3c2410/include/mach/nand.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - NAND device controller platform_device info
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 version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/**
14 * struct s3c2410_nand_set - define a set of one or more nand chips
15 * @disable_ecc: Entirely disable ECC - Dangerous
16 * @flash_bbt: Openmoko u-boot can create a Bad Block Table
17 * Setting this flag will allow the kernel to
18 * look for it at boot time and also skip the NAND
19 * scan.
20 * @options: Default value to set into 'struct nand_chip' options.
21 * @nr_chips: Number of chips in this set
22 * @nr_partitions: Number of partitions pointed to by @partitions
23 * @name: Name of set (optional)
24 * @nr_map: Map for low-layer logical to physical chip numbers (option)
25 * @partitions: The mtd partition list
26 *
27 * define a set of one or more nand chips registered with an unique mtd. Also
28 * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger
29 * a warning at boot time.
30 */
31struct s3c2410_nand_set {
32 unsigned int disable_ecc:1;
33 unsigned int flash_bbt:1;
34
35 unsigned int options;
36 int nr_chips;
37 int nr_partitions;
38 char *name;
39 int *nr_map;
40 struct mtd_partition *partitions;
41 struct nand_ecclayout *ecc_layout;
42};
43
44struct s3c2410_platform_nand {
45 /* timing information for controller, all times in nanoseconds */
46
47 int tacls; /* time for active CLE/ALE to nWE/nOE */
48 int twrph0; /* active time for nWE/nOE */
49 int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */
50
51 unsigned int ignore_unset_ecc:1;
52
53 int nr_sets;
54 struct s3c2410_nand_set *sets;
55
56 void (*select_chip)(struct s3c2410_nand_set *,
57 int chip);
58};
59
60/**
61 * s3c_nand_set_platdata() - register NAND platform data.
62 * @nand: The NAND platform data to register with s3c_device_nand.
63 *
64 * This function copies the given NAND platform data, @nand and registers
65 * it with the s3c_device_nand. This allows @nand to be __initdata.
66*/
67extern void s3c_nand_set_platdata(struct s3c2410_platform_nand *nand);
diff --git a/include/linux/platform_data/mtd-nomadik-nand.h b/include/linux/platform_data/mtd-nomadik-nand.h
new file mode 100644
index 000000000000..c3c8254c22a5
--- /dev/null
+++ b/include/linux/platform_data/mtd-nomadik-nand.h
@@ -0,0 +1,16 @@
1#ifndef __ASM_ARCH_NAND_H
2#define __ASM_ARCH_NAND_H
3
4struct nomadik_nand_platform_data {
5 struct mtd_partition *parts;
6 int nparts;
7 int options;
8 int (*init) (void);
9 int (*exit) (void);
10};
11
12#define NAND_IO_DATA 0x40000000
13#define NAND_IO_CMD 0x40800000
14#define NAND_IO_ADDR 0x41000000
15
16#endif /* __ASM_ARCH_NAND_H */
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h
new file mode 100644
index 000000000000..2858667d2e4f
--- /dev/null
+++ b/include/linux/platform_data/mtd-onenand-omap2.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/plat-omap/include/mach/onenand.h
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/mtd/mtd.h>
13#include <linux/mtd/partitions.h>
14
15#define ONENAND_SYNC_READ (1 << 0)
16#define ONENAND_SYNC_READWRITE (1 << 1)
17
18struct onenand_freq_info {
19 u16 maf_id;
20 u16 dev_id;
21 u16 ver_id;
22};
23
24struct omap_onenand_platform_data {
25 int cs;
26 int gpio_irq;
27 struct mtd_partition *parts;
28 int nr_parts;
29 int (*onenand_setup)(void __iomem *, int *freq_ptr);
30 int (*get_freq)(const struct onenand_freq_info *freq_info,
31 bool *clk_dep);
32 int dma_channel;
33 u8 flags;
34 u8 regulator_can_sleep;
35 u8 skip_initial_unlocking;
36};
37
38#define ONENAND_MAX_PARTITIONS 8
39
40#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
41 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
42
43extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
44
45#else
46
47#define board_onenand_data NULL
48
49static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
50{
51}
52
53#endif
diff --git a/include/linux/platform_data/mtd-orion_nand.h b/include/linux/platform_data/mtd-orion_nand.h
new file mode 100644
index 000000000000..9f3c180834d1
--- /dev/null
+++ b/include/linux/platform_data/mtd-orion_nand.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/plat-orion/include/plat/orion_nand.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __PLAT_ORION_NAND_H
10#define __PLAT_ORION_NAND_H
11
12/*
13 * Device bus NAND private data
14 */
15struct orion_nand_data {
16 struct mtd_partition *parts;
17 int (*dev_ready)(struct mtd_info *mtd);
18 u32 nr_parts;
19 u8 ale; /* address line number connected to ALE */
20 u8 cle; /* address line number connected to CLE */
21 u8 width; /* buswidth */
22 u8 chip_delay;
23};
24
25
26#endif
diff --git a/include/linux/platform_data/omap1_bl.h b/include/linux/platform_data/omap1_bl.h
new file mode 100644
index 000000000000..881a8e92d605
--- /dev/null
+++ b/include/linux/platform_data/omap1_bl.h
@@ -0,0 +1,11 @@
1#ifndef __OMAP1_BL_H__
2#define __OMAP1_BL_H__
3
4#include <linux/device.h>
5
6struct omap_backlight_config {
7 int default_intensity;
8 int (*set_power)(struct device *dev, int state);
9};
10
11#endif
diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/include/linux/platform_data/pcmcia-pxa2xx_viper.h
new file mode 100644
index 000000000000..d428be4db44c
--- /dev/null
+++ b/include/linux/platform_data/pcmcia-pxa2xx_viper.h
@@ -0,0 +1,11 @@
1#ifndef __ARCOM_PCMCIA_H
2#define __ARCOM_PCMCIA_H
3
4struct arcom_pcmcia_pdata {
5 int cd_gpio;
6 int rdy_gpio;
7 int pwr_gpio;
8 void (*reset)(int state);
9};
10
11#endif
diff --git a/include/linux/platform_data/pinctrl-coh901.h b/include/linux/platform_data/pinctrl-coh901.h
new file mode 100644
index 000000000000..30dea251b835
--- /dev/null
+++ b/include/linux/platform_data/pinctrl-coh901.h
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2007-2012 ST-Ericsson AB
3 * License terms: GNU General Public License (GPL) version 2
4 * GPIO block resgister definitions and inline macros for
5 * U300 GPIO COH 901 335 or COH 901 571/3
6 * Author: Linus Walleij <linus.walleij@stericsson.com>
7 */
8
9#ifndef __MACH_U300_GPIO_U300_H
10#define __MACH_U300_GPIO_U300_H
11
12/**
13 * struct u300_gpio_platform - U300 GPIO platform data
14 * @ports: number of GPIO block ports
15 * @gpio_base: first GPIO number for this block (use a free range)
16 * @gpio_irq_base: first GPIO IRQ number for this block (use a free range)
17 * @pinctrl_device: pin control device to spawn as child
18 */
19struct u300_gpio_platform {
20 u8 ports;
21 int gpio_base;
22 int gpio_irq_base;
23 struct platform_device *pinctrl_device;
24};
25
26#endif /* __MACH_U300_GPIO_U300_H */
diff --git a/include/linux/platform_data/remoteproc-omap.h b/include/linux/platform_data/remoteproc-omap.h
new file mode 100644
index 000000000000..3c1c6444ec4b
--- /dev/null
+++ b/include/linux/platform_data/remoteproc-omap.h
@@ -0,0 +1,59 @@
1/*
2 * Remote Processor - omap-specific bits
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Copyright (C) 2011 Google, Inc.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
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 _PLAT_REMOTEPROC_H
18#define _PLAT_REMOTEPROC_H
19
20struct rproc_ops;
21struct platform_device;
22
23/*
24 * struct omap_rproc_pdata - omap remoteproc's platform data
25 * @name: the remoteproc's name
26 * @oh_name: omap hwmod device
27 * @oh_name_opt: optional, secondary omap hwmod device
28 * @firmware: name of firmware file to load
29 * @mbox_name: name of omap mailbox device to use with this rproc
30 * @ops: start/stop rproc handlers
31 * @device_enable: omap-specific handler for enabling a device
32 * @device_shutdown: omap-specific handler for shutting down a device
33 * @set_bootaddr: omap-specific handler for setting the rproc boot address
34 */
35struct omap_rproc_pdata {
36 const char *name;
37 const char *oh_name;
38 const char *oh_name_opt;
39 const char *firmware;
40 const char *mbox_name;
41 const struct rproc_ops *ops;
42 int (*device_enable) (struct platform_device *pdev);
43 int (*device_shutdown) (struct platform_device *pdev);
44 void(*set_bootaddr)(u32);
45};
46
47#if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE)
48
49void __init omap_rproc_reserve_cma(void);
50
51#else
52
53void __init omap_rproc_reserve_cma(void)
54{
55}
56
57#endif
58
59#endif /* _PLAT_REMOTEPROC_H */
diff --git a/include/linux/platform_data/sc18is602.h b/include/linux/platform_data/sc18is602.h
new file mode 100644
index 000000000000..997b06634152
--- /dev/null
+++ b/include/linux/platform_data/sc18is602.h
@@ -0,0 +1,19 @@
1/*
2 * Platform data for NXP SC18IS602/603
3 *
4 * Copyright (C) 2012 Guenter Roeck <linux@roeck-us.net>
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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 * For further information, see the Documentation/spi/sc18is602 file.
11 */
12
13/**
14 * struct sc18is602_platform_data - sc18is602 info
15 * @clock_frequency SC18IS603 oscillator frequency
16 */
17struct sc18is602_platform_data {
18 u32 clock_frequency;
19};
diff --git a/include/linux/platform_data/sccnxp.h b/include/linux/platform_data/sccnxp.h
new file mode 100644
index 000000000000..7311ccd3217f
--- /dev/null
+++ b/include/linux/platform_data/sccnxp.h
@@ -0,0 +1,93 @@
1/*
2 * NXP (Philips) SCC+++(SCN+++) serial driver
3 *
4 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
5 *
6 * Based on sc26xx.c, by Thomas Bogendörfer (tsbogend@alpha.franken.de)
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
14#ifndef __SCCNXP_H
15#define __SCCNXP_H
16
17#define SCCNXP_MAX_UARTS 2
18
19/* Output lines */
20#define LINE_OP0 1
21#define LINE_OP1 2
22#define LINE_OP2 3
23#define LINE_OP3 4
24#define LINE_OP4 5
25#define LINE_OP5 6
26#define LINE_OP6 7
27#define LINE_OP7 8
28
29/* Input lines */
30#define LINE_IP0 9
31#define LINE_IP1 10
32#define LINE_IP2 11
33#define LINE_IP3 12
34#define LINE_IP4 13
35#define LINE_IP5 14
36#define LINE_IP6 15
37
38/* Signals */
39#define DTR_OP 0 /* DTR */
40#define RTS_OP 4 /* RTS */
41#define DSR_IP 8 /* DSR */
42#define CTS_IP 12 /* CTS */
43#define DCD_IP 16 /* DCD */
44#define RNG_IP 20 /* RNG */
45
46#define DIR_OP 24 /* Special signal for control RS-485.
47 * Goes high when transmit,
48 * then goes low.
49 */
50
51/* Routing control signal 'sig' to line 'line' */
52#define MCTRL_SIG(sig, line) ((line) << (sig))
53
54/*
55 * Example board initialization data:
56 *
57 * static struct resource sc2892_resources[] = {
58 * DEFINE_RES_MEM(UART_PHYS_START, 0x10),
59 * DEFINE_RES_IRQ(IRQ_EXT2),
60 * };
61 *
62 * static struct sccnxp_pdata sc2892_info = {
63 * .frequency = 3686400,
64 * .mctrl_cfg[0] = MCTRL_SIG(DIR_OP, LINE_OP0),
65 * .mctrl_cfg[1] = MCTRL_SIG(DIR_OP, LINE_OP1),
66 * };
67 *
68 * static struct platform_device sc2892 = {
69 * .name = "sc2892",
70 * .id = -1,
71 * .resource = sc2892_resources,
72 * .num_resources = ARRAY_SIZE(sc2892_resources),
73 * .dev = {
74 * .platform_data = &sc2892_info,
75 * },
76 * };
77 */
78
79/* SCCNXP platform data structure */
80struct sccnxp_pdata {
81 /* Frequency (extrenal clock or crystal) */
82 int frequency;
83 /* Shift for A0 line */
84 const u8 reg_shift;
85 /* Modem control lines configuration */
86 const u32 mctrl_cfg[SCCNXP_MAX_UARTS];
87 /* Called during startup */
88 void (*init)(void);
89 /* Called before finish */
90 void (*exit)(void);
91};
92
93#endif
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
25struct 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/shmob_drm.h b/include/linux/platform_data/shmob_drm.h
new file mode 100644
index 000000000000..7c686d335c12
--- /dev/null
+++ b/include/linux/platform_data/shmob_drm.h
@@ -0,0 +1,99 @@
1/*
2 * shmob_drm.h -- SH Mobile DRM driver
3 *
4 * Copyright (C) 2012 Renesas Corporation
5 *
6 * Laurent Pinchart (laurent.pinchart@ideasonboard.com)
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
14#ifndef __SHMOB_DRM_H__
15#define __SHMOB_DRM_H__
16
17#include <linux/kernel.h>
18
19#include <drm/drm_mode.h>
20
21struct sh_mobile_meram_cfg;
22struct sh_mobile_meram_info;
23
24enum shmob_drm_clk_source {
25 SHMOB_DRM_CLK_BUS,
26 SHMOB_DRM_CLK_PERIPHERAL,
27 SHMOB_DRM_CLK_EXTERNAL,
28};
29
30enum shmob_drm_interface {
31 SHMOB_DRM_IFACE_RGB8, /* 24bpp, 8:8:8 */
32 SHMOB_DRM_IFACE_RGB9, /* 18bpp, 9:9 */
33 SHMOB_DRM_IFACE_RGB12A, /* 24bpp, 12:12 */
34 SHMOB_DRM_IFACE_RGB12B, /* 12bpp */
35 SHMOB_DRM_IFACE_RGB16, /* 16bpp */
36 SHMOB_DRM_IFACE_RGB18, /* 18bpp */
37 SHMOB_DRM_IFACE_RGB24, /* 24bpp */
38 SHMOB_DRM_IFACE_YUV422, /* 16bpp */
39 SHMOB_DRM_IFACE_SYS8A, /* 24bpp, 8:8:8 */
40 SHMOB_DRM_IFACE_SYS8B, /* 18bpp, 8:8:2 */
41 SHMOB_DRM_IFACE_SYS8C, /* 18bpp, 2:8:8 */
42 SHMOB_DRM_IFACE_SYS8D, /* 16bpp, 8:8 */
43 SHMOB_DRM_IFACE_SYS9, /* 18bpp, 9:9 */
44 SHMOB_DRM_IFACE_SYS12, /* 24bpp, 12:12 */
45 SHMOB_DRM_IFACE_SYS16A, /* 16bpp */
46 SHMOB_DRM_IFACE_SYS16B, /* 18bpp, 16:2 */
47 SHMOB_DRM_IFACE_SYS16C, /* 18bpp, 2:16 */
48 SHMOB_DRM_IFACE_SYS18, /* 18bpp */
49 SHMOB_DRM_IFACE_SYS24, /* 24bpp */
50};
51
52struct shmob_drm_backlight_data {
53 const char *name;
54 int max_brightness;
55 int (*get_brightness)(void);
56 int (*set_brightness)(int brightness);
57};
58
59struct shmob_drm_panel_data {
60 unsigned int width_mm; /* Panel width in mm */
61 unsigned int height_mm; /* Panel height in mm */
62 struct drm_mode_modeinfo mode;
63};
64
65struct shmob_drm_sys_interface_data {
66 unsigned int read_latch:6;
67 unsigned int read_setup:8;
68 unsigned int read_cycle:8;
69 unsigned int read_strobe:8;
70 unsigned int write_setup:8;
71 unsigned int write_cycle:8;
72 unsigned int write_strobe:8;
73 unsigned int cs_setup:3;
74 unsigned int vsync_active_high:1;
75 unsigned int vsync_dir_input:1;
76};
77
78#define SHMOB_DRM_IFACE_FL_DWPOL (1 << 0) /* Rising edge dot clock data latch */
79#define SHMOB_DRM_IFACE_FL_DIPOL (1 << 1) /* Active low display enable */
80#define SHMOB_DRM_IFACE_FL_DAPOL (1 << 2) /* Active low display data */
81#define SHMOB_DRM_IFACE_FL_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
82#define SHMOB_DRM_IFACE_FL_DWCNT (1 << 4) /* Disable dotclock during blanking */
83
84struct shmob_drm_interface_data {
85 enum shmob_drm_interface interface;
86 struct shmob_drm_sys_interface_data sys;
87 unsigned int clk_div;
88 unsigned int flags;
89};
90
91struct shmob_drm_platform_data {
92 enum shmob_drm_clk_source clk_source;
93 struct shmob_drm_interface_data iface;
94 struct shmob_drm_panel_data panel;
95 struct shmob_drm_backlight_data backlight;
96 const struct sh_mobile_meram_cfg *meram;
97};
98
99#endif /* __SHMOB_DRM_H__ */
diff --git a/include/linux/platform_data/sht15.h b/include/linux/platform_data/sht15.h
new file mode 100644
index 000000000000..33e0fd27225e
--- /dev/null
+++ b/include/linux/platform_data/sht15.h
@@ -0,0 +1,33 @@
1/*
2 * sht15.h - support for the SHT15 Temperature and Humidity Sensor
3 *
4 * Copyright (c) 2009 Jonathan Cameron
5 *
6 * Copyright (c) 2007 Wouter Horre
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 * For further information, see the Documentation/hwmon/sht15 file.
13 */
14
15/**
16 * struct sht15_platform_data - sht15 connectivity info
17 * @gpio_data: no. of gpio to which bidirectional data line is
18 * connected.
19 * @gpio_sck: no. of gpio to which the data clock is connected.
20 * @supply_mv: supply voltage in mv. Overridden by regulator if
21 * available.
22 * @checksum: flag to indicate the checksum should be validated.
23 * @no_otp_reload: flag to indicate no reload from OTP.
24 * @low_resolution: flag to indicate the temp/humidity resolution to use.
25 */
26struct sht15_platform_data {
27 int gpio_data;
28 int gpio_sck;
29 int supply_mv;
30 bool checksum;
31 bool no_otp_reload;
32 bool low_resolution;
33};
diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h
new file mode 100644
index 000000000000..7af305b37868
--- /dev/null
+++ b/include/linux/platform_data/spi-davinci.h
@@ -0,0 +1,89 @@
1/*
2 * Copyright 2009 Texas Instruments.
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 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef __ARCH_ARM_DAVINCI_SPI_H
20#define __ARCH_ARM_DAVINCI_SPI_H
21
22#include <mach/edma.h>
23
24#define SPI_INTERN_CS 0xFF
25
26enum {
27 SPI_VERSION_1, /* For DM355/DM365/DM6467 */
28 SPI_VERSION_2, /* For DA8xx */
29};
30
31/**
32 * davinci_spi_platform_data - Platform data for SPI master device on DaVinci
33 *
34 * @version: version of the SPI IP. Different DaVinci devices have slightly
35 * varying versions of the same IP.
36 * @num_chipselect: number of chipselects supported by this SPI master
37 * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt
38 * controller withn the SoC. Possible values are 0 and 1.
39 * @chip_sel: list of GPIOs which can act as chip-selects for the SPI.
40 * SPI_INTERN_CS denotes internal SPI chip-select. Not necessary
41 * to populate if all chip-selects are internal.
42 * @cshold_bug: set this to true if the SPI controller on your chip requires
43 * a write to CSHOLD bit in between transfers (like in DM355).
44 * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any
45 * device on the bus.
46 */
47struct davinci_spi_platform_data {
48 u8 version;
49 u8 num_chipselect;
50 u8 intr_line;
51 u8 *chip_sel;
52 bool cshold_bug;
53 enum dma_event_q dma_event_q;
54};
55
56/**
57 * davinci_spi_config - Per-chip-select configuration for SPI slave devices
58 *
59 * @wdelay: amount of delay between transmissions. Measured in number of
60 * SPI module clocks.
61 * @odd_parity: polarity of parity flag at the end of transmit data stream.
62 * 0 - odd parity, 1 - even parity.
63 * @parity_enable: enable transmission of parity at end of each transmit
64 * data stream.
65 * @io_type: type of IO transfer. Choose between polled, interrupt and DMA.
66 * @timer_disable: disable chip-select timers (setup and hold)
67 * @c2tdelay: chip-select setup time. Measured in number of SPI module clocks.
68 * @t2cdelay: chip-select hold time. Measured in number of SPI module clocks.
69 * @t2edelay: transmit data finished to SPI ENAn pin inactive time. Measured
70 * in number of SPI clocks.
71 * @c2edelay: chip-select active to SPI ENAn signal active time. Measured in
72 * number of SPI clocks.
73 */
74struct davinci_spi_config {
75 u8 wdelay;
76 u8 odd_parity;
77 u8 parity_enable;
78#define SPI_IO_TYPE_INTR 0
79#define SPI_IO_TYPE_POLL 1
80#define SPI_IO_TYPE_DMA 2
81 u8 io_type;
82 u8 timer_disable;
83 u8 c2tdelay;
84 u8 t2cdelay;
85 u8 t2edelay;
86 u8 c2edelay;
87};
88
89#endif /* __ARCH_ARM_DAVINCI_SPI_H */
diff --git a/include/linux/platform_data/spi-ep93xx.h b/include/linux/platform_data/spi-ep93xx.h
new file mode 100644
index 000000000000..9bb63ac13f04
--- /dev/null
+++ b/include/linux/platform_data/spi-ep93xx.h
@@ -0,0 +1,29 @@
1#ifndef __ASM_MACH_EP93XX_SPI_H
2#define __ASM_MACH_EP93XX_SPI_H
3
4struct 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 */
12struct 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 */
23struct 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/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 */
20struct 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/spi-nuc900.h b/include/linux/platform_data/spi-nuc900.h
new file mode 100644
index 000000000000..2c4e0c128501
--- /dev/null
+++ b/include/linux/platform_data/spi-nuc900.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-w90x900/include/mach/nuc900_spi.h
3 *
4 * Copyright (c) 2009 Nuvoton technology corporation.
5 *
6 * Wan ZongShun <mcuos.com@gmail.com>
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;version 2 of the License.
11 *
12 */
13
14#ifndef __ASM_ARCH_SPI_H
15#define __ASM_ARCH_SPI_H
16
17extern void mfp_set_groupg(struct device *dev, const char *subname);
18
19struct nuc900_spi_info {
20 unsigned int num_cs;
21 unsigned int lsb;
22 unsigned int txneg;
23 unsigned int rxneg;
24 unsigned int divider;
25 unsigned int sleep;
26 unsigned int txnum;
27 unsigned int txbitlen;
28 int bus_num;
29};
30
31struct nuc900_spi_chip {
32 unsigned char bits_per_word;
33};
34
35#endif /* __ASM_ARCH_SPI_H */
diff --git a/include/linux/platform_data/spi-omap2-mcspi.h b/include/linux/platform_data/spi-omap2-mcspi.h
new file mode 100644
index 000000000000..a357eb26bd25
--- /dev/null
+++ b/include/linux/platform_data/spi-omap2-mcspi.h
@@ -0,0 +1,23 @@
1#ifndef _OMAP2_MCSPI_H
2#define _OMAP2_MCSPI_H
3
4#define OMAP2_MCSPI_REV 0
5#define OMAP3_MCSPI_REV 1
6#define OMAP4_MCSPI_REV 2
7
8#define OMAP4_MCSPI_REG_OFFSET 0x100
9
10struct omap2_mcspi_platform_config {
11 unsigned short num_cs;
12 unsigned int regs_offset;
13};
14
15struct omap2_mcspi_dev_attr {
16 unsigned short num_chipselect;
17};
18
19struct omap2_mcspi_device_config {
20 unsigned turbo_mode:1;
21};
22
23#endif
diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h
new file mode 100644
index 000000000000..ceba18d23a5a
--- /dev/null
+++ b/include/linux/platform_data/spi-s3c64xx.h
@@ -0,0 +1,68 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
2 *
3 * Copyright (C) 2009 Samsung Electronics Ltd.
4 * Jaswinder Singh <jassi.brar@samsung.com>
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __S3C64XX_PLAT_SPI_H
12#define __S3C64XX_PLAT_SPI_H
13
14struct platform_device;
15
16/**
17 * struct s3c64xx_spi_csinfo - ChipSelect description
18 * @fb_delay: Slave specific feedback delay.
19 * Refer to FB_CLK_SEL register definition in SPI chapter.
20 * @line: Custom 'identity' of the CS line.
21 *
22 * This is per SPI-Slave Chipselect information.
23 * Allocate and initialize one in machine init code and make the
24 * spi_board_info.controller_data point to it.
25 */
26struct s3c64xx_spi_csinfo {
27 u8 fb_delay;
28 unsigned line;
29};
30
31/**
32 * struct s3c64xx_spi_info - SPI Controller defining structure
33 * @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field.
34 * @num_cs: Number of CS this controller emulates.
35 * @cfg_gpio: Configure pins for this SPI controller.
36 */
37struct s3c64xx_spi_info {
38 int src_clk_nr;
39 int num_cs;
40 int (*cfg_gpio)(void);
41};
42
43/**
44 * s3c64xx_spi_set_platdata - SPI Controller configure callback by the board
45 * initialization code.
46 * @cfg_gpio: Pointer to gpio setup function.
47 * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks.
48 * @num_cs: Number of elements in the 'cs' array.
49 *
50 * Call this from machine init code for each SPI Controller that
51 * has some chips attached to it.
52 */
53extern void s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
54 int num_cs);
55extern void s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
56 int num_cs);
57extern void s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
58 int num_cs);
59
60/* defined by architecture to configure gpio */
61extern int s3c64xx_spi0_cfg_gpio(void);
62extern int s3c64xx_spi1_cfg_gpio(void);
63extern int s3c64xx_spi2_cfg_gpio(void);
64
65extern struct s3c64xx_spi_info s3c64xx_spi0_pdata;
66extern struct s3c64xx_spi_info s3c64xx_spi1_pdata;
67extern struct s3c64xx_spi_info s3c64xx_spi2_pdata;
68#endif /* __S3C64XX_PLAT_SPI_H */
diff --git a/include/linux/platform_data/touchscreen-s3c2410.h b/include/linux/platform_data/touchscreen-s3c2410.h
new file mode 100644
index 000000000000..26fdb22e0fc2
--- /dev/null
+++ b/include/linux/platform_data/touchscreen-s3c2410.h
@@ -0,0 +1,25 @@
1/* arch/arm/plat-samsung/include/plat/ts.h
2 *
3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
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_ARM_TS_H
11#define __ASM_ARM_TS_H
12
13struct s3c2410_ts_mach_info {
14 int delay;
15 int presc;
16 int oversampling_shift;
17 void (*cfg_gpio)(struct platform_device *dev);
18};
19
20extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *);
21
22/* defined by architecture to configure gpio */
23extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev);
24
25#endif /* __ASM_ARM_TS_H */
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h
new file mode 100644
index 000000000000..e0bc4abe69c2
--- /dev/null
+++ b/include/linux/platform_data/usb-davinci.h
@@ -0,0 +1,59 @@
1/*
2 * USB related definitions
3 *
4 * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_USB_H
12#define __ASM_ARCH_USB_H
13
14/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
15#define CFGCHIP2_PHYCLKGD (1 << 17)
16#define CFGCHIP2_VBUSSENSE (1 << 16)
17#define CFGCHIP2_RESET (1 << 15)
18#define CFGCHIP2_OTGMODE (3 << 13)
19#define CFGCHIP2_NO_OVERRIDE (0 << 13)
20#define CFGCHIP2_FORCE_HOST (1 << 13)
21#define CFGCHIP2_FORCE_DEVICE (2 << 13)
22#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
23#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
24#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
25#define CFGCHIP2_PHYPWRDN (1 << 10)
26#define CFGCHIP2_OTGPWRDN (1 << 9)
27#define CFGCHIP2_DATPOL (1 << 8)
28#define CFGCHIP2_USB1SUSPENDM (1 << 7)
29#define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */
30#define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */
31#define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */
32#define CFGCHIP2_REFFREQ (0xf << 0)
33#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
34#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
35#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
36
37struct da8xx_ohci_root_hub;
38
39typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
40 unsigned port);
41
42/* Passed as the platform data to the OHCI driver */
43struct da8xx_ohci_root_hub {
44 /* Switch the port power on/off */
45 int (*set_power)(unsigned port, int on);
46 /* Read the port power status */
47 int (*get_power)(unsigned port);
48 /* Read the port over-current indicator */
49 int (*get_oci)(unsigned port);
50 /* Over-current indicator change notification (pass NULL to disable) */
51 int (*ocic_notify)(da8xx_ocic_handler_t handler);
52
53 /* Time from power on to power good (in 2 ms units) */
54 u8 potpgt;
55};
56
57void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
58
59#endif /* ifndef __ASM_ARCH_USB_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
44struct 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
52int mx51_initialize_usb_hw(int port, unsigned int flags);
53int mx25_initialize_usb_hw(int port, unsigned int flags);
54int mx31_initialize_usb_hw(int port, unsigned int flags);
55int mx35_initialize_usb_hw(int port, unsigned int flags);
56int 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-ehci-orion.h b/include/linux/platform_data/usb-ehci-orion.h
new file mode 100644
index 000000000000..6fc78e430420
--- /dev/null
+++ b/include/linux/platform_data/usb-ehci-orion.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/plat-orion/include/plat/ehci-orion.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __PLAT_EHCI_ORION_H
10#define __PLAT_EHCI_ORION_H
11
12#include <linux/mbus.h>
13
14enum orion_ehci_phy_ver {
15 EHCI_PHY_ORION,
16 EHCI_PHY_DD,
17 EHCI_PHY_KW,
18 EHCI_PHY_NA,
19};
20
21struct orion_ehci_data {
22 enum orion_ehci_phy_ver phy_version;
23};
24
25
26#endif
diff --git a/include/linux/platform_data/usb-ehci-s5p.h b/include/linux/platform_data/usb-ehci-s5p.h
new file mode 100644
index 000000000000..5f28cae18582
--- /dev/null
+++ b/include/linux/platform_data/usb-ehci-s5p.h
@@ -0,0 +1,21 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __PLAT_SAMSUNG_EHCI_H
12#define __PLAT_SAMSUNG_EHCI_H __FILE__
13
14struct s5p_ehci_platdata {
15 int (*phy_init)(struct platform_device *pdev, int type);
16 int (*phy_exit)(struct platform_device *pdev, int type);
17};
18
19extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd);
20
21#endif /* __PLAT_SAMSUNG_EHCI_H */
diff --git a/include/linux/platform_data/usb-exynos.h b/include/linux/platform_data/usb-exynos.h
new file mode 100644
index 000000000000..c256c595be5e
--- /dev/null
+++ b/include/linux/platform_data/usb-exynos.h
@@ -0,0 +1,21 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * http://www.samsung.com/
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __MACH_EXYNOS_OHCI_H
12#define __MACH_EXYNOS_OHCI_H
13
14struct exynos4_ohci_platdata {
15 int (*phy_init)(struct platform_device *pdev, int type);
16 int (*phy_exit)(struct platform_device *pdev, int type);
17};
18
19extern void exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd);
20
21#endif /* __MACH_EXYNOS_OHCI_H */
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
18struct 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-musb-ux500.h b/include/linux/platform_data/usb-musb-ux500.h
new file mode 100644
index 000000000000..4c1cc50a595a
--- /dev/null
+++ b/include/linux/platform_data/usb-musb-ux500.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2011
3 *
4 * Author: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7#ifndef __ASM_ARCH_USB_H
8#define __ASM_ARCH_USB_H
9
10#include <linux/dmaengine.h>
11
12#define UX500_MUSB_DMA_NUM_RX_CHANNELS 8
13#define UX500_MUSB_DMA_NUM_TX_CHANNELS 8
14
15struct ux500_musb_board_data {
16 void **dma_rx_param_array;
17 void **dma_tx_param_array;
18 u32 num_rx_channels;
19 u32 num_tx_channels;
20 bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
21};
22
23void ux500_add_usb(struct device *parent, resource_size_t base,
24 int irq, int *dma_rx_cfg, int *dma_tx_cfg);
25#endif
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
18enum 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
26struct 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/usb-ohci-pxa27x.h b/include/linux/platform_data/usb-ohci-pxa27x.h
new file mode 100644
index 000000000000..95b6e2a6e514
--- /dev/null
+++ b/include/linux/platform_data/usb-ohci-pxa27x.h
@@ -0,0 +1,36 @@
1#ifndef ASMARM_ARCH_OHCI_H
2#define ASMARM_ARCH_OHCI_H
3
4struct device;
5
6struct pxaohci_platform_data {
7 int (*init)(struct device *);
8 void (*exit)(struct device *);
9
10 unsigned long flags;
11#define ENABLE_PORT1 (1 << 0)
12#define ENABLE_PORT2 (1 << 1)
13#define ENABLE_PORT3 (1 << 2)
14#define ENABLE_PORT_ALL (ENABLE_PORT1 | ENABLE_PORT2 | ENABLE_PORT3)
15
16#define POWER_SENSE_LOW (1 << 3)
17#define POWER_CONTROL_LOW (1 << 4)
18#define NO_OC_PROTECTION (1 << 5)
19#define OC_MODE_GLOBAL (0 << 6)
20#define OC_MODE_PERPORT (1 << 6)
21
22 int power_on_delay; /* Power On to Power Good time - in ms
23 * HCD must wait for this duration before
24 * accessing a powered on port
25 */
26 int port_mode;
27#define PMM_NPS_MODE 1
28#define PMM_GLOBAL_MODE 2
29#define PMM_PERPORT_MODE 3
30
31 int power_budget;
32};
33
34extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);
35
36#endif
diff --git a/include/linux/platform_data/usb-ohci-s3c2410.h b/include/linux/platform_data/usb-ohci-s3c2410.h
new file mode 100644
index 000000000000..7fa1fbefc3f2
--- /dev/null
+++ b/include/linux/platform_data/usb-ohci-s3c2410.h
@@ -0,0 +1,43 @@
1/* arch/arm/plat-samsung/include/plat/usb-control.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C - USB host port information
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 version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_USBCONTROL_H
14#define __ASM_ARCH_USBCONTROL_H
15
16#define S3C_HCDFLG_USED (1)
17
18struct s3c2410_hcd_port {
19 unsigned char flags;
20 unsigned char power;
21 unsigned char oc_status;
22 unsigned char oc_changed;
23};
24
25struct s3c2410_hcd_info {
26 struct usb_hcd *hcd;
27 struct s3c2410_hcd_port port[2];
28
29 void (*power_control)(int port, int to);
30 void (*enable_oc)(struct s3c2410_hcd_info *, int on);
31 void (*report_oc)(struct s3c2410_hcd_info *, int ports);
32};
33
34static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
35{
36 if (info->report_oc != NULL) {
37 (info->report_oc)(info, ports);
38 }
39}
40
41extern void s3c_ohci_set_platdata(struct s3c2410_hcd_info *info);
42
43#endif /*__ASM_ARCH_USBCONTROL_H */
diff --git a/include/linux/platform_data/usb-pxa3xx-ulpi.h b/include/linux/platform_data/usb-pxa3xx-ulpi.h
new file mode 100644
index 000000000000..9d82cb65ea56
--- /dev/null
+++ b/include/linux/platform_data/usb-pxa3xx-ulpi.h
@@ -0,0 +1,35 @@
1/*
2 * PXA3xx U2D header
3 *
4 * Copyright (C) 2010 CompuLab Ltd.
5 *
6 * Igor Grinberg <grinberg@compulab.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 version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __PXA310_U2D__
13#define __PXA310_U2D__
14
15#include <linux/usb/ulpi.h>
16
17struct pxa3xx_u2d_platform_data {
18
19#define ULPI_SER_6PIN (1 << 0)
20#define ULPI_SER_3PIN (1 << 1)
21 unsigned int ulpi_mode;
22
23 int (*init)(struct device *);
24 void (*exit)(struct device *);
25};
26
27
28/* Start PXA3xx U2D host */
29int pxa3xx_u2d_start_hc(struct usb_bus *host);
30/* Stop PXA3xx U2D host */
31void pxa3xx_u2d_stop_hc(struct usb_bus *host);
32
33extern void pxa3xx_set_u2d_info(struct pxa3xx_u2d_platform_data *info);
34
35#endif /* __PXA310_U2D__ */
diff --git a/include/linux/platform_data/usb-s3c2410_udc.h b/include/linux/platform_data/usb-s3c2410_udc.h
new file mode 100644
index 000000000000..de8e2288a509
--- /dev/null
+++ b/include/linux/platform_data/usb-s3c2410_udc.h
@@ -0,0 +1,44 @@
1/* arch/arm/plat-samsung/include/plat/udc.h
2 *
3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
4 *
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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 *
11 * Changelog:
12 * 14-Mar-2005 RTP Created file
13 * 02-Aug-2005 RTP File rename
14 * 07-Sep-2005 BJD Minor cleanups, changed cmd to enum
15 * 18-Jan-2007 HMW Add per-platform vbus_draw function
16*/
17
18#ifndef __ASM_ARM_ARCH_UDC_H
19#define __ASM_ARM_ARCH_UDC_H
20
21enum s3c2410_udc_cmd_e {
22 S3C2410_UDC_P_ENABLE = 1, /* Pull-up enable */
23 S3C2410_UDC_P_DISABLE = 2, /* Pull-up disable */
24 S3C2410_UDC_P_RESET = 3, /* UDC reset, in case of */
25};
26
27struct s3c2410_udc_mach_info {
28 void (*udc_command)(enum s3c2410_udc_cmd_e);
29 void (*vbus_draw)(unsigned int ma);
30
31 unsigned int pullup_pin;
32 unsigned int pullup_pin_inverted;
33
34 unsigned int vbus_pin;
35 unsigned char vbus_pin_inverted;
36};
37
38extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *);
39
40struct s3c24xx_hsudc_platdata;
41
42extern void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd);
43
44#endif /* __ASM_ARM_ARCH_UDC_H */
diff --git a/include/linux/platform_data/video-ep93xx.h b/include/linux/platform_data/video-ep93xx.h
new file mode 100644
index 000000000000..d5ae11d7c453
--- /dev/null
+++ b/include/linux/platform_data/video-ep93xx.h
@@ -0,0 +1,56 @@
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
8struct platform_device;
9struct fb_videomode;
10struct 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
44struct 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/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
54struct imx_fb_videomode {
55 struct fb_videomode mode;
56 u32 pcr;
57 unsigned char bpp;
58};
59
60struct 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
83void set_imx_fb_info(struct imx_fb_platform_data *);
84#endif /* ifndef __MACH_IMXFB_H__ */
diff --git a/include/linux/platform_data/video-msm_fb.h b/include/linux/platform_data/video-msm_fb.h
new file mode 100644
index 000000000000..1f4fc81b3d8f
--- /dev/null
+++ b/include/linux/platform_data/video-msm_fb.h
@@ -0,0 +1,147 @@
1/* arch/arm/mach-msm/include/mach/msm_fb.h
2 *
3 * Internal shared definitions for various MSM framebuffer parts.
4 *
5 * Copyright (C) 2007 Google Incorporated
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
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 _MSM_FB_H_
18#define _MSM_FB_H_
19
20#include <linux/device.h>
21
22struct mddi_info;
23
24struct msm_fb_data {
25 int xres; /* x resolution in pixels */
26 int yres; /* y resolution in pixels */
27 int width; /* disply width in mm */
28 int height; /* display height in mm */
29 unsigned output_format;
30};
31
32struct msmfb_callback {
33 void (*func)(struct msmfb_callback *);
34};
35
36enum {
37 MSM_MDDI_PMDH_INTERFACE,
38 MSM_MDDI_EMDH_INTERFACE,
39 MSM_EBI2_INTERFACE,
40};
41
42#define MSMFB_CAP_PARTIAL_UPDATES (1 << 0)
43
44struct msm_panel_data {
45 /* turns off the fb memory */
46 int (*suspend)(struct msm_panel_data *);
47 /* turns on the fb memory */
48 int (*resume)(struct msm_panel_data *);
49 /* turns off the panel */
50 int (*blank)(struct msm_panel_data *);
51 /* turns on the panel */
52 int (*unblank)(struct msm_panel_data *);
53 void (*wait_vsync)(struct msm_panel_data *);
54 void (*request_vsync)(struct msm_panel_data *, struct msmfb_callback *);
55 void (*clear_vsync)(struct msm_panel_data *);
56 /* from the enum above */
57 unsigned interface_type;
58 /* data to be passed to the fb driver */
59 struct msm_fb_data *fb_data;
60
61 /* capabilities supported by the panel */
62 uint32_t caps;
63};
64
65struct msm_mddi_client_data {
66 void (*suspend)(struct msm_mddi_client_data *);
67 void (*resume)(struct msm_mddi_client_data *);
68 void (*activate_link)(struct msm_mddi_client_data *);
69 void (*remote_write)(struct msm_mddi_client_data *, uint32_t val,
70 uint32_t reg);
71 uint32_t (*remote_read)(struct msm_mddi_client_data *, uint32_t reg);
72 void (*auto_hibernate)(struct msm_mddi_client_data *, int);
73 /* custom data that needs to be passed from the board file to a
74 * particular client */
75 void *private_client_data;
76 struct resource *fb_resource;
77 /* from the list above */
78 unsigned interface_type;
79};
80
81struct msm_mddi_platform_data {
82 unsigned int clk_rate;
83 void (*power_client)(struct msm_mddi_client_data *, int on);
84
85 /* fixup the mfr name, product id */
86 void (*fixup)(uint16_t *mfr_name, uint16_t *product_id);
87
88 struct resource *fb_resource; /*optional*/
89 /* number of clients in the list that follows */
90 int num_clients;
91 /* array of client information of clients */
92 struct {
93 unsigned product_id; /* mfr id in top 16 bits, product id
94 * in lower 16 bits
95 */
96 char *name; /* the device name will be the platform
97 * device name registered for the client,
98 * it should match the name of the associated
99 * driver
100 */
101 unsigned id; /* id for mddi client device node, will also
102 * be used as device id of panel devices, if
103 * the client device will have multiple panels
104 * space must be left here for them
105 */
106 void *client_data; /* required private client data */
107 unsigned int clk_rate; /* optional: if the client requires a
108 * different mddi clk rate
109 */
110 } client_platform_data[];
111};
112
113struct mdp_blit_req;
114struct fb_info;
115struct mdp_device {
116 struct device dev;
117 void (*dma)(struct mdp_device *mpd, uint32_t addr,
118 uint32_t stride, uint32_t w, uint32_t h, uint32_t x,
119 uint32_t y, struct msmfb_callback *callback, int interface);
120 void (*dma_wait)(struct mdp_device *mdp);
121 int (*blit)(struct mdp_device *mdp, struct fb_info *fb,
122 struct mdp_blit_req *req);
123 void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id);
124};
125
126struct class_interface;
127int register_mdp_client(struct class_interface *class_intf);
128
129/**** private client data structs go below this line ***/
130
131struct msm_mddi_bridge_platform_data {
132 /* from board file */
133 int (*init)(struct msm_mddi_bridge_platform_data *,
134 struct msm_mddi_client_data *);
135 int (*uninit)(struct msm_mddi_bridge_platform_data *,
136 struct msm_mddi_client_data *);
137 /* passed to panel for use by the fb driver */
138 int (*blank)(struct msm_mddi_bridge_platform_data *,
139 struct msm_mddi_client_data *);
140 int (*unblank)(struct msm_mddi_bridge_platform_data *,
141 struct msm_mddi_client_data *);
142 struct msm_fb_data fb_data;
143};
144
145
146
147#endif
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 */
30enum 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 */
45struct 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
diff --git a/include/linux/platform_data/video-nuc900fb.h b/include/linux/platform_data/video-nuc900fb.h
new file mode 100644
index 000000000000..cec5ece765ed
--- /dev/null
+++ b/include/linux/platform_data/video-nuc900fb.h
@@ -0,0 +1,83 @@
1/* linux/include/asm/arch-nuc900/fb.h
2 *
3 * Copyright (c) 2008 Nuvoton technology corporation
4 * All rights reserved.
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 * Changelog:
12 *
13 * 2008/08/26 vincen.zswan modify this file for LCD.
14 */
15
16#ifndef __ASM_ARM_FB_H
17#define __ASM_ARM_FB_H
18
19
20
21/* LCD Controller Hardware Desc */
22struct nuc900fb_hw {
23 unsigned int lcd_dccs;
24 unsigned int lcd_device_ctrl;
25 unsigned int lcd_mpulcd_cmd;
26 unsigned int lcd_int_cs;
27 unsigned int lcd_crtc_size;
28 unsigned int lcd_crtc_dend;
29 unsigned int lcd_crtc_hr;
30 unsigned int lcd_crtc_hsync;
31 unsigned int lcd_crtc_vr;
32 unsigned int lcd_va_baddr0;
33 unsigned int lcd_va_baddr1;
34 unsigned int lcd_va_fbctrl;
35 unsigned int lcd_va_scale;
36 unsigned int lcd_va_test;
37 unsigned int lcd_va_win;
38 unsigned int lcd_va_stuff;
39};
40
41/* LCD Display Description */
42struct nuc900fb_display {
43 /* LCD Image type */
44 unsigned type;
45
46 /* LCD Screen Size */
47 unsigned short width;
48 unsigned short height;
49
50 /* LCD Screen Info */
51 unsigned short xres;
52 unsigned short yres;
53 unsigned short bpp;
54
55 unsigned long pixclock;
56 unsigned short left_margin;
57 unsigned short right_margin;
58 unsigned short hsync_len;
59 unsigned short upper_margin;
60 unsigned short lower_margin;
61 unsigned short vsync_len;
62
63 /* hardware special register value */
64 unsigned int dccs;
65 unsigned int devctl;
66 unsigned int fbctrl;
67 unsigned int scale;
68};
69
70struct nuc900fb_mach_info {
71 struct nuc900fb_display *displays;
72 unsigned num_displays;
73 unsigned default_display;
74 /* GPIO Setting Info */
75 unsigned gpio_dir;
76 unsigned gpio_dir_mask;
77 unsigned gpio_data;
78 unsigned gpio_data_mask;
79};
80
81extern void __init nuc900_fb_set_platdata(struct nuc900fb_mach_info *);
82
83#endif /* __ASM_ARM_FB_H */
diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h
new file mode 100644
index 000000000000..486b4c519ae2
--- /dev/null
+++ b/include/linux/platform_data/video-pxafb.h
@@ -0,0 +1,175 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxafb.h
3 *
4 * Support for the xscale frame buffer.
5 *
6 * Author: Jean-Frederic Clere
7 * Created: Sep 22, 2003
8 * Copyright: jfclere@sinix.net
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/fb.h>
16#include <mach/regs-lcd.h>
17
18/*
19 * Supported LCD connections
20 *
21 * bits 0 - 3: for LCD panel type:
22 *
23 * STN - for passive matrix
24 * DSTN - for dual scan passive matrix
25 * TFT - for active matrix
26 *
27 * bits 4 - 9 : for bus width
28 * bits 10-17 : for AC Bias Pin Frequency
29 * bit 18 : for output enable polarity
30 * bit 19 : for pixel clock edge
31 * bit 20 : for output pixel format when base is RGBT16
32 */
33#define LCD_CONN_TYPE(_x) ((_x) & 0x0f)
34#define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f)
35
36#define LCD_TYPE_MASK 0xf
37#define LCD_TYPE_UNKNOWN 0
38#define LCD_TYPE_MONO_STN 1
39#define LCD_TYPE_MONO_DSTN 2
40#define LCD_TYPE_COLOR_STN 3
41#define LCD_TYPE_COLOR_DSTN 4
42#define LCD_TYPE_COLOR_TFT 5
43#define LCD_TYPE_SMART_PANEL 6
44#define LCD_TYPE_MAX 7
45
46#define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN)
47#define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN)
48#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
49#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
50#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
51#define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT)
52#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
53#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
54#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
55#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
56#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
57
58#define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10)
59#define LCD_BIAS_ACTIVE_HIGH (0 << 18)
60#define LCD_BIAS_ACTIVE_LOW (1 << 18)
61#define LCD_PCLK_EDGE_RISE (0 << 19)
62#define LCD_PCLK_EDGE_FALL (1 << 19)
63#define LCD_ALTERNATE_MAPPING (1 << 20)
64
65/*
66 * This structure describes the machine which we are running on.
67 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
68 * of linux/drivers/video/pxafb.c
69 */
70struct pxafb_mode_info {
71 u_long pixclock;
72
73 u_short xres;
74 u_short yres;
75
76 u_char bpp;
77 u_int cmap_greyscale:1,
78 depth:8,
79 transparency:1,
80 unused:22;
81
82 /* Parallel Mode Timing */
83 u_char hsync_len;
84 u_char left_margin;
85 u_char right_margin;
86
87 u_char vsync_len;
88 u_char upper_margin;
89 u_char lower_margin;
90 u_char sync;
91
92 /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details
93 * Note:
94 * 1. all parameters in nanosecond (ns)
95 * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits
96 * in pxa27x and pxa3xx, initialize them to the same value or
97 * the larger one will be used
98 * 3. same to {rd,wr}_pulse_width
99 *
100 * 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity
101 * 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0
102 * 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD
103 */
104 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
105 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
106 unsigned wr_pulse_width; /* L_PCLK_WR pulse width */
107 unsigned rd_pulse_width; /* L_FCLK_RD pulse width */
108 unsigned cmd_inh_time; /* Command Inhibit time between two writes */
109 unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */
110};
111
112struct pxafb_mach_info {
113 struct pxafb_mode_info *modes;
114 unsigned int num_modes;
115
116 unsigned int lcd_conn;
117 unsigned long video_mem_size;
118
119 u_int fixed_modes:1,
120 cmap_inverse:1,
121 cmap_static:1,
122 acceleration_enabled:1,
123 unused:28;
124
125 /* The following should be defined in LCCR0
126 * LCCR0_Act or LCCR0_Pas Active or Passive
127 * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
128 * LCCR0_Mono or LCCR0_Color Mono/Color
129 * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
130 * LCCR0_DMADel(Tcpu) (optional) DMA request delay
131 *
132 * The following should not be defined in LCCR0:
133 * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
134 * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
135 */
136 u_int lccr0;
137 /* The following should be defined in LCCR3
138 * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
139 * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
140 * LCCR3_Acb(X) AB Bias pin frequency
141 * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
142 *
143 * The following should not be defined in LCCR3
144 * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
145 */
146 u_int lccr3;
147 /* The following should be defined in LCCR4
148 * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
149 *
150 * All other bits in LCCR4 should be left alone.
151 */
152 u_int lccr4;
153 void (*pxafb_backlight_power)(int);
154 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
155 void (*smart_update)(struct fb_info *);
156};
157
158void pxa_set_fb_info(struct device *, struct pxafb_mach_info *);
159unsigned long pxafb_get_hsync_time(struct device *dev);
160
161#ifdef CONFIG_FB_PXA_SMARTPANEL
162extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
163extern int pxafb_smart_flush(struct fb_info *info);
164#else
165static inline int pxafb_smart_queue(struct fb_info *info,
166 uint16_t *cmds, int n)
167{
168 return 0;
169}
170
171static inline int pxafb_smart_flush(struct fb_info *info)
172{
173 return 0;
174}
175#endif
diff --git a/include/linux/platform_data/video-vt8500lcdfb.h b/include/linux/platform_data/video-vt8500lcdfb.h
new file mode 100644
index 000000000000..7f399c370fe0
--- /dev/null
+++ b/include/linux/platform_data/video-vt8500lcdfb.h
@@ -0,0 +1,31 @@
1/*
2 * VT8500/WM8505 Frame Buffer platform data definitions
3 *
4 * Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef _VT8500FB_H
17#define _VT8500FB_H
18
19#include <linux/fb.h>
20
21struct vt8500fb_platform_data {
22 struct fb_videomode mode;
23 u32 xres_virtual;
24 u32 yres_virtual;
25 u32 bpp;
26 unsigned long video_mem_phys;
27 void *video_mem_virt;
28 unsigned long video_mem_len;
29};
30
31#endif /* _VT8500FB_H */
diff --git a/include/linux/platform_data/voltage-omap.h b/include/linux/platform_data/voltage-omap.h
new file mode 100644
index 000000000000..5be4d5def427
--- /dev/null
+++ b/include/linux/platform_data/voltage-omap.h
@@ -0,0 +1,39 @@
1/*
2 * OMAP Voltage Management Routines
3 *
4 * Copyright (C) 2011, Texas Instruments, Inc.
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ARCH_ARM_OMAP_VOLTAGE_H
12#define __ARCH_ARM_OMAP_VOLTAGE_H
13
14/**
15 * struct omap_volt_data - Omap voltage specific data.
16 * @voltage_nominal: The possible voltage value in uV
17 * @sr_efuse_offs: The offset of the efuse register(from system
18 * control module base address) from where to read
19 * the n-target value for the smartreflex module.
20 * @sr_errminlimit: Error min limit value for smartreflex. This value
21 * differs at differnet opp and thus is linked
22 * with voltage.
23 * @vp_errorgain: Error gain value for the voltage processor. This
24 * field also differs according to the voltage/opp.
25 */
26struct omap_volt_data {
27 u32 volt_nominal;
28 u32 sr_efuse_offs;
29 u8 sr_errminlimit;
30 u8 vp_errgain;
31};
32struct voltagedomain;
33
34struct voltagedomain *voltdm_lookup(const char *name);
35int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
36unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
37struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
38 unsigned long volt);
39#endif