Add PCC dependency and enhance verification during the probe phase.
Huisong Li (2):
soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete
port attribute
soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
drivers/soc/hisilicon/Kconfig | 2 +-
drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.22.0
Add PCC dependency and enhance verification during the probe phase.
---
v2: fix the log on failure.
Huisong Li (2):
soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete
port attribute
soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
drivers/soc/hisilicon/Kconfig | 2 +-
drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.22.0
The kunpeng_hccs driver depands on Platform Communication Channel Driver.
If PCC driver is not enabled, this driver fails to probe.
Seeing as how PCC driver depands on MAILBOX. so replace MAILBOX dependency
with PCC.
Signed-off-by: Huisong Li <[email protected]>
---
drivers/soc/hisilicon/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/hisilicon/Kconfig b/drivers/soc/hisilicon/Kconfig
index 0ab688af308f..4b0a099b28cc 100644
--- a/drivers/soc/hisilicon/Kconfig
+++ b/drivers/soc/hisilicon/Kconfig
@@ -6,7 +6,7 @@ menu "Hisilicon SoC drivers"
config KUNPENG_HCCS
tristate "HCCS driver on Kunpeng SoC"
depends on ACPI
- depends on MAILBOX
+ depends on PCC
depends on ARM64 || COMPILE_TEST
help
The Huawei Cache Coherence System (HCCS) is a multi-chip
--
2.22.0
The hccs_get_all_port_attr() is used to obtained the attribute of all
ports on a specified DIE from firmware. However, this interface doesn't
ensure whether firmware reports the complete attribute of all ports or not.
So this patch adds the check for this.
Signed-off-by: Huisong Li <[email protected]>
---
drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
index 9ff70b38e5e9..e882a61636ec 100644
--- a/drivers/soc/hisilicon/kunpeng_hccs.c
+++ b/drivers/soc/hisilicon/kunpeng_hccs.c
@@ -556,6 +556,12 @@ static int hccs_get_all_port_attr(struct hccs_dev *hdev,
start_id = rsp_head.next_id;
}
+ if (left_buf_len != 0) {
+ dev_err(hdev->dev, "failed to get the expected port number(%u) attribute.\n",
+ size);
+ return -EINVAL;
+ }
+
return 0;
}
--
2.22.0
Hi Huisong,
On 2024/4/17 17:47, Huisong Li wrote:
> Add PCC dependency and enhance verification during the probe phase.
>
> ---
> v2: fix the log on failure.
>
> Huisong Li (2):
> soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete
> port attribute
> soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
>
> drivers/soc/hisilicon/Kconfig | 2 +-
> drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
Thanks!
Series applied to the HiSilicon driver tree with minor changes in the commit msg:
https://github.com/hisilicon/linux-hisi/tree/next/drivers
Best Regards,
Wei