summaryrefslogtreecommitdiff
path: root/drivers/soc/hisilicon
AgeCommit message (Collapse)AuthorFilesLines
2024-04-25soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCCHuisong Li1-1/+1
The kunpeng_hccs driver depends on the Platform Communication Channel Driver. If the PCC driver is not enabled, this driver will be failed to probe. And since the PCC driver depends on the MAILBOX, replace the MAILBOX dependency with the PCC. Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2024-04-25soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port ↵Huisong Li1-0/+6
attribute The hccs_get_all_port_attr() is used to obtain the attribute of all the ports on a specified DIE from the firmware. However this interface doesn't ensure whether the firmware reports the complete attribute of all the ports or not. So this patch adds the check for this. Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2023-12-07soc: hisilicon: kunpeng_hccs: Support the platform with PCC type3 and ↵Huisong Li2-25/+125
interrupt ack Support the platform with PCC type3 and interrupt ack. And a version specific structure is introduced to handle the difference between the device in the code. Signed-off-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2023-12-07soc: hisilicon: kunpeng_hccs: Remove an unused blank lineHuisong Li1-1/+0
Remove an unused blank line. Signed-off-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2023-12-07soc: hisilicon: kunpeng_hccs: Add failure log for no _CRS methodHuisong Li1-1/+3
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>
2023-12-07soc: hisilicon: kunpeng_hccs: Fix some incorrect format stringsHuisong Li1-6/+6
Fix some incorrect format strings. Signed-off-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2023-11-02Merge tag 'soc-drivers-6.7' of ↵Linus Torvalds1-4/+2
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "The highlights for the driver support this time are - Qualcomm platforms gain support for the Qualcomm Secure Execution Environment firmware interface to access EFI variables on certain devices, and new features for multiple platform and firmware drivers. - Arm FF-A firmware support gains support for v1.1 specification features, in particular notification and memory transaction descriptor changes. - SCMI firmware support now support v3.2 features for clock and DVFS configuration and a new transport for Qualcomm platforms. - Minor cleanups and bugfixes are added to pretty much all the active platforms: qualcomm, broadcom, dove, ti-k3, rockchip, sifive, amlogic, atmel, tegra, aspeed, vexpress, mediatek, samsung and more. In particular, this contains portions of the treewide conversion to use __counted_by annotations and the device_get_match_data helper" * tag 'soc-drivers-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (156 commits) soc: qcom: pmic_glink_altmode: Print return value on error firmware: qcom: scm: remove unneeded 'extern' specifiers firmware: qcom: scm: add a missing forward declaration for struct device firmware: qcom: move Qualcomm code into its own directory soc: samsung: exynos-chipid: Convert to platform remove callback returning void soc: qcom: apr: Add __counted_by for struct apr_rx_buf and use struct_size() soc: qcom: pmic_glink: fix connector type to be DisplayPort soc: ti: k3-socinfo: Avoid overriding return value soc: ti: k3-socinfo: Fix typo in bitfield documentation soc: ti: knav_qmss_queue: Use device_get_match_data() firmware: ti_sci: Use device_get_match_data() firmware: qcom: qseecom: add missing include guards soc/pxa: ssp: Convert to platform remove callback returning void soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void soc/mediatek: mtk-devapc: Convert to platform remove callback returning void soc/loongson: loongson2_guts: Convert to platform remove callback returning void soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void ...
2023-10-15soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20230925095532.1984344-10-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2023-09-29soc: kunpeng_hccs: Migrate to use generic PCC shmem related macrosSudeep Holla1-6/+2
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>
2023-08-22soc: kunpeng_hccs: fix some sparse warnings about incorrect typeHuisong Li2-7/+8
This patch fixes some sparse warnings about incorrect type. The address about PCC communication space should use '__iomem' tag. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308151142.dH5Muhva-lkp@intel.com/ Fixes: 886bdf9c883b ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Huisong Li <lihuisong@huawei.com> Link: https://lore.kernel.org/r/20230816073706.33297-1-lihuisong@huawei.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-14soc: kunpeng_hccs: add MAILBOX dependencyArnd Bergmann1-0/+1
When the mailbox subsystem is disabled, the driver fails to link, so add an explicit dependency. Some other drivers use 'select' here, but the dependency seems more logical and more common. Fixes: 886bdf9c883bc ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-12soc: kunpeng_hccs: fix size_t format stringArnd Bergmann1-1/+1
Printing a size_t using the %lu format string causes a warning on architectures that define the type as 'unsigned int': In file included from include/linux/device.h:15, from include/linux/acpi.h:14, from drivers/soc/hisilicon/kunpeng_hccs.c:25: drivers/soc/hisilicon/kunpeng_hccs.c: In function 'hccs_get_bd_info': drivers/soc/hisilicon/kunpeng_hccs.c:441:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] Use the correct %zu format instead. Fixes: 886bdf9c883bc ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-08soc: hisilicon: add sysfs entry to query information of HCCSHuisong Li2-0/+660
This patch creates chip, die and port directory based on the actual hardware implementation of platform. Some sysfs entries under these directories are created to query the health status and port information of HCCS. Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2023-08-08soc: hisilicon: Support HCCS driver on Kunpeng SoCHuisong Li4-0/+828
The Huawei Cache Coherence System (HCCS) is a multi-chip interconnection bus protocol. This driver is aimed to support some features about HCCS on Kunpeng SoC, like, querying the health status of HCCS. This patch adds the probing of HCCS driver, and obtains all HCCS port information by the dimension of chip and die on platform. Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>