diff options
| author | Konstantin Porotchkin <[email protected]> | 2017-02-16 13:52:27 +0200 |
|---|---|---|
| committer | Stefan Roese <[email protected]> | 2017-03-23 08:50:50 +0100 |
| commit | 976feda2d8e6bb558264961c532cf505bfd1e099 (patch) | |
| tree | 35a936e680c1cc9a5a7ee69f2f7c0a23492b310e /drivers | |
| parent | 81b7c7f6379cfb6ca6b40b22504ad4ae8aca1fdd (diff) | |
mvebu: neta: Add support for board init function
Add ability to use board-specific initialization flow
to NETA driver (for instance Ethernet switch bring-up)
Signed-off-by: Konstantin Porotchkin <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Igal Liberman <[email protected]>
Cc: Nadav Haklai <[email protected]>
Signed-off-by: Stefan Roese <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/mvneta.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 674075f037d..a1e2136e350 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -404,6 +404,15 @@ static struct buffer_location buffer_loc; */ #define BD_SPACE (1 << 20) +/* + * Dummy implementation that can be overwritten by a board + * specific function + */ +__weak int board_network_enable(struct mii_dev *bus) +{ + return 0; +} + /* Utility/helper methods */ /* Write helper method */ @@ -1615,6 +1624,7 @@ static int mvneta_probe(struct udevice *dev) struct mii_dev *bus; unsigned long addr; void *bd_space; + int ret; /* * Allocate buffer area for descs and rx_buffers. This is only @@ -1664,7 +1674,11 @@ static int mvneta_probe(struct udevice *dev) bus->priv = (void *)pp; pp->bus = bus; - return mdio_register(bus); + ret = mdio_register(bus); + if (ret) + return ret; + + return board_network_enable(bus); } static void mvneta_stop(struct udevice *dev) |
