ARM: OMAP2+: MMC: use separate platform data for omap3 and omap 1/2 driver
Subsystems (6)
v3 cover ARM: OMAP2+: MMC: use separate platform data for omap3 and omap 1/2 driver
v3:
- fix compile break, by include proper platform header tested with these architectures
CONFIG_MACH_OMAP2_TUSB6010=y
CONFIG_MACH_OMAP3_BEAGLE=y
CONFIG_MACH_DEVKIT8000=y
CONFIG_MACH_OMAP_LDP=y
CONFIG_MACH_OMAP3530_LV_SOM=y
CONFIG_MACH_OMAP3_TORPEDO=y
CONFIG_MACH_OVERO=y
CONFIG_MACH_OMAP3517EVM=y
CONFIG_MACH_CRANEBOARD=y
CONFIG_MACH_OMAP3_PANDORA=y
CONFIG_MACH_TOUCHBOOK=y
CONFIG_MACH_OMAP_3430SDP=y
CONFIG_MACH_NOKIA_N810=y
CONFIG_MACH_NOKIA_N810_WIMAX=y
CONFIG_MACH_NOKIA_N8X0=y
CONFIG_MACH_NOKIA_RX51=y
CONFIG_MACH_CM_T35=y
CONFIG_MACH_CM_T3517=y
CONFIG_MACH_CM_T3730=y
CONFIG_MACH_SBC3530=y
CONFIG_MACH_TI8168EVM=y
CONFIG_MACH_TI8148EVM=y- dropped all patches simplifying the hsmmc-omap platform struct, will resubmit once the platform data split is successful
Andreas Fenkart (3):
ARM: OMAP2+: remove unused defines from mach-omap2/mmc header
ARM: OMAP2+: include mmc-omap platform directly in hwmod data files
ARM: OMAP2+: use separate platform data for omap3 and omap 1/2 driver
arch/arm/mach-omap2/board-n8x0.c | 2 + arch/arm/mach-omap2/hsmmc.c | 27 ++-- arch/arm/mach-omap2/mmc.h | 14 -- arch/arm/mach-omap2/omap4-common.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 4 +- .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 8 +- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 +- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 4 +- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 4 +- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 4 +- drivers/mmc/host/omap_hsmmc.c | 28 ++-- include/linux/platform_data/hsmmc-omap.h | 152 +++++++++++++++++++++ include/linux/platform_data/mmc-omap.h | 24 ---- 14 files changed, 198 insertions(+), 83 deletions(-) create mode 100644 include/linux/platform_data/hsmmc-omap.h
Signature · 1 line
2.1.0
PATCH v3 1/3 ARM: OMAP2+: remove unused defines from mach-omap2/mmc header
build tested for these architecturesCONFIG_MACH_OMAP2_TUSB6010=yCONFIG_MACH_OMAP3_BEAGLE=yCONFIG_MACH_DEVKIT8000=yCONFIG_MACH_OMAP_LDP=yCONFIG_MACH_OMAP3530_LV_SOM=yCONFIG_MACH_OMAP3_TORPEDO=yCONFIG_MACH_OVERO=yCONFIG_MACH_OMAP3517EVM=yCONFIG_MACH_CRANEBOARD=yCONFIG_MACH_OMAP3_PANDORA=yCONFIG_MACH_TOUCHBOOK=yCONFIG_MACH_OMAP_3430SDP=yCONFIG_MACH_NOKIA_N810=yCONFIG_MACH_NOKIA_N810_WIMAX=yCONFIG_MACH_NOKIA_N8X0=yCONFIG_MACH_NOKIA_RX51=yCONFIG_MACH_CM_T35=yCONFIG_MACH_CM_T3517=yCONFIG_MACH_CM_T3730=yCONFIG_MACH_SBC3530=yCONFIG_MACH_TI8168EVM=yCONFIG_MACH_TI8148EVM=y
arch/arm/mach-omap2/mmc.h +0 -12
@@ -2,18 +2,6 @@#include <linux/platform_data/mmc-omap.h> #define OMAP24XX_NR_MMC 2 -#define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE -#define OMAP2_MMC1_BASE 0x4809c000 - -#define OMAP4_MMC_REG_OFFSET 0x100 - -#if defined(CONFIG_MMC_OMAP ) || defined(CONFIG_MMC_OMAP_MODULE ) -void omap242x_init_mmc (struct omap_mmc_platform_data **mmc_data); -#else -static inline void omap242x_init_mmc (struct omap_mmc_platform_data **mmc_data) -{ -} -#endif struct omap_hwmod ;int omap_msdi_reset (struct omap_hwmod *oh);
Signature · 1 line
2.1.0
PATCH v3 2/3 ARM: OMAP2+: include mmc-omap platform directly in hwmod data files
In reply to Andreas FenkartWhen splitting platform data of omap mmc/hsmmc driver it will allow to check which hwomod uses easily by looking at which header is included
arch/arm/mach-omap2/board-n8x0.c +2 -0
@@ -21,8 +21,10 @@#include <linux/i2c.h> #include <linux/spi/spi.h> #include <linux/usb/musb.h> +#include <linux/mmc/host.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/mfd/menelaus.h> #include <sound/tlv320aic3x.h>
arch/arm/mach-omap2/hsmmc.c +2 -1
@@ -14,14 +14,15 @@#include <linux/string.h> #include <linux/delay.h> #include <linux/gpio.h> +#include <linux/mmc/host.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include "soc.h" #include "omap_device.h" #include "omap-pm.h" #include "mux.h" -#include "mmc.h" #include "hsmmc.h" #include "control.h"
arch/arm/mach-omap2/mmc.h +0 -2
@@ -1,5 +1,3 @@ -#include <linux/mmc/host.h> -#include <linux/platform_data/mmc-omap.h> #define OMAP24XX_NR_MMC 2
arch/arm/mach-omap2/omap4-common.c +0 -1
@@ -35,7 +35,6 @@#include "soc.h" #include "iomap.h" #include "common.h" -#include "mmc.h" #include "prminst44xx.h" #include "prcm_mpu44xx.h" #include "omap4-sar-layout.h"
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1 -1
@@ -15,13 +15,13 @@#include <linux/i2c-omap.h> #include <linux/platform_data/asoc-ti-mcbsp.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/omap-dma.h> #include <linux/platform_data/mailbox-omap.h> #include <plat/dmtimer.h> #include "omap_hwmod.h" -#include "mmc.h" #include "l3_2xxx.h" #include "soc.h"
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +1 -1
@@ -15,10 +15,10 @@*/ #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include "omap_hwmod.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" #include "cm33xx.h" #include "prm33xx.h"
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
@@ -27,7 +27,6 @@#include "prm33xx.h" #include "prm-regbits-33xx.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" #include "omap_hwmod_33xx_43xx_common_data.h"
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
@@ -18,6 +18,7 @@#include <linux/i2c-omap.h> #include <linux/power/smartreflex.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/omap-dma.h> #include "l3_3xxx.h"
@@ -37,7 +38,6 @@#include "cm-regbits-34xx.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" #include "serial.h"
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +1 -1
@@ -22,6 +22,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -39,7 +40,6 @@#include "prm44xx.h" #include "prm-regbits-44xx.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" /* Base offset for all OMAP4 interrupts external to MPUSS */
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +1 -1
@@ -19,6 +19,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -33,7 +34,6 @@#include "cm2_54xx.h" #include "prm54xx.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" /* Base offset for all OMAP5 interrupts external to MPUSS */
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +1 -1
@@ -19,6 +19,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/mmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -33,7 +34,6 @@#include "cm2_7xx.h" #include "prm7xx.h" #include "i2c.h" -#include "mmc.h" #include "wd_timer.h" /* Base offset for all DRA7XX interrupts external to MPUSS */
Signature · 1 line
2.1.0
PATCH v3 3/3 ARM: OMAP2+: use separate platform data for omap3 and omap 1/2 driver
In reply to Andreas Fenkart- mmci driver supports multiple slots, omap_hsmmc only one this leads to one of the major confusions in the omap_hsmmc driver
- platform data should be read-only for the driver
most callbacks are not set by the omap3 platform init code while being required by the driver, leading to the fact that they are set by the driver during it's probe function
typical example are card detect / read only detect callbacks
un-bundling by searching for driver name \"omap_hsmmc in the arch/arm folder. omap_hsmmc_platform_data is not initialized directly, but from omap2_hsmmc_info, which is defined in a separate header file not touched by this patch
additionally hwmod is used to initialize platform data. use omap_mmc_dev_attr as a key which hwmod uses omap_hsmmc driver. since all possible values assigned to omap_mmc_dev_attr.flags are hsmmc specific:
#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0)
#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1)
#define OMAP_HSMMC_SWAKEUP_MISSING BIT(2)
arch/arm/mach-omap2/hsmmc.c +13 -13
@@ -16,7 +16,7 @@#include <linux/gpio.h> #include <linux/mmc/host.h> #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include "soc.h" #include "omap_device.h"
@@ -48,7 +48,7 @@ static void omap_hsmmc1_before_set_reg(struct device *dev, int slot, int power_on, int vdd) {u32 reg, prog_io; -struct omap_mmc_platform_data *mmc = dev->platform_data; +struct omap_hsmmc_platform_data *mmc = dev->platform_data;if (mmc->slots[0 ].remux) mmc->slots[0 ].remux (dev, slot, power_on);
@@ -121,7 +121,7 @@ static void omap_hsmmc1_after_set_reg(struct device *dev, int slot, } } -static void hsmmc2_select_input_clk_src (struct omap_mmc_platform_data *mmc) +static void hsmmc2_select_input_clk_src (struct omap_hsmmc_platform_data *mmc) {u32 reg;
@@ -136,7 +136,7 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)static void hsmmc2_before_set_reg (struct device *dev,int slot,int power_on,int vdd) { -struct omap_mmc_platform_data *mmc = dev->platform_data; +struct omap_hsmmc_platform_data *mmc = dev->platform_data;if (mmc->slots[0 ].remux) mmc->slots[0 ].remux (dev, slot, power_on);
@@ -148,7 +148,7 @@ static void hsmmc2_before_set_reg(struct device *dev, int slot,static int am35x_hsmmc2_set_power (struct device *dev,int slot,int power_on,int vdd) { -struct omap_mmc_platform_data *mmc = dev->platform_data; +struct omap_hsmmc_platform_data *mmc = dev->platform_data;if (power_on)hsmmc2_select_input_clk_src (mmc);
@@ -162,8 +162,8 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,return 0 ; } -static inline void omap_hsmmc_mux (struct omap_mmc_platform_data *mmc_controller, -int controller_nr) +static inline void omap_hsmmc_mux (struct omap_hsmmc_platform_data + *mmc_controller,int controller_nr) {if (gpio_is_valid (mmc_controller->slots[0 ].switch_pin) && (mmc_controller->slots[0 ].switch_pin <OMAP_MAX_GPIO_LINES ))
@@ -244,7 +244,7 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, }static int __init omap_hsmmc_pdata_init (struct omap2_hsmmc_info *c, -struct omap_mmc_platform_data *mmc) +struct omap_hsmmc_platform_data *mmc) {char *hc_name;
@@ -369,7 +369,7 @@ static int omap_hsmmc_done;void omap_hsmmc_late_init (struct omap2_hsmmc_info *c) {struct platform_device *pdev; -struct omap_mmc_platform_data *mmc_pdata; +struct omap_hsmmc_platform_data *mmc_pdata;int res;if (omap_hsmmc_done !=1 )
@@ -409,12 +409,12 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,struct omap_device *od;struct platform_device *pdev;char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN ]; -struct omap_mmc_platform_data *mmc_data; -struct omap_mmc_dev_attr *mmc_dev_attr; +struct omap_hsmmc_platform_data *mmc_data; +struct omap_hsmmc_dev_attr *mmc_dev_attr;char *name;int res; - mmc_data =kzalloc (sizeof (struct omap_mmc_platform_data ),GFP_KERNEL ); + mmc_data =kzalloc (sizeof (*mmc_data),GFP_KERNEL );if (!mmc_data) {pr_err ("Cannot allocate memory for mmc device!\n" );return ;
@@ -464,7 +464,7 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, } res =platform_device_add_data (pdev, mmc_data, -sizeof (struct omap_mmc_platform_data )); +sizeof (struct omap_hsmmc_platform_data ));if (res) {pr_err ("Could not add pdata for %s\n" , name); goto put_pdev;
arch/arm/mach-omap2/omap_hwmod_2430_data.c +2 -2
@@ -15,7 +15,7 @@#include <linux/i2c-omap.h> #include <linux/platform_data/asoc-ti-mcbsp.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/omap-dma.h> #include <linux/platform_data/mailbox-omap.h>
@@ -385,7 +385,7 @@ static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { { .role = "dbck", .clk = "mmchsdb1_fck" }, }; -static struct omap_mmc_dev_attr mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +4 -4
@@ -15,7 +15,7 @@*/ #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include "omap_hwmod.h" #include "i2c.h"
@@ -836,7 +836,7 @@ static struct omap_hwmod_class am33xx_mmc_hwmod_class = { };/* mmc0 */ -static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = { +static struct omap_hsmmc_dev_attr am33xx_mmc0_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
@@ -854,7 +854,7 @@ struct omap_hwmod am33xx_mmc0_hwmod = { };/* mmc1 */ -static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr am33xx_mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
@@ -872,7 +872,7 @@ struct omap_hwmod am33xx_mmc1_hwmod = { };/* mmc2 */ -static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = { +static struct omap_hsmmc_dev_attr am33xx_mmc2_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };struct omap_hwmod am33xx_mmc2_hwmod = {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +4 -4
@@ -18,7 +18,7 @@#include <linux/i2c-omap.h> #include <linux/power/smartreflex.h> #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/omap-dma.h> #include "l3_3xxx.h"
@@ -1786,12 +1786,12 @@ static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { { .role = "dbck", .clk = "omap_32k_fck", }, }; -static struct omap_mmc_dev_attr mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };/* See 35xx errata 2.1.1.128 in SPRZ278F */ -static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = { .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |OMAP_HSMMC_BROKEN_MULTIBLOCK_READ ), };
@@ -1854,7 +1854,7 @@ static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { };/* See 35xx errata 2.1.1.128 in SPRZ278F */ -static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { +static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = { .flags =OMAP_HSMMC_BROKEN_MULTIBLOCK_READ , };
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2 -2
@@ -22,7 +22,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -1952,7 +1952,7 @@ static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { };/* mmc1 dev_attr */ -static struct omap_mmc_dev_attr mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +2 -2
@@ -19,7 +19,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -1269,7 +1269,7 @@ static struct omap_hwmod_opt_clk mmc1_opt_clks[] = { };/* mmc1 dev_attr */ -static struct omap_mmc_dev_attr mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -2
@@ -19,7 +19,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> #include <linux/power/smartreflex.h> #include <linux/i2c-omap.h>
@@ -1071,7 +1071,7 @@ static struct omap_hwmod_opt_clk mmc1_opt_clks[] = { };/* mmc1 dev_attr */ -static struct omap_mmc_dev_attr mmc1_dev_attr = { +static struct omap_hsmmc_dev_attr mmc1_dev_attr = { .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , };
drivers/mmc/host/omap_hsmmc.c +14 -14
@@ -42,7 +42,7 @@#include <linux/regulator/consumer.h> #include <linux/pinctrl/consumer.h> #include <linux/pm_runtime.h> -#include <linux/platform_data/mmc-omap.h> +#include <linux/platform_data/hsmmc-omap.h> /* OMAP HSMMC Host Controller Registers */ #define OMAP_HSMMC_SYSSTATUS 0x0014
@@ -220,7 +220,7 @@ struct omap_hsmmc_host {#define HSMMC_SDIO_IRQ_ENABLED (1 << 1)/* SDIO irq enabled */ #define HSMMC_WAKE_IRQ_ENABLED (1 << 2)struct omap_hsmmc_next next_data; -struct omap_mmc_platform_data *pdata; +struct omap_hsmmc_platform_data *pdata; };struct omap_mmc_of_data {
@@ -233,7 +233,7 @@ static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host);static int omap_hsmmc_card_detect (struct device *dev,int slot) {struct omap_hsmmc_host *host =dev_get_drvdata (dev); -struct omap_mmc_platform_data *mmc = host->pdata; +struct omap_hsmmc_platform_data *mmc = host->pdata;/* NOTE: assumes card detect signal is active-low */ return !gpio_get_value_cansleep (mmc->slots[0 ].switch_pin);
@@ -242,7 +242,7 @@ static int omap_hsmmc_card_detect(struct device *dev, int slot)static int omap_hsmmc_get_wp (struct device *dev,int slot) {struct omap_hsmmc_host *host =dev_get_drvdata (dev); -struct omap_mmc_platform_data *mmc = host->pdata; +struct omap_hsmmc_platform_data *mmc = host->pdata;/* NOTE: assumes write protect signal is active-high */ return gpio_get_value_cansleep (mmc->slots[0 ].gpio_wp);
@@ -251,7 +251,7 @@ static int omap_hsmmc_get_wp(struct device *dev, int slot)static int omap_hsmmc_get_cover_state (struct device *dev,int slot) {struct omap_hsmmc_host *host =dev_get_drvdata (dev); -struct omap_mmc_platform_data *mmc = host->pdata; +struct omap_hsmmc_platform_data *mmc = host->pdata;/* NOTE: assumes card detect signal is active-low */ return !gpio_get_value_cansleep (mmc->slots[0 ].switch_pin);
@@ -262,7 +262,7 @@ static int omap_hsmmc_get_cover_state(struct device *dev, int slot)static int omap_hsmmc_suspend_cdirq (struct device *dev,int slot) {struct omap_hsmmc_host *host =dev_get_drvdata (dev); -struct omap_mmc_platform_data *mmc = host->pdata; +struct omap_hsmmc_platform_data *mmc = host->pdata;disable_irq (mmc->slots[0 ].card_detect_irq);return 0 ;
@@ -271,7 +271,7 @@ static int omap_hsmmc_suspend_cdirq(struct device *dev, int slot)static int omap_hsmmc_resume_cdirq (struct device *dev,int slot) {struct omap_hsmmc_host *host =dev_get_drvdata (dev); -struct omap_mmc_platform_data *mmc = host->pdata; +struct omap_hsmmc_platform_data *mmc = host->pdata;enable_irq (mmc->slots[0 ].card_detect_irq);return 0 ;
@@ -449,7 +449,7 @@ static inline int omap_hsmmc_have_reg(void)#endif -static int omap_hsmmc_gpio_init (struct omap_mmc_platform_data *pdata) +static int omap_hsmmc_gpio_init (struct omap_hsmmc_platform_data *pdata) {int ret;
@@ -492,7 +492,7 @@ err_free_sp:return ret; } -static void omap_hsmmc_gpio_free (struct omap_mmc_platform_data *pdata) +static void omap_hsmmc_gpio_free (struct omap_hsmmc_platform_data *pdata) {if (gpio_is_valid (pdata->slots[0 ].gpio_wp))gpio_free (pdata->slots[0 ].gpio_wp);
@@ -1286,7 +1286,7 @@ static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host)static irqreturn_t omap_hsmmc_detect (int irq,void *dev_id) {struct omap_hsmmc_host *host = dev_id; -struct omap_mmc_slot_data *slot = &mmc_slot (host); +struct omap_hsmmc_slot_data *slot = &mmc_slot (host);int carddetect;sysfs_notify (&host->mmc->class_dev.kobj,NULL ,"cover_switch" );
@@ -1947,9 +1947,9 @@ static const struct of_device_id omap_mmc_of_match[] = { };MODULE_DEVICE_TABLE (of, omap_mmc_of_match); -static struct omap_mmc_platform_data *of_get_hsmmc_pdata (struct device *dev) +static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata (struct device *dev) { -struct omap_mmc_platform_data *pdata; +struct omap_hsmmc_platform_data *pdata;struct device_node *np = dev->of_node;u32 bus_width, max_freq;int cd_gpio, wp_gpio;
@@ -1999,7 +1999,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) return pdata; }#else -static inline struct omap_mmc_platform_data +static inline struct omap_hsmmc_platform_data *of_get_hsmmc_pdata (struct device *dev) {return ERR_PTR (-EINVAL );
@@ -2008,7 +2008,7 @@ static inline struct omap_mmc_platform_datastatic int omap_hsmmc_probe (struct platform_device *pdev) { -struct omap_mmc_platform_data *pdata = pdev->dev.platform_data; +struct omap_hsmmc_platform_data *pdata = pdev->dev.platform_data;struct mmc_host *mmc;struct omap_hsmmc_host *host =NULL ;struct resource *res;
include/linux/platform_data/hsmmc-omap.h new file +152 -0
152 lines not on this page · raw message
include/linux/platform_data/mmc-omap.h +0 -24
@@ -10,32 +10,8 @@#define OMAP_MMC_MAX_SLOTS 2 -/* -* struct omap_mmc_dev_attr.flags possibilities -* -* OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can -* operate with either 1.8Vdc or 3.0Vdc card voltages; this flag -* should be set if this is the case. See for example Section 22.5.3 -* "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia -* Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). -* -* OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers -* don't work correctly on some MMC controller instances on some -* OMAP3 SoCs; this flag should be set if this is the case. See -* for example Advisory 2.1.1.128 "MMC: Multiple Block Read -* Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ -* Revision F (October 2010) (SPRZ278F). -*/ -#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) -#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) -#define OMAP_HSMMC_SWAKEUP_MISSING BIT(2) -struct mmc_card ; -struct omap_mmc_dev_attr { -u8 flags; -}; -struct omap_mmc_platform_data {/* back-link to device */ struct device *dev;
Signature · 1 line
2.1.0