aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
commit92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch)
tree15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/linux/mmc
parent15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff)
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2 Backmerge to get at commit 1b0e3a049efe471c399674fd954500ce97438d30 Author: Imre Deak <imre.deak@intel.com> Date: Thu Nov 5 23:04:11 2015 +0200 drm/i915/skl: disable display side power well support for now so that we can proplery re-eanble skl power wells in -next. Conflicts are just adjacent lines changed, except for intel_fbdev.c where we need to interleave the changs. Nothing nefarious. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/card.h1
-rw-r--r--include/linux/mmc/core.h4
-rw-r--r--include/linux/mmc/dw_mmc.h23
-rw-r--r--include/linux/mmc/host.h39
4 files changed, 29 insertions, 38 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index fdd0779ccdfa..eb0151bac50c 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -269,7 +269,6 @@ struct mmc_card {
269 /* for byte mode */ 269 /* for byte mode */
270#define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */ 270#define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */
271 /* (missing CIA registers) */ 271 /* (missing CIA registers) */
272#define MMC_QUIRK_BROKEN_CLK_GATING (1<<3) /* clock gating the sdio bus will make card fail */
273#define MMC_QUIRK_NONSTD_FUNC_IF (1<<4) /* SDIO card has nonstd function interfaces */ 272#define MMC_QUIRK_NONSTD_FUNC_IF (1<<4) /* SDIO card has nonstd function interfaces */
274#define MMC_QUIRK_DISABLE_CD (1<<5) /* disconnect CD/DAT[3] resistor */ 273#define MMC_QUIRK_DISABLE_CD (1<<5) /* disconnect CD/DAT[3] resistor */
275#define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */ 274#define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 258daf914c6d..37967b6da03c 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -152,10 +152,8 @@ extern int mmc_app_cmd(struct mmc_host *, struct mmc_card *);
152extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, 152extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
153 struct mmc_command *, int); 153 struct mmc_command *, int);
154extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); 154extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
155extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool,
156 bool, bool);
157extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 155extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
158extern int mmc_send_tuning(struct mmc_host *host); 156extern int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
159extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd); 157extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
160 158
161#define MMC_ERASE_ARG 0x00000000 159#define MMC_ERASE_ARG 0x00000000
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 134c57422740..f67b2ec18e6d 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -16,6 +16,7 @@
16 16
17#include <linux/scatterlist.h> 17#include <linux/scatterlist.h>
18#include <linux/mmc/core.h> 18#include <linux/mmc/core.h>
19#include <linux/dmaengine.h>
19 20
20#define MAX_MCI_SLOTS 2 21#define MAX_MCI_SLOTS 2
21 22
@@ -40,6 +41,17 @@ enum {
40 41
41struct mmc_data; 42struct mmc_data;
42 43
44enum {
45 TRANS_MODE_PIO = 0,
46 TRANS_MODE_IDMAC,
47 TRANS_MODE_EDMAC
48};
49
50struct dw_mci_dma_slave {
51 struct dma_chan *ch;
52 enum dma_transfer_direction direction;
53};
54
43/** 55/**
44 * struct dw_mci - MMC controller state shared between all slots 56 * struct dw_mci - MMC controller state shared between all slots
45 * @lock: Spinlock protecting the queue and associated data. 57 * @lock: Spinlock protecting the queue and associated data.
@@ -154,7 +166,14 @@ struct dw_mci {
154 dma_addr_t sg_dma; 166 dma_addr_t sg_dma;
155 void *sg_cpu; 167 void *sg_cpu;
156 const struct dw_mci_dma_ops *dma_ops; 168 const struct dw_mci_dma_ops *dma_ops;
169 /* For idmac */
157 unsigned int ring_size; 170 unsigned int ring_size;
171
172 /* For edmac */
173 struct dw_mci_dma_slave *dms;
174 /* Registers's physical base address */
175 void *phy_regs;
176
158 u32 cmd_status; 177 u32 cmd_status;
159 u32 data_status; 178 u32 data_status;
160 u32 stop_cmdr; 179 u32 stop_cmdr;
@@ -208,8 +227,8 @@ struct dw_mci {
208struct dw_mci_dma_ops { 227struct dw_mci_dma_ops {
209 /* DMA Ops */ 228 /* DMA Ops */
210 int (*init)(struct dw_mci *host); 229 int (*init)(struct dw_mci *host);
211 void (*start)(struct dw_mci *host, unsigned int sg_len); 230 int (*start)(struct dw_mci *host, unsigned int sg_len);
212 void (*complete)(struct dw_mci *host); 231 void (*complete)(void *host);
213 void (*stop)(struct dw_mci *host); 232 void (*stop)(struct dw_mci *host);
214 void (*cleanup)(struct dw_mci *host); 233 void (*cleanup)(struct dw_mci *host);
215 void (*exit)(struct dw_mci *host); 234 void (*exit)(struct dw_mci *host);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 83b81fd865f3..8673ffe3d86e 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -292,18 +292,6 @@ struct mmc_host {
292 292
293 mmc_pm_flag_t pm_caps; /* supported pm features */ 293 mmc_pm_flag_t pm_caps; /* supported pm features */
294 294
295#ifdef CONFIG_MMC_CLKGATE
296 int clk_requests; /* internal reference counter */
297 unsigned int clk_delay; /* number of MCI clk hold cycles */
298 bool clk_gated; /* clock gated */
299 struct delayed_work clk_gate_work; /* delayed clock gate */
300 unsigned int clk_old; /* old clock value cache */
301 spinlock_t clk_lock; /* lock for clk fields */
302 struct mutex clk_gate_mutex; /* mutex for clock gating */
303 struct device_attribute clkgate_delay_attr;
304 unsigned long clkgate_delay;
305#endif
306
307 /* host specific block data */ 295 /* host specific block data */
308 unsigned int max_seg_size; /* see blk_queue_max_segment_size */ 296 unsigned int max_seg_size; /* see blk_queue_max_segment_size */
309 unsigned short max_segs; /* see blk_queue_max_segments */ 297 unsigned short max_segs; /* see blk_queue_max_segments */
@@ -423,6 +411,7 @@ int mmc_regulator_get_ocrmask(struct regulator *supply);
423int mmc_regulator_set_ocr(struct mmc_host *mmc, 411int mmc_regulator_set_ocr(struct mmc_host *mmc,
424 struct regulator *supply, 412 struct regulator *supply,
425 unsigned short vdd_bit); 413 unsigned short vdd_bit);
414int mmc_regulator_set_vqmmc(struct mmc_host *mmc, struct mmc_ios *ios);
426#else 415#else
427static inline int mmc_regulator_get_ocrmask(struct regulator *supply) 416static inline int mmc_regulator_get_ocrmask(struct regulator *supply)
428{ 417{
@@ -435,6 +424,12 @@ static inline int mmc_regulator_set_ocr(struct mmc_host *mmc,
435{ 424{
436 return 0; 425 return 0;
437} 426}
427
428static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc,
429 struct mmc_ios *ios)
430{
431 return -EINVAL;
432}
438#endif 433#endif
439 434
440int mmc_regulator_get_supply(struct mmc_host *mmc); 435int mmc_regulator_get_supply(struct mmc_host *mmc);
@@ -479,26 +474,6 @@ static inline int mmc_host_packed_wr(struct mmc_host *host)
479 return host->caps2 & MMC_CAP2_PACKED_WR; 474 return host->caps2 & MMC_CAP2_PACKED_WR;
480} 475}
481 476
482#ifdef CONFIG_MMC_CLKGATE
483void mmc_host_clk_hold(struct mmc_host *host);
484void mmc_host_clk_release(struct mmc_host *host);
485unsigned int mmc_host_clk_rate(struct mmc_host *host);
486
487#else
488static inline void mmc_host_clk_hold(struct mmc_host *host)
489{
490}
491
492static inline void mmc_host_clk_release(struct mmc_host *host)
493{
494}
495
496static inline unsigned int mmc_host_clk_rate(struct mmc_host *host)
497{
498 return host->ios.clock;
499}
500#endif
501
502static inline int mmc_card_hs(struct mmc_card *card) 477static inline int mmc_card_hs(struct mmc_card *card)
503{ 478{
504 return card->host->ios.timing == MMC_TIMING_SD_HS || 479 return card->host->ios.timing == MMC_TIMING_SD_HS ||