pxamci.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #define MMC_STRPCL 0x0000
  2. #define STOP_CLOCK (1 << 0)
  3. #define START_CLOCK (2 << 0)
  4. #define MMC_STAT 0x0004
  5. #define STAT_END_CMD_RES (1 << 13)
  6. #define STAT_PRG_DONE (1 << 12)
  7. #define STAT_DATA_TRAN_DONE (1 << 11)
  8. #define STAT_CLK_EN (1 << 8)
  9. #define STAT_RECV_FIFO_FULL (1 << 7)
  10. #define STAT_XMIT_FIFO_EMPTY (1 << 6)
  11. #define STAT_RES_CRC_ERR (1 << 5)
  12. #define STAT_SPI_READ_ERROR_TOKEN (1 << 4)
  13. #define STAT_CRC_READ_ERROR (1 << 3)
  14. #define STAT_CRC_WRITE_ERROR (1 << 2)
  15. #define STAT_TIME_OUT_RESPONSE (1 << 1)
  16. #define STAT_READ_TIME_OUT (1 << 0)
  17. #define MMC_CLKRT 0x0008 /* 3 bit */
  18. #define MMC_SPI 0x000c
  19. #define SPI_CS_ADDRESS (1 << 3)
  20. #define SPI_CS_EN (1 << 2)
  21. #define CRC_ON (1 << 1)
  22. #define SPI_EN (1 << 0)
  23. #define MMC_CMDAT 0x0010
  24. #define CMDAT_SDIO_INT_EN (1 << 11)
  25. #define CMDAT_SD_4DAT (1 << 8)
  26. #define CMDAT_DMAEN (1 << 7)
  27. #define CMDAT_INIT (1 << 6)
  28. #define CMDAT_BUSY (1 << 5)
  29. #define CMDAT_STREAM (1 << 4) /* 1 = stream */
  30. #define CMDAT_WRITE (1 << 3) /* 1 = write */
  31. #define CMDAT_DATAEN (1 << 2)
  32. #define CMDAT_RESP_NONE (0 << 0)
  33. #define CMDAT_RESP_SHORT (1 << 0)
  34. #define CMDAT_RESP_R2 (2 << 0)
  35. #define CMDAT_RESP_R3 (3 << 0)
  36. #define MMC_RESTO 0x0014 /* 7 bit */
  37. #define MMC_RDTO 0x0018 /* 16 bit */
  38. #define MMC_BLKLEN 0x001c /* 10 bit */
  39. #define MMC_NOB 0x0020 /* 16 bit */
  40. #define MMC_PRTBUF 0x0024
  41. #define BUF_PART_FULL (1 << 0)
  42. #define MMC_I_MASK 0x0028
  43. /*PXA27x MMC interrupts*/
  44. #define SDIO_SUSPEND_ACK (1 << 12)
  45. #define SDIO_INT (1 << 11)
  46. #define RD_STALLED (1 << 10)
  47. #define RES_ERR (1 << 9)
  48. #define DAT_ERR (1 << 8)
  49. #define TINT (1 << 7)
  50. /*PXA2xx MMC interrupts*/
  51. #define TXFIFO_WR_REQ (1 << 6)
  52. #define RXFIFO_RD_REQ (1 << 5)
  53. #define CLK_IS_OFF (1 << 4)
  54. #define STOP_CMD (1 << 3)
  55. #define END_CMD_RES (1 << 2)
  56. #define PRG_DONE (1 << 1)
  57. #define DATA_TRAN_DONE (1 << 0)
  58. #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
  59. #define MMC_I_MASK_ALL 0x00001fff
  60. #else
  61. #define MMC_I_MASK_ALL 0x0000007f
  62. #endif
  63. #define MMC_I_REG 0x002c
  64. /* same as MMC_I_MASK */
  65. #define MMC_CMD 0x0030
  66. #define MMC_ARGH 0x0034 /* 16 bit */
  67. #define MMC_ARGL 0x0038 /* 16 bit */
  68. #define MMC_RES 0x003c /* 16 bit */
  69. #define MMC_RXFIFO 0x0040 /* 8 bit */
  70. #define MMC_TXFIFO 0x0044 /* 8 bit */