From patchwork Mon Jan 27 05:06:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1229593 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Z9VJ8+ja; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 485dWQ5T9Vz9sR1 for ; Mon, 27 Jan 2020 16:25:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 05D308192E; Mon, 27 Jan 2020 06:13:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Z9VJ8+ja"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB287817DF; Mon, 27 Jan 2020 06:10:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84AEA817FB for ; Mon, 27 Jan 2020 06:09:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id m25so8557414ioo.8 for ; Sun, 26 Jan 2020 21:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EIF7zRdlYtJZzfPt615FxMQaUhME2QMyKTebziCEUnc=; b=Z9VJ8+jalnqusEuwqKoL6kUcGneKiM+ucpd4zJHGq1RSCwCmBvr3fcu9ImXkJTf1aH Z/zygL1TB4WMNiS9LyRaQI7pHMgASXH0QTqJ1ltxJTI7p0QSaIalhKbK/ve8bdP5zg27 tj81g6dLhK+ji1/bZTlqpsLXiixNwhEALriTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EIF7zRdlYtJZzfPt615FxMQaUhME2QMyKTebziCEUnc=; b=Ybd5H6nGoEZzvQO4Ysxt7Rr/qdM/Sd3FPTQdygFzCIvv72Y5CtODIHovxu16XsARDh l0rSK50lsgX+ueG+ZAOqJBwbthl5e8zR/n+zIO+IbqAV09zaCgPpVkHqtg8xB5eoarUP 3NkUGlZHG4aAzKUgYQDGkj7zJbeCK58Kr6HwZK2JSO51uwA2lruWaAhtRFHRk/bBDnEQ yFiL9kclr8SzVBhX8AF5UgA3JEJiLwNA9CY0rn7IXtGmMenF0N0QQKwS7DgLeHzN/RYF WyqVmmKVQ19rA4PYyQalLJBtimHTOXjpYPZlonZivXCgx3kHwaqsWofLg2BXeV27jA7c 00Cg== X-Gm-Message-State: APjAAAXNiwQhAfRpu4H8rvVJN5c58FjGJOBW0m7NOh1ljlpV+B/R+Et8 WjBRHXVN4CjzY0adivhSYtnIlcMxRInXSA== X-Google-Smtp-Source: APXvYqy4wyHqjiyT3OlUGGH3aVWqjOGOvsmoplYZhVXq2Z/CLWMV1RZOpBuJ+U/ULpmFtYdn+lPqjg== X-Received: by 2002:a5d:8a10:: with SMTP id w16mr500951iod.216.1580101779325; Sun, 26 Jan 2020 21:09:39 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id h23sm4313195ilf.57.2020.01.26.21.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 21:09:38 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 094/108] x86: apl: Generate ACPI table for LPC Date: Sun, 26 Jan 2020 22:06:41 -0700 Message-Id: <20200126220508.94.Ie219a98cd7e07d939f53d36c407ed88e7089b54a@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200127050655.170614-1-sjg@chromium.org> References: <20200127050655.170614-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Add an ACPI table for the LPC on Apollo Lake. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/lpc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index 45b2144fc6..7c0ebf332b 100644 --- a/arch/x86/cpu/apollolake/lpc.c +++ b/arch/x86/cpu/apollolake/lpc.c @@ -6,12 +6,16 @@ */ #include +#include #include #include +#include +#include #include #include #include #include +#include #include void lpc_enable_fixed_io_ranges(uint io_enables) @@ -109,6 +113,17 @@ void lpc_io_setup_comm_a_b(void) lpc_enable_fixed_io_ranges(com_enable); } +static int apl_acpi_lpc_get_name(const struct udevice *dev, char *out_name) +{ + return acpi_return_name(out_name, "LPCB"); +} + +struct acpi_ops apl_lpc_acpi_ops = { + .get_name = apl_acpi_lpc_get_name, + .write_tables = intel_southbridge_write_acpi_tables, + .inject_dsdt = southbridge_inject_dsdt, +}; + static const struct udevice_id apl_lpc_ids[] = { { .compatible = "intel,apl-lpc" }, { } @@ -119,4 +134,5 @@ U_BOOT_DRIVER(apl_lpc_drv) = { .name = "intel_apl_lpc", .id = UCLASS_LPC, .of_match = apl_lpc_ids, + acpi_ops_ptr(&apl_lpc_acpi_ops) };