aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/host.h32
-rw-r--r--include/linux/mmc/mmc.h1
-rw-r--r--include/linux/mmc/sdio_func.h21
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/spi/mmc_spi.h9
6 files changed, 49 insertions, 16 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index d0c3abed74c2..143cebf0586f 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -135,6 +135,7 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
135 struct mmc_command *, int); 135 struct mmc_command *, int);
136 136
137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); 137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *);
138extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
138 139
139extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 140extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
140extern void mmc_release_host(struct mmc_host *host); 141extern void mmc_release_host(struct mmc_host *host);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7ab962fa1d73..10a2080086ca 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -51,8 +51,30 @@ struct mmc_ios {
51 51
52struct mmc_host_ops { 52struct mmc_host_ops {
53 void (*request)(struct mmc_host *host, struct mmc_request *req); 53 void (*request)(struct mmc_host *host, struct mmc_request *req);
54 /*
55 * Avoid calling these three functions too often or in a "fast path",
56 * since underlaying controller might implement them in an expensive
57 * and/or slow way.
58 *
59 * Also note that these functions might sleep, so don't call them
60 * in the atomic contexts!
61 *
62 * Return values for the get_ro callback should be:
63 * 0 for a read/write card
64 * 1 for a read-only card
65 * -ENOSYS when not supported (equal to NULL callback)
66 * or a negative errno value when something bad happened
67 *
68 * Return values for the get_ro callback should be:
69 * 0 for a absent card
70 * 1 for a present card
71 * -ENOSYS when not supported (equal to NULL callback)
72 * or a negative errno value when something bad happened
73 */
54 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); 74 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
55 int (*get_ro)(struct mmc_host *host); 75 int (*get_ro)(struct mmc_host *host);
76 int (*get_cd)(struct mmc_host *host);
77
56 void (*enable_sdio_irq)(struct mmc_host *host, int enable); 78 void (*enable_sdio_irq)(struct mmc_host *host, int enable);
57}; 79};
58 80
@@ -89,11 +111,11 @@ struct mmc_host {
89 unsigned long caps; /* Host capabilities */ 111 unsigned long caps; /* Host capabilities */
90 112
91#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ 113#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
92#define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ 114#define MMC_CAP_MMC_HIGHSPEED (1 << 1) /* Can do MMC high-speed timing */
93#define MMC_CAP_MMC_HIGHSPEED (1 << 2) /* Can do MMC high-speed timing */ 115#define MMC_CAP_SD_HIGHSPEED (1 << 2) /* Can do SD high-speed timing */
94#define MMC_CAP_SD_HIGHSPEED (1 << 3) /* Can do SD high-speed timing */ 116#define MMC_CAP_SDIO_IRQ (1 << 3) /* Can signal pending SDIO IRQs */
95#define MMC_CAP_SDIO_IRQ (1 << 4) /* Can signal pending SDIO IRQs */ 117#define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */
96#define MMC_CAP_SPI (1 << 5) /* Talks only SPI protocols */ 118#define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */
97 119
98 /* host specific block data */ 120 /* host specific block data */
99 unsigned int max_seg_size; /* see blk_queue_max_segment_size */ 121 unsigned int max_seg_size; /* see blk_queue_max_segment_size */
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 4236fbf0b6fb..14b81f3e5232 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -16,7 +16,6 @@
16 * Based strongly on code by: 16 * Based strongly on code by:
17 * 17 *
18 * Author: Yong-iL Joh <tolkien@mizi.com> 18 * Author: Yong-iL Joh <tolkien@mizi.com>
19 * Date : $Date: 2002/06/18 12:37:30 $
20 * 19 *
21 * Author: Andrew Christian 20 * Author: Andrew Christian
22 * 15 May 2002 21 * 15 May 2002
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index b050f4d7b41f..07bee4a0d457 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * include/linux/mmc/sdio_func.h 2 * include/linux/mmc/sdio_func.h
3 * 3 *
4 * Copyright 2007 Pierre Ossman 4 * Copyright 2007-2008 Pierre Ossman
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -46,6 +46,8 @@ struct sdio_func {
46 unsigned max_blksize; /* maximum block size */ 46 unsigned max_blksize; /* maximum block size */
47 unsigned cur_blksize; /* current block size */ 47 unsigned cur_blksize; /* current block size */
48 48
49 unsigned enable_timeout; /* max enable timeout in msec */
50
49 unsigned int state; /* function state */ 51 unsigned int state; /* function state */
50#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ 52#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
51 53
@@ -120,23 +122,22 @@ extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz);
120extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); 122extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
121extern int sdio_release_irq(struct sdio_func *func); 123extern int sdio_release_irq(struct sdio_func *func);
122 124
123extern unsigned char sdio_readb(struct sdio_func *func, 125extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
124 unsigned int addr, int *err_ret); 126
125extern unsigned short sdio_readw(struct sdio_func *func, 127extern u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret);
126 unsigned int addr, int *err_ret); 128extern u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret);
127extern unsigned long sdio_readl(struct sdio_func *func, 129extern u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret);
128 unsigned int addr, int *err_ret);
129 130
130extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, 131extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst,
131 unsigned int addr, int count); 132 unsigned int addr, int count);
132extern int sdio_readsb(struct sdio_func *func, void *dst, 133extern int sdio_readsb(struct sdio_func *func, void *dst,
133 unsigned int addr, int count); 134 unsigned int addr, int count);
134 135
135extern void sdio_writeb(struct sdio_func *func, unsigned char b, 136extern void sdio_writeb(struct sdio_func *func, u8 b,
136 unsigned int addr, int *err_ret); 137 unsigned int addr, int *err_ret);
137extern void sdio_writew(struct sdio_func *func, unsigned short b, 138extern void sdio_writew(struct sdio_func *func, u16 b,
138 unsigned int addr, int *err_ret); 139 unsigned int addr, int *err_ret);
139extern void sdio_writel(struct sdio_func *func, unsigned long b, 140extern void sdio_writel(struct sdio_func *func, u32 b,
140 unsigned int addr, int *err_ret); 141 unsigned int addr, int *err_ret);
141 142
142extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, 143extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1cf4084b51e8..6be6a7943d8b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2190,6 +2190,7 @@
2190#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 2190#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
2191#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 2191#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
2192#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 2192#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381
2193#define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382
2193#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 2194#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383
2194 2195
2195#define PCI_VENDOR_ID_KORENIX 0x1982 2196#define PCI_VENDOR_ID_KORENIX 0x1982
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index d5ca78b93a3b..a3626aedaec9 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -23,6 +23,15 @@ struct mmc_spi_platform_data {
23 /* sense switch on sd cards */ 23 /* sense switch on sd cards */
24 int (*get_ro)(struct device *); 24 int (*get_ro)(struct device *);
25 25
26 /*
27 * If board does not use CD interrupts, driver can optimize polling
28 * using this function.
29 */
30 int (*get_cd)(struct device *);
31
32 /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
33 unsigned long caps;
34
26 /* how long to debounce card detect, in msecs */ 35 /* how long to debounce card detect, in msecs */
27 u16 detect_delay; 36 u16 detect_delay;
28 37