[U-Boot] [PATCH v3 4/9] net: designware: Export the operation functions

Joe Hershberger joe.hershberger at gmail.com
Tue Nov 29 23:31:16 CET 2016


On Sun, Nov 27, 2016 at 11:01 AM, Simon Glass <sjg at chromium.org> wrote:
> Export all functions so that drivers can use them, or not, as the need
> arises.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>

With a minor nit below,

Acked-by: Joe Hershberger <joe.hershberger at ni.com>

> ---
>
> Changes in v3:
> - Add new patch to export the operation functions
>
> Changes in v2: None
>
>  drivers/net/designware.c | 19 +++++++++----------
>  drivers/net/designware.h |  9 +++++++++
>  2 files changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 0c596a7..f242fc6 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -271,7 +271,7 @@ static void _dw_eth_halt(struct dw_eth_dev *priv)
>         phy_shutdown(priv->phydev);
>  }
>
> -static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
> +int designware_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)

Modern functions are called "_start", not init. Also, this already
uses stop below, instead of halt. It would be nice to keep them
symmetric.

>  {
>         struct eth_mac_regs *mac_p = priv->mac_regs_p;
>         struct eth_dma_regs *dma_p = priv->dma_regs_p;
> @@ -330,7 +330,7 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
>         return 0;
>  }


More information about the U-Boot mailing list