From patchwork Tue Jul 7 19:11:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1324657 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=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=fmfJRis9; 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 4B1XBm0fQHz9s1x for ; Wed, 8 Jul 2020 05:12:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6154A81C44; Tue, 7 Jul 2020 21:12:45 +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="fmfJRis9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96DA581C36; Tue, 7 Jul 2020 21:12:42 +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=-2.0 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-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (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 BAF1181C19 for ; Tue, 7 Jul 2020 21:12:39 +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-io1-xd44.google.com with SMTP id v8so44293802iox.2 for ; Tue, 07 Jul 2020 12:12:39 -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=99t7UUGOqwwNI1ryfls7A+kUwvPv6SPtM91Pvdao+wI=; b=fmfJRis9dQNhLgfzy7/TMJ9Qa8zuQVvxGas3//Twsa/D/mLgcG4jFPsZ02qPCJ8TE8 weaHqRELx+b2JOOiOI75wMhmb3FAwvnZgB3VP2xlpW/DQHkRe9rCvnYFcHflM5ecQiDM GshaeYbf9RC88/Gpby2GUsm1d9zRX69Vf2wzE= 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=99t7UUGOqwwNI1ryfls7A+kUwvPv6SPtM91Pvdao+wI=; b=nhQ7NfmT1vSEzEaGiZF4cYyfWRpKEVnOTdT5yxtVTdmBe8xT29hi6MUjBdLmB9zCT2 osjuu4KwpfKEdV00jBncEhrTdZgxCMWwc3lFFPa/l/rnB8qk7LWzEKbcolBxFmnmro2E KnIW2/rPm/AMvHkEpdPp09l0MoGiz54FzQWL7VVrvE2G/3yq/FFUThCfAt8kI49aTm8t 078v7pScKCb+Z/iYZU6Mu4kXDYb++RWRJDP1TcanGy1BbxSKq4UMTPJ1IIQ+QY6MEx5P Nosbbgii7/bjMbPHT8pMEHI2V/A4Emrsrveq+wAXlahTWGcowv+OBi8igKnnYnUb6Azb BJEQ== X-Gm-Message-State: AOAM533vcp8Wd1sHfS27WJXCaL++I8Hl1+TM19BVfYobukR7At+r5J/S UH+N9MAPflJzUwNckkptK5ZpvzQQppHS+g== X-Google-Smtp-Source: ABdhPJxx5qz9ibWNikMuY0DDDvNGaezGCN6vZj2trbAfz5Ce39UB6mTy+EQCi3akNnDYGJk0bMZktg== X-Received: by 2002:a6b:3985:: with SMTP id g127mr17835003ioa.107.1594149158337; Tue, 07 Jul 2020 12:12:38 -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 186sm9584320iow.26.2020.07.07.12.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 12:12:38 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Andy Shevchenko , Bin Meng , Wolfgang Wallner , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH v4 01/35] dm: core: Add an ACPI name for the root node Date: Tue, 7 Jul 2020 13:11:38 -0600 Message-Id: <20200707131135.v4.1.I3fc26919ac73d55741c6ee8098cc0d6df70bb23c@changeid> X-Mailer: git-send-email 2.27.0.383.g050319c2ae-goog In-Reply-To: <20200707191212.2542638-1-sjg@chromium.org> References: <20200707191212.2542638-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 This always has a fixed ACPI name so add it as a driver function. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR drivers/core/root.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/core/root.c b/drivers/core/root.c index 0de5d7c70d..0726be6b79 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -377,10 +378,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_copy_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 */