scc.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * SCC (Super Companion Chip) definitions
  3. *
  4. * (C) Copyright 2004-2006 TOSHIBA CORPORATION
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #ifndef _CELLEB_SCC_H
  21. #define _CELLEB_SCC_H
  22. #define PCI_VENDOR_ID_TOSHIBA_2 0x102f
  23. #define PCI_DEVICE_ID_TOSHIBA_SCC_PCIEXC_BRIDGE 0x01b0
  24. #define PCI_DEVICE_ID_TOSHIBA_SCC_EPCI_BRIDGE 0x01b1
  25. #define PCI_DEVICE_ID_TOSHIBA_SCC_BRIDGE 0x01b2
  26. #define PCI_DEVICE_ID_TOSHIBA_SCC_GBE 0x01b3
  27. #define PCI_DEVICE_ID_TOSHIBA_SCC_ATA 0x01b4
  28. #define PCI_DEVICE_ID_TOSHIBA_SCC_USB2 0x01b5
  29. #define PCI_DEVICE_ID_TOSHIBA_SCC_USB 0x01b6
  30. #define PCI_DEVICE_ID_TOSHIBA_SCC_ENCDEC 0x01b7
  31. #define SCC_EPCI_REG 0x0000d000
  32. /* EPCI registers */
  33. #define SCC_EPCI_CNF10_REG 0x010
  34. #define SCC_EPCI_CNF14_REG 0x014
  35. #define SCC_EPCI_CNF18_REG 0x018
  36. #define SCC_EPCI_PVBAT 0x100
  37. #define SCC_EPCI_VPMBAT 0x104
  38. #define SCC_EPCI_VPIBAT 0x108
  39. #define SCC_EPCI_VCSR 0x110
  40. #define SCC_EPCI_VIENAB 0x114
  41. #define SCC_EPCI_VISTAT 0x118
  42. #define SCC_EPCI_VRDCOUNT 0x124
  43. #define SCC_EPCI_BAM0 0x12c
  44. #define SCC_EPCI_BAM1 0x134
  45. #define SCC_EPCI_BAM2 0x13c
  46. #define SCC_EPCI_IADR 0x164
  47. #define SCC_EPCI_CLKRST 0x800
  48. #define SCC_EPCI_INTSET 0x804
  49. #define SCC_EPCI_STATUS 0x808
  50. #define SCC_EPCI_ABTSET 0x80c
  51. #define SCC_EPCI_WATRP 0x810
  52. #define SCC_EPCI_DUMMYRADR 0x814
  53. #define SCC_EPCI_SWRESP 0x818
  54. #define SCC_EPCI_CNTOPT 0x81c
  55. #define SCC_EPCI_ECMODE 0xf00
  56. #define SCC_EPCI_IOM_AC_NUM 5
  57. #define SCC_EPCI_IOM_ACTE(n) (0xf10 + (n) * 4)
  58. #define SCC_EPCI_IOT_AC_NUM 4
  59. #define SCC_EPCI_IOT_ACTE(n) (0xf30 + (n) * 4)
  60. #define SCC_EPCI_MAEA 0xf50
  61. #define SCC_EPCI_MAEC 0xf54
  62. #define SCC_EPCI_CKCTRL 0xff0
  63. /* bits for SCC_EPCI_VCSR */
  64. #define SCC_EPCI_VCSR_FRE 0x00020000
  65. #define SCC_EPCI_VCSR_FWE 0x00010000
  66. #define SCC_EPCI_VCSR_DR 0x00000400
  67. #define SCC_EPCI_VCSR_SR 0x00000008
  68. #define SCC_EPCI_VCSR_AT 0x00000004
  69. /* bits for SCC_EPCI_VIENAB/SCC_EPCI_VISTAT */
  70. #define SCC_EPCI_VISTAT_PMPE 0x00000008
  71. #define SCC_EPCI_VISTAT_PMFE 0x00000004
  72. #define SCC_EPCI_VISTAT_PRA 0x00000002
  73. #define SCC_EPCI_VISTAT_PRD 0x00000001
  74. #define SCC_EPCI_VISTAT_ALL 0x0000000f
  75. #define SCC_EPCI_VIENAB_PMPEE 0x00000008
  76. #define SCC_EPCI_VIENAB_PMFEE 0x00000004
  77. #define SCC_EPCI_VIENAB_PRA 0x00000002
  78. #define SCC_EPCI_VIENAB_PRD 0x00000001
  79. #define SCC_EPCI_VIENAB_ALL 0x0000000f
  80. /* bits for SCC_EPCI_CLKRST */
  81. #define SCC_EPCI_CLKRST_CKS_MASK 0x00030000
  82. #define SCC_EPCI_CLKRST_CKS_2 0x00000000
  83. #define SCC_EPCI_CLKRST_CKS_4 0x00010000
  84. #define SCC_EPCI_CLKRST_CKS_8 0x00020000
  85. #define SCC_EPCI_CLKRST_PCICRST 0x00000400
  86. #define SCC_EPCI_CLKRST_BC 0x00000200
  87. #define SCC_EPCI_CLKRST_PCIRST 0x00000100
  88. #define SCC_EPCI_CLKRST_PCKEN 0x00000001
  89. /* bits for SCC_EPCI_INTSET/SCC_EPCI_STATUS */
  90. #define SCC_EPCI_INT_2M 0x01000000
  91. #define SCC_EPCI_INT_RERR 0x00200000
  92. #define SCC_EPCI_INT_SERR 0x00100000
  93. #define SCC_EPCI_INT_PRTER 0x00080000
  94. #define SCC_EPCI_INT_SER 0x00040000
  95. #define SCC_EPCI_INT_PER 0x00020000
  96. #define SCC_EPCI_INT_PAI 0x00010000
  97. #define SCC_EPCI_INT_1M 0x00000100
  98. #define SCC_EPCI_INT_PME 0x00000010
  99. #define SCC_EPCI_INT_INTD 0x00000008
  100. #define SCC_EPCI_INT_INTC 0x00000004
  101. #define SCC_EPCI_INT_INTB 0x00000002
  102. #define SCC_EPCI_INT_INTA 0x00000001
  103. #define SCC_EPCI_INT_DEVINT 0x0000000f
  104. #define SCC_EPCI_INT_ALL 0x003f001f
  105. #define SCC_EPCI_INT_ALLERR 0x003f0000
  106. /* bits for SCC_EPCI_CKCTRL */
  107. #define SCC_EPCI_CKCTRL_CRST0 0x00010000
  108. #define SCC_EPCI_CKCTRL_CRST1 0x00020000
  109. #define SCC_EPCI_CKCTRL_OCLKEN 0x00000100
  110. #define SCC_EPCI_CKCTRL_LCLKEN 0x00000001
  111. #define SCC_EPCI_IDSEL_AD_TO_SLOT(ad) ((ad) - 10)
  112. #define SCC_EPCI_MAX_DEVNU SCC_EPCI_IDSEL_AD_TO_SLOT(32)
  113. /* bits for SCC_EPCI_CNTOPT */
  114. #define SCC_EPCI_CNTOPT_O2PMB 0x00000002
  115. /* UHC registers */
  116. #define SCC_UHC_CKRCTRL 0xff0
  117. #define SCC_UHC_ECMODE 0xf00
  118. /* bits for SCC_UHC_CKRCTRL */
  119. #define SCC_UHC_F48MCKLEN 0x00000001
  120. #define SCC_UHC_P_SUSPEND 0x00000002
  121. #define SCC_UHC_PHY_SUSPEND_SEL 0x00000004
  122. #define SCC_UHC_HCLKEN 0x00000100
  123. #define SCC_UHC_USBEN 0x00010000
  124. #define SCC_UHC_USBCEN 0x00020000
  125. #define SCC_UHC_PHYEN 0x00040000
  126. /* bits for SCC_UHC_ECMODE */
  127. #define SCC_UHC_ECMODE_BY_BYTE 0x00000555
  128. #define SCC_UHC_ECMODE_BY_WORD 0x00000aaa
  129. #endif /* _CELLEB_SCC_H */