sdhci-s3c-regs.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* linux/arch/arm/plat-s3c/include/plat/regs-sdhci.h
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * http://armlinux.simtec.co.uk/
  6. * Ben Dooks <ben@simtec.co.uk>
  7. *
  8. * S3C Platform - SDHCI (HSMMC) register definitions
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef __PLAT_S3C_SDHCI_REGS_H
  15. #define __PLAT_S3C_SDHCI_REGS_H __FILE__
  16. #define S3C_SDHCI_CONTROL2 (0x80)
  17. #define S3C_SDHCI_CONTROL3 (0x84)
  18. #define S3C64XX_SDHCI_CONTROL4 (0x8C)
  19. #define S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR (1 << 31)
  20. #define S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK (1 << 30)
  21. #define S3C_SDHCI_CTRL2_CDINVRXD3 (1 << 29)
  22. #define S3C_SDHCI_CTRL2_SLCARDOUT (1 << 28)
  23. #define S3C_SDHCI_CTRL2_FLTCLKSEL_MASK (0xf << 24)
  24. #define S3C_SDHCI_CTRL2_FLTCLKSEL_SHIFT (24)
  25. #define S3C_SDHCI_CTRL2_FLTCLKSEL(_x) ((_x) << 24)
  26. #define S3C_SDHCI_CTRL2_LVLDAT_MASK (0xff << 16)
  27. #define S3C_SDHCI_CTRL2_LVLDAT_SHIFT (16)
  28. #define S3C_SDHCI_CTRL2_LVLDAT(_x) ((_x) << 16)
  29. #define S3C_SDHCI_CTRL2_ENFBCLKTX (1 << 15)
  30. #define S3C_SDHCI_CTRL2_ENFBCLKRX (1 << 14)
  31. #define S3C_SDHCI_CTRL2_SDCDSEL (1 << 13)
  32. #define S3C_SDHCI_CTRL2_SDSIGPC (1 << 12)
  33. #define S3C_SDHCI_CTRL2_ENBUSYCHKTXSTART (1 << 11)
  34. #define S3C_SDHCI_CTRL2_DFCNT_MASK (0x3 << 9)
  35. #define S3C_SDHCI_CTRL2_DFCNT_SHIFT (9)
  36. #define S3C_SDHCI_CTRL2_DFCNT_NONE (0x0 << 9)
  37. #define S3C_SDHCI_CTRL2_DFCNT_4SDCLK (0x1 << 9)
  38. #define S3C_SDHCI_CTRL2_DFCNT_16SDCLK (0x2 << 9)
  39. #define S3C_SDHCI_CTRL2_DFCNT_64SDCLK (0x3 << 9)
  40. #define S3C_SDHCI_CTRL2_ENCLKOUTHOLD (1 << 8)
  41. #define S3C_SDHCI_CTRL2_RWAITMODE (1 << 7)
  42. #define S3C_SDHCI_CTRL2_DISBUFRD (1 << 6)
  43. #define S3C_SDHCI_CTRL2_SELBASECLK_MASK (0x3 << 4)
  44. #define S3C_SDHCI_CTRL2_SELBASECLK_SHIFT (4)
  45. #define S3C_SDHCI_CTRL2_PWRSYNC (1 << 3)
  46. #define S3C_SDHCI_CTRL2_ENCLKOUTMSKCON (1 << 1)
  47. #define S3C_SDHCI_CTRL2_HWINITFIN (1 << 0)
  48. #define S3C_SDHCI_CTRL3_FCSEL3 (1 << 31)
  49. #define S3C_SDHCI_CTRL3_FCSEL2 (1 << 23)
  50. #define S3C_SDHCI_CTRL3_FCSEL1 (1 << 15)
  51. #define S3C_SDHCI_CTRL3_FCSEL0 (1 << 7)
  52. #define S3C_SDHCI_CTRL3_FIA3_MASK (0x7f << 24)
  53. #define S3C_SDHCI_CTRL3_FIA3_SHIFT (24)
  54. #define S3C_SDHCI_CTRL3_FIA3(_x) ((_x) << 24)
  55. #define S3C_SDHCI_CTRL3_FIA2_MASK (0x7f << 16)
  56. #define S3C_SDHCI_CTRL3_FIA2_SHIFT (16)
  57. #define S3C_SDHCI_CTRL3_FIA2(_x) ((_x) << 16)
  58. #define S3C_SDHCI_CTRL3_FIA1_MASK (0x7f << 8)
  59. #define S3C_SDHCI_CTRL3_FIA1_SHIFT (8)
  60. #define S3C_SDHCI_CTRL3_FIA1(_x) ((_x) << 8)
  61. #define S3C_SDHCI_CTRL3_FIA0_MASK (0x7f << 0)
  62. #define S3C_SDHCI_CTRL3_FIA0_SHIFT (0)
  63. #define S3C_SDHCI_CTRL3_FIA0(_x) ((_x) << 0)
  64. #define S3C64XX_SDHCI_CONTROL4_DRIVE_MASK (0x3 << 16)
  65. #define S3C64XX_SDHCI_CONTROL4_DRIVE_SHIFT (16)
  66. #define S3C64XX_SDHCI_CONTROL4_DRIVE_2mA (0x0 << 16)
  67. #define S3C64XX_SDHCI_CONTROL4_DRIVE_4mA (0x1 << 16)
  68. #define S3C64XX_SDHCI_CONTROL4_DRIVE_7mA (0x2 << 16)
  69. #define S3C64XX_SDHCI_CONTROL4_DRIVE_9mA (0x3 << 16)
  70. #define S3C64XX_SDHCI_CONTROL4_BUSY (1)
  71. #endif /* __PLAT_S3C_SDHCI_REGS_H */