Message ID | 20201230210941.5.I30dc7335f97a218b7a30b5ffa6a4d254e7266238@changeid |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) 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=K8a9XPBo; 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 4D5vq944fqz9sRN for <incoming@patchwork.ozlabs.org>; Thu, 31 Dec 2020 15:11:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8944882649; Thu, 31 Dec 2020 05:10:49 +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=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="K8a9XPBo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B83EC8261F; Thu, 31 Dec 2020 05:10:31 +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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 3827682603 for <u-boot@lists.denx.de>; Thu, 31 Dec 2020 05:10:26 +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-il1-x12e.google.com with SMTP id w17so16461404ilj.8 for <u-boot@lists.denx.de>; Wed, 30 Dec 2020 20:10:26 -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=MSWNosXAiUB1lFpki9/QOHiXvwYJDEH1KV9vjx09r/4=; b=K8a9XPBocE+A5LpIxRinC7529/wVmrqYnCUFr4Iv2qtzE7G9wfPM3PF6mjPciWgPCB LfY2wb37GKSxZzVuM3wq1QBVkkJN/6qXJ4X/9tjSYBL3EVoZRU/kyq1W9Le1/CMRLRMM f3Ov92g5/crXNco1eGGcMPLwWH9TftbznBaOo= 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=MSWNosXAiUB1lFpki9/QOHiXvwYJDEH1KV9vjx09r/4=; b=RWN9lnNBXBHGke1E/P62jnCusgDzH7nOVxF0ea+0t/Z+1zHHr2K4GZBSgKsMo9APds 1D59Zw2i+kcty+6oh9aHaIOcEqkOEgsK8USIsVUxXO7acb4KjVX8iBnTMaFKShEURvGc A+itx5aQ+N6FSMfuGdOQ29eDEFakmNHbvDbIWsKkpQ1o+YAhN6UdvamIIDFnuXQInJ7z +R615KDM9UoOJx4fGvvZhfCD1txwkM72IEHRyV3JNpraDCOIPlZ4b8WmHx1uiu62AYKS t0GqXvhZEL/f54jPABJiOKDrY7seH0Yx3Jlbjp2p68RZL9ZjfXBCZXKLCpuuY+Tyuzw3 knwg== X-Gm-Message-State: AOAM533LLUbsh5/niYfglMf014Tzb3S096YORZSCJpx8ePzbkq28+uMC pPfg2hVqYtwuuZpWzKJmtXdrCJBdqH5BOXi3 X-Google-Smtp-Source: ABdhPJwka5fubOSMjnbd7oh8KN2xEuZX3j9/w16eX7A1OG9+4YWxdY1cMEn3cKXF63HS2AR3ftPBGw== X-Received: by 2002:a92:ca8b:: with SMTP id t11mr55458941ilo.115.1609387824911; Wed, 30 Dec 2020 20:10:24 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id 14sm31959026ilz.7.2020.12.30.20.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 20:10:24 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Marek Vasut <marex@denx.de>, Walter Lozano <walter.lozano@collabora.com>, Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Bin Meng <bmeng.cn@gmail.com>, Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>, Pavel Herrmann <morpheus.ibis@gmail.com> Subject: [PATCH 05/30] dm: core: Adjust uclass setup with of-platdata Date: Wed, 30 Dec 2020 21:09:35 -0700 Message-Id: <20201230210941.5.I30dc7335f97a218b7a30b5ffa6a4d254e7266238@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20201231041000.660925-1-sjg@chromium.org> References: <20201231041000.660925-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
dm: Implement OF_PLATDATA_INST in driver model (part E)
|
expand
|
diff --git a/drivers/core/root.c b/drivers/core/root.c index 78de7cdf875..74f326bf6c2 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -136,8 +136,12 @@ int dm_init(bool of_live) dm_warn("Virtual root driver already exists!\n"); return -EINVAL; } - gd->uclass_root = &DM_UCLASS_ROOT_S_NON_CONST; - INIT_LIST_HEAD(DM_UCLASS_ROOT_NON_CONST); + if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + gd->uclass_root = &uclass_head; + } else { + gd->uclass_root = &DM_UCLASS_ROOT_S_NON_CONST; + INIT_LIST_HEAD(DM_UCLASS_ROOT_NON_CONST); + } if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)) { fix_drivers(); diff --git a/include/dm/root.h b/include/dm/root.h index 89afbee6196..42510b106ab 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -11,6 +11,9 @@ struct udevice; +/* Head of the uclass list if CONFIG_OF_PLATDATA_INST is enabled */ +extern struct list_head uclass_head; + /** * dm_root() - Return pointer to the top of the driver tree *
When OF_PLATDATA_INST is enabled we don't need to create the uclass list. Instead we just need to point to the existing list. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/core/root.c | 8 ++++++-- include/dm/root.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-)