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