diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2013-08-15 14:57:09 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2013-08-29 10:06:26 +0200 |
commit | f7381f8cd1cf4307dcccd5728fc11afce3610439 (patch) | |
tree | 484d4f25d92308096f0410638b42bda8847dfdd4 /src/mainboard/kontron/ktqm77/mainboard.c | |
parent | ab6d27e8f83db2791bc2b633a02f12a3076a4e5f (diff) |
kontron/ktqm77: Allow disabling onboard NICs
Two new nvram variables control disabling the two non-ME NICs
on the mainboard. This is implemented by disabling their PCIe bridge.
Change-Id: I086f0d79de3ad0b53fa0ec40648d63378070e3bd
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/3870
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/kontron/ktqm77/mainboard.c')
-rw-r--r-- | src/mainboard/kontron/ktqm77/mainboard.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/kontron/ktqm77/mainboard.c b/src/mainboard/kontron/ktqm77/mainboard.c index 454976cfab..3829d72669 100644 --- a/src/mainboard/kontron/ktqm77/mainboard.c +++ b/src/mainboard/kontron/ktqm77/mainboard.c @@ -161,6 +161,23 @@ static void mainboard_enable(device_t dev) mainboard_interrupt_handlers(0x15, &int15_handler); #endif verb_setup(); + + unsigned disable = 0; + if ((get_option(&disable, "ethernet1") == 0) && disable) { + device_t nic = dev_find_slot(0, PCI_DEVFN(0x1c, 2)); + if (nic) { + printk(BIOS_DEBUG, "DISABLE FIRST NIC!\n"); + nic->enabled = 0; + } + } + disable = 0; + if ((get_option(&disable, "ethernet2") == 0) && disable) { + device_t nic = dev_find_slot(0, PCI_DEVFN(0x1c, 3)); + if (nic) { + printk(BIOS_DEBUG, "DISABLE SECOND NIC!\n"); + nic->enabled = 0; + } + } } struct chip_operations mainboard_ops = { |