]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: zynqmp: Enable non-invasive CCI-400 PMU debug
authorSean Anderson <sean.anderson@linux.dev>
Thu, 5 Sep 2024 17:18:33 +0000 (13:18 -0400)
committerMichal Simek <michal.simek@amd.com>
Fri, 20 Sep 2024 06:31:57 +0000 (08:31 +0200)
Set NIDEN, enabling non-invasive debug for the CCI-400 PMU. Otherwise,
the PMU is effectively disabled.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240905171833.325548-3-sean.anderson@linux.dev
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/arm/mach-zynqmp/include/mach/hardware.h
board/xilinx/zynqmp/zynqmp.c

index eb8fffaf192e59c7fd89b1f99fe16f74000b8b8a..49e449ebd61dff1aae336f88f565b536756c8ecf 100644 (file)
@@ -132,6 +132,9 @@ struct crfapb_regs {
 
 #define crfapb_base ((struct crfapb_regs *)ZYNQMP_CRF_APB_BASEADDR)
 
+#define ZYNQMP_CCI_REG_CCI_MISC_CTRL   0xFD5E0040
+#define ZYNQMP_CCI_REG_CCI_MISC_CTRL_NIDEN     BIT(1)
+
 #define ZYNQMP_APU_BASEADDR    0xFD5C0000
 
 struct apu_regs {
index 56e3b36ca99e89ce46654965f908f7f7e3cdaf81..20a675c010d562e8c4a61b271b6d09d9c40f42cf 100644 (file)
@@ -76,6 +76,10 @@ int __maybe_unused psu_uboot_init(void)
        writel(0x04920492, ZYNQMP_IOU_SECURE_SLCR);
        writel(0x00920492, ZYNQMP_IOU_SECURE_SLCR + 4);
 
+       /* Enable CCI PMU events */
+       writel(ZYNQMP_CCI_REG_CCI_MISC_CTRL_NIDEN,
+              ZYNQMP_CCI_REG_CCI_MISC_CTRL);
+
        /* Delay is required for clocks to be propagated */
        udelay(1000000);