[U-Boot] [PATCH] socfpga: initialize designware ethernet

Marek Vasut marex at denx.de
Fri Jul 11 11:49:49 CEST 2014


On Friday, July 11, 2014 at 11:45:56 AM, Pavel Machek wrote:
[...]
> diff --git a/board/altera/socfpga/socfpga_cyclone5.c
> b/board/altera/socfpga/socfpga_cyclone5.c index a960eb6..2214ab7 100644
> --- a/board/altera/socfpga/socfpga_cyclone5.c
> +++ b/board/altera/socfpga/socfpga_cyclone5.c
> @@ -1,5 +1,6 @@
>  /*
>   *  Copyright (C) 2012 Altera Corporation <www.altera.com>
> + *  Copyright (C) 2014 Pavel Machek, pavel at denx.de

NAK ;-) Can you please keep the email address in this extremely relevant comment 
in the same format as above (in the <> chars) .

>   *
>   * SPDX-License-Identifier:	GPL-2.0+
>   */
> @@ -7,7 +8,7 @@
>  #include <common.h>
>  #include <asm/arch/reset_manager.h>
>  #include <asm/io.h>
> -
> +#include <miiphy.h>
>  #include <netdev.h>
> 
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -67,5 +68,11 @@ int overwrite_console(void)
>  /* We know all the init functions have been run now */
>  int board_eth_init(bd_t *bis)
>  {
> +#if !defined(CONFIG_SOCFPGA_VIRTUAL_TARGET) && !defined(CONFIG_SPL_BUILD)
> +       /* initialize and register the emac */
> +	int rval = designware_initialize(CONFIG_EMAC_BASE,
> CONFIG_PHY_INTERFACE_MODE); +	return rval;
> +#else
>  	return 0;
> +#endif
>  }

Can this all not go into cpu_eth_init() and into arch/arm/... instead ?

[...]

Best regards,
Marek Vasut


More information about the U-Boot mailing list