mpc85xx_edac.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Freescale MPC85xx Memory Controller kernel module
  3. * Author: Dave Jiang <djiang@mvista.com>
  4. *
  5. * 2006-2007 (c) MontaVista Software, Inc. This file is licensed under
  6. * the terms of the GNU General Public License version 2. This program
  7. * is licensed "as is" without any warranty of any kind, whether express
  8. * or implied.
  9. *
  10. */
  11. #ifndef _MPC85XX_EDAC_H_
  12. #define _MPC85XX_EDAC_H_
  13. #define MPC85XX_REVISION " Ver: 2.0.0"
  14. #define EDAC_MOD_STR "MPC85xx_edac"
  15. #define mpc85xx_printk(level, fmt, arg...) \
  16. edac_printk(level, "MPC85xx", fmt, ##arg)
  17. /*
  18. * L2 Err defines
  19. */
  20. #define MPC85XX_L2_ERRINJHI 0x0000
  21. #define MPC85XX_L2_ERRINJLO 0x0004
  22. #define MPC85XX_L2_ERRINJCTL 0x0008
  23. #define MPC85XX_L2_CAPTDATAHI 0x0020
  24. #define MPC85XX_L2_CAPTDATALO 0x0024
  25. #define MPC85XX_L2_CAPTECC 0x0028
  26. #define MPC85XX_L2_ERRDET 0x0040
  27. #define MPC85XX_L2_ERRDIS 0x0044
  28. #define MPC85XX_L2_ERRINTEN 0x0048
  29. #define MPC85XX_L2_ERRATTR 0x004c
  30. #define MPC85XX_L2_ERRADDR 0x0050
  31. #define MPC85XX_L2_ERRCTL 0x0058
  32. /* Error Interrupt Enable */
  33. #define L2_EIE_L2CFGINTEN 0x1
  34. #define L2_EIE_SBECCINTEN 0x4
  35. #define L2_EIE_MBECCINTEN 0x8
  36. #define L2_EIE_TPARINTEN 0x10
  37. #define L2_EIE_MASK (L2_EIE_L2CFGINTEN | L2_EIE_SBECCINTEN | \
  38. L2_EIE_MBECCINTEN | L2_EIE_TPARINTEN)
  39. /* Error Detect */
  40. #define L2_EDE_L2CFGERR 0x1
  41. #define L2_EDE_SBECCERR 0x4
  42. #define L2_EDE_MBECCERR 0x8
  43. #define L2_EDE_TPARERR 0x10
  44. #define L2_EDE_MULL2ERR 0x80000000
  45. #define L2_EDE_CE_MASK L2_EDE_SBECCERR
  46. #define L2_EDE_UE_MASK (L2_EDE_L2CFGERR | L2_EDE_MBECCERR | \
  47. L2_EDE_TPARERR)
  48. #define L2_EDE_MASK (L2_EDE_L2CFGERR | L2_EDE_SBECCERR | \
  49. L2_EDE_MBECCERR | L2_EDE_TPARERR | L2_EDE_MULL2ERR)
  50. /*
  51. * PCI Err defines
  52. */
  53. #define PCI_EDE_TOE 0x00000001
  54. #define PCI_EDE_SCM 0x00000002
  55. #define PCI_EDE_IRMSV 0x00000004
  56. #define PCI_EDE_ORMSV 0x00000008
  57. #define PCI_EDE_OWMSV 0x00000010
  58. #define PCI_EDE_TGT_ABRT 0x00000020
  59. #define PCI_EDE_MST_ABRT 0x00000040
  60. #define PCI_EDE_TGT_PERR 0x00000080
  61. #define PCI_EDE_MST_PERR 0x00000100
  62. #define PCI_EDE_RCVD_SERR 0x00000200
  63. #define PCI_EDE_ADDR_PERR 0x00000400
  64. #define PCI_EDE_MULTI_ERR 0x80000000
  65. #define PCI_EDE_PERR_MASK (PCI_EDE_TGT_PERR | PCI_EDE_MST_PERR | \
  66. PCI_EDE_ADDR_PERR)
  67. #define MPC85XX_PCI_ERR_DR 0x0000
  68. #define MPC85XX_PCI_ERR_CAP_DR 0x0004
  69. #define MPC85XX_PCI_ERR_EN 0x0008
  70. #define PEX_ERR_ICCAIE_EN_BIT 0x00020000
  71. #define MPC85XX_PCI_ERR_ATTRIB 0x000c
  72. #define MPC85XX_PCI_ERR_ADDR 0x0010
  73. #define PEX_ERR_ICCAD_DISR_BIT 0x00020000
  74. #define MPC85XX_PCI_ERR_EXT_ADDR 0x0014
  75. #define MPC85XX_PCI_ERR_DL 0x0018
  76. #define MPC85XX_PCI_ERR_DH 0x001c
  77. #define MPC85XX_PCI_GAS_TIMR 0x0020
  78. #define MPC85XX_PCI_PCIX_TIMR 0x0024
  79. #define MPC85XX_PCIE_ERR_CAP_R0 0x0028
  80. #define MPC85XX_PCIE_ERR_CAP_R1 0x002c
  81. #define MPC85XX_PCIE_ERR_CAP_R2 0x0030
  82. #define MPC85XX_PCIE_ERR_CAP_R3 0x0034
  83. struct mpc85xx_l2_pdata {
  84. char *name;
  85. int edac_idx;
  86. void __iomem *l2_vbase;
  87. int irq;
  88. };
  89. struct mpc85xx_pci_pdata {
  90. char *name;
  91. bool is_pcie;
  92. int edac_idx;
  93. void __iomem *pci_vbase;
  94. int irq;
  95. };
  96. #endif