mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
4d586b5724
The DFI is a unit which is suitable for measuring DDR utilization, but so far it could only be used as an event driver for the DDR frequency scaling driver. This adds perf support to the DFI driver. Usage with the 'perf' tool can look like: perf stat -a -e rockchip_ddr/cycles/,\ rockchip_ddr/read-bytes/,\ rockchip_ddr/write-bytes/,\ rockchip_ddr/bytes/ sleep 1 Performance counter stats for 'system wide': 1582524826 rockchip_ddr/cycles/ 1802.25 MB rockchip_ddr/read-bytes/ 1793.72 MB rockchip_ddr/write-bytes/ 3595.90 MB rockchip_ddr/bytes/ 1.014369709 seconds time elapsed perf support has been tested on a RK3568 and a RK3399, the latter with dual channel DDR. Link: https://lore.kernel.org/all/20231019064819.3496740-1-s.hauer@pengutronix.de/ Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [cw00.choi: Fix typo from 'write_acccess' to 'write_access'] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 lines
443 B
C
14 lines
443 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
#ifndef __SOC_RK3568_GRF_H
|
|
#define __SOC_RK3568_GRF_H
|
|
|
|
#define RK3568_PMUGRF_OS_REG2 0x208
|
|
#define RK3568_PMUGRF_OS_REG2_DRAMTYPE_INFO GENMASK(15, 13)
|
|
#define RK3568_PMUGRF_OS_REG2_BW_CH0 GENMASK(3, 2)
|
|
|
|
#define RK3568_PMUGRF_OS_REG3 0x20c
|
|
#define RK3568_PMUGRF_OS_REG3_DRAMTYPE_INFO_V3 GENMASK(13, 12)
|
|
#define RK3568_PMUGRF_OS_REG3_SYSREG_VERSION GENMASK(31, 28)
|
|
|
|
#endif /* __SOC_RK3568_GRF_H */
|