diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /include/linux/mmc | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/card.h | 7 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 5 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/pm.h | 30 | ||||
-rw-r--r-- | include/linux/mmc/sdio.h | 2 | ||||
-rw-r--r-- | include/linux/mmc/sdio_func.h | 5 | ||||
-rw-r--r-- | include/linux/mmc/sdio_ids.h | 1 |
7 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 2ee22e8af110..d02d2c6e0cfe 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -99,6 +99,8 @@ struct mmc_card { | |||
99 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 99 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ |
100 | unsigned int quirks; /* card quirks */ | 100 | unsigned int quirks; /* card quirks */ |
101 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | 101 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ |
102 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ | ||
103 | /* for byte mode */ | ||
102 | 104 | ||
103 | u32 raw_cid[4]; /* raw card CID */ | 105 | u32 raw_cid[4]; /* raw card CID */ |
104 | u32 raw_csd[4]; /* raw card CSD */ | 106 | u32 raw_csd[4]; /* raw card CSD */ |
@@ -139,6 +141,11 @@ static inline int mmc_card_lenient_fn0(const struct mmc_card *c) | |||
139 | return c->quirks & MMC_QUIRK_LENIENT_FN0; | 141 | return c->quirks & MMC_QUIRK_LENIENT_FN0; |
140 | } | 142 | } |
141 | 143 | ||
144 | static inline int mmc_blksz_for_byte_mode(const struct mmc_card *c) | ||
145 | { | ||
146 | return c->quirks & MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; | ||
147 | } | ||
148 | |||
142 | #define mmc_card_name(c) ((c)->cid.prod_name) | 149 | #define mmc_card_name(c) ((c)->cid.prod_name) |
143 | #define mmc_card_id(c) (dev_name(&(c)->dev)) | 150 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
144 | 151 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index eaf36364b7d4..43eaf5ca5848 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | 15 | ||
16 | #include <linux/mmc/core.h> | 16 | #include <linux/mmc/core.h> |
17 | #include <linux/mmc/pm.h> | ||
17 | 18 | ||
18 | struct mmc_ios { | 19 | struct mmc_ios { |
19 | unsigned int clock; /* clock rate */ | 20 | unsigned int clock; /* clock rate */ |
@@ -152,6 +153,8 @@ struct mmc_host { | |||
152 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 153 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
153 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 154 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
154 | 155 | ||
156 | mmc_pm_flag_t pm_caps; /* supported pm features */ | ||
157 | |||
155 | /* host specific block data */ | 158 | /* host specific block data */ |
156 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 159 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
157 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 160 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
@@ -197,6 +200,8 @@ struct mmc_host { | |||
197 | struct task_struct *sdio_irq_thread; | 200 | struct task_struct *sdio_irq_thread; |
198 | atomic_t sdio_irq_thread_abort; | 201 | atomic_t sdio_irq_thread_abort; |
199 | 202 | ||
203 | mmc_pm_flag_t pm_flags; /* requested pm features */ | ||
204 | |||
200 | #ifdef CONFIG_LEDS_TRIGGERS | 205 | #ifdef CONFIG_LEDS_TRIGGERS |
201 | struct led_trigger *led; /* activity led */ | 206 | struct led_trigger *led; /* activity led */ |
202 | #endif | 207 | #endif |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -268,6 +268,7 @@ struct _mmc_csd { | |||
268 | 268 | ||
269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
271 | 272 | ||
272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/mmc/pm.h b/include/linux/mmc/pm.h new file mode 100644 index 000000000000..d37aac49cf9a --- /dev/null +++ b/include/linux/mmc/pm.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * linux/include/linux/mmc/pm.h | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Copyright: (C) 2009 Marvell Technology Group Ltd. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef LINUX_MMC_PM_H | ||
13 | #define LINUX_MMC_PM_H | ||
14 | |||
15 | /* | ||
16 | * These flags are used to describe power management features that | ||
17 | * some cards (typically SDIO cards) might wish to benefit from when | ||
18 | * the host system is being suspended. There are several layers of | ||
19 | * abstractions involved, from the host controller driver, to the MMC core | ||
20 | * code, to the SDIO core code, to finally get to the actual SDIO function | ||
21 | * driver. This file is therefore used for common definitions shared across | ||
22 | * all those layers. | ||
23 | */ | ||
24 | |||
25 | typedef unsigned int mmc_pm_flag_t; | ||
26 | |||
27 | #define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */ | ||
28 | #define MMC_PM_WAKE_SDIO_IRQ (1 << 1) /* wake up host system on SDIO IRQ assertion */ | ||
29 | |||
30 | #endif | ||
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index 47ba464f5170..0ebaef577ff5 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
@@ -95,6 +95,8 @@ | |||
95 | #define SDIO_BUS_WIDTH_1BIT 0x00 | 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 |
96 | #define SDIO_BUS_WIDTH_4BIT 0x02 | 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 |
97 | 97 | ||
98 | #define SDIO_BUS_ASYNC_INT 0x20 | ||
99 | |||
98 | #define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */ | 100 | #define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */ |
99 | 101 | ||
100 | #define SDIO_CCCR_CAPS 0x08 | 102 | #define SDIO_CCCR_CAPS 0x08 |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index ac3ab683fec6..c6c0cceba5fe 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/mod_devicetable.h> | 16 | #include <linux/mod_devicetable.h> |
17 | 17 | ||
18 | #include <linux/mmc/pm.h> | ||
19 | |||
18 | struct mmc_card; | 20 | struct mmc_card; |
19 | struct sdio_func; | 21 | struct sdio_func; |
20 | 22 | ||
@@ -153,5 +155,8 @@ extern unsigned char sdio_f0_readb(struct sdio_func *func, | |||
153 | extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, | 155 | extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, |
154 | unsigned int addr, int *err_ret); | 156 | unsigned int addr, int *err_ret); |
155 | 157 | ||
158 | extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func); | ||
159 | extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags); | ||
160 | |||
156 | #endif | 161 | #endif |
157 | 162 | ||
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 2dbfb5a05994..33b2ea09a4ad 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 | 28 | #define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 |
29 | #define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 | 29 | #define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 |
30 | #define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 | 30 | #define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 |
31 | #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 0x1407 | ||
31 | 32 | ||
32 | #define SDIO_VENDOR_ID_MARVELL 0x02df | 33 | #define SDIO_VENDOR_ID_MARVELL 0x02df |
33 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 | 34 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 |