summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-03 23:00:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-03 23:00:07 +0300
commite9e67a8b579d9605a3d06f7430dbb40465c97bf1 (patch)
treecd90f29814359440b0f46995216d523ff5d26730 /include
parentad6b646fe55c40ec193240b974561f0a3775d68d (diff)
parent418f19ea17a99421b22a64e101e14b6a16bed66d (diff)
downloadlinux-e9e67a8b579d9605a3d06f7430dbb40465c97bf1.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mmc: warn about voltage mismatches mmc_spi: Add support for OpenFirmware bindings pxamci: fix dma_unmap_sg length mmc_block: ensure all sectors that do not have errors are read drivers/mmc: Move a dereference below a NULL test sdhci: handle built-in sdhci with modular leds class mmc: balanc pci_iomap with pci_iounmap mmc_block: print better error messages mmc: Add mmc_vddrange_to_ocrmask() helper function ricoh_mmc: Handle newer models of Ricoh controllers mmc: Add 8-bit bus width support sdhci: activate led support also when module mmc: trivial annotation of 'blocks' pci: use pci_ioremap_bar() in drivers/mmc sdricoh_cs: Add support for Bay Controller devices mmc: at91_mci: reorder timer setup and mmc_add_host() call
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/core.h2
-rw-r--r--include/linux/mmc/host.h2
-rw-r--r--include/linux/spi/mmc_spi.h15
3 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 143cebf0586f..7ac8b500d55c 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -151,4 +151,6 @@ static inline void mmc_claim_host(struct mmc_host *host)
__mmc_claim_host(host, NULL);
}
+extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
+
#endif
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index f842f234e44f..4e457256bd33 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -41,6 +41,7 @@ struct mmc_ios {
#define MMC_BUS_WIDTH_1 0
#define MMC_BUS_WIDTH_4 2
+#define MMC_BUS_WIDTH_8 3
unsigned char timing; /* timing specification used */
@@ -116,6 +117,7 @@ struct mmc_host {
#define MMC_CAP_SDIO_IRQ (1 << 3) /* Can signal pending SDIO IRQs */
#define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */
#define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */
+#define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */
/* host specific block data */
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index a3626aedaec9..0f4eb165f254 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -1,9 +1,10 @@
#ifndef __LINUX_SPI_MMC_SPI_H
#define __LINUX_SPI_MMC_SPI_H
+#include <linux/device.h>
+#include <linux/spi/spi.h>
#include <linux/interrupt.h>
-struct device;
struct mmc_host;
/* Put this in platform_data of a device being used to manage an MMC/SD
@@ -41,4 +42,16 @@ struct mmc_spi_platform_data {
void (*setpower)(struct device *, unsigned int maskval);
};
+#ifdef CONFIG_OF
+extern struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi);
+extern void mmc_spi_put_pdata(struct spi_device *spi);
+#else
+static inline struct mmc_spi_platform_data *
+mmc_spi_get_pdata(struct spi_device *spi)
+{
+ return spi->dev.platform_data;
+}
+static inline void mmc_spi_put_pdata(struct spi_device *spi) {}
+#endif /* CONFIG_OF */
+
#endif /* __LINUX_SPI_MMC_SPI_H */