diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 15:13:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 15:13:20 -0400 |
commit | f6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c (patch) | |
tree | c5643fcdc884a8d0bfc3f1bc28039cab7394e5bc /include/linux/mmc | |
parent | 323ec001c6bb98eeabb5abbdbb8c8055d9496554 (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into core/generic-dma-coherent
Conflicts:
kernel/Makefile
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 32 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/sdio_func.h | 21 |
4 files changed, 39 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 | ||
137 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); | 137 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); |
138 | extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); | ||
138 | 139 | ||
139 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | 140 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); |
140 | extern void mmc_release_host(struct mmc_host *host); | 141 | extern 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 | ||
52 | struct mmc_host_ops { | 52 | struct 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); | |||
120 | extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); | 122 | extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); |
121 | extern int sdio_release_irq(struct sdio_func *func); | 123 | extern int sdio_release_irq(struct sdio_func *func); |
122 | 124 | ||
123 | extern unsigned char sdio_readb(struct sdio_func *func, | 125 | extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz); |
124 | unsigned int addr, int *err_ret); | 126 | |
125 | extern unsigned short sdio_readw(struct sdio_func *func, | 127 | extern u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret); |
126 | unsigned int addr, int *err_ret); | 128 | extern u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret); |
127 | extern unsigned long sdio_readl(struct sdio_func *func, | 129 | extern u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret); |
128 | unsigned int addr, int *err_ret); | ||
129 | 130 | ||
130 | extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, | 131 | extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, |
131 | unsigned int addr, int count); | 132 | unsigned int addr, int count); |
132 | extern int sdio_readsb(struct sdio_func *func, void *dst, | 133 | extern int sdio_readsb(struct sdio_func *func, void *dst, |
133 | unsigned int addr, int count); | 134 | unsigned int addr, int count); |
134 | 135 | ||
135 | extern void sdio_writeb(struct sdio_func *func, unsigned char b, | 136 | extern void sdio_writeb(struct sdio_func *func, u8 b, |
136 | unsigned int addr, int *err_ret); | 137 | unsigned int addr, int *err_ret); |
137 | extern void sdio_writew(struct sdio_func *func, unsigned short b, | 138 | extern void sdio_writew(struct sdio_func *func, u16 b, |
138 | unsigned int addr, int *err_ret); | 139 | unsigned int addr, int *err_ret); |
139 | extern void sdio_writel(struct sdio_func *func, unsigned long b, | 140 | extern 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 | ||
142 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, | 143 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, |