soc: hisilicon: kunpeng_hccs: Add failure log for no _CRS method
authorHuisong Li <lihuisong@huawei.com>
Fri, 1 Dec 2023 03:45:31 +0000 (11:45 +0800)
committerWei Xu <xuwei5@hisilicon.com>
Thu, 7 Dec 2023 06:16:34 +0000 (06:16 +0000)
Driver gets the PCC channel id by using the PCC GAS in _CRS.
But, currently, if the firmware has no _CRS method on platform, there
is not any failure log. So this patch adds the log for this.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
drivers/soc/hisilicon/kunpeng_hccs.c

index dad6235dbf1afc51492be2845a3c7a3103d16e3d..fd3ca0eb8175be7d7ef3d01161f680ba372d3f41 100644 (file)
@@ -85,8 +85,10 @@ static int hccs_get_pcc_chan_id(struct hccs_dev *hdev)
        struct hccs_register_ctx ctx = {0};
        acpi_status status;
 
-       if (!acpi_has_method(handle, METHOD_NAME__CRS))
+       if (!acpi_has_method(handle, METHOD_NAME__CRS)) {
+               dev_err(hdev->dev, "No _CRS method.\n");
                return -ENODEV;
+       }
 
        ctx.dev = hdev->dev;
        status = acpi_walk_resources(handle, METHOD_NAME__CRS,