Skip to content

Commit 2a25d75

Browse files
JamesH65popcornmix
authored andcommitted
AXI performance monitor driver (#2222)
Uses the debugfs I/F to provide access to the AXI bus performance monitors. Requires the new mailbox peripheral access for access to the VPU performance registers, system bus access is done using direct register reads. Signed-off-by: James Hughes <[email protected]>
1 parent e2b58bc commit 2a25d75

File tree

8 files changed

+660
-0
lines changed

8 files changed

+660
-0
lines changed

arch/arm/boot/dts/bcm2708-rpi.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
fb = &fb;
3838
vchiq = &vchiq;
3939
thermal = &thermal;
40+
axiperf = &axiperf;
4041
};
4142

4243
leds: leds {
@@ -119,6 +120,7 @@
119120
sd_force_pio = <&sdhost>,"brcm,force-pio?";
120121
sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
121122
sd_debug = <&sdhost>,"brcm,debug";
123+
axiperf = <&axiperf>,"status";
122124
};
123125
};
124126

arch/arm/boot/dts/bcm270x.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@
130130
/* Add alias */
131131
status = "disabled";
132132
};
133+
134+
axiperf: axiperf {
135+
compatible = "brcm,bcm2835-axiperf";
136+
reg = <0x7e009800 0x100>,
137+
<0x7ee08000 0x100>;
138+
firmware = <&firmware>;
139+
status = "disabled";
140+
};
133141
};
134142

135143
vdd_5v0_reg: fixedregulator_5v0 {

arch/arm/configs/bcm2709_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ CONFIG_INV_MPU6050_I2C=m
11791179
CONFIG_BMP280=m
11801180
CONFIG_PWM_BCM2835=m
11811181
CONFIG_PWM_PCA9685=m
1182+
CONFIG_RPI_AXIPERF=m
11821183
CONFIG_RASPBERRYPI_FIRMWARE=y
11831184
CONFIG_EXT4_FS=y
11841185
CONFIG_EXT4_FS_POSIX_ACL=y

arch/arm/configs/bcmrpi_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ CONFIG_INV_MPU6050_I2C=m
11851185
CONFIG_BMP280=m
11861186
CONFIG_PWM_BCM2835=m
11871187
CONFIG_PWM_PCA9685=m
1188+
CONFIG_RPI_AXIPERF=m
11881189
CONFIG_RASPBERRYPI_FIRMWARE=y
11891190
CONFIG_EXT4_FS=y
11901191
CONFIG_EXT4_FS_POSIX_ACL=y

drivers/perf/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,11 @@ config XGENE_PMU
4343
help
4444
Say y if you want to use APM X-Gene SoC performance monitors.
4545

46+
config RPI_AXIPERF
47+
depends on ARCH_BCM2835
48+
tristate "RaspberryPi AXI Performance monitors"
49+
default n
50+
help
51+
Say y if you want to use Raspberry Pi AXI performance monitors, m if
52+
you want to build it as a module.
4653
endmenu

drivers/perf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
33
obj-$(CONFIG_QCOM_L2_PMU) += qcom_l2_pmu.o
44
obj-$(CONFIG_QCOM_L3_PMU) += qcom_l3_pmu.o
55
obj-$(CONFIG_XGENE_PMU) += xgene_pmu.o
6+
obj-$(CONFIG_RPI_AXIPERF) += raspberrypi_axi_monitor.o

0 commit comments

Comments
 (0)