From patchwork Mon Jun 13 05:32:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 634343 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rShQj4yTBz9t0Y for ; Mon, 13 Jun 2016 15:38:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=bGpUhM4y; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A2066A780D; Mon, 13 Jun 2016 07:37:06 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UkANn3uN8buc; Mon, 13 Jun 2016 07:37:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 17464B3966; Mon, 13 Jun 2016 07:35:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7ABDFB38B2 for ; Mon, 13 Jun 2016 07:35:26 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h6uFld40CzII for ; Mon, 13 Jun 2016 07:35:26 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by theia.denx.de (Postfix) with ESMTPS id 7CD44B38C2 for ; Mon, 13 Jun 2016 07:35:18 +0200 (CEST) Received: by mail-it0-f43.google.com with SMTP id a5so40510854ita.1 for ; Sun, 12 Jun 2016 22:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=e1TURPD9wX5EaoLi8AaRbeQYWu5iqak+L7Qiz7y9NrQ=; b=bGpUhM4ypJF36Y8Ut92rvpo4CWURESUgjNs4UOV7wSP/m08f+hVxHuBEpKFCW5wZ/O pAWy6Xt9/iwCU9VXm42ytB32xsXJflpaBZRoE+ZP1D6xIPHPOXNWfcJEbagzoYcXDN6s TvqdK4CuT+ZIetDHYu71W92aDJsTvogO6ZX9Rf7JSaCq+3sIcAy7POOmJzLEsFeGJpAt ssGaq/Ig7tzHPJH6RxQz8u1MTQUVVnPJN9CW0BOTTBvV19WD9qLwOpa2dxDVCft88quM qRWHkCgPZVM/g7ojDte3cND8swwWogwkZHWqd8gpQBq6jYtzZmyUmyPSXFhb16CtROpH qfRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=e1TURPD9wX5EaoLi8AaRbeQYWu5iqak+L7Qiz7y9NrQ=; b=ON/RLE6ZLqUfjAEnGWBAgYxGyXDla8zTxKO80TfPq+Qx+t9i+oTfYDCzmgqBAQe5Fu lW4gSVe9uGQ+oHPZjy8hOJo29lBSbJeBW1lXuCxYu5rKM/Tx0vN5YelY3u59avgtFpUQ czXQmgvvICQ2U8SbLIOpiUUgSH2LbGewdfDbufGH1V4/DDqCVzFGxdrmK0ssY3aeUug3 biOmGAKRlMd3uPBsnxp9XDSA54YUKjgCslZXgNnjMPcmgrS7L79DW8ectSJrZ+g0J0p6 BDgie4iMFUangVE5HJnlUR1Gf15aX5lf24YhXfnn6OkACDFdEGP8MXID907Wm98OVATN HH3A== X-Gm-Message-State: ALyK8tJPwFNqzQ5DEOPRbCGqORqBTZiXqkF7P6RNwwdW6yZ6h0L1YHM0T43KYa86lD29h4t8 X-Received: by 10.36.98.136 with SMTP id d130mr14785249itc.84.1465796117539; Sun, 12 Jun 2016 22:35:17 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.57]) by smtp.gmail.com with ESMTPSA id l14sm5693387ita.8.2016.06.12.22.35.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jun 2016 22:35:14 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 2524F223F44; Sun, 12 Jun 2016 23:35:11 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 12 Jun 2016 23:32:59 -0600 Message-Id: <1465796016-18375-19-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1465796016-18375-1-git-send-email-sjg@chromium.org> References: <1465796016-18375-1-git-send-email-sjg@chromium.org> Cc: Tom Rini , huang lin , Jeffy Chen Subject: [U-Boot] [PATCH v2 18/55] dm: core: Don't use device tree with of-platdata X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When CONFIG_SPL_OF_PLATDATA is enabled we should not access the device tree. Remove all references to this in the core driver-model code. Signed-off-by: Simon Glass --- Changes in v2: None drivers/core/device.c | 2 +- drivers/core/lists.c | 2 +- drivers/core/root.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index eb75b17..de52f07 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -607,7 +607,7 @@ const char *dev_get_uclass_name(struct udevice *dev) fdt_addr_t dev_get_addr_index(struct udevice *dev, int index) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) fdt_addr_t addr; if (CONFIG_IS_ENABLED(OF_TRANSLATE)) { diff --git a/drivers/core/lists.c b/drivers/core/lists.c index 0c27717..6a634e6 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -99,7 +99,7 @@ int device_bind_driver_to_node(struct udevice *parent, const char *drv_name, return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) /** * driver_check_compatible() - Check if a driver is compatible with this node * diff --git a/drivers/core/root.c b/drivers/core/root.c index 13c2713..0743aeb 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -173,7 +173,7 @@ int dm_scan_platdata(bool pre_reloc_only) return ret; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset, bool pre_reloc_only) { @@ -229,7 +229,7 @@ int dm_init_and_scan(bool pre_reloc_only) return ret; } - if (CONFIG_IS_ENABLED(OF_CONTROL)) { + if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only); if (ret) { debug("dm_scan_fdt() failed: %d\n", ret);