sdhci-esdhc.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Freescale eSDHC controller driver generics for OF and pltfm.
  3. *
  4. * Copyright (c) 2007 Freescale Semiconductor, Inc.
  5. * Copyright (c) 2009 MontaVista Software, Inc.
  6. * Copyright (c) 2010 Pengutronix e.K.
  7. * Author: Wolfram Sang <w.sang@pengutronix.de>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License.
  12. */
  13. #ifndef _DRIVERS_MMC_SDHCI_ESDHC_H
  14. #define _DRIVERS_MMC_SDHCI_ESDHC_H
  15. /*
  16. * Ops and quirks for the Freescale eSDHC controller.
  17. */
  18. #define ESDHC_DEFAULT_QUIRKS (SDHCI_QUIRK_FORCE_BLK_SZ_2048 | \
  19. SDHCI_QUIRK_NO_BUSY_IRQ | \
  20. SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | \
  21. SDHCI_QUIRK_PIO_NEEDS_DELAY)
  22. #define ESDHC_SYSTEM_CONTROL 0x2c
  23. #define ESDHC_CLOCK_MASK 0x0000fff0
  24. #define ESDHC_PREDIV_SHIFT 8
  25. #define ESDHC_DIVIDER_SHIFT 4
  26. #define ESDHC_CLOCK_PEREN 0x00000004
  27. #define ESDHC_CLOCK_HCKEN 0x00000002
  28. #define ESDHC_CLOCK_IPGEN 0x00000001
  29. /* pltfm-specific */
  30. #define ESDHC_HOST_CONTROL_LE 0x20
  31. /*
  32. * P2020 interpretation of the SDHCI_HOST_CONTROL register
  33. */
  34. #define ESDHC_CTRL_4BITBUS (0x1 << 1)
  35. #define ESDHC_CTRL_8BITBUS (0x2 << 1)
  36. #define ESDHC_CTRL_BUSWIDTH_MASK (0x3 << 1)
  37. /* OF-specific */
  38. #define ESDHC_DMA_SYSCTL 0x40c
  39. #define ESDHC_DMA_SNOOP 0x00000040
  40. #define ESDHC_HOST_CONTROL_RES 0x05
  41. #endif /* _DRIVERS_MMC_SDHCI_ESDHC_H */