From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 003F0ECAAA1 for ; Fri, 9 Sep 2022 20:17:27 +0000 (UTC) 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) 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=20Tosi?=" To: u-boot@lists.denx.de Cc: "=?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?=" , Simon Glass Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A9ment 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 +=3D 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 +=3D gd->reloc_off; -#endif + if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC)) + gd->fdt_blob +=3D gd->reloc_off; + #ifdef CONFIG_EFI_LOADER /* * On the ARM architecture gd is mapped to a fixed register (r9 or x18). --=20 2.37.2.789.g6183377224-goog