From patchwork Tue Sep 22 18:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1369207 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=c64TbsDc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4Bwr7l0DWKz9sTS for ; Wed, 23 Sep 2020 04:54:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 193F482681; Tue, 22 Sep 2020 20:48:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="c64TbsDc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 38038825FB; Tue, 22 Sep 2020 20:47:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,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-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) (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 65529825E1 for ; Tue, 22 Sep 2020 20:47:02 +0200 (CEST) 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-ot1-x343.google.com with SMTP id m12so16632055otr.0 for ; Tue, 22 Sep 2020 11:47:02 -0700 (PDT) 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=vxfWyYEuAq4nD35bBJyKlYN3cEtj/H/tl5X1Qh58qV8=; b=c64TbsDcXbSGB6wuVera+0hzCBDzy0XTTyTs7c3+CTho1hzaDHNiM43hgUlNjinm/H Swfkd3Z0c7mSlHIL79SRT+VcTAV4glxYhyV9G6KdLuLUNvlA4//zETST+nJuQPVFcm6z aL5o+ycmHRcEV+eBMTqY7TYfPDUALD9ge6VoI= 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=vxfWyYEuAq4nD35bBJyKlYN3cEtj/H/tl5X1Qh58qV8=; b=SKWEueH2jcFYMom86XqRwvXq3T+JDrASghRW1UOQj9Rvg2rqx71YOxfu0a0FdZe6Bs G5hoSERZOvGkfWO1QrV2i0zKFiZkl7TXhaG/dts1U1MYWpu7IOnNpnQra7AfDPsFy6JP 6rRzyjYn80zcvdAupXU1HSrqWQkA5ToIxNCy6+5zLJpBzO7K498KWQTWqkHLWw7gtYhq 7aM53NqYvUQfIjGtqnk2G7vG8No3fS4C61jaxzbau6ToYU/2EOalPj5+W9n2FV1WYV/1 4qtkXKek7TWn0TfIH0dr2Nto5qzNtZG7n7zcLee1bSFoiPzu7myoaZHkWqe5+qkbrChq crgg== X-Gm-Message-State: AOAM532WYbdEDtmveNuol32iQsEXrxfT5H4/N2vv0XKDbJOeoye3Iyu6 Osz2wQt8C1aJX/Ef1MlVMeKTUwkVfDgv2Y0f X-Google-Smtp-Source: ABdhPJyxzU3/kiGRwbKjV3dYU3wq1uenjs7SIkRYx95Lw/Pd/kkQmZ0ljSkDkMiAff07bYI8fkAl7g== X-Received: by 2002:a05:6830:1487:: with SMTP id s7mr3652383otq.225.1600800420971; Tue, 22 Sep 2020 11:47:00 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id q24sm7622663oij.19.2020.09.22.11.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 11:47:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Andy Shevchenko , Wolfgang Wallner , Bin Meng , Bernhard Messerklinger , Simon Glass Subject: [PATCH v4 37/59] x86: apl: Generate ACPI table for LPC Date: Tue, 22 Sep 2020 12:45:22 -0600 Message-Id: <20200922124521.v4.37.Ie219a98cd7e07d939f53d36c407ed88e7089b54a@changeid> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog In-Reply-To: <20200922184544.2920969-1-sjg@chromium.org> References: <20200922184544.2920969-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Add an ACPI table for the LPC on Apollo Lake. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR arch/x86/cpu/apollolake/lpc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index b81a458f2eb..a29832c879a 100644 --- a/arch/x86/cpu/apollolake/lpc.c +++ b/arch/x86/cpu/apollolake/lpc.c @@ -9,10 +9,14 @@ #include #include #include +#include +#include +#include #include #include #include #include +#include #include void lpc_enable_fixed_io_ranges(uint io_enables) @@ -110,6 +114,19 @@ 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_copy_name(out_name, "LPCB"); +} + +struct acpi_ops apl_lpc_acpi_ops = { + .get_name = apl_acpi_lpc_get_name, +#ifdef CONFIG_GENERATE_ACPI_TABLE + .write_tables = intel_southbridge_write_acpi_tables, +#endif + .inject_dsdt = southbridge_inject_dsdt, +}; + static const struct udevice_id apl_lpc_ids[] = { { .compatible = "intel,apl-lpc" }, { } @@ -120,4 +137,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) };