diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 19:55:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 19:55:55 -0400 |
commit | 8c1c77ff9be27137fa7cbbf51efedef1a2ae915b (patch) | |
tree | cdbd09cac5f5d1c6eb5ec4257dc478c6acca70c5 /include/linux/mfd | |
parent | f3ae1c75203535f65448517e46c8dd70a56b6c71 (diff) | |
parent | 08ee80cc397ac1a306ca689a22ede954d92d0db1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (75 commits)
mmc: core: eMMC bus width may not work on all platforms
mmc: sdhci: Auto-CMD23 fixes.
mmc: sdhci: Auto-CMD23 support.
mmc: core: Block CMD23 support for UHS104/SDXC cards.
mmc: sdhci: Implement MMC_CAP_CMD23 for SDHCI.
mmc: core: Use CMD23 for multiblock transfers when we can.
mmc: quirks: Add/remove quirks conditional support.
mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver
mmc: sdhci-pxa: Add quirks for DMA/ADMA to match h/w
mmc: core: duplicated trial with same freq in mmc_rescan_try_freq()
mmc: core: add support for eMMC Dual Data Rate
mmc: core: eMMC signal voltage does not use CMD11
mmc: sdhci-pxa: add platform code for UHS signaling
mmc: sdhci: add hooks for setting UHS in platform specific code
mmc: core: clear MMC_PM_KEEP_POWER flag on resume
mmc: dw_mmc: fixed wrong regulator_enable in suspend/resume
mmc: sdhi: allow powering down controller with no card inserted
mmc: tmio: runtime suspend the controller, where possible
mmc: sdhi: support up to 3 interrupt sources
mmc: sdhi: print physical base address and clock rate
...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/tmio.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 8e70310ee945..5a90266c3a5a 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/fb.h> | 4 | #include <linux/fb.h> |
5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
6 | #include <linux/platform_device.h> | 6 | #include <linux/platform_device.h> |
7 | #include <linux/pm_runtime.h> | ||
7 | 8 | ||
8 | #define tmio_ioread8(addr) readb(addr) | 9 | #define tmio_ioread8(addr) readb(addr) |
9 | #define tmio_ioread16(addr) readw(addr) | 10 | #define tmio_ioread16(addr) readw(addr) |
@@ -61,6 +62,12 @@ | |||
61 | * Some controllers can support SDIO IRQ signalling. | 62 | * Some controllers can support SDIO IRQ signalling. |
62 | */ | 63 | */ |
63 | #define TMIO_MMC_SDIO_IRQ (1 << 2) | 64 | #define TMIO_MMC_SDIO_IRQ (1 << 2) |
65 | /* | ||
66 | * Some platforms can detect card insertion events with controller powered | ||
67 | * down, in which case they have to call tmio_mmc_cd_wakeup() to power up the | ||
68 | * controller and report the event to the driver. | ||
69 | */ | ||
70 | #define TMIO_MMC_HAS_COLD_CD (1 << 3) | ||
64 | 71 | ||
65 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 72 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
66 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | 73 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); |
@@ -82,11 +89,21 @@ struct tmio_mmc_data { | |||
82 | unsigned long flags; | 89 | unsigned long flags; |
83 | u32 ocr_mask; /* available voltages */ | 90 | u32 ocr_mask; /* available voltages */ |
84 | struct tmio_mmc_dma *dma; | 91 | struct tmio_mmc_dma *dma; |
92 | struct device *dev; | ||
93 | bool power; | ||
85 | void (*set_pwr)(struct platform_device *host, int state); | 94 | void (*set_pwr)(struct platform_device *host, int state); |
86 | void (*set_clk_div)(struct platform_device *host, int state); | 95 | void (*set_clk_div)(struct platform_device *host, int state); |
87 | int (*get_cd)(struct platform_device *host); | 96 | int (*get_cd)(struct platform_device *host); |
88 | }; | 97 | }; |
89 | 98 | ||
99 | static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata) | ||
100 | { | ||
101 | if (pdata && !pdata->power) { | ||
102 | pdata->power = true; | ||
103 | pm_runtime_get(pdata->dev); | ||
104 | } | ||
105 | } | ||
106 | |||
90 | /* | 107 | /* |
91 | * data for the NAND controller | 108 | * data for the NAND controller |
92 | */ | 109 | */ |