summaryrefslogtreecommitdiff
path: root/include/linux/mmc/host.h
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2006-12-31 00:11:32 +0100
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:41:06 +0200
commit7ea239d9e6d6993469a6a8ca83ff23834dfc3fce (patch)
tree40629c00e317ca8f4ce0a6394dcb4b7535e7b7ab /include/linux/mmc/host.h
parentb2670b1c6ddd54be4a0f72f853122510ea5ef285 (diff)
mmc: add bus handler
Delegate protocol handling to "bus handlers". This allows the core to just handle the task of arbitrating the bus. Initialisation and pampering of cards is now done by the different bus handlers. This design also allows MMC and SD (and later SDIO) to be more cleanly separated, allowing easier maintenance. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r--include/linux/mmc/host.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 43bf6a5c398d..efae87b5c4e7 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -131,6 +131,8 @@ struct mmc_host {
unsigned int max_blk_count; /* maximum number of blocks in one req */
/* private data */
+ spinlock_t lock; /* lock for claim and bus ops */
+
struct mmc_ios ios; /* current io bus settings */
u32 ocr; /* the current OCR setting */
@@ -141,7 +143,6 @@ struct mmc_host {
struct mmc_card *card; /* device attached to this host */
wait_queue_head_t wq;
- spinlock_t lock; /* claimed lock */
unsigned int claimed:1; /* host exclusively claimed */
struct delayed_work detect;
@@ -149,6 +150,10 @@ struct mmc_host {
unsigned int removed:1; /* host is being removed */
#endif
+ const struct mmc_bus_ops *bus_ops; /* current bus driver */
+ unsigned int bus_refs; /* reference counter */
+ unsigned int bus_dead:1; /* bus has been released */
+
unsigned long private[0] ____cacheline_aligned;
};