sdhci-pltfm.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  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. #ifndef _DRIVERS_MMC_SDHCI_PLTFM_H
  11. #define _DRIVERS_MMC_SDHCI_PLTFM_H
  12. #include <linux/clk.h>
  13. #include <linux/types.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/mmc/sdhci-pltfm.h>
  16. #include <linux/mmc/sdhci.h>
  17. struct sdhci_pltfm_host {
  18. struct clk *clk;
  19. void *priv; /* to handle quirks across io-accessor calls */
  20. /* migrate from sdhci_of_host */
  21. unsigned int clock;
  22. u16 xfer_mode_shadow;
  23. };
  24. #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
  25. extern u32 sdhci_be32bs_readl(struct sdhci_host *host, int reg);
  26. extern u16 sdhci_be32bs_readw(struct sdhci_host *host, int reg);
  27. extern u8 sdhci_be32bs_readb(struct sdhci_host *host, int reg);
  28. extern void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg);
  29. extern void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg);
  30. extern void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg);
  31. #endif
  32. extern void sdhci_get_of_property(struct platform_device *pdev);
  33. extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
  34. struct sdhci_pltfm_data *pdata);
  35. extern void sdhci_pltfm_free(struct platform_device *pdev);
  36. extern int sdhci_pltfm_register(struct platform_device *pdev,
  37. struct sdhci_pltfm_data *pdata);
  38. extern int sdhci_pltfm_unregister(struct platform_device *pdev);
  39. #ifdef CONFIG_PM
  40. extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state);
  41. extern int sdhci_pltfm_resume(struct platform_device *dev);
  42. #endif
  43. #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */