m32r_pcc.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2001 by Hiroyuki Kondo
  4. */
  5. #define M32R_MAX_PCC 2
  6. /*
  7. * M32R PC Card Controller
  8. */
  9. #define M32R_PCC0_BASE 0x00ef7000
  10. #define M32R_PCC1_BASE 0x00ef7020
  11. /*
  12. * Register offsets
  13. */
  14. #define PCCR 0x00
  15. #define PCADR 0x04
  16. #define PCMOD 0x08
  17. #define PCIRC 0x0c
  18. #define PCCSIGCR 0x10
  19. #define PCATCR 0x14
  20. /*
  21. * PCCR
  22. */
  23. #define PCCR_PCEN (1UL<<(31-31))
  24. /*
  25. * PCIRC
  26. */
  27. #define PCIRC_BWERR (1UL<<(31-7))
  28. #define PCIRC_CDIN1 (1UL<<(31-14))
  29. #define PCIRC_CDIN2 (1UL<<(31-15))
  30. #define PCIRC_BEIEN (1UL<<(31-23))
  31. #define PCIRC_CIIEN (1UL<<(31-30))
  32. #define PCIRC_COIEN (1UL<<(31-31))
  33. /*
  34. * PCCSIGCR
  35. */
  36. #define PCCSIGCR_SEN (1UL<<(31-3))
  37. #define PCCSIGCR_VEN (1UL<<(31-7))
  38. #define PCCSIGCR_CRST (1UL<<(31-15))
  39. #define PCCSIGCR_COCR (1UL<<(31-31))
  40. /*
  41. *
  42. */
  43. #define PCMOD_AS_ATTRIB (1UL<<(31-19))
  44. #define PCMOD_AS_IO (1UL<<(31-18))
  45. #define PCMOD_CBSZ (1UL<<(31-23)) /* set for 8bit */
  46. #define PCMOD_DBEX (1UL<<(31-31)) /* set for excahnge */
  47. /*
  48. * M32R PCC Map addr
  49. */
  50. #define M32R_PCC0_MAPBASE 0x14000000
  51. #define M32R_PCC1_MAPBASE 0x16000000
  52. #define M32R_PCC_MAPMAX 0x02000000
  53. #define M32R_PCC_MAPSIZE 0x00001000 /* XXX */
  54. #define M32R_PCC_MAPMASK (~(M32R_PCC_MAPMAX-1))