Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / cxl / pmu.h
blobb1e9bcd9f28cffa318e015c17c97a55daad7c02b
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright(c) 2023 Huawei
4 * CXL Specification rev 3.0 Setion 8.2.7 (CPMU Register Interface)
5 */
6 #ifndef CXL_PMU_H
7 #define CXL_PMU_H
8 #include <linux/device.h>
10 enum cxl_pmu_type {
11 CXL_PMU_MEMDEV,
14 #define CXL_PMU_REGMAP_SIZE 0xe00 /* Table 8-32 CXL 3.0 specification */
15 struct cxl_pmu {
16 struct device dev;
17 void __iomem *base;
18 int assoc_id;
19 int index;
20 enum cxl_pmu_type type;
23 #define to_cxl_pmu(dev) container_of(dev, struct cxl_pmu, dev)
24 struct cxl_pmu_regs;
25 int devm_cxl_pmu_add(struct device *parent, struct cxl_pmu_regs *regs,
26 int assoc_id, int idx, enum cxl_pmu_type type);
28 #endif