Changeset 19031


Ignore:
Timestamp:
2010-01-04T15:28:25+01:00 (8 years ago)
Author:
juhosg
Message:

ar71xx: add dummy debugfs support for the ag71xx driver

Location:
trunk/target/linux/ar71xx
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/config-2.6.30

    r18951 r19031  
    44CONFIG_AG71XX_AR8216_SUPPORT=y 
    55# CONFIG_AG71XX_DEBUG is not set 
     6# CONFIG_AG71XX_DEBUG_FS is not set 
    67CONFIG_AR71XX_DEV_AP91_PCI=y 
    78CONFIG_AR71XX_DEV_AP94_PCI=y 
  • trunk/target/linux/ar71xx/config-2.6.31

    r18951 r19031  
    44CONFIG_AG71XX_AR8216_SUPPORT=y 
    55# CONFIG_AG71XX_DEBUG is not set 
     6# CONFIG_AG71XX_DEBUG_FS is not set 
    67# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
    78# CONFIG_AR7 is not set 
  • trunk/target/linux/ar71xx/config-2.6.32

    r18951 r19031  
    44CONFIG_AG71XX_AR8216_SUPPORT=y 
    55# CONFIG_AG71XX_DEBUG is not set 
     6# CONFIG_AG71XX_DEBUG_FS is not set 
    67# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
    78# CONFIG_AR7 is not set 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/Kconfig

    r15427 r19031  
    1414          Atheros AR71xx built-in ethernet driver debugging messages. 
    1515 
     16config AG71XX_DEBUG_FS 
     17        bool "Atheros AR71xx built-in ethernet driver debugfs support" 
     18        depends on AG71XX && DEBUG_FS 
     19        default n 
     20        help 
     21          Say Y, if you need access to various statistics provided by 
     22          the ag71xx driver. 
     23 
    1624config AG71XX_AR8216_SUPPORT 
    1725        bool "special support for the Atheros AR8216 switch" 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/Makefile

    r15245 r19031  
    33# 
    44 
    5 ag71xx-y        += ag71xx_main.o  
    6 ag71xx-y        += ag71xx_ethtool.o  
    7 ag71xx-y        += ag71xx_phy.o  
     5ag71xx-y        += ag71xx_main.o 
     6ag71xx-y        += ag71xx_ethtool.o 
     7ag71xx-y        += ag71xx_phy.o 
    88ag71xx-y        += ag71xx_mdio.o 
    99 
    10 ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT) += ag71xx_ar8216.o 
     10ag71xx-$(CONFIG_AG71XX_DEBUG_FS)        += ag71xx_debugfs.o 
     11ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT)  += ag71xx_ar8216.o 
    1112 
    1213obj-$(CONFIG_AG71XX)    += ag71xx.o 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h

    r18692 r19031  
    22 *  Atheros AR71xx built-in ethernet mac driver 
    33 * 
    4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
     
    110110}; 
    111111 
     112struct ag71xx_debug { 
     113        struct dentry           *debugfs_dir; 
     114}; 
     115 
    112116struct ag71xx { 
    113117        void __iomem            *mac_base; 
     
    132136        struct work_struct      restart_work; 
    133137        struct timer_list       oom_timer; 
     138 
     139#ifdef CONFIG_AG71XX_DEBUG_FS 
     140        struct ag71xx_debug     debug; 
     141#endif 
    134142}; 
    135143 
     
    451459#endif 
    452460 
     461#ifdef CONFIG_AG71XX_DEBUG_FS 
     462int ag71xx_debugfs_root_init(void); 
     463void ag71xx_debugfs_root_exit(void); 
     464int ag71xx_debugfs_init(struct ag71xx *ag); 
     465void ag71xx_debugfs_exit(struct ag71xx *ag); 
     466#else 
     467static inline int ag71xx_debugfs_root_init(void) { return 0; } 
     468static inline void ag71xx_debugfs_root_exit(void) {} 
     469static inline int ag71xx_debugfs_init(struct ag71xx *ag) { return 0; } 
     470static inline void ag71xx_debugfs_exit(struct ag71xx *ag) {} 
     471#endif /* CONFIG_AG71XX_DEBUG_FS */ 
     472 
    453473#endif /* _AG71XX_H */ 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c

    r15245 r19031  
    33 *  Special support for the Atheros ar8216 switch chip 
    44 * 
    5  *  Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org> 
     5 *  Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org> 
    66 * 
    77 *  Based on Atheros' AG7100 driver 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c

    r15629 r19031  
    22 *  Atheros AR71xx built-in ethernet mac driver 
    33 * 
    4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c

    r18789 r19031  
    22 *  Atheros AR71xx built-in ethernet mac driver 
    33 * 
    4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
     
    923923                goto err_unregister_netdev; 
    924924 
     925        err = ag71xx_debugfs_init(ag); 
     926        if (err) 
     927                goto err_phy_disconnect; 
     928 
    925929        platform_set_drvdata(pdev, dev); 
    926930 
    927931        return 0; 
    928932 
     933 err_phy_disconnect: 
     934        ag71xx_phy_disconnect(ag); 
    929935 err_unregister_netdev: 
    930936        unregister_netdev(dev); 
     
    949955                struct ag71xx *ag = netdev_priv(dev); 
    950956 
     957                ag71xx_debugfs_exit(ag); 
    951958                ag71xx_phy_disconnect(ag); 
    952959                unregister_netdev(dev); 
     
    973980        int ret; 
    974981 
     982        ret = ag71xx_debugfs_root_init(); 
     983        if (ret) 
     984                goto err_out; 
     985 
    975986        ret = ag71xx_mdio_driver_init(); 
    976987        if (ret) 
    977                 goto err_out; 
     988                goto err_debugfs_exit; 
    978989 
    979990        ret = platform_driver_register(&ag71xx_driver); 
     
    985996 err_mdio_exit: 
    986997        ag71xx_mdio_driver_exit(); 
     998 err_debugfs_exit: 
     999        ag71xx_debugfs_root_exit(); 
    9871000 err_out: 
    9881001        return ret; 
     
    9931006        platform_driver_unregister(&ag71xx_driver); 
    9941007        ag71xx_mdio_driver_exit(); 
     1008        ag71xx_debugfs_root_exit(); 
    9951009} 
    9961010 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c

    r18692 r19031  
    22 *  Atheros AR71xx built-in ethernet mac driver 
    33 * 
    4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c

    r18755 r19031  
    22 *  Atheros AR71xx built-in ethernet mac driver 
    33 * 
    4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
Note: See TracChangeset for help on using the changeset viewer.