diff options
| author | Andreas Fenkart <afenkart@gmail.com> | 2014-11-08 09:33:14 -0500 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-26 08:30:55 -0500 |
| commit | 326119c9923711d782e71e197429b1bab16125e1 (patch) | |
| tree | 829c2379945a1e47d89955f47df9c2c6731464b9 /include/linux/platform_data | |
| parent | df206c313987bff595d2199f3bbf9b160e666b32 (diff) | |
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 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #define OMAP_HSMMC_MAX_SLOTS 1 | ||
| 12 | |||
| 13 | /* | 11 | /* |
| 14 | * struct omap_hsmmc_dev_attr.flags possibilities | 12 | * struct omap_hsmmc_dev_attr.flags possibilities |
| 15 | * | 13 | * |
| @@ -57,62 +55,60 @@ struct omap_hsmmc_platform_data { | |||
| 57 | /* Register offset deviation */ | 55 | /* Register offset deviation */ |
| 58 | u16 reg_offset; | 56 | u16 reg_offset; |
| 59 | 57 | ||
| 60 | struct omap_hsmmc_slot_data { | 58 | /* |
| 61 | /* | 59 | * 4/8 wires and any additional host capabilities |
| 62 | * 4/8 wires and any additional host capabilities | 60 | * need to OR'd all capabilities (ref. linux/mmc/host.h) |
| 63 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | 61 | */ |
| 64 | */ | 62 | u32 caps; /* Used for the MMC driver on 2430 and later */ |
| 65 | u32 caps; /* Used for the MMC driver on 2430 and later */ | 63 | u32 pm_caps; /* PM capabilities of the mmc */ |
| 66 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
| 67 | 64 | ||
| 68 | /* switch pin can be for card detect (default) or card cover */ | 65 | /* switch pin can be for card detect (default) or card cover */ |
| 69 | unsigned cover:1; | 66 | unsigned cover:1; |
| 70 | 67 | ||
| 71 | /* use the internal clock */ | 68 | /* use the internal clock */ |
| 72 | unsigned internal_clock:1; | 69 | unsigned internal_clock:1; |
| 73 | 70 | ||
| 74 | /* nonremovable e.g. eMMC */ | 71 | /* nonremovable e.g. eMMC */ |
| 75 | unsigned nonremovable:1; | 72 | unsigned nonremovable:1; |
| 76 | 73 | ||
| 77 | /* eMMC does not handle power off when not in sleep state */ | 74 | /* eMMC does not handle power off when not in sleep state */ |
| 78 | unsigned no_regulator_off_init:1; | 75 | unsigned no_regulator_off_init:1; |
| 79 | 76 | ||
| 80 | /* we can put the features above into this variable */ | 77 | /* we can put the features above into this variable */ |
| 81 | #define HSMMC_HAS_PBIAS (1 << 0) | 78 | #define HSMMC_HAS_PBIAS (1 << 0) |
| 82 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | 79 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) |
| 83 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) | 80 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) |
| 84 | unsigned features; | 81 | unsigned features; |
| 85 | 82 | ||
| 86 | int switch_pin; /* gpio (card detect) */ | 83 | int switch_pin; /* gpio (card detect) */ |
| 87 | int gpio_wp; /* gpio (write protect) */ | 84 | int gpio_wp; /* gpio (write protect) */ |
| 88 | 85 | ||
| 89 | int (*set_power)(struct device *dev, int slot, | 86 | int (*set_power)(struct device *dev, int slot, |
| 90 | int power_on, int vdd); | 87 | int power_on, int vdd); |
| 91 | int (*get_ro)(struct device *dev, int slot); | 88 | int (*get_ro)(struct device *dev, int slot); |
| 92 | void (*remux)(struct device *dev, int slot, int power_on); | 89 | void (*remux)(struct device *dev, int slot, int power_on); |
| 93 | /* Call back before enabling / disabling regulators */ | 90 | /* Call back before enabling / disabling regulators */ |
| 94 | void (*before_set_reg)(struct device *dev, int slot, | 91 | void (*before_set_reg)(struct device *dev, int slot, |
| 95 | int power_on, int vdd); | 92 | int power_on, int vdd); |
| 96 | /* Call back after enabling / disabling regulators */ | 93 | /* Call back after enabling / disabling regulators */ |
| 97 | void (*after_set_reg)(struct device *dev, int slot, | 94 | void (*after_set_reg)(struct device *dev, int slot, |
| 98 | int power_on, int vdd); | 95 | int power_on, int vdd); |
| 99 | /* if we have special card, init it using this callback */ | 96 | /* if we have special card, init it using this callback */ |
| 100 | void (*init_card)(struct mmc_card *card); | 97 | void (*init_card)(struct mmc_card *card); |
| 101 | 98 | ||
| 102 | /* return MMC cover switch state, can be NULL if not supported. | 99 | /* return MMC cover switch state, can be NULL if not supported. |
| 103 | * | 100 | * |
| 104 | * possible return values: | 101 | * possible return values: |
| 105 | * 0 - closed | 102 | * 0 - closed |
| 106 | * 1 - open | 103 | * 1 - open |
| 107 | */ | 104 | */ |
| 108 | int (*get_cover_state)(struct device *dev, int slot); | 105 | int (*get_cover_state)(struct device *dev, int slot); |
| 109 | 106 | ||
| 110 | const char *name; | 107 | const char *name; |
| 111 | u32 ocr_mask; | 108 | u32 ocr_mask; |
| 112 | 109 | ||
| 113 | /* Card detection IRQs */ | 110 | /* Card detection IRQs */ |
| 114 | int card_detect_irq; | 111 | int card_detect_irq; |
| 115 | 112 | ||
| 116 | int (*card_detect)(struct device *dev, int slot); | 113 | int (*card_detect)(struct device *dev, int slot); |
| 117 | } slots[OMAP_HSMMC_MAX_SLOTS]; | ||
| 118 | }; | 114 | }; |
