• Xu Yang's avatar
    drivers/perf: imx_ddr: Add support for NXP i.MX9 SoC DDRC PMU driver · 55691f99
    Xu Yang authored
    Add ddr performance monitor support for i.MX93.
    
    There are 11 counters for ddr performance events.
    - Counter 0 is a 64-bit counter that counts only clock cycles.
    - Counter 1-10 are 32-bit counters that can monitor counter-specific
      events in addition to counting reference events.
    
    For example:
      perf stat -a -e imx9_ddr0/ddrc_pm_1,counter=1/,imx9_ddr0/ddrc_pm_2,counter=2/ ls
    
    Besides, this ddr pmu support AXI filter capability. It's implemented as
    counter-specific events. It now supports read transaction, write transaction
    and read beat events which corresponding respecitively to counter 2, 3 and 4.
    axi_mask and axi_id need to be as event parameters.
    
    For example:
      perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_trans_filt,counter=2,axi_mask=ID_MASK,axi_id=ID/
      perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_trans_filt,counter=3,axi_mask=ID_MASK,axi_id=ID/
      perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt,counter=4,axi_mask=ID_...
    55691f99
fsl_imx9_ddr_perf.c 19.7 KB