From patchwork Fri Sep 9 20:16:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= X-Patchwork-Id: 1676227 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=KJ8GzkLe; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MPS3336Qmz1yhP for ; Sat, 10 Sep 2022 06:17:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 37E6A84B4D; Fri, 9 Sep 2022 22:17:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="KJ8GzkLe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E996F84B4F; Fri, 9 Sep 2022 22:17:22 +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=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) (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 83FA484B3C for ; Fri, 9 Sep 2022 22:17:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3T58bYwUKBhwHLGKA8GG8D6.4GEM-3GGLDAKLK.56FP.56@flex--ptosi.bounces.google.com Received: by mail-wm1-x34a.google.com with SMTP id c128-20020a1c3586000000b003b324bb08c5so3000529wma.9 for ; Fri, 09 Sep 2022 13:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:from:to:cc:subject:date; bh=y2w3uBbhurNqExWLrSAqu5bzDLofND/sBUNfSpa8rDI=; b=KJ8GzkLeUcWs5bmQnLY1CAjtfCunGHyS4fY3HAB9+xM/KTfEI1aqUfvJG9V6SqE1eg l2CjdmYQUu9lGI7rfD9Uhxy0niksMkOZZcTjWrWOWetPOKZHFv4b/XUE52lTzOMJmfFw wykPQRlxnxwtULqmQZnT1c01ETFb9wLbzYDCLB1ifOnzEN7eaiXeeERD3QqSRo/WsjOb fD2wwKd1kjbTCDgmguNw/nRgZlHSSR3wnwTUmhzyoieIQVc/IMLD51s8RZq6rjuZjti5 8RdpZQB66KFHlDsxUIky62NZNKCVpJ5dDnY6pmudhEDB+XcKztxRubk3zjKla/882xDl oglQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:x-gm-message-state:from:to:cc:subject:date; bh=y2w3uBbhurNqExWLrSAqu5bzDLofND/sBUNfSpa8rDI=; b=MJ3rGhyaTPMAYSKIH+nrPhgKDVxMOxv41/XrVydyhfBq7zJn1Sq1vCSoKEUCBoxZXl q/OVpZyWPxv619AiTGO8JCxAHUNGl08vF/kO9A8kB2Etzz5WpaJzkygDFj/fcf/mVnC4 3U9PdXCQtzZinpG36mIjCAQeo2UtHMXf6tSBsmHUddcb/NGyN7i+aFLMwx/sAwja4dCO BjYQUI6AkRoVfn7EfjFTulOWnMbFi60DfYq82Fs58HIladPq9YT0zHS9U2thXaeAU+QW /1WHCFOpyiDDv+pq75jxyYA74h/UNiwpiWlcipSbL7J9V43kR2oxgnbuvACl9J7rszC+ uS3Q== X-Gm-Message-State: ACgBeo0BTUbjiK91Yc7NTAtc5h7mdpTkp+HcRShNXBSxxC0MRw/sFoh8 +NcslM4LtD3rK1vHgq2/CpJzdCFRELzpVdBDxmuMyKsKc/zTdNlH3IOSkfMIVrYx6glQnZUYQ7/ QL1NOyLoD93wUHFzF2kL4Rn54pzae+ZE29jV3+Zygvb3zScxkQgXUtZmu X-Google-Smtp-Source: AA6agR49EL1JeBz5jsvuAanf2MmNBZi7L8ZRVzIQpsC+VZztL2tyBlkTO5BToSJj7qkSx2Em9HswRJnxgQ== X-Received: from ptosi1.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:afb]) (user=ptosi job=sendgmr) by 2002:a05:600c:cb:b0:3b3:407a:b5b6 with SMTP id u11-20020a05600c00cb00b003b3407ab5b6mr100968wmm.0.1662754639510; Fri, 09 Sep 2022 13:17:19 -0700 (PDT) Date: Fri, 9 Sep 2022 21:16:18 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Message-ID: <20220909201618.1660198-1-ptosi@google.com> Subject: [PATCH] board_r: Relocate OF_EMBED if NEEDS_MANUAL_RELOC only From: " =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= " To: u-boot@lists.denx.de Cc: " =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= " , Simon Glass X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean When the embedded device tree is pointed to by the __dtb_dt_*begin symbols, it seems to be covered by the early relocation code and doesn't need to be manually patched. Cc: Simon Glass Signed-off-by: Pierre-Clément Tosi --- common/board_r.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 56eb60fa27..00926dcb1e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -150,13 +150,13 @@ static int initr_reloc_global_data(void) */ gd->env_addr += gd->reloc_off; #endif -#ifdef CONFIG_OF_EMBED /* * The fdt_blob needs to be moved to new relocation address * incase of FDT blob is embedded with in image */ - gd->fdt_blob += gd->reloc_off; -#endif + if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC)) + gd->fdt_blob += gd->reloc_off; + #ifdef CONFIG_EFI_LOADER /* * On the ARM architecture gd is mapped to a fixed register (r9 or x18).