Merge tag 'efi-2021-01-rc2-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-01-rc2 (2)

The following bugs are fixed:

* The conitrace command failed to build.
* Non-volatile UEFI variables were not delete form the file store.

The following features are added:

* Support for the FN1 - FN10 keys on crosswire keyboards is added.
* An EFI binary is provided to dump the binary device tree.

tpm2_get_capability() is adjusted in preparation of the implementation
of the EFI_TCG2_PROTOCOL.
diff --git a/Kconfig b/Kconfig
index c94b10e..6dc20ed 100644
--- a/Kconfig
+++ b/Kconfig
@@ -200,7 +200,7 @@
 	default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
 			   ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
 			   ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
-			   ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI)
+			   ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL)
 	default 0x400
 	help
 	  Before relocation, memory is very limited on many platforms. Still,
diff --git a/configs/chromebook_coral_defconfig b/configs/chromebook_coral_defconfig
index 51f892f..05e6ce6 100644
--- a/configs/chromebook_coral_defconfig
+++ b/configs/chromebook_coral_defconfig
@@ -29,8 +29,6 @@
 CONFIG_SPL_BOOTSTAGE_RECORD_COUNT=10
 CONFIG_BOOTSTAGE_STASH=y
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS=""
-CONFIG_BOOTARGS_SUBST=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_LOGF_FUNC=y
 CONFIG_SPL_LOG=y
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index 08c1c53..9d99aff 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -42,7 +42,6 @@
 CONFIG_SYS_I2C_MVTWSI=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
-CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_PXA3XX=y
diff --git a/configs/ge_b1x5v2_defconfig b/configs/ge_b1x5v2_defconfig
index aa33c43..6840509 100644
--- a/configs/ge_b1x5v2_defconfig
+++ b/configs/ge_b1x5v2_defconfig
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
-CONFIG_MX6QDL=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
@@ -12,6 +11,7 @@
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x11400
 # CONFIG_GE_RTC is not set
+CONFIG_MX6QDL=y
 CONFIG_TARGET_GE_B1X5V2=y
 CONFIG_SPL_TEXT_BASE=0x00908000
 CONFIG_SPL_SERIAL_SUPPORT=y
@@ -26,17 +26,16 @@
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-b1x5v2"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
+CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=1
+CONFIG_DEFAULT_FDT_FILE="imx6dl-b1x5v2.dtb"
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_LOG_MAX_LEVEL=8
 CONFIG_LOG_DEFAULT_LEVEL=4
-CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_DEFAULT_FDT_FILE="imx6dl-b1x5v2.dtb"
-CONFIG_MISC_INIT_R=y
-CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_MISC_INIT_R=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
@@ -74,6 +73,7 @@
 # CONFIG_SPL_DOS_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_DM_BOOTCOUNT_SPI_FLASH=y
diff --git a/configs/lion-rk3368_defconfig b/configs/lion-rk3368_defconfig
index 3287bd1..583dd44 100644
--- a/configs/lion-rk3368_defconfig
+++ b/configs/lion-rk3368_defconfig
@@ -84,9 +84,9 @@
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_ROCKCHIP_SPI=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_LZO=y
 CONFIG_ERRNO_STR=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/myir_mys_6ulx_defconfig b/configs/myir_mys_6ulx_defconfig
index 4ba817a..db79c63 100644
--- a/configs/myir_mys_6ulx_defconfig
+++ b/configs/myir_mys_6ulx_defconfig
@@ -64,8 +64,8 @@
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_MXC_UART=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig
index f2c9fa7..14e8405 100644
--- a/configs/odroid-c2_defconfig
+++ b/configs/odroid-c2_defconfig
@@ -46,6 +46,8 @@
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
@@ -63,5 +65,3 @@
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
 CONFIG_OF_LIBFDT_OVERLAY=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/px30-core-ctouch2-px30_defconfig b/configs/px30-core-ctouch2-px30_defconfig
index d64f05d..1afc146 100644
--- a/configs/px30-core-ctouch2-px30_defconfig
+++ b/configs/px30-core-ctouch2-px30_defconfig
@@ -21,11 +21,11 @@
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/px30-px30-core-ctouch2.dtb"
-CONFIG_MISC_INIT_R=y
+# CONFIG_CONSOLE_MUX is not set
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_MISC_INIT_R=y
 CONFIG_SPL_BOOTROM_SUPPORT=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_STACK_R=y
@@ -47,7 +47,6 @@
 CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_MISC is not set
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
diff --git a/configs/px30-core-edimm2.2-px30_defconfig b/configs/px30-core-edimm2.2-px30_defconfig
index 50a9a15..9d78eee 100644
--- a/configs/px30-core-edimm2.2-px30_defconfig
+++ b/configs/px30-core-edimm2.2-px30_defconfig
@@ -21,11 +21,11 @@
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/px30-px30-core-edimm2.2.dtb"
-CONFIG_MISC_INIT_R=y
+# CONFIG_CONSOLE_MUX is not set
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_MISC_INIT_R=y
 CONFIG_SPL_BOOTROM_SUPPORT=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_STACK_R=y
@@ -47,7 +47,6 @@
 CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_MISC is not set
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 946a007..aa131bf 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -82,6 +82,8 @@
 CONFIG_DM_RESET=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_SYSRESET=y
 # CONFIG_TPL_SYSRESET is not set
 CONFIG_USB=y
@@ -99,5 +101,3 @@
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index fae9a50..bc4068a 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -84,6 +84,8 @@
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_SYSRESET=y
 # CONFIG_TPL_SYSRESET is not set
 CONFIG_USB=y
@@ -101,5 +103,3 @@
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index c625a47..cb79cea 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -81,6 +81,8 @@
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_ROCKCHIP_SPI=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_SYSRESET=y
 # CONFIG_TPL_SYSRESET is not set
 CONFIG_USB=y
@@ -98,5 +100,3 @@
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 5d893de..65dce3c 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -33,6 +33,7 @@
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_DM_KEYBOARD=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
@@ -59,7 +60,6 @@
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_DWC3=y
-CONFIG_DM_KEYBOARD=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index ec97489..9c41cf4 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -85,6 +85,8 @@
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_MVEBU_A3700_UART=y
 CONFIG_MVEBU_A3700_SPI=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
@@ -96,5 +98,3 @@
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_LZO=y
 CONFIG_SPL_LZO=y
-CONFIG_SYSINFO=y
-CONFIG_SYSINFO_SMBIOS=y
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index d226684..58e065c 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -622,6 +622,34 @@
 	return 0;
 }
 
+static int ks8851_read_rom_hwaddr(struct udevice *dev)
+{
+	struct ks_net *ks = dev_get_priv(dev);
+	struct eth_pdata *pdata = dev_get_platdata(dev);
+	u16 addrl, addrm, addrh;
+
+	/* No EEPROM means no valid MAC address. */
+	if (!(ks_rdreg16(ks, KS_CCR) & CCR_EEPROM))
+		return -EINVAL;
+
+	/*
+	 * If the EEPROM contains valid MAC address, it is loaded into
+	 * the NIC on power on. Read the MAC out of the NIC registers.
+	 */
+	addrl = ks_rdreg16(ks, KS_MARL);
+	addrm = ks_rdreg16(ks, KS_MARM);
+	addrh = ks_rdreg16(ks, KS_MARH);
+
+	pdata->enetaddr[0] = (addrh >> 8) & 0xff;
+	pdata->enetaddr[1] = addrh & 0xff;
+	pdata->enetaddr[2] = (addrm >> 8) & 0xff;
+	pdata->enetaddr[3] = addrm & 0xff;
+	pdata->enetaddr[4] = (addrl >> 8) & 0xff;
+	pdata->enetaddr[5] = addrl & 0xff;
+
+	return !is_valid_ethaddr(pdata->enetaddr);
+}
+
 static int ks8851_bind(struct udevice *dev)
 {
 	return device_set_name(dev, dev->name);
@@ -654,6 +682,7 @@
 	.send		= ks8851_send,
 	.recv		= ks8851_recv,
 	.write_hwaddr	= ks8851_write_hwaddr,
+	.read_rom_hwaddr = ks8851_read_rom_hwaddr,
 };
 
 static const struct udevice_id ks8851_ids[] = {