Skip to content

Commit a46e42c

Browse files
committed
soc: kunpeng_hccs: Migrate to use generic PCC shmem related macros
Use the newly defined common and generic PCC shared memory region related macros in this driver to replace the locally defined ones. Cc: Huisong Li <[email protected]> Reviewed-by: Huisong Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent 2cf39b8 commit a46e42c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/soc/hisilicon/kunpeng_hccs.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131

3232
#include "kunpeng_hccs.h"
3333

34-
/* PCC defines */
35-
#define HCCS_PCC_SIGNATURE_MASK 0x50434300
36-
#define HCCS_PCC_STATUS_CMD_COMPLETE BIT(0)
37-
3834
/*
3935
* Arbitrary retries in case the remote processor is slow to respond
4036
* to PCC commands
@@ -187,7 +183,7 @@ static int hccs_check_chan_cmd_complete(struct hccs_dev *hdev)
187183
* deadline_us(timeout_us) until PCC command complete bit is set(cond)
188184
*/
189185
ret = readw_poll_timeout(&comm_base->status, status,
190-
status & HCCS_PCC_STATUS_CMD_COMPLETE,
186+
status & PCC_STATUS_CMD_COMPLETE,
191187
HCCS_POLL_STATUS_TIME_INTERVAL_US,
192188
cl_info->deadline_us);
193189
if (unlikely(ret))
@@ -208,7 +204,7 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
208204
int ret;
209205

210206
/* Write signature for this subspace */
211-
tmp.signature = HCCS_PCC_SIGNATURE_MASK | hdev->chan_id;
207+
tmp.signature = PCC_SIGNATURE | hdev->chan_id;
212208
/* Write to the shared command region */
213209
tmp.command = cmd;
214210
/* Clear cmd complete bit */

0 commit comments

Comments
 (0)