xref: /openbmc/linux/drivers/mmc/host/sdhci-pltfm.h (revision e307148f)
1515033f9SAnton Vorontsov /*
2515033f9SAnton Vorontsov  * Copyright 2010 MontaVista Software, LLC.
3515033f9SAnton Vorontsov  *
4515033f9SAnton Vorontsov  * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
5515033f9SAnton Vorontsov  *
6515033f9SAnton Vorontsov  * This program is free software; you can redistribute it and/or modify
7515033f9SAnton Vorontsov  * it under the terms of the GNU General Public License version 2 as
8515033f9SAnton Vorontsov  * published by the Free Software Foundation.
9515033f9SAnton Vorontsov  */
10515033f9SAnton Vorontsov 
11515033f9SAnton Vorontsov #ifndef _DRIVERS_MMC_SDHCI_PLTFM_H
12515033f9SAnton Vorontsov #define _DRIVERS_MMC_SDHCI_PLTFM_H
13515033f9SAnton Vorontsov 
144b711cb1SWolfram Sang #include <linux/clk.h>
154b711cb1SWolfram Sang #include <linux/types.h>
1685d6509dSShawn Guo #include <linux/platform_device.h>
17d3b993dcSWolfram Sang #include <linux/mmc/sdhci-pltfm.h>
1820b1597bSAnton Vorontsov 
194b711cb1SWolfram Sang struct sdhci_pltfm_host {
204b711cb1SWolfram Sang 	struct clk *clk;
21e149860dSRichard Zhu 	void *priv; /* to handle quirks across io-accessor calls */
22e307148fSShawn Guo 
23e307148fSShawn Guo 	/* migrate from sdhci_of_host */
24e307148fSShawn Guo 	unsigned int clock;
25e307148fSShawn Guo 	u16 xfer_mode_shadow;
264b711cb1SWolfram Sang };
274b711cb1SWolfram Sang 
2885d6509dSShawn Guo extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
2985d6509dSShawn Guo 					   struct sdhci_pltfm_data *pdata);
3085d6509dSShawn Guo extern void sdhci_pltfm_free(struct platform_device *pdev);
3185d6509dSShawn Guo 
3285d6509dSShawn Guo extern int sdhci_pltfm_register(struct platform_device *pdev,
3385d6509dSShawn Guo 				struct sdhci_pltfm_data *pdata);
3485d6509dSShawn Guo extern int sdhci_pltfm_unregister(struct platform_device *pdev);
3585d6509dSShawn Guo 
3685d6509dSShawn Guo #ifdef CONFIG_PM
3785d6509dSShawn Guo extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state);
3885d6509dSShawn Guo extern int sdhci_pltfm_resume(struct platform_device *dev);
3985d6509dSShawn Guo #endif
4020b1597bSAnton Vorontsov 
41515033f9SAnton Vorontsov #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
42