From patchwork Fri Sep 6 16:02:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Li X-Patchwork-Id: 19804 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2A2924690 for ; Fri, 6 Sep 2013 16:03:12 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf2755846veb.10 for ; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=UXLBwbIgreH/GywHs/53nDvFz2VlKea7L7D8mC1gMao=; b=YuvNWtNDZHe78/4zw9mbzrKmaEXd9/krcgLJaV0H+BbDGk7Mrm7q+MPJyZjnD1yAaM wnIo1unyz8NR4701bXptG47ikY9CjWlbVmzssNPj0QQwXD8GNSWQcm/fHwKyVG9EkIkt JCRWBlmk59rk6KFp+LBemC6Y+aGpWFY7Zp69vMBuMIra7Z7rha+s9z9PtW6KHyLmuP0b vb/r7eHZ9Lj24ZVpXTvB9LJvNPQldS3KQ5f9vf9HTnfA+xmqt/bGq8IrIkZ6NhMD1y+5 kXD5o7k6Vu8Pomzk8ThdcHudA16bW4uzVBjS62zuvjWx8hRzLKfj5J46AaCUwq3Dz8XE PWBA== X-Received: by 10.236.161.137 with SMTP id w9mr1031161yhk.49.1378483392567; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.101 with SMTP id f5ls1028970qek.31.gmail; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) X-Received: by 10.220.140.69 with SMTP id h5mr3020053vcu.0.1378483392377; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ee8si984767vdc.15.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 09:03:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so2296451vcb.14 for ; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) X-Gm-Message-State: ALoCoQln68p/MpE80XM/oRmRm2OY/S0bjPz9TYA8Tap74AyCHDGVGXuXkbA2E7wbE0DewL2C60/K X-Received: by 10.52.103.35 with SMTP id ft3mr2557544vdb.5.1378483392265; Fri, 06 Sep 2013 09:03:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp348155vcz; Fri, 6 Sep 2013 09:03:11 -0700 (PDT) X-Received: by 10.66.159.40 with SMTP id wz8mr4833373pab.135.1378483391094; Fri, 06 Sep 2013 09:03:11 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id qc9si3979379pac.211.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 09:03:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of yi.li@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so3426114pdj.11 for ; Fri, 06 Sep 2013 09:03:10 -0700 (PDT) X-Received: by 10.66.132.69 with SMTP id os5mr4834669pab.114.1378483390681; Fri, 06 Sep 2013 09:03:10 -0700 (PDT) Received: from localhost.localdomain (li568-142.members.linode.com. [106.186.21.142]) by mx.google.com with ESMTPSA id bu4sm4728296pbc.11.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 09:03:10 -0700 (PDT) From: Yi Li To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-uefi-internal@linaro.org, yi.li@linaro.org Subject: [PATCH] ARM:DMI: Add dmi driver support on arm Date: Sat, 7 Sep 2013 00:02:51 +0800 Message-Id: <1378483371-19858-2-git-send-email-yi.li@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1378483371-19858-1-git-send-email-yi.li@linaro.org> References: <1378483371-19858-1-git-send-email-yi.li@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: yi.li@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: liyi Add dmi driver support on arm, it depends on efi runtime service enabled. Signed-off-by: liyi --- arch/arm/Kconfig | 9 +++++++++ arch/arm/include/asm/dmi.h | 12 ++++++++++++ arch/arm/kernel/setup.c | 7 ++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include/asm/dmi.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e8daccd..02abb1d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1946,6 +1946,15 @@ config EFI_STUB executed directly by EFI firmware. See Documentation/efi-stub.txt for more information. +config DMI + default y + bool "Enable DMI scanning" if EXPERT + ---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. + config SECCOMP bool prompt "Enable seccomp to safely compute untrusted bytecode" diff --git a/arch/arm/include/asm/dmi.h b/arch/arm/include/asm/dmi.h new file mode 100644 index 0000000..84baf0e --- /dev/null +++ b/arch/arm/include/asm/dmi.h @@ -0,0 +1,12 @@ +#ifndef _ASM_DMI_H +#define _ASM_DMI_H 1 + +#include +#include +#include +/* Use normal IO mappings for DMI */ +#define dmi_ioremap(x, l) __arm_ioremap((x), (l), MT_MEMORY) +#define dmi_iounmap(x, l) __arm_iounmap((x)) +#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) + +#endif diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index a440211..2194554 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -34,13 +34,15 @@ #ifdef CONFIG_ACPI #include #endif +#ifdef CONFIG_DMI +#include +#endif #include #include #include #include #include -#include #include #include #include @@ -1073,3 +1075,6 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show }; +#ifdef CONFIG_DMI + core_initcall(dmi_scan_machine); +#endif