0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _CS5536_H
0010 #define _CS5536_H
0011
0012 #include <linux/types.h>
0013
0014 extern void _rdmsr(u32 msr, u32 *hi, u32 *lo);
0015 extern void _wrmsr(u32 msr, u32 hi, u32 lo);
0016
0017
0018
0019
0020 #define CS5536_SB_MSR_BASE (0x00000000)
0021 #define CS5536_GLIU_MSR_BASE (0x10000000)
0022 #define CS5536_ILLEGAL_MSR_BASE (0x20000000)
0023 #define CS5536_USB_MSR_BASE (0x40000000)
0024 #define CS5536_IDE_MSR_BASE (0x60000000)
0025 #define CS5536_DIVIL_MSR_BASE (0x80000000)
0026 #define CS5536_ACC_MSR_BASE (0xa0000000)
0027 #define CS5536_UNUSED_MSR_BASE (0xc0000000)
0028 #define CS5536_GLCP_MSR_BASE (0xe0000000)
0029
0030 #define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset))
0031 #define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset))
0032 #define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset))
0033 #define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset))
0034 #define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset))
0035 #define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset))
0036 #define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset))
0037 #define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset))
0038 #define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset))
0039
0040
0041
0042
0043
0044
0045 #define CS5536_IRQ_RANGE 0xffffffe0
0046 #define CS5536_IRQ_LENGTH 0x20
0047 #define CS5536_SMB_RANGE 0xfffffff8
0048 #define CS5536_SMB_LENGTH 0x08
0049 #define CS5536_GPIO_RANGE 0xffffff00
0050 #define CS5536_GPIO_LENGTH 0x100
0051 #define CS5536_MFGPT_RANGE 0xffffffc0
0052 #define CS5536_MFGPT_LENGTH 0x40
0053 #define CS5536_ACPI_RANGE 0xffffffe0
0054 #define CS5536_ACPI_LENGTH 0x20
0055 #define CS5536_PMS_RANGE 0xffffff80
0056 #define CS5536_PMS_LENGTH 0x80
0057
0058 #define CS5536_IDE_RANGE 0xfffffff0
0059 #define CS5536_IDE_LENGTH 0x10
0060
0061 #define CS5536_ACC_RANGE 0xffffff80
0062 #define CS5536_ACC_LENGTH 0x80
0063
0064 #define CS5536_OHCI_RANGE 0xfffff000
0065 #define CS5536_OHCI_LENGTH 0x1000
0066 #define CS5536_EHCI_RANGE 0xfffff000
0067 #define CS5536_EHCI_LENGTH 0x1000
0068
0069
0070
0071
0072 #define PCI_MSR_CTRL 0xF0
0073 #define PCI_MSR_ADDR 0xF4
0074 #define PCI_MSR_DATA_LO 0xF8
0075 #define PCI_MSR_DATA_HI 0xFC
0076
0077
0078
0079
0080
0081
0082 #define GLIU_CAP 0x00
0083 #define GLIU_CONFIG 0x01
0084 #define GLIU_SMI 0x02
0085 #define GLIU_ERROR 0x03
0086 #define GLIU_PM 0x04
0087 #define GLIU_DIAG 0x05
0088
0089
0090
0091
0092 #define GLIU_P2D_BM0 0x20
0093 #define GLIU_P2D_BM1 0x21
0094 #define GLIU_P2D_BM2 0x22
0095 #define GLIU_P2D_BMK0 0x23
0096 #define GLIU_P2D_BMK1 0x24
0097 #define GLIU_P2D_BM3 0x25
0098 #define GLIU_P2D_BM4 0x26
0099 #define GLIU_COH 0x80
0100 #define GLIU_PAE 0x81
0101 #define GLIU_ARB 0x82
0102 #define GLIU_ASMI 0x83
0103 #define GLIU_AERR 0x84
0104 #define GLIU_DEBUG 0x85
0105 #define GLIU_PHY_CAP 0x86
0106 #define GLIU_NOUT_RESP 0x87
0107 #define GLIU_NOUT_WDATA 0x88
0108 #define GLIU_WHOAMI 0x8B
0109 #define GLIU_SLV_DIS 0x8C
0110 #define GLIU_IOD_BM0 0xE0
0111 #define GLIU_IOD_BM1 0xE1
0112 #define GLIU_IOD_BM2 0xE2
0113 #define GLIU_IOD_BM3 0xE3
0114 #define GLIU_IOD_BM4 0xE4
0115 #define GLIU_IOD_BM5 0xE5
0116 #define GLIU_IOD_BM6 0xE6
0117 #define GLIU_IOD_BM7 0xE7
0118 #define GLIU_IOD_BM8 0xE8
0119 #define GLIU_IOD_BM9 0xE9
0120 #define GLIU_IOD_SC0 0xEA
0121 #define GLIU_IOD_SC1 0xEB
0122 #define GLIU_IOD_SC2 0xEC
0123 #define GLIU_IOD_SC3 0xED
0124 #define GLIU_IOD_SC4 0xEE
0125 #define GLIU_IOD_SC5 0xEF
0126 #define GLIU_IOD_SC6 0xF0
0127 #define GLIU_IOD_SC7 0xF1
0128
0129
0130
0131
0132 #define SB_CAP 0x00
0133 #define SB_CONFIG 0x01
0134 #define SB_SMI 0x02
0135 #define SB_ERROR 0x03
0136 #define SB_MAR_ERR_EN 0x00000001
0137 #define SB_TAR_ERR_EN 0x00000002
0138 #define SB_RSVD_BIT1 0x00000004
0139 #define SB_EXCEP_ERR_EN 0x00000008
0140 #define SB_SYSE_ERR_EN 0x00000010
0141 #define SB_PARE_ERR_EN 0x00000020
0142 #define SB_TAS_ERR_EN 0x00000040
0143 #define SB_MAR_ERR_FLAG 0x00010000
0144 #define SB_TAR_ERR_FLAG 0x00020000
0145 #define SB_RSVD_BIT2 0x00040000
0146 #define SB_EXCEP_ERR_FLAG 0x00080000
0147 #define SB_SYSE_ERR_FLAG 0x00100000
0148 #define SB_PARE_ERR_FLAG 0x00200000
0149 #define SB_TAS_ERR_FLAG 0x00400000
0150 #define SB_PM 0x04
0151 #define SB_DIAG 0x05
0152
0153
0154
0155
0156 #define SB_CTRL 0x10
0157 #define SB_R0 0x20
0158 #define SB_R1 0x21
0159 #define SB_R2 0x22
0160 #define SB_R3 0x23
0161 #define SB_R4 0x24
0162 #define SB_R5 0x25
0163 #define SB_R6 0x26
0164 #define SB_R7 0x27
0165 #define SB_R8 0x28
0166 #define SB_R9 0x29
0167 #define SB_R10 0x2A
0168 #define SB_R11 0x2B
0169 #define SB_R12 0x2C
0170 #define SB_R13 0x2D
0171 #define SB_R14 0x2E
0172 #define SB_R15 0x2F
0173
0174
0175
0176
0177 #define GLCP_CAP 0x00
0178 #define GLCP_CONFIG 0x01
0179 #define GLCP_SMI 0x02
0180 #define GLCP_ERROR 0x03
0181 #define GLCP_PM 0x04
0182 #define GLCP_DIAG 0x05
0183
0184
0185
0186
0187 #define GLCP_CLK_DIS_DELAY 0x08
0188 #define GLCP_PM_CLK_DISABLE 0x09
0189 #define GLCP_GLB_PM 0x0B
0190 #define GLCP_DBG_OUT 0x0C
0191 #define GLCP_RSVD1 0x0D
0192 #define GLCP_SOFT_COM 0x0E
0193 #define SOFT_BAR_SMB_FLAG 0x00000001
0194 #define SOFT_BAR_GPIO_FLAG 0x00000002
0195 #define SOFT_BAR_MFGPT_FLAG 0x00000004
0196 #define SOFT_BAR_IRQ_FLAG 0x00000008
0197 #define SOFT_BAR_PMS_FLAG 0x00000010
0198 #define SOFT_BAR_ACPI_FLAG 0x00000020
0199 #define SOFT_BAR_IDE_FLAG 0x00000400
0200 #define SOFT_BAR_ACC_FLAG 0x00000800
0201 #define SOFT_BAR_OHCI_FLAG 0x00001000
0202 #define SOFT_BAR_EHCI_FLAG 0x00002000
0203 #define GLCP_RSVD2 0x0F
0204 #define GLCP_CLK_OFF 0x10
0205 #define GLCP_CLK_ACTIVE 0x11
0206 #define GLCP_CLK_DISABLE 0x12
0207 #define GLCP_CLK4ACK 0x13
0208 #define GLCP_SYS_RST 0x14
0209 #define GLCP_RSVD3 0x15
0210 #define GLCP_DBG_CLK_CTRL 0x16
0211 #define GLCP_CHIP_REV_ID 0x17
0212
0213
0214 #define PIC_YSEL_LOW 0x20
0215 #define PIC_YSEL_LOW_USB_SHIFT 8
0216 #define PIC_YSEL_LOW_ACC_SHIFT 16
0217 #define PIC_YSEL_LOW_FLASH_SHIFT 24
0218 #define PIC_YSEL_HIGH 0x21
0219 #define PIC_ZSEL_LOW 0x22
0220 #define PIC_ZSEL_HIGH 0x23
0221 #define PIC_IRQM_PRIM 0x24
0222 #define PIC_IRQM_LPC 0x25
0223 #define PIC_XIRR_STS_LOW 0x26
0224 #define PIC_XIRR_STS_HIGH 0x27
0225 #define PCI_SHDW 0x34
0226
0227
0228
0229
0230 #define DIVIL_CAP 0x00
0231 #define DIVIL_CONFIG 0x01
0232 #define DIVIL_SMI 0x02
0233 #define DIVIL_ERROR 0x03
0234 #define DIVIL_PM 0x04
0235 #define DIVIL_DIAG 0x05
0236
0237
0238
0239
0240 #define DIVIL_LBAR_IRQ 0x08
0241 #define DIVIL_LBAR_KEL 0x09
0242 #define DIVIL_LBAR_SMB 0x0B
0243 #define DIVIL_LBAR_GPIO 0x0C
0244 #define DIVIL_LBAR_MFGPT 0x0D
0245 #define DIVIL_LBAR_ACPI 0x0E
0246 #define DIVIL_LBAR_PMS 0x0F
0247 #define DIVIL_LEG_IO 0x14
0248 #define DIVIL_BALL_OPTS 0x15
0249 #define DIVIL_SOFT_IRQ 0x16
0250 #define DIVIL_SOFT_RESET 0x17
0251
0252
0253 #define MFGPT_IRQ 0x28
0254
0255
0256
0257
0258 #define IDE_CAP 0x00
0259 #define IDE_CONFIG 0x01
0260 #define IDE_SMI 0x02
0261 #define IDE_ERROR 0x03
0262 #define IDE_PM 0x04
0263 #define IDE_DIAG 0x05
0264
0265
0266
0267
0268 #define IDE_IO_BAR 0x08
0269 #define IDE_CFG 0x10
0270 #define IDE_DTC 0x12
0271 #define IDE_CAST 0x13
0272 #define IDE_ETC 0x14
0273 #define IDE_INTERNAL_PM 0x15
0274
0275
0276
0277
0278 #define ACC_CAP 0x00
0279 #define ACC_CONFIG 0x01
0280 #define ACC_SMI 0x02
0281 #define ACC_ERROR 0x03
0282 #define ACC_PM 0x04
0283 #define ACC_DIAG 0x05
0284
0285
0286
0287
0288 #define USB_CAP 0x00
0289 #define USB_CONFIG 0x01
0290 #define USB_SMI 0x02
0291 #define USB_ERROR 0x03
0292 #define USB_PM 0x04
0293 #define USB_DIAG 0x05
0294
0295
0296
0297
0298 #define USB_OHCI 0x08
0299 #define USB_EHCI 0x09
0300
0301
0302
0303 #define GPIOL_OUT_VAL 0x00
0304 #define GPIOL_OUT_EN 0x04
0305
0306 #endif