summaryrefslogtreecommitdiff
path: root/drivers/soc/hisilicon
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2023-09-27 17:26:13 +0100
committerSudeep Holla <sudeep.holla@arm.com>2023-09-29 11:55:37 +0100
commita46e42c097982e258f89c64c5f52f30994bcfeda (patch)
treed0e85c118a658f93b3f1ab2359bb13f2011a55e0 /drivers/soc/hisilicon
parent2cf39b806be74661cc347e99796c97d9f54b7c42 (diff)
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 <lihuisong@huawei.com> Reviewed-by: Huisong Li <lihuisong@huawei.com> Link: https://lore.kernel.org/r/20230927-pcc_defines-v2-4-0b8ffeaef2e5@arm.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/soc/hisilicon')
-rw-r--r--drivers/soc/hisilicon/kunpeng_hccs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
index f3810d9d1caa..27a96cafd1ea 100644
--- a/drivers/soc/hisilicon/kunpeng_hccs.c
+++ b/drivers/soc/hisilicon/kunpeng_hccs.c
@@ -31,10 +31,6 @@
#include "kunpeng_hccs.h"
-/* PCC defines */
-#define HCCS_PCC_SIGNATURE_MASK 0x50434300
-#define HCCS_PCC_STATUS_CMD_COMPLETE BIT(0)
-
/*
* Arbitrary retries in case the remote processor is slow to respond
* to PCC commands
@@ -187,7 +183,7 @@ static int hccs_check_chan_cmd_complete(struct hccs_dev *hdev)
* deadline_us(timeout_us) until PCC command complete bit is set(cond)
*/
ret = readw_poll_timeout(&comm_base->status, status,
- status & HCCS_PCC_STATUS_CMD_COMPLETE,
+ status & PCC_STATUS_CMD_COMPLETE,
HCCS_POLL_STATUS_TIME_INTERVAL_US,
cl_info->deadline_us);
if (unlikely(ret))
@@ -208,7 +204,7 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
int ret;
/* Write signature for this subspace */
- tmp.signature = HCCS_PCC_SIGNATURE_MASK | hdev->chan_id;
+ tmp.signature = PCC_SIGNATURE | hdev->chan_id;
/* Write to the shared command region */
tmp.command = cmd;
/* Clear cmd complete bit */