Skip to content

Commit

Permalink
run gpio_net_set only if board_eth_init fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxaspec committed Jan 5, 2024
1 parent f0cde55 commit 8a37e09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/mips/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,14 @@ extern void board_usb_init(void);
#endif
#if defined(CONFIG_CMD_NET)
puts("Net: ");
int ret = eth_initialize(gd->bd);
if (ret == 0) {
printf("GPIO: gpio_dev_net \n");
/* GPIOs to be set if net initialization fails */
int ret = board_eth_init(gd->bd);
if (ret < 0) {
printf("Net: Board Net Initialization Failed\n");
// GPIOs to be set after net initialization fails
printf("GPIO: gpio_net_set \n");
handle_gpio_settings("gpio_dev_net");
}
eth_initialize(gd->bd);
#endif

/* User defined GPIO set */
Expand Down

0 comments on commit 8a37e09

Please sign in to comment.