regs-ssp.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * stmp37xx: SSP register definitions
  3. *
  4. * Copyright (c) 2008 Freescale Semiconductor
  5. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #define REGS_SSP_BASE (STMP3XXX_REGS_BASE + 0x10000)
  22. #define REGS_SSP1_PHYS 0x80010000
  23. #define REGS_SSP2_PHYS 0x80034000
  24. #define REGS_SSP_SIZE 0x2000
  25. #define HW_SSP_CTRL0 0x0
  26. #define BM_SSP_CTRL0_XFER_COUNT 0x0000FFFF
  27. #define BP_SSP_CTRL0_XFER_COUNT 0
  28. #define BM_SSP_CTRL0_ENABLE 0x00010000
  29. #define BM_SSP_CTRL0_GET_RESP 0x00020000
  30. #define BM_SSP_CTRL0_LONG_RESP 0x00080000
  31. #define BM_SSP_CTRL0_WAIT_FOR_CMD 0x00100000
  32. #define BM_SSP_CTRL0_WAIT_FOR_IRQ 0x00200000
  33. #define BM_SSP_CTRL0_BUS_WIDTH 0x00C00000
  34. #define BP_SSP_CTRL0_BUS_WIDTH 22
  35. #define BM_SSP_CTRL0_DATA_XFER 0x01000000
  36. #define BM_SSP_CTRL0_READ 0x02000000
  37. #define BM_SSP_CTRL0_IGNORE_CRC 0x04000000
  38. #define BM_SSP_CTRL0_LOCK_CS 0x08000000
  39. #define BM_SSP_CTRL0_RUN 0x20000000
  40. #define BM_SSP_CTRL0_CLKGATE 0x40000000
  41. #define BM_SSP_CTRL0_SFTRST 0x80000000
  42. #define HW_SSP_CMD0 0x10
  43. #define BM_SSP_CMD0_CMD 0x000000FF
  44. #define BP_SSP_CMD0_CMD 0
  45. #define BM_SSP_CMD0_BLOCK_COUNT 0x0000FF00
  46. #define BP_SSP_CMD0_BLOCK_COUNT 8
  47. #define BM_SSP_CMD0_BLOCK_SIZE 0x000F0000
  48. #define BP_SSP_CMD0_BLOCK_SIZE 16
  49. #define BM_SSP_CMD0_APPEND_8CYC 0x00100000
  50. #define BM_SSP_CMD1_CMD_ARG 0xFFFFFFFF
  51. #define BP_SSP_CMD1_CMD_ARG 0
  52. #define HW_SSP_TIMING 0x50
  53. #define BM_SSP_TIMING_CLOCK_RATE 0x000000FF
  54. #define BP_SSP_TIMING_CLOCK_RATE 0
  55. #define BM_SSP_TIMING_CLOCK_DIVIDE 0x0000FF00
  56. #define BP_SSP_TIMING_CLOCK_DIVIDE 8
  57. #define BM_SSP_TIMING_TIMEOUT 0xFFFF0000
  58. #define BP_SSP_TIMING_TIMEOUT 16
  59. #define HW_SSP_CTRL1 0x60
  60. #define BM_SSP_CTRL1_SSP_MODE 0x0000000F
  61. #define BP_SSP_CTRL1_SSP_MODE 0
  62. #define BM_SSP_CTRL1_WORD_LENGTH 0x000000F0
  63. #define BP_SSP_CTRL1_WORD_LENGTH 4
  64. #define BM_SSP_CTRL1_POLARITY 0x00000200
  65. #define BM_SSP_CTRL1_PHASE 0x00000400
  66. #define BM_SSP_CTRL1_DMA_ENABLE 0x00002000
  67. #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ 0x00008000
  68. #define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN 0x00010000
  69. #define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ 0x00020000
  70. #define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ 0x00200000
  71. #define BM_SSP_CTRL1_DATA_CRC_IRQ_EN 0x00400000
  72. #define BM_SSP_CTRL1_DATA_CRC_IRQ 0x00800000
  73. #define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN 0x01000000
  74. #define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ 0x02000000
  75. #define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN 0x04000000
  76. #define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ 0x08000000
  77. #define BM_SSP_CTRL1_RESP_ERR_IRQ_EN 0x10000000
  78. #define BM_SSP_CTRL1_RESP_ERR_IRQ 0x20000000
  79. #define BM_SSP_CTRL1_SDIO_IRQ 0x80000000
  80. #define HW_SSP_DATA 0x70
  81. #define HW_SSP_SDRESP0 0x80
  82. #define HW_SSP_SDRESP1 0x90
  83. #define HW_SSP_SDRESP2 0xA0
  84. #define HW_SSP_SDRESP3 0xB0
  85. #define HW_SSP_STATUS 0xC0
  86. #define BM_SSP_STATUS_FIFO_EMPTY 0x00000020
  87. #define BM_SSP_STATUS_TIMEOUT 0x00001000
  88. #define BM_SSP_STATUS_RESP_TIMEOUT 0x00004000
  89. #define BM_SSP_STATUS_RESP_ERR 0x00008000
  90. #define BM_SSP_STATUS_RESP_CRC_ERR 0x00010000
  91. #define BM_SSP_STATUS_CARD_DETECT 0x10000000