diff options
author | Andreas Fenkart <afenkart@gmail.com> | 2014-11-08 15:33:14 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-26 14:30:55 +0100 |
commit | 326119c9923711d782e71e197429b1bab16125e1 (patch) | |
tree | 829c2379945a1e47d89955f47df9c2c6731464b9 /include/linux/platform_data | |
parent | df206c313987bff595d2199f3bbf9b160e666b32 (diff) | |
download | blackbird-obmc-linux-326119c9923711d782e71e197429b1bab16125e1.tar.gz blackbird-obmc-linux-326119c9923711d782e71e197429b1bab16125e1.zip |
mmc: omap_hsmmc: remove unnecessary omap_hsmmc_slot_data indirection
omap_hsmmc supports only one slot per controller, see OMAP_MMC_MAX_SLOTS.
This unnecessary indirection leads to confusion in the omap_hsmmc driver.
For example the card_detect callback is not installed by platform code
but from the driver probe function. So it should be a field of
omap_hsmmc_host. But since it is declared under the platform slot while
the drivers struct omap_hsmmc_host has no slot abstraction, this looks
like a bug, especially when not familiar that this driver only supports
1 slot anyway.
Either we should add a slot abstraction to omap_hsmmc_host or remove
it from the platform data struct. Removed since slot multiplexing is
an un-implemented feature
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/hsmmc-omap.h | 100 |
1 files changed, 48 insertions, 52 deletions
diff --git a/include/linux/platform_data/hsmmc-omap.h b/include/linux/platform_data/hsmmc-omap.h index 35d494f7d62f..26912143adc0 100644 --- a/include/linux/platform_data/hsmmc-omap.h +++ b/include/linux/platform_data/hsmmc-omap.h @@ -8,8 +8,6 @@ * published by the Free Software Foundation. */ -#define OMAP_HSMMC_MAX_SLOTS 1 - /* * struct omap_hsmmc_dev_attr.flags possibilities * @@ -57,62 +55,60 @@ struct omap_hsmmc_platform_data { /* Register offset deviation */ u16 reg_offset; - struct omap_hsmmc_slot_data { - /* - * 4/8 wires and any additional host capabilities - * need to OR'd all capabilities (ref. linux/mmc/host.h) - */ - u32 caps; /* Used for the MMC driver on 2430 and later */ - u32 pm_caps; /* PM capabilities of the mmc */ + /* + * 4/8 wires and any additional host capabilities + * need to OR'd all capabilities (ref. linux/mmc/host.h) + */ + u32 caps; /* Used for the MMC driver on 2430 and later */ + u32 pm_caps; /* PM capabilities of the mmc */ - /* switch pin can be for card detect (default) or card cover */ - unsigned cover:1; + /* switch pin can be for card detect (default) or card cover */ + unsigned cover:1; - /* use the internal clock */ - unsigned internal_clock:1; + /* use the internal clock */ + unsigned internal_clock:1; - /* nonremovable e.g. eMMC */ - unsigned nonremovable:1; + /* nonremovable e.g. eMMC */ + unsigned nonremovable:1; - /* eMMC does not handle power off when not in sleep state */ - unsigned no_regulator_off_init:1; + /* eMMC does not handle power off when not in sleep state */ + unsigned no_regulator_off_init:1; - /* we can put the features above into this variable */ + /* we can put the features above into this variable */ #define HSMMC_HAS_PBIAS (1 << 0) #define HSMMC_HAS_UPDATED_RESET (1 << 1) #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) - unsigned features; - - int switch_pin; /* gpio (card detect) */ - int gpio_wp; /* gpio (write protect) */ - - int (*set_power)(struct device *dev, int slot, - int power_on, int vdd); - int (*get_ro)(struct device *dev, int slot); - void (*remux)(struct device *dev, int slot, int power_on); - /* Call back before enabling / disabling regulators */ - void (*before_set_reg)(struct device *dev, int slot, - int power_on, int vdd); - /* Call back after enabling / disabling regulators */ - void (*after_set_reg)(struct device *dev, int slot, - int power_on, int vdd); - /* if we have special card, init it using this callback */ - void (*init_card)(struct mmc_card *card); - - /* return MMC cover switch state, can be NULL if not supported. - * - * possible return values: - * 0 - closed - * 1 - open - */ - int (*get_cover_state)(struct device *dev, int slot); - - const char *name; - u32 ocr_mask; - - /* Card detection IRQs */ - int card_detect_irq; - - int (*card_detect)(struct device *dev, int slot); - } slots[OMAP_HSMMC_MAX_SLOTS]; + unsigned features; + + int switch_pin; /* gpio (card detect) */ + int gpio_wp; /* gpio (write protect) */ + + int (*set_power)(struct device *dev, int slot, + int power_on, int vdd); + int (*get_ro)(struct device *dev, int slot); + void (*remux)(struct device *dev, int slot, int power_on); + /* Call back before enabling / disabling regulators */ + void (*before_set_reg)(struct device *dev, int slot, + int power_on, int vdd); + /* Call back after enabling / disabling regulators */ + void (*after_set_reg)(struct device *dev, int slot, + int power_on, int vdd); + /* if we have special card, init it using this callback */ + void (*init_card)(struct mmc_card *card); + + /* return MMC cover switch state, can be NULL if not supported. + * + * possible return values: + * 0 - closed + * 1 - open + */ + int (*get_cover_state)(struct device *dev, int slot); + + const char *name; + u32 ocr_mask; + + /* Card detection IRQs */ + int card_detect_irq; + + int (*card_detect)(struct device *dev, int slot); }; |