diff mbox series

[15/18] common: board_r: Drop initr_bbmii wrapper

Message ID 20201105090955.29641-16-ovidiu.panait@windriver.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Minor board_f/board_r cleanups | expand

Commit Message

Ovidiu Panait Nov. 5, 2020, 9:09 a.m. UTC
Add a return value to bb_miiphy_init and use it directly in the
post-relocation init sequence, rather than using a wrapper stub.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---
 common/board_r.c           | 10 +---------
 drivers/net/phy/miiphybb.c |  4 +++-
 include/miiphy.h           |  2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)

Comments

Simon Glass Nov. 14, 2020, 3:17 p.m. UTC | #1
On Thu, 5 Nov 2020 at 03:11, Ovidiu Panait <ovidiu.panait@windriver.com> wrote:
>
> Add a return value to bb_miiphy_init and use it directly in the
> post-relocation init sequence, rather than using a wrapper stub.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> ---
>  common/board_r.c           | 10 +---------
>  drivers/net/phy/miiphybb.c |  4 +++-
>  include/miiphy.h           |  2 +-
>  3 files changed, 5 insertions(+), 11 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/common/board_r.c b/common/board_r.c
index b2d8331d6b..3ad4443c22 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -525,14 +525,6 @@  static int initr_scsi(void)
 }
 #endif
 
-#ifdef CONFIG_BITBANGMII
-static int initr_bbmii(void)
-{
-	bb_miiphy_init();
-	return 0;
-}
-#endif
-
 #ifdef CONFIG_CMD_NET
 static int initr_net(void)
 {
@@ -774,7 +766,7 @@  static init_fnc_t init_sequence_r[] = {
 	initr_scsi,
 #endif
 #ifdef CONFIG_BITBANGMII
-	initr_bbmii,
+	bb_miiphy_init,
 #endif
 #ifdef CONFIG_PCI_ENDPOINT
 	pci_ep_init,
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index ba97a54c06..59a32c4913 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -105,7 +105,7 @@  int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
 			  sizeof(bb_miiphy_buses[0]);
 #endif
 
-void bb_miiphy_init(void)
+int bb_miiphy_init(void)
 {
 	int i;
 
@@ -124,6 +124,8 @@  void bb_miiphy_init(void)
 			bb_miiphy_buses[i].init(&bb_miiphy_buses[i]);
 		}
 	}
+
+	return 0;
 }
 
 static inline struct bb_miiphy_bus *bb_miiphy_getbus(const char *devname)
diff --git a/include/miiphy.h b/include/miiphy.h
index 61c136b114..c166f54e36 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -81,7 +81,7 @@  struct bb_miiphy_bus {
 extern struct bb_miiphy_bus bb_miiphy_buses[];
 extern int bb_miiphy_buses_num;
 
-void bb_miiphy_init(void);
+int bb_miiphy_init(void);
 int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg);
 int bb_miiphy_write(struct mii_dev *miidev, int addr, int devad, int reg,
 		    u16 value);