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> 18*38576af1SShawn Guo #include <linux/mmc/sdhci.h> 1920b1597bSAnton Vorontsov 204b711cb1SWolfram Sang struct sdhci_pltfm_host { 214b711cb1SWolfram Sang struct clk *clk; 22e149860dSRichard Zhu void *priv; /* to handle quirks across io-accessor calls */ 23e307148fSShawn Guo 24e307148fSShawn Guo /* migrate from sdhci_of_host */ 25e307148fSShawn Guo unsigned int clock; 26e307148fSShawn Guo u16 xfer_mode_shadow; 274b711cb1SWolfram Sang }; 284b711cb1SWolfram Sang 29*38576af1SShawn Guo #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER 30*38576af1SShawn Guo extern u32 sdhci_be32bs_readl(struct sdhci_host *host, int reg); 31*38576af1SShawn Guo extern u16 sdhci_be32bs_readw(struct sdhci_host *host, int reg); 32*38576af1SShawn Guo extern u8 sdhci_be32bs_readb(struct sdhci_host *host, int reg); 33*38576af1SShawn Guo extern void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg); 34*38576af1SShawn Guo extern void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg); 35*38576af1SShawn Guo extern void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg); 36*38576af1SShawn Guo #endif 37*38576af1SShawn Guo 38*38576af1SShawn Guo extern void sdhci_get_of_property(struct platform_device *pdev); 39*38576af1SShawn Guo 4085d6509dSShawn Guo extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, 4185d6509dSShawn Guo struct sdhci_pltfm_data *pdata); 4285d6509dSShawn Guo extern void sdhci_pltfm_free(struct platform_device *pdev); 4385d6509dSShawn Guo 4485d6509dSShawn Guo extern int sdhci_pltfm_register(struct platform_device *pdev, 4585d6509dSShawn Guo struct sdhci_pltfm_data *pdata); 4685d6509dSShawn Guo extern int sdhci_pltfm_unregister(struct platform_device *pdev); 4785d6509dSShawn Guo 4885d6509dSShawn Guo #ifdef CONFIG_PM 4985d6509dSShawn Guo extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state); 5085d6509dSShawn Guo extern int sdhci_pltfm_resume(struct platform_device *dev); 5185d6509dSShawn Guo #endif 5220b1597bSAnton Vorontsov 53515033f9SAnton Vorontsov #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ 54