drivers/perf: hisi: Simplify the probe process for each DDRC version
authorJunhao He <hejunhao3@huawei.com>
Thu, 19 Jun 2025 12:55:50 +0000 (20:55 +0800)
committerWill Deacon <will@kernel.org>
Mon, 14 Jul 2025 14:42:16 +0000 (15:42 +0100)
commitdc86791ff68c38a2954c3bf2c444b6d6d9da52f3
treeed40939c292c617e55509b58ff7cd584752fadcc
parent89f0b9ccd31479db17dcc59db29a6fcdb677746c
drivers/perf: hisi: Simplify the probe process for each DDRC version

Version 1 and 2 of DDRC PMU also use different HID. Make use of
struct acpi_device_id::driver_data for version specific information
rather than judge the version register. This will help to
simplify the probe process and also a bit easier for extension.

In order to support this extend struct hisi_pmu_dev_info for version
specific counter bits and event range.

Signed-off-by: Junhao He <hejunhao3@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20250619125557.57372-2-yangyicong@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.h