[linux-yocto] [PATCH 2/2] Revert "minnowboard: Read mac address from efi var"
Darren Hart
dvhart at linux.intel.com
Thu May 30 16:22:53 PDT 2013
This reverts commit 95a0b8d4d5383094501790951b412cb8adebf2ad.
The RC3 firmware and beyond manages to populate the MAC without the need
for the EFI var. Pretend this never happened.
Signed-off-by: Darren Hart <dvhart at linux.intel.com>
---
drivers/platform/x86/Kconfig | 1 -
drivers/platform/x86/minnowboard.c | 32 --------------------------------
include/linux/minnowboard.h | 2 --
3 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 23321b4..89d1065 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -21,7 +21,6 @@ config MINNOWBOARD
depends on GPIO_SCH
depends on GPIO_PCH
depends on LEDS_GPIO
- depends on EFI
default n
---help---
This driver configures the MinnowBoard fixed functionality GPIO lines.
diff --git a/drivers/platform/x86/minnowboard.c b/drivers/platform/x86/minnowboard.c
index 8512516..c0d93a9 100644
--- a/drivers/platform/x86/minnowboard.c
+++ b/drivers/platform/x86/minnowboard.c
@@ -28,23 +28,12 @@
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/gpio-sch.h>
-#include <linux/random.h>
#include <linux/delay.h>
-#include <linux/efi.h>
-#include <uapi/linux/if_ether.h>
#include <linux/minnowboard.h>
#include "minnowboard-gpio.h"
static int minnow_hwid_val = -1;
-#define EFI_VENDOR_GUID \
- EFI_GUID(0x9ad0b0fd, 0xf325, 0x425c, \
- 0x81, 0xdc, 0xa1, 0xc7, 0xa6, 0x27, 0x55, 0x1b)
-
-static efi_char16_t eth_addr_efivar_name[] = {
- 'E', 'g', '2', '0', 't', 'M', 'a', 'c', 'A', 'd', 'd', 'r', 'e', 's', 's', '2', 0
-};
-
/* leds-gpio platform device structures */
static const struct gpio_led minnow_leds[] = {
{ .name = "minnow_led0", .gpio = GPIO_LED0, .active_low = 0,
@@ -113,27 +102,6 @@ void minnow_phy_reset(void)
}
EXPORT_SYMBOL_GPL(minnow_phy_reset);
-void minnow_eth_addr(u8 *addr)
-{
- unsigned long data_len = ETH_ALEN;
- u32 efi_attrib = 0;
- u8 efi_data[data_len];
- efi_status_t ret;
-
- ret = (&efi)->get_variable(eth_addr_efivar_name, &EFI_VENDOR_GUID,
- &efi_attrib, &data_len, &efi_data);
-
- if (ret != EFI_SUCCESS || data_len != ETH_ALEN)
- goto out_err;
-
- memcpy(addr, &efi_data, data_len);
- return;
-
- out_err:
- pr_warn("Failed to read Ethernet address from EFI variable\n");
-}
-EXPORT_SYMBOL_GPL(minnow_eth_addr);
-
static int __init minnow_module_init(void)
{
int err, val, i;
diff --git a/include/linux/minnowboard.h b/include/linux/minnowboard.h
index 12c0288..d3608b8 100644
--- a/include/linux/minnowboard.h
+++ b/include/linux/minnowboard.h
@@ -27,13 +27,11 @@ bool minnow_detect(void);
bool minnow_lvds_detect(void);
int minnow_hwid(void);
void minnow_phy_reset(void);
-void minnow_eth_addr(u8 *addr);
#else
#define minnow_detect() (false)
#define minnow_lvds_detect() (false)
#define minnow_hwid() (-1)
#define minnow_phy_reset() do { } while (0)
-#define minnow_eth_addr(a) do { } while (0)
#endif /* MINNOWBOARD */
#endif /* _LINUX_MINNOWBOARD_H */
--
1.7.5.4
More information about the linux-yocto
mailing list