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>
19 lines
486 B
C
19 lines
486 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Rockchip General Register Files definitions
|
|
*
|
|
* Copyright (c) 2018, Collabora Ltd.
|
|
* Author: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
*/
|
|
|
|
#ifndef __SOC_RK3399_GRF_H
|
|
#define __SOC_RK3399_GRF_H
|
|
|
|
/* PMU GRF Registers */
|
|
#define RK3399_PMUGRF_OS_REG2 0x308
|
|
#define RK3399_PMUGRF_OS_REG2_DDRTYPE GENMASK(15, 13)
|
|
#define RK3399_PMUGRF_OS_REG2_BW_CH0 GENMASK(3, 2)
|
|
#define RK3399_PMUGRF_OS_REG2_BW_CH1 GENMASK(19, 18)
|
|
|
|
#endif
|