blob: 3cac4506f8f9ef2a9faac4d7d3d09ecb29489db7 [file] [log] [blame]
Anton Vorontsov515033f2010-08-10 18:01:47 -07001/*
2 * Copyright 2010 MontaVista Software, LLC.
3 *
4 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef _DRIVERS_MMC_SDHCI_PLTFM_H
12#define _DRIVERS_MMC_SDHCI_PLTFM_H
13
Wolfram Sang4b711cb2010-10-15 12:20:59 +020014#include <linux/clk.h>
15#include <linux/types.h>
Shawn Guo85d65092011-05-27 23:48:12 +080016#include <linux/platform_device.h>
Wolfram Sangd3b993d2010-10-15 12:21:00 +020017#include <linux/mmc/sdhci-pltfm.h>
Anton Vorontsov20b1597b2010-08-10 18:01:49 -070018
Wolfram Sang4b711cb2010-10-15 12:20:59 +020019struct sdhci_pltfm_host {
20 struct clk *clk;
Richard Zhue1498602011-03-25 09:18:27 -040021 void *priv; /* to handle quirks across io-accessor calls */
Shawn Guoe3071482011-07-20 17:13:36 -040022
23 /* migrate from sdhci_of_host */
24 unsigned int clock;
25 u16 xfer_mode_shadow;
Wolfram Sang4b711cb2010-10-15 12:20:59 +020026};
27
Shawn Guo85d65092011-05-27 23:48:12 +080028extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
29 struct sdhci_pltfm_data *pdata);
30extern void sdhci_pltfm_free(struct platform_device *pdev);
31
32extern int sdhci_pltfm_register(struct platform_device *pdev,
33 struct sdhci_pltfm_data *pdata);
34extern int sdhci_pltfm_unregister(struct platform_device *pdev);
35
36#ifdef CONFIG_PM
37extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state);
38extern int sdhci_pltfm_resume(struct platform_device *dev);
39#endif
Anton Vorontsov20b1597b2010-08-10 18:01:49 -070040
Anton Vorontsov515033f2010-08-10 18:01:47 -070041#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */