Commit 732fdf0e authored by Giuseppe CAVALLARO's avatar Giuseppe CAVALLARO Committed by David S. Miller

stmmac: review driver when run kernel-doc

When run ./scripts/kernel-doc several warnings are reported
so this patch fix them.
Also it reviews many comments and adds new ones.
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 915c199f
/** /*
* dwmac-sti.c - STMicroelectronics DWMAC Specific Glue layer * dwmac-sti.c - STMicroelectronics DWMAC Specific Glue layer
* *
* Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited * Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited
...@@ -37,9 +37,8 @@ ...@@ -37,9 +37,8 @@
#define IS_PHY_IF_MODE_GBIT(iface) (IS_PHY_IF_MODE_RGMII(iface) || \ #define IS_PHY_IF_MODE_GBIT(iface) (IS_PHY_IF_MODE_RGMII(iface) || \
iface == PHY_INTERFACE_MODE_GMII) iface == PHY_INTERFACE_MODE_GMII)
/* STiH4xx register definitions (STiH415/STiH416/STiH407/STiH410 families) */ /* STiH4xx register definitions (STiH415/STiH416/STiH407/STiH410 families)
*
/**
* Below table summarizes the clock requirement and clock sources for * Below table summarizes the clock requirement and clock sources for
* supported phy interface modes with link speeds. * supported phy interface modes with link speeds.
* ________________________________________________ * ________________________________________________
...@@ -78,9 +77,7 @@ ...@@ -78,9 +77,7 @@
#define STIH4XX_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7) #define STIH4XX_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7)
#define STIH4XX_ETH_SEL_TXCLK_NOT_CLK125 BIT(6) #define STIH4XX_ETH_SEL_TXCLK_NOT_CLK125 BIT(6)
/* STiD127 register definitions */ /* STiD127 register definitions
/**
*----------------------- *-----------------------
* src |BIT(6)| BIT(7)| * src |BIT(6)| BIT(7)|
*----------------------- *-----------------------
...@@ -106,13 +103,13 @@ ...@@ -106,13 +103,13 @@
#define EN_MASK GENMASK(1, 1) #define EN_MASK GENMASK(1, 1)
#define EN BIT(1) #define EN BIT(1)
/** /*
* 3 bits [4:2] * 3 bits [4:2]
* 000-GMII/MII * 000-GMII/MII
* 001-RGMII * 001-RGMII
* 010-SGMII * 010-SGMII
* 100-RMII * 100-RMII
*/ */
#define MII_PHY_SEL_MASK GENMASK(4, 2) #define MII_PHY_SEL_MASK GENMASK(4, 2)
#define ETH_PHY_SEL_RMII BIT(4) #define ETH_PHY_SEL_RMII BIT(4)
#define ETH_PHY_SEL_SGMII BIT(3) #define ETH_PHY_SEL_SGMII BIT(3)
......
/** /*
* dwmac-sunxi.c - Allwinner sunxi DWMAC specific glue layer * dwmac-sunxi.c - Allwinner sunxi DWMAC specific glue layer
* *
* Copyright (C) 2013 Chen-Yu Tsai * Copyright (C) 2013 Chen-Yu Tsai
......
...@@ -51,7 +51,11 @@ MODULE_DEVICE_TABLE(of, stmmac_dt_ids); ...@@ -51,7 +51,11 @@ MODULE_DEVICE_TABLE(of, stmmac_dt_ids);
#ifdef CONFIG_OF #ifdef CONFIG_OF
/* This function validates the number of Multicast filtering bins specified /**
* dwmac1000_validate_mcast_bins - validates the number of Multicast filter bins
* @mcast_bins: Multicast filtering bins
* Description:
* this function validates the number of Multicast filtering bins specified
* by the configuration through the device tree. The Synopsys GMAC supports * by the configuration through the device tree. The Synopsys GMAC supports
* 64 bins, 128 bins, or 256 bins. "bins" refer to the division of CRC * 64 bins, 128 bins, or 256 bins. "bins" refer to the division of CRC
* number space. 64 bins correspond to 6 bits of the CRC, 128 corresponds * number space. 64 bins correspond to 6 bits of the CRC, 128 corresponds
...@@ -77,7 +81,11 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins) ...@@ -77,7 +81,11 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins)
return x; return x;
} }
/* This function validates the number of Unicast address entries supported /**
* dwmac1000_validate_ucast_entries - validate the Unicast address entries
* @ucast_entries: number of Unicast address entries
* Description:
* This function validates the number of Unicast address entries supported
* by a particular Synopsys 10/100/1000 controller. The Synopsys controller * by a particular Synopsys 10/100/1000 controller. The Synopsys controller
* supports 1, 32, 64, or 128 Unicast filter entries for it's Unicast filter * supports 1, 32, 64, or 128 Unicast filter entries for it's Unicast filter
* logic. This function validates a valid, supported configuration is * logic. This function validates a valid, supported configuration is
...@@ -103,6 +111,15 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries) ...@@ -103,6 +111,15 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
return x; return x;
} }
/**
* stmmac_probe_config_dt - parse device-tree driver parameters
* @pdev: platform_device structure
* @plat: driver data platform structure
* @mac: MAC address to use
* Description:
* this function is to read the driver parameters from device-tree and
* set some private fields that will be used by the main at runtime.
*/
static int stmmac_probe_config_dt(struct platform_device *pdev, static int stmmac_probe_config_dt(struct platform_device *pdev,
struct plat_stmmacenet_data *plat, struct plat_stmmacenet_data *plat,
const char **mac) const char **mac)
...@@ -242,11 +259,11 @@ static int stmmac_probe_config_dt(struct platform_device *pdev, ...@@ -242,11 +259,11 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
#endif /* CONFIG_OF */ #endif /* CONFIG_OF */
/** /**
* stmmac_pltfr_probe * stmmac_pltfr_probe - platform driver probe.
* @pdev: platform device pointer * @pdev: platform device pointer
* Description: platform_device probe function. It allocates * Description: platform_device probe function. It is to allocate
* the necessary resources and invokes the main to init * the necessary platform resources, invoke custom helper (if required) and
* the net device, register the mdio bus etc. * invoke the main probe function.
*/ */
static int stmmac_pltfr_probe(struct platform_device *pdev) static int stmmac_pltfr_probe(struct platform_device *pdev)
{ {
...@@ -363,6 +380,13 @@ static int stmmac_pltfr_remove(struct platform_device *pdev) ...@@ -363,6 +380,13 @@ static int stmmac_pltfr_remove(struct platform_device *pdev)
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
/**
* stmmac_pltfr_suspend
* @dev: device pointer
* Description: this function is invoked when suspend the driver and it direcly
* call the main suspend function and then, if required, on some platform, it
* can call an exit helper.
*/
static int stmmac_pltfr_suspend(struct device *dev) static int stmmac_pltfr_suspend(struct device *dev)
{ {
int ret; int ret;
...@@ -377,6 +401,13 @@ static int stmmac_pltfr_suspend(struct device *dev) ...@@ -377,6 +401,13 @@ static int stmmac_pltfr_suspend(struct device *dev)
return ret; return ret;
} }
/**
* stmmac_pltfr_resume
* @dev: device pointer
* Description: this function is invoked when resume the driver before calling
* the main resume function, on some platforms, it can call own init helper
* if required.
*/
static int stmmac_pltfr_resume(struct device *dev) static int stmmac_pltfr_resume(struct device *dev)
{ {
struct net_device *ndev = dev_get_drvdata(dev); struct net_device *ndev = dev_get_drvdata(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment