Add dmi support on arm64, it depends on efi boot.
Signed-off-by: Yi Li yi.li@linaro.org --- arch/arm64/Kconfig | 8 ++++++++ arch/arm64/include/asm/dmi.h | 29 +++++++++++++++++++++++++++++ arch/arm64/kernel/setup.c | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 arch/arm64/include/asm/dmi.h
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index d5aaddf..5fda3b4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -292,6 +292,14 @@ config EFI_STUB by EFI firmware without the use of a bootloader. See Documentation/efi-stub.txt for more information.
+config DMI + default y + bool "Enable DMI scanning" + ---help--- + Enabled scanning of DMI to identify machine quirks. Say Y + here unless you have verified that your setup is not + affected by entries in the DMI blacklist. Required by EFI + support. endmenu
menu "Userspace binary formats" diff --git a/arch/arm64/include/asm/dmi.h b/arch/arm64/include/asm/dmi.h new file mode 100644 index 0000000..f25a7da --- /dev/null +++ b/arch/arm64/include/asm/dmi.h @@ -0,0 +1,29 @@ +/* + * arch/arm64/include/asm/dmi.h + * + * Copyright (C) 2013 Linaro Limited. + * Written by: Yi Li (yi.li@linaro.org) + * + * based on arch/ia64/include/asm/dmi.h + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + + +#ifndef _ASM_DMI_H +#define _ASM_DMI_H 1 + +#include <linux/slab.h> +#include <asm/io.h> + +/* Use normal IO mappings for DMI */ +#define dmi_early_remap early_memremap +#define dmi_early_unmap(x, l) early_iounmap(x, l) +#define dmi_remap early_memremap +#define dmi_unmap(x, l) early_iounmap(x, l) +#define dmi_alloc(l) kzalloc(l, GFP_ATOMIC) + +#endif + diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 1aeaaf5..1480843 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -45,6 +45,7 @@ #ifdef CONFIG_ACPI #include <linux/acpi.h> #endif +#include <linux/dmi.h>
#include <asm/fixmap.h> #include <asm/cputype.h> @@ -312,6 +313,7 @@ static int __init arm64_device_init(void) { of_clk_init(NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + dmi_scan_machine(); return 0; } arch_initcall(arm64_device_init);