Go to the documentation of this file.
34 #ifndef _SB1250_SMBUS_H
35 #define _SB1250_SMBUS_H
43 #define S_SMB_FREQ_DIV 0
44 #define M_SMB_FREQ_DIV _SB_MAKEMASK(13, S_SMB_FREQ_DIV)
45 #define V_SMB_FREQ_DIV(x) _SB_MAKEVALUE(x, S_SMB_FREQ_DIV)
47 #define K_SMB_FREQ_400KHZ 0x1F
48 #define K_SMB_FREQ_100KHZ 0x7D
49 #define K_SMB_FREQ_10KHZ 1250
52 #define M_SMB_CMD _SB_MAKEMASK(8, S_SMB_CMD)
53 #define V_SMB_CMD(x) _SB_MAKEVALUE(x, S_SMB_CMD)
59 #define M_SMB_ERR_INTR _SB_MAKEMASK1(0)
60 #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1)
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)
66 #define M_SMB_DATA_DIR _SB_MAKEMASK1(5)
67 #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR
68 #define M_SMB_CLK_OUT _SB_MAKEMASK1(6)
69 #define M_SMB_DIRECT_ENABLE _SB_MAKEMASK1(7)
75 #define M_SMB_BUSY _SB_MAKEMASK1(0)
76 #define M_SMB_ERROR _SB_MAKEMASK1(1)
77 #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2)
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)
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)
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)
101 #define M_SMB_ADDR _SB_MAKEMASK(7, S_SMB_ADDR)
102 #define V_SMB_ADDR(x) _SB_MAKEVALUE(x, S_SMB_ADDR)
103 #define G_SMB_ADDR(x) _SB_GETVALUE(x, S_SMB_ADDR, M_SMB_ADDR)
105 #define M_SMB_QDATA _SB_MAKEMASK1(7)
108 #define M_SMB_TT _SB_MAKEMASK(3, S_SMB_TT)
109 #define V_SMB_TT(x) _SB_MAKEVALUE(x, S_SMB_TT)
110 #define G_SMB_TT(x) _SB_GETVALUE(x, S_SMB_TT, M_SMB_TT)
112 #define K_SMB_TT_WR1BYTE 0
113 #define K_SMB_TT_WR2BYTE 1
114 #define K_SMB_TT_WR3BYTE 2
115 #define K_SMB_TT_CMD_RD1BYTE 3
116 #define K_SMB_TT_CMD_RD2BYTE 4
117 #define K_SMB_TT_RD1BYTE 5
118 #define K_SMB_TT_QUICKCMD 6
119 #define K_SMB_TT_EEPROMREAD 7
121 #define V_SMB_TT_WR1BYTE V_SMB_TT(K_SMB_TT_WR1BYTE)
122 #define V_SMB_TT_WR2BYTE V_SMB_TT(K_SMB_TT_WR2BYTE)
123 #define V_SMB_TT_WR3BYTE V_SMB_TT(K_SMB_TT_WR3BYTE)
124 #define V_SMB_TT_CMD_RD1BYTE V_SMB_TT(K_SMB_TT_CMD_RD1BYTE)
125 #define V_SMB_TT_CMD_RD2BYTE V_SMB_TT(K_SMB_TT_CMD_RD2BYTE)
126 #define V_SMB_TT_RD1BYTE V_SMB_TT(K_SMB_TT_RD1BYTE)
127 #define V_SMB_TT_QUICKCMD V_SMB_TT(K_SMB_TT_QUICKCMD)
128 #define V_SMB_TT_EEPROMREAD V_SMB_TT(K_SMB_TT_EEPROMREAD)
130 #define M_SMB_PEC _SB_MAKEMASK1(15)
137 #define M_SMB_LB _SB_MAKEMASK(8, S_SMB_LB)
138 #define V_SMB_LB(x) _SB_MAKEVALUE(x, S_SMB_LB)
141 #define M_SMB_MB _SB_MAKEMASK(8, S_SMB_MB)
142 #define V_SMB_MB(x) _SB_MAKEVALUE(x, S_SMB_MB)
150 #define M_SPEC_PEC _SB_MAKEMASK(8, S_SPEC_PEC)
151 #define V_SPEC_MB(x) _SB_MAKEVALUE(x, S_SPEC_PEC)
154 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
157 #define M_SMB_CMDH _SB_MAKEMASK(8, S_SMB_CMDH)
158 #define V_SMB_CMDH(x) _SB_MAKEVALUE(x, S_SMB_CMDH)
160 #define M_SMB_EXTEND _SB_MAKEMASK1(14)
163 #define M_SMB_DFMT _SB_MAKEMASK(3, S_SMB_DFMT)
164 #define V_SMB_DFMT(x) _SB_MAKEVALUE(x, S_SMB_DFMT)
165 #define G_SMB_DFMT(x) _SB_GETVALUE(x, S_SMB_DFMT, M_SMB_DFMT)
167 #define K_SMB_DFMT_1BYTE 0
168 #define K_SMB_DFMT_2BYTE 1
169 #define K_SMB_DFMT_3BYTE 2
170 #define K_SMB_DFMT_4BYTE 3
171 #define K_SMB_DFMT_NODATA 4
172 #define K_SMB_DFMT_CMD4BYTE 5
173 #define K_SMB_DFMT_CMD5BYTE 6
174 #define K_SMB_DFMT_RESERVED 7
176 #define V_SMB_DFMT_1BYTE V_SMB_DFMT(K_SMB_DFMT_1BYTE)
177 #define V_SMB_DFMT_2BYTE V_SMB_DFMT(K_SMB_DFMT_2BYTE)
178 #define V_SMB_DFMT_3BYTE V_SMB_DFMT(K_SMB_DFMT_3BYTE)
179 #define V_SMB_DFMT_4BYTE V_SMB_DFMT(K_SMB_DFMT_4BYTE)
180 #define V_SMB_DFMT_NODATA V_SMB_DFMT(K_SMB_DFMT_NODATA)
181 #define V_SMB_DFMT_CMD4BYTE V_SMB_DFMT(K_SMB_DFMT_CMD4BYTE)
182 #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE)
183 #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED)
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)
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
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)
200 #define M_SMB_DIR _SB_MAKEMASK1(13)