diff mbox series

[PATCHv4,06/16] powerpc: mpc8xxx: Don't compile cpu_eth_init() when DM_ETH enabled

Message ID 20200701165857.39930-7-Zhiqiang.Hou@nxp.com
State Superseded
Headers show
Series powerpc: covert p1010, p1020 and p2020 RDB board to DM_ETH | expand

Commit Message

Zhiqiang Hou July 1, 2020, 4:58 p.m. UTC
From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>

The cpu_eth_init() is only used by the legacy ethernet driver framework.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
---
V4:
 - No change.

 arch/powerpc/cpu/mpc8xxx/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vladimir Oltean July 4, 2020, 8:13 a.m. UTC | #1
On Thu, Jul 02, 2020 at 12:58:47AM +0800, Zhiqiang Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
> 
> The cpu_eth_init() is only used by the legacy ethernet driver framework.
> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>

> V4:
>  - No change.
> 
>  arch/powerpc/cpu/mpc8xxx/cpu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
> index da0a80e6fc..b904943b0e 100644
> --- a/arch/powerpc/cpu/mpc8xxx/cpu.c
> +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
> @@ -347,6 +347,7 @@ int fixup_cpu(void)
>   * Initializes on-chip ethernet controllers.
>   * to override, implement board_eth_init()
>   */
> +#ifndef CONFIG_DM_ETH
>  int cpu_eth_init(bd_t *bis)
>  {
>  #if defined(CONFIG_ETHER_ON_FCC)
> @@ -370,3 +371,4 @@ int cpu_eth_init(bd_t *bis)
>  #endif
>  	return 0;
>  }
> +#endif
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index da0a80e6fc..b904943b0e 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -347,6 +347,7 @@  int fixup_cpu(void)
  * Initializes on-chip ethernet controllers.
  * to override, implement board_eth_init()
  */
+#ifndef CONFIG_DM_ETH
 int cpu_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_ETHER_ON_FCC)
@@ -370,3 +371,4 @@  int cpu_eth_init(bd_t *bis)
 #endif
 	return 0;
 }
+#endif