diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/tmio.h | 28 | ||||
| -rw-r--r-- | include/linux/mmc/card.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
| -rw-r--r-- | include/linux/mmc/dw_mmc.h | 6 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 4 | ||||
| -rw-r--r-- | include/linux/mmc/mmc.h | 10 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci.h | 10 | ||||
| -rw-r--r-- | include/linux/mmc/sh_mobile_sdhi.h | 15 | ||||
| -rw-r--r-- | include/linux/mmc/slot-gpio.h | 5 | ||||
| -rw-r--r-- | include/linux/platform_data/mmc-omap.h | 4 |
10 files changed, 28 insertions, 57 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 57388171610d..605812820e48 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
| @@ -96,11 +96,6 @@ | |||
| 96 | #define TMIO_MMC_SDIO_STATUS_QUIRK (1 << 8) | 96 | #define TMIO_MMC_SDIO_STATUS_QUIRK (1 << 8) |
| 97 | 97 | ||
| 98 | /* | 98 | /* |
| 99 | * Some controllers have DMA enable/disable register | ||
| 100 | */ | ||
| 101 | #define TMIO_MMC_HAVE_CTL_DMA_REG (1 << 9) | ||
| 102 | |||
| 103 | /* | ||
| 104 | * Some controllers allows to set SDx actual clock | 99 | * Some controllers allows to set SDx actual clock |
| 105 | */ | 100 | */ |
| 106 | #define TMIO_MMC_CLK_ACTUAL (1 << 10) | 101 | #define TMIO_MMC_CLK_ACTUAL (1 << 10) |
| @@ -112,18 +107,6 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | |||
| 112 | 107 | ||
| 113 | struct dma_chan; | 108 | struct dma_chan; |
| 114 | 109 | ||
| 115 | struct tmio_mmc_dma { | ||
| 116 | void *chan_priv_tx; | ||
| 117 | void *chan_priv_rx; | ||
| 118 | int slave_id_tx; | ||
| 119 | int slave_id_rx; | ||
| 120 | int alignment_shift; | ||
| 121 | dma_addr_t dma_rx_offset; | ||
| 122 | bool (*filter)(struct dma_chan *chan, void *arg); | ||
| 123 | }; | ||
| 124 | |||
| 125 | struct tmio_mmc_host; | ||
| 126 | |||
| 127 | /* | 110 | /* |
| 128 | * data for the MMC controller | 111 | * data for the MMC controller |
| 129 | */ | 112 | */ |
| @@ -132,19 +115,12 @@ struct tmio_mmc_data { | |||
| 132 | unsigned long capabilities; | 115 | unsigned long capabilities; |
| 133 | unsigned long capabilities2; | 116 | unsigned long capabilities2; |
| 134 | unsigned long flags; | 117 | unsigned long flags; |
| 135 | unsigned long bus_shift; | ||
| 136 | u32 ocr_mask; /* available voltages */ | 118 | u32 ocr_mask; /* available voltages */ |
| 137 | struct tmio_mmc_dma *dma; | ||
| 138 | struct device *dev; | ||
| 139 | unsigned int cd_gpio; | 119 | unsigned int cd_gpio; |
| 120 | int alignment_shift; | ||
| 121 | dma_addr_t dma_rx_offset; | ||
| 140 | void (*set_pwr)(struct platform_device *host, int state); | 122 | void (*set_pwr)(struct platform_device *host, int state); |
| 141 | void (*set_clk_div)(struct platform_device *host, int state); | 123 | void (*set_clk_div)(struct platform_device *host, int state); |
| 142 | int (*write16_hook)(struct tmio_mmc_host *host, int addr); | ||
| 143 | /* clock management callbacks */ | ||
| 144 | int (*clk_enable)(struct platform_device *pdev, unsigned int *f); | ||
| 145 | void (*clk_disable)(struct platform_device *pdev); | ||
| 146 | int (*multi_io_quirk)(struct mmc_card *card, | ||
| 147 | unsigned int direction, int blk_size); | ||
| 148 | }; | 124 | }; |
| 149 | 125 | ||
| 150 | /* | 126 | /* |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 4d69c00497bd..a6cf4c063e4e 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -83,7 +83,7 @@ struct mmc_ext_csd { | |||
| 83 | bool hpi; /* HPI support bit */ | 83 | bool hpi; /* HPI support bit */ |
| 84 | unsigned int hpi_cmd; /* cmd used as HPI */ | 84 | unsigned int hpi_cmd; /* cmd used as HPI */ |
| 85 | bool bkops; /* background support bit */ | 85 | bool bkops; /* background support bit */ |
| 86 | bool bkops_en; /* background enable bit */ | 86 | bool man_bkops_en; /* manual bkops enable bit */ |
| 87 | unsigned int data_sector_size; /* 512 bytes or 4KB */ | 87 | unsigned int data_sector_size; /* 512 bytes or 4KB */ |
| 88 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ | 88 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ |
| 89 | unsigned int boot_ro_lock; /* ro lock support */ | 89 | unsigned int boot_ro_lock; /* ro lock support */ |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index cb2b0400d284..160448f920ac 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
| @@ -182,7 +182,6 @@ extern int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen); | |||
| 182 | extern int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount, | 182 | extern int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount, |
| 183 | bool is_rel_write); | 183 | bool is_rel_write); |
| 184 | extern int mmc_hw_reset(struct mmc_host *host); | 184 | extern int mmc_hw_reset(struct mmc_host *host); |
| 185 | extern int mmc_hw_reset_check(struct mmc_host *host); | ||
| 186 | extern int mmc_can_reset(struct mmc_card *card); | 185 | extern int mmc_can_reset(struct mmc_card *card); |
| 187 | 186 | ||
| 188 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); | 187 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 42b724e8d503..471fb3116dbe 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -106,6 +106,11 @@ struct mmc_data; | |||
| 106 | * @cur_slot, @mrq and @state. These must always be updated | 106 | * @cur_slot, @mrq and @state. These must always be updated |
| 107 | * at the same time while holding @lock. | 107 | * at the same time while holding @lock. |
| 108 | * | 108 | * |
| 109 | * @irq_lock is an irq-safe spinlock protecting the INTMASK register | ||
| 110 | * to allow the interrupt handler to modify it directly. Held for only long | ||
| 111 | * enough to read-modify-write INTMASK and no other locks are grabbed when | ||
| 112 | * holding this one. | ||
| 113 | * | ||
| 109 | * The @mrq field of struct dw_mci_slot is also protected by @lock, | 114 | * The @mrq field of struct dw_mci_slot is also protected by @lock, |
| 110 | * and must always be written at the same time as the slot is added to | 115 | * and must always be written at the same time as the slot is added to |
| 111 | * @queue. | 116 | * @queue. |
| @@ -125,6 +130,7 @@ struct mmc_data; | |||
| 125 | */ | 130 | */ |
| 126 | struct dw_mci { | 131 | struct dw_mci { |
| 127 | spinlock_t lock; | 132 | spinlock_t lock; |
| 133 | spinlock_t irq_lock; | ||
| 128 | void __iomem *regs; | 134 | void __iomem *regs; |
| 129 | 135 | ||
| 130 | struct scatterlist *sg; | 136 | struct scatterlist *sg; |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 9f322706f7cb..0c8cbe5d1550 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -166,7 +166,6 @@ struct mmc_async_req { | |||
| 166 | * struct mmc_slot - MMC slot functions | 166 | * struct mmc_slot - MMC slot functions |
| 167 | * | 167 | * |
| 168 | * @cd_irq: MMC/SD-card slot hotplug detection IRQ or -EINVAL | 168 | * @cd_irq: MMC/SD-card slot hotplug detection IRQ or -EINVAL |
| 169 | * @lock: protect the @handler_priv pointer | ||
| 170 | * @handler_priv: MMC/SD-card slot context | 169 | * @handler_priv: MMC/SD-card slot context |
| 171 | * | 170 | * |
| 172 | * Some MMC/SD host controllers implement slot-functions like card and | 171 | * Some MMC/SD host controllers implement slot-functions like card and |
| @@ -176,7 +175,6 @@ struct mmc_async_req { | |||
| 176 | */ | 175 | */ |
| 177 | struct mmc_slot { | 176 | struct mmc_slot { |
| 178 | int cd_irq; | 177 | int cd_irq; |
| 179 | struct mutex lock; | ||
| 180 | void *handler_priv; | 178 | void *handler_priv; |
| 181 | }; | 179 | }; |
| 182 | 180 | ||
| @@ -197,6 +195,7 @@ struct mmc_context_info { | |||
| 197 | }; | 195 | }; |
| 198 | 196 | ||
| 199 | struct regulator; | 197 | struct regulator; |
| 198 | struct mmc_pwrseq; | ||
| 200 | 199 | ||
| 201 | struct mmc_supply { | 200 | struct mmc_supply { |
| 202 | struct regulator *vmmc; /* Card power supply */ | 201 | struct regulator *vmmc; /* Card power supply */ |
| @@ -208,6 +207,7 @@ struct mmc_host { | |||
| 208 | struct device class_dev; | 207 | struct device class_dev; |
| 209 | int index; | 208 | int index; |
| 210 | const struct mmc_host_ops *ops; | 209 | const struct mmc_host_ops *ops; |
| 210 | struct mmc_pwrseq *pwrseq; | ||
| 211 | unsigned int f_min; | 211 | unsigned int f_min; |
| 212 | unsigned int f_max; | 212 | unsigned int f_max; |
| 213 | unsigned int f_init; | 213 | unsigned int f_init; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 49ad7a943638..124f562118b8 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -53,11 +53,6 @@ | |||
| 53 | #define MMC_SEND_TUNING_BLOCK 19 /* adtc R1 */ | 53 | #define MMC_SEND_TUNING_BLOCK 19 /* adtc R1 */ |
| 54 | #define MMC_SEND_TUNING_BLOCK_HS200 21 /* adtc R1 */ | 54 | #define MMC_SEND_TUNING_BLOCK_HS200 21 /* adtc R1 */ |
| 55 | 55 | ||
| 56 | #define MMC_TUNING_BLK_PATTERN_4BIT_SIZE 64 | ||
| 57 | #define MMC_TUNING_BLK_PATTERN_8BIT_SIZE 128 | ||
| 58 | extern const u8 tuning_blk_pattern_4bit[MMC_TUNING_BLK_PATTERN_4BIT_SIZE]; | ||
| 59 | extern const u8 tuning_blk_pattern_8bit[MMC_TUNING_BLK_PATTERN_8BIT_SIZE]; | ||
| 60 | |||
| 61 | /* class 3 */ | 56 | /* class 3 */ |
| 62 | #define MMC_WRITE_DAT_UNTIL_STOP 20 /* adtc [31:0] data addr R1 */ | 57 | #define MMC_WRITE_DAT_UNTIL_STOP 20 /* adtc [31:0] data addr R1 */ |
| 63 | 58 | ||
| @@ -433,6 +428,11 @@ struct _mmc_csd { | |||
| 433 | #define EXT_CSD_BKOPS_LEVEL_2 0x2 | 428 | #define EXT_CSD_BKOPS_LEVEL_2 0x2 |
| 434 | 429 | ||
| 435 | /* | 430 | /* |
| 431 | * BKOPS modes | ||
| 432 | */ | ||
| 433 | #define EXT_CSD_MANUAL_BKOPS_MASK 0x01 | ||
| 434 | |||
| 435 | /* | ||
| 436 | * MMC_SWITCH access modes | 436 | * MMC_SWITCH access modes |
| 437 | */ | 437 | */ |
| 438 | 438 | ||
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index f767a0de611f..c3e3db196738 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -17,6 +17,11 @@ | |||
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/mmc/host.h> | 18 | #include <linux/mmc/host.h> |
| 19 | 19 | ||
| 20 | struct sdhci_host_next { | ||
| 21 | unsigned int sg_count; | ||
| 22 | s32 cookie; | ||
| 23 | }; | ||
| 24 | |||
| 20 | struct sdhci_host { | 25 | struct sdhci_host { |
| 21 | /* Data set by hardware interface driver */ | 26 | /* Data set by hardware interface driver */ |
| 22 | const char *hw_name; /* Hardware bus name */ | 27 | const char *hw_name; /* Hardware bus name */ |
| @@ -106,6 +111,10 @@ struct sdhci_host { | |||
| 106 | #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) | 111 | #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) |
| 107 | /* Capability register bit-63 indicates HS400 support */ | 112 | /* Capability register bit-63 indicates HS400 support */ |
| 108 | #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) | 113 | #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) |
| 114 | /* forced tuned clock */ | ||
| 115 | #define SDHCI_QUIRK2_TUNING_WORK_AROUND (1<<12) | ||
| 116 | /* disable the block count for single block transactions */ | ||
| 117 | #define SDHCI_QUIRK2_SUPPORT_SINGLE (1<<13) | ||
| 109 | 118 | ||
| 110 | int irq; /* Device IRQ */ | 119 | int irq; /* Device IRQ */ |
| 111 | void __iomem *ioaddr; /* Mapped address */ | 120 | void __iomem *ioaddr; /* Mapped address */ |
| @@ -203,6 +212,7 @@ struct sdhci_host { | |||
| 203 | #define SDHCI_TUNING_MODE_1 0 | 212 | #define SDHCI_TUNING_MODE_1 0 |
| 204 | struct timer_list tuning_timer; /* Timer for tuning */ | 213 | struct timer_list tuning_timer; /* Timer for tuning */ |
| 205 | 214 | ||
| 215 | struct sdhci_host_next next_data; | ||
| 206 | unsigned long private[0] ____cacheline_aligned; | 216 | unsigned long private[0] ____cacheline_aligned; |
| 207 | }; | 217 | }; |
| 208 | #endif /* LINUX_MMC_SDHCI_H */ | 218 | #endif /* LINUX_MMC_SDHCI_H */ |
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index 68927ae50845..da77e5e2041d 100644 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h | |||
| @@ -3,20 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct platform_device; | ||
| 7 | |||
| 8 | #define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" | 6 | #define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" |
| 9 | #define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" | 7 | #define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" |
| 10 | #define SH_MOBILE_SDHI_IRQ_SDIO "sdio" | 8 | #define SH_MOBILE_SDHI_IRQ_SDIO "sdio" |
| 11 | 9 | ||
| 12 | /** | ||
| 13 | * struct sh_mobile_sdhi_ops - SDHI driver callbacks | ||
| 14 | * @cd_wakeup: trigger a card-detection run | ||
| 15 | */ | ||
| 16 | struct sh_mobile_sdhi_ops { | ||
| 17 | void (*cd_wakeup)(const struct platform_device *pdev); | ||
| 18 | }; | ||
| 19 | |||
| 20 | struct sh_mobile_sdhi_info { | 10 | struct sh_mobile_sdhi_info { |
| 21 | int dma_slave_tx; | 11 | int dma_slave_tx; |
| 22 | int dma_slave_rx; | 12 | int dma_slave_rx; |
| @@ -25,11 +15,6 @@ struct sh_mobile_sdhi_info { | |||
| 25 | unsigned long tmio_caps2; | 15 | unsigned long tmio_caps2; |
| 26 | u32 tmio_ocr_mask; /* available MMC voltages */ | 16 | u32 tmio_ocr_mask; /* available MMC voltages */ |
| 27 | unsigned int cd_gpio; | 17 | unsigned int cd_gpio; |
| 28 | |||
| 29 | /* callbacks for board specific setup code */ | ||
| 30 | int (*init)(struct platform_device *pdev, | ||
| 31 | const struct sh_mobile_sdhi_ops *ops); | ||
| 32 | void (*cleanup)(struct platform_device *pdev); | ||
| 33 | }; | 18 | }; |
| 34 | 19 | ||
| 35 | #endif /* LINUX_MMC_SH_MOBILE_SDHI_H */ | 20 | #endif /* LINUX_MMC_SH_MOBILE_SDHI_H */ |
diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h index e56fa24c9322..3945a8c9d3cb 100644 --- a/include/linux/mmc/slot-gpio.h +++ b/include/linux/mmc/slot-gpio.h | |||
| @@ -15,12 +15,10 @@ struct mmc_host; | |||
| 15 | 15 | ||
| 16 | int mmc_gpio_get_ro(struct mmc_host *host); | 16 | int mmc_gpio_get_ro(struct mmc_host *host); |
| 17 | int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio); | 17 | int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio); |
| 18 | void mmc_gpio_free_ro(struct mmc_host *host); | ||
| 19 | 18 | ||
| 20 | int mmc_gpio_get_cd(struct mmc_host *host); | 19 | int mmc_gpio_get_cd(struct mmc_host *host); |
| 21 | int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio, | 20 | int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio, |
| 22 | unsigned int debounce); | 21 | unsigned int debounce); |
| 23 | void mmc_gpio_free_cd(struct mmc_host *host); | ||
| 24 | 22 | ||
| 25 | int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, | 23 | int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, |
| 26 | unsigned int idx, bool override_active_level, | 24 | unsigned int idx, bool override_active_level, |
| @@ -28,7 +26,8 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, | |||
| 28 | int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id, | 26 | int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id, |
| 29 | unsigned int idx, bool override_active_level, | 27 | unsigned int idx, bool override_active_level, |
| 30 | unsigned int debounce, bool *gpio_invert); | 28 | unsigned int debounce, bool *gpio_invert); |
| 31 | void mmc_gpiod_free_cd(struct mmc_host *host); | 29 | void mmc_gpio_set_cd_isr(struct mmc_host *host, |
| 30 | irqreturn_t (*isr)(int irq, void *dev_id)); | ||
| 32 | void mmc_gpiod_request_cd_irq(struct mmc_host *host); | 31 | void mmc_gpiod_request_cd_irq(struct mmc_host *host); |
| 33 | 32 | ||
| 34 | #endif | 33 | #endif |
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h index 5c188f4e9bec..929469291406 100644 --- a/include/linux/platform_data/mmc-omap.h +++ b/include/linux/platform_data/mmc-omap.h | |||
| @@ -31,10 +31,6 @@ struct omap_mmc_platform_data { | |||
| 31 | void (*cleanup)(struct device *dev); | 31 | void (*cleanup)(struct device *dev); |
| 32 | void (*shutdown)(struct device *dev); | 32 | void (*shutdown)(struct device *dev); |
| 33 | 33 | ||
| 34 | /* To handle board related suspend/resume functionality for MMC */ | ||
| 35 | int (*suspend)(struct device *dev, int slot); | ||
| 36 | int (*resume)(struct device *dev, int slot); | ||
| 37 | |||
| 38 | /* Return context loss count due to PM states changing */ | 34 | /* Return context loss count due to PM states changing */ |
| 39 | int (*get_context_loss_count)(struct device *dev); | 35 | int (*get_context_loss_count)(struct device *dev); |
| 40 | 36 | ||
