Skip to content

Commit

Permalink
AXI performance monitor driver (#2222)
Browse files Browse the repository at this point in the history
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 <james.hughes@raspberrypi.org>
  • Loading branch information
JamesH65 authored and popcornmix committed Nov 15, 2017
1 parent e2b58bc commit 2a25d75
Show file tree
Hide file tree
Showing 8 changed files with 660 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
fb = &fb;
vchiq = &vchiq;
thermal = &thermal;
axiperf = &axiperf;
};

leds: leds {
Expand Down Expand Up @@ -119,6 +120,7 @@
sd_force_pio = <&sdhost>,"brcm,force-pio?";
sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
sd_debug = <&sdhost>,"brcm,debug";
axiperf = <&axiperf>,"status";
};
};

Expand Down
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/bcm270x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@
/* Add alias */
status = "disabled";
};

axiperf: axiperf {
compatible = "brcm,bcm2835-axiperf";
reg = <0x7e009800 0x100>,
<0x7ee08000 0x100>;
firmware = <&firmware>;
status = "disabled";
};
};

vdd_5v0_reg: fixedregulator_5v0 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ CONFIG_INV_MPU6050_I2C=m
CONFIG_BMP280=m
CONFIG_PWM_BCM2835=m
CONFIG_PWM_PCA9685=m
CONFIG_RPI_AXIPERF=m
CONFIG_RASPBERRYPI_FIRMWARE=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ CONFIG_INV_MPU6050_I2C=m
CONFIG_BMP280=m
CONFIG_PWM_BCM2835=m
CONFIG_PWM_PCA9685=m
CONFIG_RPI_AXIPERF=m
CONFIG_RASPBERRYPI_FIRMWARE=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
Expand Down
7 changes: 7 additions & 0 deletions drivers/perf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@ config XGENE_PMU
help
Say y if you want to use APM X-Gene SoC performance monitors.

config RPI_AXIPERF
depends on ARCH_BCM2835
tristate "RaspberryPi AXI Performance monitors"
default n
help
Say y if you want to use Raspberry Pi AXI performance monitors, m if
you want to build it as a module.
endmenu
1 change: 1 addition & 0 deletions drivers/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
obj-$(CONFIG_QCOM_L2_PMU) += qcom_l2_pmu.o
obj-$(CONFIG_QCOM_L3_PMU) += qcom_l3_pmu.o
obj-$(CONFIG_XGENE_PMU) += xgene_pmu.o
obj-$(CONFIG_RPI_AXIPERF) += raspberrypi_axi_monitor.o
Loading

0 comments on commit 2a25d75

Please sign in to comment.