ramips: raeth: add debugfs support
[librecmc/librecmc.git] / target / linux / ramips / files / drivers / net / ethernet / ramips / ramips_eth.h
index 1d151df687aee86af9591fa9ea8c293cb663d70e..ea3e9234038056f23df3a133af3ed48e041aeb8c 100644 (file)
@@ -213,6 +213,10 @@ struct ramips_tx_dma {
        unsigned int txd4;
 } __packed __aligned(4);
 
+struct raeth_debug {
+       struct dentry           *debugfs_dir;
+};
+
 struct raeth_priv
 {
        dma_addr_t              rx_desc_dma;
@@ -243,6 +247,22 @@ struct raeth_priv
        int                     mii_irq[PHY_MAX_ADDR];
        struct phy_device       *phy_dev;
        spinlock_t              phy_lock;
+
+#ifdef CONFIG_NET_RAMIPS_DEBUG_FS
+       struct raeth_debug      debug;
+#endif
 };
 
+#ifdef CONFIG_NET_RAMIPS_DEBUG_FS
+int raeth_debugfs_root_init(void);
+void raeth_debugfs_root_exit(void);
+int raeth_debugfs_init(struct raeth_priv *re);
+void raeth_debugfs_exit(struct raeth_priv *re);
+#else
+static inline int raeth_debugfs_root_init(void) { return 0; }
+static inline void raeth_debugfs_root_exit(void) {}
+static inline int raeth_debugfs_init(struct raeth_priv *re) { return 0; }
+static inline void raeth_debugfs_exit(struct raeth_priv *re) {}
+#endif /* CONFIG_NET_RAMIPS_DEBUG_FS */
+
 #endif /* RAMIPS_ETH_H */