m32r_cfc.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2001 by Hiroyuki Kondo
  3. */
  4. #if !defined(CONFIG_M32R_CFC_NUM)
  5. #define M32R_MAX_PCC 2
  6. #else
  7. #define M32R_MAX_PCC CONFIG_M32R_CFC_NUM
  8. #endif
  9. /*
  10. * M32R PC Card Controller
  11. */
  12. #define M32R_PCC0_BASE 0x00ef7000
  13. #define M32R_PCC1_BASE 0x00ef7020
  14. /*
  15. * Register offsets
  16. */
  17. #define PCCR 0x00
  18. #define PCADR 0x04
  19. #define PCMOD 0x08
  20. #define PCIRC 0x0c
  21. #define PCCSIGCR 0x10
  22. #define PCATCR 0x14
  23. /*
  24. * PCCR
  25. */
  26. #define PCCR_PCEN (1UL<<(31-31))
  27. /*
  28. * PCIRC
  29. */
  30. #define PCIRC_BWERR (1UL<<(31-7))
  31. #define PCIRC_CDIN1 (1UL<<(31-14))
  32. #define PCIRC_CDIN2 (1UL<<(31-15))
  33. #define PCIRC_BEIEN (1UL<<(31-23))
  34. #define PCIRC_CIIEN (1UL<<(31-30))
  35. #define PCIRC_COIEN (1UL<<(31-31))
  36. /*
  37. * PCCSIGCR
  38. */
  39. #define PCCSIGCR_SEN (1UL<<(31-3))
  40. #define PCCSIGCR_VEN (1UL<<(31-7))
  41. #define PCCSIGCR_CRST (1UL<<(31-15))
  42. #define PCCSIGCR_COCR (1UL<<(31-31))
  43. /*
  44. *
  45. */
  46. #define PCMOD_AS_ATTRIB (1UL<<(31-19))
  47. #define PCMOD_AS_IO (1UL<<(31-18))
  48. #define PCMOD_CBSZ (1UL<<(31-23)) /* set for 8bit */
  49. #define PCMOD_DBEX (1UL<<(31-31)) /* set for excahnge */
  50. /*
  51. * M32R PCC Map addr
  52. */
  53. #define M32R_PCC0_MAPBASE 0x14000000
  54. #define M32R_PCC1_MAPBASE 0x16000000
  55. #define M32R_PCC_MAPMAX 0x02000000
  56. #define M32R_PCC_MAPSIZE 0x00001000 /* XXX */
  57. #define M32R_PCC_MAPMASK (~(M32R_PCC_MAPMAX-1))
  58. #define CFC_IOPORT_BASE 0x1000
  59. #if defined(CONFIG_PLAT_MAPPI3)
  60. #define CFC_ATTR_MAPBASE 0x14014000
  61. #define CFC_IO_MAPBASE_BYTE 0xb4012000
  62. #define CFC_IO_MAPBASE_WORD 0xb4002000
  63. #elif !defined(CONFIG_PLAT_USRV)
  64. #define CFC_ATTR_MAPBASE 0x0c014000
  65. #define CFC_IO_MAPBASE_BYTE 0xac012000
  66. #define CFC_IO_MAPBASE_WORD 0xac002000
  67. #else
  68. #define CFC_ATTR_MAPBASE 0x04014000
  69. #define CFC_IO_MAPBASE_BYTE 0xa4012000
  70. #define CFC_IO_MAPBASE_WORD 0xa4002000
  71. #endif /* CONFIG_PLAT_USRV */