mmc: Separate out protocol ops
[safe/jmp/linux-2.6] / drivers / mmc / core / core.h
1 /*
2  *  linux/drivers/mmc/core/core.h
3  *
4  *  Copyright (C) 2003 Russell King, All Rights Reserved.
5  *  Copyright 2007 Pierre Ossman
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 #ifndef _MMC_CORE_CORE_H
12 #define _MMC_CORE_CORE_H
13
14 #include <linux/delay.h>
15
16 #define MMC_CMD_RETRIES        3
17
18 void mmc_set_chip_select(struct mmc_host *host, int mode);
19
20 static inline void mmc_delay(unsigned int ms)
21 {
22         if (ms < 1000 / HZ) {
23                 cond_resched();
24                 mdelay(ms);
25         } else {
26                 msleep(ms);
27         }
28 }
29
30 #endif
31