mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-01-27 17:37:22 +01:00
ipq807x: Initialize ethernet only if it is needed
Initialize ethernet module only if network communication is needed. This change is introduced to save the boot up time of the AP. Change-Id: I318a3e897fe511accef37667af1a6c46ae31db6e Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
This commit is contained in:
parent
d5b694bc11
commit
67e7d1b728
5 changed files with 19 additions and 1 deletions
|
|
@ -160,6 +160,11 @@ void dump_func(void)
|
|||
{
|
||||
uint64_t etime;
|
||||
|
||||
#ifdef CONFIG_IPQ_ETH_INIT_DEFER
|
||||
puts("\nNet: ");
|
||||
eth_initialize();
|
||||
#endif
|
||||
|
||||
etime = get_timer_masked() + (10 * CONFIG_SYS_HZ);
|
||||
printf("\nCrashdump magic found."
|
||||
"\nHit any key within 10s to stop dump activity...");
|
||||
|
|
|
|||
|
|
@ -271,7 +271,12 @@ static int abortboot_normal(int bootdelay)
|
|||
if (abort)
|
||||
gd->flags &= ~GD_FLG_SILENT;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IPQ_ETH_INIT_DEFER
|
||||
if (abort) {
|
||||
puts("\nNet: ");
|
||||
eth_initialize();
|
||||
}
|
||||
#endif
|
||||
return abort;
|
||||
}
|
||||
# endif /* CONFIG_AUTOBOOT_KEYED */
|
||||
|
|
|
|||
|
|
@ -634,8 +634,10 @@ static int initr_bbmii(void)
|
|||
#ifdef CONFIG_CMD_NET
|
||||
static int initr_net(void)
|
||||
{
|
||||
#if !defined(CONFIG_IPQ_ETH_INIT_DEFER)
|
||||
puts("Net: ");
|
||||
eth_initialize();
|
||||
#endif
|
||||
#if defined(CONFIG_RESET_PHY_R)
|
||||
debug("Reset Ethernet PHY\n");
|
||||
reset_phy();
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ extern loff_t board_env_offset;
|
|||
#define CONFIG_CMD_TFTPPUT
|
||||
#define CONFIG_IPQ_MDIO 1
|
||||
#define CONFIG_QCA8075_PHY 1
|
||||
#define CONFIG_IPQ_ETH_INIT_DEFER
|
||||
|
||||
/*
|
||||
* CRASH DUMP ENABLE
|
||||
|
|
|
|||
|
|
@ -167,6 +167,11 @@ struct udevice *eth_get_dev(void)
|
|||
|
||||
uc_priv = eth_get_uclass_priv();
|
||||
if (!uc_priv->current)
|
||||
#ifdef CONFIG_IPQ_ETH_INIT_DEFER
|
||||
eth_initialize();
|
||||
/* Wait 3s for link to settle down */
|
||||
mdelay(3000);
|
||||
#endif
|
||||
eth_errno = uclass_first_device(UCLASS_ETH,
|
||||
&uc_priv->current);
|
||||
return uc_priv->current;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue