From patchwork Mon Jan 27 05:05:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1229535 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=miyOiSzf; 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 485dHN1Sktz9sR1 for ; Mon, 27 Jan 2020 16:15:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9DE1281854; Mon, 27 Jan 2020 06:11:25 +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="miyOiSzf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B489281835; Mon, 27 Jan 2020 06:09: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 36D91817C1 for ; Mon, 27 Jan 2020 06:08:57 +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 h8so8565567iob.2 for ; Sun, 26 Jan 2020 21:08:57 -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=RVzQV7LwwdR+vniJnRWJ7GSRnbWJrtn9J2ypgxI4xM4=; b=miyOiSzfI6Vmt+scXMfwFGgNFGozpAvcVO4Luano9OGB6bJGqRl15ThSLxN8v+ksRL mWhJgmqlJMFAjlnw6JHRZ3A6jcBTbjrKUCC8WxQiKYCFw8QVqFWmhDspuUeJdk6BifRX wLpobJ+OD+MngYTC5thp7TYZ1siBOGSfgV08o= 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=RVzQV7LwwdR+vniJnRWJ7GSRnbWJrtn9J2ypgxI4xM4=; b=IuuwnUmMASmifkVNUIFJ4ETm3cKJfq1a8FGkew532KB+Gna0aLAi7QM2JenC61gLoQ i2ImhaXUu0nQSabU3U3KNFaJI/wvYAmI+xTf/T0gflzUeI62FPHyxCa+fD5R42kuhkQm UEOqYHNY/sBxXflHsBotxtWBX8PXB/9fbA65O3xFzfcLyFQQGkQSm6txRoq+QJaNFEXn +6a8EFhueTLafMcyETSbXqOc2TsBse7nynjEiHCQQUVvqQxqvLiTCOdLccNw4Qp8CzCz 9K65DifuRgHMUzWqlcE2UO9iWL+mxljjo4BudDMbjAotNU2V0SUygiTbrGxoyYZ+dQ9m pbAQ== X-Gm-Message-State: APjAAAV7bODsZMF86a/6kFTMQ08Zj1lHC2XANh+ZA4YrCLsUf8/7VPoq 20raXSxIssP8MlndKr+Ez+V3hfJ/iBz6Ig== X-Google-Smtp-Source: APXvYqz96fF9pvxPMTKKtXIA9BX8OlEXHQCyDcWiCfE8yCj78gVIwADpTd1wfcHy/FlbXIYNUY6nZQ== X-Received: by 2002:a02:a694:: with SMTP id j20mr12216948jam.69.1580101735955; Sun, 26 Jan 2020 21:08:55 -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.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 21:08:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 040/108] dm: core: Add an ACPI name for the root node Date: Sun, 26 Jan 2020 22:05:47 -0700 Message-Id: <20200126220508.40.I3fc26919ac73d55741c6ee8098cc0d6df70bb23c@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: , Cc: Pavel Herrmann 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 This always has a fixed ACPI name so add it as a driver function. Signed-off-by: Simon Glass --- drivers/core/root.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/core/root.c b/drivers/core/root.c index e85643819e..431c8c7246 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -390,10 +391,22 @@ int dm_init_and_scan(bool pre_reloc_only) return 0; } +#ifdef CONFIG_ACPIGEN +static int root_acpi_get_name(const struct udevice *dev, char *out_name) +{ + return acpi_return_name(out_name, "\\_SB"); +} + +struct acpi_ops root_acpi_ops = { + .get_name = root_acpi_get_name, +}; +#endif + /* This is the root driver - all drivers are children of this */ U_BOOT_DRIVER(root_driver) = { .name = "root_driver", .id = UCLASS_ROOT, + acpi_ops_ptr(&root_acpi_ops) }; /* This is the root uclass */