public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: evan.lloyd@arm.com
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Matteo Carlini <Matteo.Carlini@arm.com>,
	nd@arm.com
Subject: [PATCH 1/2] ArmPlatformPkg: Juno networking build option
Date: Wed, 13 Sep 2017 19:16:20 +0100	[thread overview]
Message-ID: <20170913181621.45384-2-evan.lloyd@arm.com> (raw)
In-Reply-To: <20170913181621.45384-1-evan.lloyd@arm.com>

From: Sami <sami.mujawar@arm.com>

When network functionality is not required, the boot process is
impeded by redundant network timeouts. Moreover Juno is a mobile
platform so it makes sense to have an option to disable the
(ethernet) networking support.  We therefore introduce the
DISABLE_NETWORK build option.

By default ArmJunoDxe configures the MAC address. This is redundant
when networking is disabled, so the MAC Address configuration is
removed when the DISABLE_NETWORK build option is defined.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
---
 ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 18491c7378523f365644658c270de95e711c5ac1..456e21ba47db7ec440ac1ef5554eccd5e4d2bcf9 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2013-2015, ARM Limited. All rights reserved.
+*  Copyright (c) 2013-2017, ARM Limited. All rights reserved.
 *
 *  This program and the accompanying materials
 *  are licensed and made available under the terms and conditions of the BSD License
@@ -71,6 +71,7 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mPciRootComplexDevicePath = {
 
 EFI_EVENT mAcpiRegistration = NULL;
 
+#ifndef DISABLE_NETWORK
 /**
   This function reads PCI ID of the controller.
 
@@ -355,6 +356,7 @@ ArmJunoSetNicMacAddress ()
 
   return EFI_SUCCESS;
 }
+#endif
 
 /**
   Notification function of the event defined as belonging to the
@@ -395,10 +397,12 @@ OnEndOfDxe (
   Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE);
   ASSERT_EFI_ERROR (Status);
 
+#ifndef DISABLE_NETWORK
   Status = ArmJunoSetNicMacAddress ();
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n"));
   }
+#endif
 }
 
 EFI_STATUS
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")



  reply	other threads:[~2017-09-13 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 18:16 [PATCH 0/2] Options to remove code evan.lloyd
2017-09-13 18:16 ` evan.lloyd [this message]
2017-09-13 18:16 ` [PATCH 2/2] ArmPlatformPkg: Remove DT code when unsupported evan.lloyd
2017-09-15 14:46 ` [PATCH 0/2] Options to remove code Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170913181621.45384-2-evan.lloyd@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox