blob: fb8a5cd2e4a1e87bfab9439f8c9e44a3d75ee4b4 [file] [log] [blame]
Pierre Ossmanb93931a2007-05-19 14:06:24 +02001/*
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 Walleij04566832010-11-08 21:36:50 -050013#include <linux/mmc/host.h>
Pierre Ossmanb93931a2007-05-19 14:06:24 +020014
15int mmc_register_host_class(void);
16void mmc_unregister_host_class(void);
17
Linus Walleij04566832010-11-08 21:36:50 -050018#ifdef CONFIG_MMC_CLKGATE
Mika Westerberg08c14072011-08-18 15:23:47 +030019void mmc_host_clk_hold(struct mmc_host *host);
20void mmc_host_clk_release(struct mmc_host *host);
Linus Walleij04566832010-11-08 21:36:50 -050021unsigned int mmc_host_clk_rate(struct mmc_host *host);
22
23#else
Mika Westerberg08c14072011-08-18 15:23:47 +030024static inline void mmc_host_clk_hold(struct mmc_host *host)
Linus Walleij04566832010-11-08 21:36:50 -050025{
26}
27
Mika Westerberg08c14072011-08-18 15:23:47 +030028static inline void mmc_host_clk_release(struct mmc_host *host)
Linus Walleij04566832010-11-08 21:36:50 -050029{
30}
31
32static inline unsigned int mmc_host_clk_rate(struct mmc_host *host)
33{
34 return host->ios.clock;
35}
36#endif
37
Adrian Hunter8ea926b2009-09-22 16:44:29 -070038void mmc_host_deeper_disable(struct work_struct *work);
39
Pierre Ossmanb93931a2007-05-19 14:06:24 +020040#endif
41