Merge tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC updates from Chris Ball: Core: * Support for MMC 4.5 Data Tag feature -- we tag REQ_META, so devices that support Data Tag will provide increased throughput for metadata. * Faster detection of card removal on I/O errors. Drivers: * dw_mmc now supports eMMC Power Off Notify, has PCI support, and implements pre_req and post_req for asynchronous requests. * omap_hsmmc now supports device tree. * esdhc now has power management support. * sdhci-tegra now supports Tegra30 devices. * sdhci-spear now supports hibernation. * tmio_mmc now supports using a GPIO for card detection. * Intel PCH now supports 8-bit bus transfers. * tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits) mmc: sh_mmcif: simplify bitmask macros mmc: sh_mobile_sdhi: support modular mmc-core with non-standard hotplug mmc: sh_mobile_sdhi: add a callback for board specific init code mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function mmc: sh_mobile_sdhi: do not manage PM clocks manually mmc: tmio_mmc: remove unused sdio_irq_enabled flag mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper mmc: tmio: calculate the native hotplug condition only once mmc: simplify mmc_cd_gpio_request() by removing two parameters mmc: sdhci-pci: allow 8-bit bus width for Intel PCH mmc: sdhci: check interrupt flags in ISR again mmc: sdhci-pci: Add MSI support mmc: core: warn when card doesn't support HPI mmc: davinci: Poll status for small size transfers mmc: davinci: Eliminate spurious interrupts mmc: omap_hsmmc: Avoid a regulator voltage change with dt mmc: omap_hsmmc: Convert hsmmc driver to use device tree mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIO ...
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#ifndef MFD_TMIO_H
|
||||
#define MFD_TMIO_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
@@ -64,8 +66,8 @@
|
||||
#define TMIO_MMC_SDIO_IRQ (1 << 2)
|
||||
/*
|
||||
* Some platforms can detect card insertion events with controller powered
|
||||
* down, in which case they have to call tmio_mmc_cd_wakeup() to power up the
|
||||
* controller and report the event to the driver.
|
||||
* down, using a GPIO IRQ, in which case they have to fill in cd_irq, cd_gpio,
|
||||
* and cd_flags fields of struct tmio_mmc_data.
|
||||
*/
|
||||
#define TMIO_MMC_HAS_COLD_CD (1 << 3)
|
||||
/*
|
||||
@@ -73,6 +75,12 @@
|
||||
* idle before writing to some registers.
|
||||
*/
|
||||
#define TMIO_MMC_HAS_IDLE_WAIT (1 << 4)
|
||||
/*
|
||||
* A GPIO is used for card hotplug detection. We need an extra flag for this,
|
||||
* because 0 is a valid GPIO number too, and requiring users to specify
|
||||
* cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
|
||||
*/
|
||||
#define TMIO_MMC_USE_GPIO_CD (1 << 5)
|
||||
|
||||
int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
|
||||
int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
|
||||
@@ -97,19 +105,23 @@ struct tmio_mmc_data {
|
||||
u32 ocr_mask; /* available voltages */
|
||||
struct tmio_mmc_dma *dma;
|
||||
struct device *dev;
|
||||
bool power;
|
||||
unsigned int cd_gpio;
|
||||
void (*set_pwr)(struct platform_device *host, int state);
|
||||
void (*set_clk_div)(struct platform_device *host, int state);
|
||||
int (*get_cd)(struct platform_device *host);
|
||||
int (*write16_hook)(struct tmio_mmc_host *host, int addr);
|
||||
};
|
||||
|
||||
/*
|
||||
* This function is deprecated and will be removed soon. Please, convert your
|
||||
* platform to use drivers/mmc/core/cd-gpio.c
|
||||
*/
|
||||
#include <linux/mmc/host.h>
|
||||
static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata)
|
||||
{
|
||||
if (pdata && !pdata->power) {
|
||||
pdata->power = true;
|
||||
pm_runtime_get(pdata->dev);
|
||||
}
|
||||
if (pdata)
|
||||
mmc_detect_change(dev_get_drvdata(pdata->dev),
|
||||
msecs_to_jiffies(100));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user