diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-08-24 09:22:12 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-19 11:42:18 -0400 |
| commit | 436d42c61c3eef1d02256174c8615046c61a28ad (patch) | |
| tree | 307432ed7b49bde1715200ec2b32eb92e83187e5 /include/linux/platform_data | |
| parent | c02cecb92ed49f36196ee9e29d29c4cfcbad05ae (diff) | |
ARM: samsung: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.
This moves such data out of the samsung include directories
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/asoc-s3c.h | 59 | ||||
| -rw-r--r-- | include/linux/platform_data/asoc-s3c24xx_simtec.h | 34 | ||||
| -rw-r--r-- | include/linux/platform_data/ata-samsung_cf.h | 36 | ||||
| -rw-r--r-- | include/linux/platform_data/hwmon-s3c.h | 51 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-s3c2410.h | 77 | ||||
| -rw-r--r-- | include/linux/platform_data/leds-s3c24xx.h | 28 | ||||
| -rw-r--r-- | include/linux/platform_data/mipi-csis.h | 43 | ||||
| -rw-r--r-- | include/linux/platform_data/mmc-s3cmci.h | 52 | ||||
| -rw-r--r-- | include/linux/platform_data/mtd-nand-s3c2410.h | 67 | ||||
| -rw-r--r-- | include/linux/platform_data/spi-s3c64xx.h | 68 | ||||
| -rw-r--r-- | include/linux/platform_data/touchscreen-s3c2410.h | 25 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-ehci-s5p.h | 21 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-exynos.h | 21 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-ohci-s3c2410.h | 43 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-s3c2410_udc.h | 44 |
15 files changed, 669 insertions, 0 deletions
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 | ||
| 17 | extern 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 | ||
| 26 | extern void s5pc100_spdif_setup_gpio(int); | ||
| 27 | |||
| 28 | struct 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 | */ | ||
| 54 | struct 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 | */ | ||
| 23 | struct 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/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 | */ | ||
| 21 | struct 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 | */ | ||
| 29 | extern void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata); | ||
| 30 | |||
| 31 | /* architecture-specific IDE configuration */ | ||
| 32 | extern void s3c64xx_ide_setup_gpio(void); | ||
| 33 | extern void s5pc100_ide_setup_gpio(void); | ||
| 34 | extern void s5pv210_ide_setup_gpio(void); | ||
| 35 | |||
| 36 | #endif /*__ASM_PLAT_ATA_H */ | ||
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 | */ | ||
| 26 | struct 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 | */ | ||
| 36 | struct 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 | */ | ||
| 48 | extern 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-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 | */ | ||
| 30 | struct 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 | */ | ||
| 55 | extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 56 | extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 57 | extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 58 | extern void s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 59 | extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 60 | extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 61 | extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 62 | extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 63 | extern void s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 64 | |||
| 65 | /* defined by architecture to configure gpio */ | ||
| 66 | extern void s3c_i2c0_cfg_gpio(struct platform_device *dev); | ||
| 67 | extern void s3c_i2c1_cfg_gpio(struct platform_device *dev); | ||
| 68 | extern void s3c_i2c2_cfg_gpio(struct platform_device *dev); | ||
| 69 | extern void s3c_i2c3_cfg_gpio(struct platform_device *dev); | ||
| 70 | extern void s3c_i2c4_cfg_gpio(struct platform_device *dev); | ||
| 71 | extern void s3c_i2c5_cfg_gpio(struct platform_device *dev); | ||
| 72 | extern void s3c_i2c6_cfg_gpio(struct platform_device *dev); | ||
| 73 | extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); | ||
| 74 | |||
| 75 | extern struct s3c2410_platform_i2c default_i2c_data; | ||
| 76 | |||
| 77 | #endif /* __ASM_ARCH_IIC_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 | |||
| 20 | struct 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/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 | |||
| 14 | struct 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 | */ | ||
| 26 | struct 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 | */ | ||
| 41 | int 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-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 | */ | ||
| 29 | struct 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 | */ | ||
| 50 | extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata); | ||
| 51 | |||
| 52 | #endif /* _ARCH_NCI_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 | */ | ||
| 31 | struct 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 | |||
| 44 | struct 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 | */ | ||
| 67 | extern void s3c_nand_set_platdata(struct s3c2410_platform_nand *nand); | ||
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 | |||
| 14 | struct 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 | */ | ||
| 26 | struct 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 | */ | ||
| 37 | struct 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 | */ | ||
| 53 | extern void s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, | ||
| 54 | int num_cs); | ||
| 55 | extern void s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, | ||
| 56 | int num_cs); | ||
| 57 | extern 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 */ | ||
| 61 | extern int s3c64xx_spi0_cfg_gpio(void); | ||
| 62 | extern int s3c64xx_spi1_cfg_gpio(void); | ||
| 63 | extern int s3c64xx_spi2_cfg_gpio(void); | ||
| 64 | |||
| 65 | extern struct s3c64xx_spi_info s3c64xx_spi0_pdata; | ||
| 66 | extern struct s3c64xx_spi_info s3c64xx_spi1_pdata; | ||
| 67 | extern 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 | |||
| 13 | struct s3c2410_ts_mach_info { | ||
| 14 | int delay; | ||
| 15 | int presc; | ||
| 16 | int oversampling_shift; | ||
| 17 | void (*cfg_gpio)(struct platform_device *dev); | ||
| 18 | }; | ||
| 19 | |||
| 20 | extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *); | ||
| 21 | |||
| 22 | /* defined by architecture to configure gpio */ | ||
| 23 | extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev); | ||
| 24 | |||
| 25 | #endif /* __ASM_ARM_TS_H */ | ||
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 | |||
| 14 | struct 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 | |||
| 19 | extern 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 | |||
| 14 | struct 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 | |||
| 19 | extern 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-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 | |||
| 18 | struct s3c2410_hcd_port { | ||
| 19 | unsigned char flags; | ||
| 20 | unsigned char power; | ||
| 21 | unsigned char oc_status; | ||
| 22 | unsigned char oc_changed; | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct 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 | |||
| 34 | static 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 | |||
| 41 | extern 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-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 | |||
| 21 | enum 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 | |||
| 27 | struct 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 | |||
| 38 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); | ||
| 39 | |||
| 40 | struct s3c24xx_hsudc_platdata; | ||
| 41 | |||
| 42 | extern void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd); | ||
| 43 | |||
| 44 | #endif /* __ASM_ARM_ARCH_UDC_H */ | ||
