57
57
(MSG_TYPE_SET(MSG_TYPE_PWRMGMT) | \
58
58
MSG_SUBTYPE_SET(hndl) | TPC_CMD_SET(cmd) | type)
59
59
60
- /* PCC defines */
61
- #define PCC_SIGNATURE_MASK 0x50424300
62
- #define PCCC_GENERATE_DB_INT BIT(15)
63
- #define PCCS_CMD_COMPLETE BIT(0)
64
- #define PCCS_SCI_DOORBEL BIT(1)
65
- #define PCCS_PLATFORM_NOTIFICATION BIT(3)
66
60
/*
67
61
* Arbitrary retries in case the remote processor is slow to respond
68
62
* to PCC commands
@@ -142,15 +136,15 @@ static int xgene_hwmon_pcc_rd(struct xgene_hwmon_dev *ctx, u32 *msg)
142
136
143
137
/* Write signature for subspace */
144
138
WRITE_ONCE (generic_comm_base -> signature ,
145
- cpu_to_le32 (PCC_SIGNATURE_MASK | ctx -> mbox_idx ));
139
+ cpu_to_le32 (PCC_SIGNATURE | ctx -> mbox_idx ));
146
140
147
141
/* Write to the shared command region */
148
142
WRITE_ONCE (generic_comm_base -> command ,
149
- cpu_to_le16 (MSG_TYPE (msg [0 ]) | PCCC_GENERATE_DB_INT ));
143
+ cpu_to_le16 (MSG_TYPE (msg [0 ]) | PCC_CMD_GENERATE_DB_INTR ));
150
144
151
145
/* Flip CMD COMPLETE bit */
152
146
val = le16_to_cpu (READ_ONCE (generic_comm_base -> status ));
153
- val &= ~PCCS_CMD_COMPLETE ;
147
+ val &= ~PCC_STATUS_CMD_COMPLETE ;
154
148
WRITE_ONCE (generic_comm_base -> status , cpu_to_le16 (val ));
155
149
156
150
/* Copy the message to the PCC comm space */
@@ -544,7 +538,7 @@ static void xgene_hwmon_pcc_rx_cb(struct mbox_client *cl, void *msg)
544
538
msg = generic_comm_base + 1 ;
545
539
/* Check if platform sends interrupt */
546
540
if (!xgene_word_tst_and_clr (& generic_comm_base -> status ,
547
- PCCS_SCI_DOORBEL ))
541
+ PCC_STATUS_SCI_DOORBELL ))
548
542
return ;
549
543
550
544
/*
@@ -566,7 +560,7 @@ static void xgene_hwmon_pcc_rx_cb(struct mbox_client *cl, void *msg)
566
560
TPC_CMD (((u32 * )msg )[0 ]) == TPC_ALARM ))) {
567
561
/* Check if platform completes command */
568
562
if (xgene_word_tst_and_clr (& generic_comm_base -> status ,
569
- PCCS_CMD_COMPLETE )) {
563
+ PCC_STATUS_CMD_COMPLETE )) {
570
564
ctx -> sync_msg .msg = ((u32 * )msg )[0 ];
571
565
ctx -> sync_msg .param1 = ((u32 * )msg )[1 ];
572
566
ctx -> sync_msg .param2 = ((u32 * )msg )[2 ];
0 commit comments