diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2015-10-22 14:31:23 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2021-02-15 13:59:10 +0000 |
commit | f223a66d966060bfc180299729322797dd2681ef (patch) | |
tree | ca07ff9413e8c7d72953f1fc5bb3a35f4f1fe4ad /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | f40ddce88593482919761f74910f42f4b84c004b (diff) |
net: dsa: mv88e6xxx: add debugfs interface
Add a debugfs directory named mv88e6xxx.X where X is the DSA switch
index. Mount the debugfs file system with:
# mount -t debugfs none /sys/kernel/debug
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
[Modified by rmk for current kernels.]
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 54aa942eedaa..302cbb52285f 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -2848,8 +2848,13 @@ static int mv88e6390_setup_errata(struct mv88e6xxx_chip *chip) return mv88e6xxx_software_reset(chip); } +#include "mv88e6xxx_debugfs.c" + static void mv88e6xxx_teardown(struct dsa_switch *ds) { + struct mv88e6xxx_chip *chip = ds->priv; + + mv88e6xxx_remove_debugfs(chip); mv88e6xxx_teardown_devlink_params(ds); dsa_devlink_resources_unregister(ds); mv88e6xxx_teardown_devlink_regions(ds); @@ -2969,6 +2974,8 @@ static int mv88e6xxx_setup(struct dsa_switch *ds) if (err) goto unlock; + mv88e6xxx_init_debugfs(chip); + unlock: mv88e6xxx_reg_unlock(chip); |