mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
common: board_r: Drop initr_bbmii wrapper
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> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ce41e73523
commit
c65abc70fb
@ -534,14 +534,6 @@ static int initr_scsi(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BITBANGMII
|
|
||||||
static int initr_bbmii(void)
|
|
||||||
{
|
|
||||||
bb_miiphy_init();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_NET
|
#ifdef CONFIG_CMD_NET
|
||||||
static int initr_net(void)
|
static int initr_net(void)
|
||||||
{
|
{
|
||||||
@ -783,7 +775,7 @@ static init_fnc_t init_sequence_r[] = {
|
|||||||
initr_scsi,
|
initr_scsi,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BITBANGMII
|
#ifdef CONFIG_BITBANGMII
|
||||||
initr_bbmii,
|
bb_miiphy_init,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PCI_ENDPOINT
|
#ifdef CONFIG_PCI_ENDPOINT
|
||||||
pci_ep_init,
|
pci_ep_init,
|
||||||
|
@ -105,7 +105,7 @@ int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
|
|||||||
sizeof(bb_miiphy_buses[0]);
|
sizeof(bb_miiphy_buses[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void bb_miiphy_init(void)
|
int bb_miiphy_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -124,6 +124,8 @@ void bb_miiphy_init(void)
|
|||||||
bb_miiphy_buses[i].init(&bb_miiphy_buses[i]);
|
bb_miiphy_buses[i].init(&bb_miiphy_buses[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct bb_miiphy_bus *bb_miiphy_getbus(const char *devname)
|
static inline struct bb_miiphy_bus *bb_miiphy_getbus(const char *devname)
|
||||||
|
@ -81,7 +81,15 @@ struct bb_miiphy_bus {
|
|||||||
extern struct bb_miiphy_bus bb_miiphy_buses[];
|
extern struct bb_miiphy_bus bb_miiphy_buses[];
|
||||||
extern int bb_miiphy_buses_num;
|
extern int bb_miiphy_buses_num;
|
||||||
|
|
||||||
void bb_miiphy_init(void);
|
/**
|
||||||
|
* bb_miiphy_init() - Initialize bit-banged MII bus driver
|
||||||
|
*
|
||||||
|
* It is called during the generic post-relocation init sequence.
|
||||||
|
*
|
||||||
|
* Return: 0 if OK
|
||||||
|
*/
|
||||||
|
int bb_miiphy_init(void);
|
||||||
|
|
||||||
int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg);
|
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,
|
int bb_miiphy_write(struct mii_dev *miidev, int addr, int devad, int reg,
|
||||||
u16 value);
|
u16 value);
|
||||||
|
Loading…
Reference in New Issue
Block a user