diff mbox series

[PATCHv3,12/15] powerpc: p1010rdb: Compile legacy ethernet init function when no DM_ETH

Message ID 20200612151735.49048-13-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 June 12, 2020, 3:17 p.m. UTC
From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>

The board_eth_init() is only used by legacy ethernet driver framework,
so do not compile it when DM_ETH config has been selected.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
---
V3:
 - Rebase the patch, no change intended.

 board/freescale/p1010rdb/p1010rdb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vladimir Oltean June 12, 2020, 8:24 p.m. UTC | #1
On Fri, 12 Jun 2020 at 18:23, Zhiqiang Hou <Zhiqiang.Hou at nxp.com> wrote:
>
> From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
>
> The board_eth_init() is only used by legacy ethernet driver framework,
> so do not compile it when DM_ETH config has been selected.
>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
> ---

Ideally shouldn't all p1010rdb configs be converted to DM_ETH, and
then board_eth_init can be deleted? What was the problem with the rest
of the configs?

> V3:
>  - Rebase the patch, no change intended.
>
>  board/freescale/p1010rdb/p1010rdb.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
> index 66ccc0bd1e..309f4daa88 100644
> --- a/board/freescale/p1010rdb/p1010rdb.c
> +++ b/board/freescale/p1010rdb/p1010rdb.c
> @@ -484,6 +484,7 @@ int checkboard(void)
>         return 0;
>  }
>
> +#ifndef CONFIG_DM_ETH
>  int board_eth_init(bd_t *bis)
>  {
>  #ifdef CONFIG_TSEC_ENET
> @@ -524,6 +525,7 @@ int board_eth_init(bd_t *bis)
>
>         return pci_eth_init(bis);
>  }
> +#endif
>
>  #if defined(CONFIG_OF_BOARD_SETUP)
>  void fdt_del_flexcan(void *blob)
> --
> 2.25.1
>
Zhiqiang Hou June 15, 2020, 8:54 a.m. UTC | #2
Hi Vladimir,

Thanks a lot for your comments!

> -----Original Message-----
> From: Vladimir Oltean [mailto:olteanv at gmail.com]
> Sent: 2020?6?13? 4:25
> To: Z.q. Hou <zhiqiang.hou at nxp.com>
> Cc: u-boot <u-boot at lists.denx.de>; Priyanka Jain <priyanka.jain at nxp.com>;
> Bin Meng <bmeng.cn at gmail.com>
> Subject: Re: [PATCHv3 12/15] powerpc: p1010rdb: Compile legacy ethernet
> init function when no DM_ETH
> 
> On Fri, 12 Jun 2020 at 18:23, Zhiqiang Hou <Zhiqiang.Hou at nxp.com> wrote:
> >
> > From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
> >
> > The board_eth_init() is only used by legacy ethernet driver framework,
> > so do not compile it when DM_ETH config has been selected.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
> > ---
> 
> Ideally shouldn't all p1010rdb configs be converted to DM_ETH, and then
> board_eth_init can be deleted? What was the problem with the rest of the
> configs?
> 

Now the SECBOOT defconfigs are still not converted.

Thanks,
Zhiqiang

> > V3:
> >  - Rebase the patch, no change intended.
> >
> >  board/freescale/p1010rdb/p1010rdb.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/board/freescale/p1010rdb/p1010rdb.c
> > b/board/freescale/p1010rdb/p1010rdb.c
> > index 66ccc0bd1e..309f4daa88 100644
> > --- a/board/freescale/p1010rdb/p1010rdb.c
> > +++ b/board/freescale/p1010rdb/p1010rdb.c
> > @@ -484,6 +484,7 @@ int checkboard(void)
> >         return 0;
> >  }
> >
> > +#ifndef CONFIG_DM_ETH
> >  int board_eth_init(bd_t *bis)
> >  {
> >  #ifdef CONFIG_TSEC_ENET
> > @@ -524,6 +525,7 @@ int board_eth_init(bd_t *bis)
> >
> >         return pci_eth_init(bis);
> >  }
> > +#endif
> >
> >  #if defined(CONFIG_OF_BOARD_SETUP)
> >  void fdt_del_flexcan(void *blob)
> > --
> > 2.25.1
> >
diff mbox series

Patch

diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 66ccc0bd1e..309f4daa88 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -484,6 +484,7 @@  int checkboard(void)
 	return 0;
 }
 
+#ifndef CONFIG_DM_ETH
 int board_eth_init(bd_t *bis)
 {
 #ifdef CONFIG_TSEC_ENET
@@ -524,6 +525,7 @@  int board_eth_init(bd_t *bis)
 
 	return pci_eth_init(bis);
 }
+#endif
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 void fdt_del_flexcan(void *blob)