Pierre Ossman | b93931a | 2007-05-19 14:06:24 +0200 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/mmc/core/host.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_HOST_H |
| 12 | #define _MMC_CORE_HOST_H |
Linus Walleij | 0456683 | 2010-11-08 21:36:50 -0500 | [diff] [blame] | 13 | #include <linux/mmc/host.h> |
Pierre Ossman | b93931a | 2007-05-19 14:06:24 +0200 | [diff] [blame] | 14 | |
| 15 | int mmc_register_host_class(void); |
| 16 | void mmc_unregister_host_class(void); |
| 17 | |
Linus Walleij | 0456683 | 2010-11-08 21:36:50 -0500 | [diff] [blame] | 18 | #ifdef CONFIG_MMC_CLKGATE |
Mika Westerberg | 08c1407 | 2011-08-18 15:23:47 +0300 | [diff] [blame^] | 19 | void mmc_host_clk_hold(struct mmc_host *host); |
| 20 | void mmc_host_clk_release(struct mmc_host *host); |
Linus Walleij | 0456683 | 2010-11-08 21:36:50 -0500 | [diff] [blame] | 21 | unsigned int mmc_host_clk_rate(struct mmc_host *host); |
| 22 | |
| 23 | #else |
Mika Westerberg | 08c1407 | 2011-08-18 15:23:47 +0300 | [diff] [blame^] | 24 | static inline void mmc_host_clk_hold(struct mmc_host *host) |
Linus Walleij | 0456683 | 2010-11-08 21:36:50 -0500 | [diff] [blame] | 25 | { |
| 26 | } |
| 27 | |
Mika Westerberg | 08c1407 | 2011-08-18 15:23:47 +0300 | [diff] [blame^] | 28 | static inline void mmc_host_clk_release(struct mmc_host *host) |
Linus Walleij | 0456683 | 2010-11-08 21:36:50 -0500 | [diff] [blame] | 29 | { |
| 30 | } |
| 31 | |
| 32 | static inline unsigned int mmc_host_clk_rate(struct mmc_host *host) |
| 33 | { |
| 34 | return host->ios.clock; |
| 35 | } |
| 36 | #endif |
| 37 | |
Adrian Hunter | 8ea926b | 2009-09-22 16:44:29 -0700 | [diff] [blame] | 38 | void mmc_host_deeper_disable(struct work_struct *work); |
| 39 | |
Pierre Ossman | b93931a | 2007-05-19 14:06:24 +0200 | [diff] [blame] | 40 | #endif |
| 41 | |