91
91
92
92
#define SLIMPRO_IIC_MSG_DWORD_COUNT 3
93
93
94
- /* PCC related defines */
95
- #define PCC_SIGNATURE 0x50424300
96
- #define PCC_STS_CMD_COMPLETE BIT(0)
97
- #define PCC_STS_SCI_DOORBELL BIT(1)
98
- #define PCC_STS_ERR BIT(2)
99
- #define PCC_STS_PLAT_NOTIFY BIT(3)
100
- #define PCC_CMD_GENERATE_DB_INT BIT(15)
101
-
102
94
struct slimpro_i2c_dev {
103
95
struct i2c_adapter adapter ;
104
96
struct device * dev ;
@@ -160,11 +152,11 @@ static void slimpro_i2c_pcc_rx_cb(struct mbox_client *cl, void *msg)
160
152
161
153
/* Check if platform sends interrupt */
162
154
if (!xgene_word_tst_and_clr (& generic_comm_base -> status ,
163
- PCC_STS_SCI_DOORBELL ))
155
+ PCC_STATUS_SCI_DOORBELL ))
164
156
return ;
165
157
166
158
if (xgene_word_tst_and_clr (& generic_comm_base -> status ,
167
- PCC_STS_CMD_COMPLETE )) {
159
+ PCC_STATUS_CMD_COMPLETE )) {
168
160
msg = generic_comm_base + 1 ;
169
161
170
162
/* Response message msg[1] contains the return value. */
@@ -186,10 +178,10 @@ static void slimpro_i2c_pcc_tx_prepare(struct slimpro_i2c_dev *ctx, u32 *msg)
186
178
cpu_to_le32 (PCC_SIGNATURE | ctx -> mbox_idx ));
187
179
188
180
WRITE_ONCE (generic_comm_base -> command ,
189
- cpu_to_le16 (SLIMPRO_MSG_TYPE (msg [0 ]) | PCC_CMD_GENERATE_DB_INT ));
181
+ cpu_to_le16 (SLIMPRO_MSG_TYPE (msg [0 ]) | PCC_CMD_GENERATE_DB_INTR ));
190
182
191
183
status = le16_to_cpu (READ_ONCE (generic_comm_base -> status ));
192
- status &= ~PCC_STS_CMD_COMPLETE ;
184
+ status &= ~PCC_STATUS_CMD_COMPLETE ;
193
185
WRITE_ONCE (generic_comm_base -> status , cpu_to_le16 (status ));
194
186
195
187
/* Copy the message to the PCC comm space */
0 commit comments