mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: add more statistics from fw_util debugfs knobs
Print out exception state and program counters of WA/WM MCUs. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -597,6 +597,12 @@ mt7915_fw_util_wm_show(struct seq_file *file, void *data)
|
||||
{
|
||||
struct mt7915_dev *dev = file->private;
|
||||
|
||||
seq_printf(file, "Program counter: 0x%x\n", mt76_rr(dev, MT_WM_MCU_PC));
|
||||
seq_printf(file, "Exception state: 0x%x\n",
|
||||
is_mt7915(&dev->mt76) ?
|
||||
(u32)mt76_get_field(dev, MT_FW_EXCEPTION, GENMASK(15, 8)) :
|
||||
(u32)mt76_get_field(dev, MT_FW_EXCEPTION, GENMASK(7, 0)));
|
||||
|
||||
if (dev->fw.debug_wm) {
|
||||
seq_printf(file, "Busy: %u%% Peak busy: %u%%\n",
|
||||
mt76_rr(dev, MT_CPU_UTIL_BUSY_PCT),
|
||||
@@ -616,6 +622,8 @@ mt7915_fw_util_wa_show(struct seq_file *file, void *data)
|
||||
{
|
||||
struct mt7915_dev *dev = file->private;
|
||||
|
||||
seq_printf(file, "Program counter: 0x%x\n", mt76_rr(dev, MT_WA_MCU_PC));
|
||||
|
||||
if (dev->fw.debug_wa)
|
||||
return mt7915_mcu_wa_cmd(dev, MCU_WA_PARAM_CMD(QUERY),
|
||||
MCU_WA_PARAM_CPU_UTIL, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user