diff options
Diffstat (limited to 'include/asm-mips/sibyte/sb1250_smbus.h')
-rw-r--r-- | include/asm-mips/sibyte/sb1250_smbus.h | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/include/asm-mips/sibyte/sb1250_smbus.h b/include/asm-mips/sibyte/sb1250_smbus.h index 335c53e92936..279a912213cd 100644 --- a/include/asm-mips/sibyte/sb1250_smbus.h +++ b/include/asm-mips/sibyte/sb1250_smbus.h | |||
@@ -6,9 +6,8 @@ | |||
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's SMbus devices. | 7 | * manipulating the SB1250's SMbus devices. |
8 | * | 8 | * |
9 | * SB1250 specification level: 01/02/2002 | 9 | * SB1250 specification level: 10/21/02 |
10 | * | 10 | * BCM1280 specification level: 11/24/03 |
11 | * Author: Mitch Lichtenberg | ||
12 | * | 11 | * |
13 | ********************************************************************* | 12 | ********************************************************************* |
14 | * | 13 | * |
@@ -47,6 +46,7 @@ | |||
47 | 46 | ||
48 | #define K_SMB_FREQ_400KHZ 0x1F | 47 | #define K_SMB_FREQ_400KHZ 0x1F |
49 | #define K_SMB_FREQ_100KHZ 0x7D | 48 | #define K_SMB_FREQ_100KHZ 0x7D |
49 | #define K_SMB_FREQ_10KHZ 1250 | ||
50 | 50 | ||
51 | #define S_SMB_CMD 0 | 51 | #define S_SMB_CMD 0 |
52 | #define M_SMB_CMD _SB_MAKEMASK(8,S_SMB_CMD) | 52 | #define M_SMB_CMD _SB_MAKEMASK(8,S_SMB_CMD) |
@@ -58,7 +58,11 @@ | |||
58 | 58 | ||
59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) | 59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) |
60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) | 60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) |
61 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(4) | 61 | |
62 | #define S_SMB_DATA_OUT 4 | ||
63 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(S_SMB_DATA_OUT) | ||
64 | #define V_SMB_DATA_OUT(x) _SB_MAKEVALUE(x,S_SMB_DATA_OUT) | ||
65 | |||
62 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) | 66 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) |
63 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR | 67 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR |
64 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) | 68 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) |
@@ -71,8 +75,23 @@ | |||
71 | #define M_SMB_BUSY _SB_MAKEMASK1(0) | 75 | #define M_SMB_BUSY _SB_MAKEMASK1(0) |
72 | #define M_SMB_ERROR _SB_MAKEMASK1(1) | 76 | #define M_SMB_ERROR _SB_MAKEMASK1(1) |
73 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) | 77 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) |
74 | #define M_SMB_REF _SB_MAKEMASK1(6) | 78 | |
75 | #define M_SMB_DATA_IN _SB_MAKEMASK1(7) | 79 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
80 | #define S_SMB_SCL_IN 5 | ||
81 | #define M_SMB_SCL_IN _SB_MAKEMASK1(S_SMB_SCL_IN) | ||
82 | #define V_SMB_SCL_IN(x) _SB_MAKEVALUE(x,S_SMB_SCL_IN) | ||
83 | #define G_SMB_SCL_IN(x) _SB_GETVALUE(x,S_SMB_SCL_IN,M_SMB_SCL_IN) | ||
84 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | ||
85 | |||
86 | #define S_SMB_REF 6 | ||
87 | #define M_SMB_REF _SB_MAKEMASK1(S_SMB_REF) | ||
88 | #define V_SMB_REF(x) _SB_MAKEVALUE(x,S_SMB_REF) | ||
89 | #define G_SMB_REF(x) _SB_GETVALUE(x,S_SMB_REF,M_SMB_REF) | ||
90 | |||
91 | #define S_SMB_DATA_IN 7 | ||
92 | #define M_SMB_DATA_IN _SB_MAKEMASK1(S_SMB_DATA_IN) | ||
93 | #define V_SMB_DATA_IN(x) _SB_MAKEVALUE(x,S_SMB_DATA_IN) | ||
94 | #define G_SMB_DATA_IN(x) _SB_GETVALUE(x,S_SMB_DATA_IN,M_SMB_DATA_IN) | ||
76 | 95 | ||
77 | /* | 96 | /* |
78 | * SMBus Start/Command registers (Table 14-9) | 97 | * SMBus Start/Command registers (Table 14-9) |
@@ -132,16 +151,14 @@ | |||
132 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x,S_SPEC_PEC) | 151 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x,S_SPEC_PEC) |
133 | 152 | ||
134 | 153 | ||
135 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
136 | 155 | ||
137 | #define S_SMB_CMDH 8 | 156 | #define S_SMB_CMDH 8 |
138 | #define M_SMB_CMDH _SB_MAKEMASK(8,S_SMBH_CMD) | 157 | #define M_SMB_CMDH _SB_MAKEMASK(8,S_SMB_CMDH) |
139 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x,S_SMBH_CMD) | 158 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x,S_SMB_CMDH) |
140 | 159 | ||
141 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) | 160 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) |
142 | 161 | ||
143 | #define M_SMB_DIR _SB_MAKEMASK1(13) | ||
144 | |||
145 | #define S_SMB_DFMT 8 | 162 | #define S_SMB_DFMT 8 |
146 | #define M_SMB_DFMT _SB_MAKEMASK(3,S_SMB_DFMT) | 163 | #define M_SMB_DFMT _SB_MAKEMASK(3,S_SMB_DFMT) |
147 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x,S_SMB_DFMT) | 164 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x,S_SMB_DFMT) |
@@ -165,6 +182,23 @@ | |||
165 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) | 182 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) |
166 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) | 183 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) |
167 | 184 | ||
168 | #endif /* 1250 PASS2 || 112x PASS1 */ | 185 | #define S_SMB_AFMT 11 |
186 | #define M_SMB_AFMT _SB_MAKEMASK(2,S_SMB_AFMT) | ||
187 | #define V_SMB_AFMT(x) _SB_MAKEVALUE(x,S_SMB_AFMT) | ||
188 | #define G_SMB_AFMT(x) _SB_GETVALUE(x,S_SMB_AFMT,M_SMB_AFMT) | ||
189 | |||
190 | #define K_SMB_AFMT_NONE 0 | ||
191 | #define K_SMB_AFMT_ADDR 1 | ||
192 | #define K_SMB_AFMT_ADDR_CMD1BYTE 2 | ||
193 | #define K_SMB_AFMT_ADDR_CMD2BYTE 3 | ||
194 | |||
195 | #define V_SMB_AFMT_NONE V_SMB_AFMT(K_SMB_AFMT_NONE) | ||
196 | #define V_SMB_AFMT_ADDR V_SMB_AFMT(K_SMB_AFMT_ADDR) | ||
197 | #define V_SMB_AFMT_ADDR_CMD1BYTE V_SMB_AFMT(K_SMB_AFMT_ADDR_CMD1BYTE) | ||
198 | #define V_SMB_AFMT_ADDR_CMD2BYTE V_SMB_AFMT(K_SMB_AFMT_ADDR_CMD2BYTE) | ||
199 | |||
200 | #define M_SMB_DIR _SB_MAKEMASK1(13) | ||
201 | |||
202 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | ||
169 | 203 | ||
170 | #endif | 204 | #endif |