From patchwork Mon Aug 1 12:50:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1662543 X-Patchwork-Delegate: marek.behun@nic.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Su2XyY9i; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LxHzh5q4nz9s5W for ; Mon, 1 Aug 2022 22:50:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0082B84129; Mon, 1 Aug 2022 14:50:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="Su2XyY9i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EB8FA8415B; Mon, 1 Aug 2022 14:50:49 +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.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C42B88401B for ; Mon, 1 Aug 2022 14:50:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 57A0CB811A3; Mon, 1 Aug 2022 12:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0829C433D6; Mon, 1 Aug 2022 12:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659358245; bh=Ta1T1JffmELxd2l4++o42aop2HYjRgtj+bq8aqSqfyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Su2XyY9i0klGMNdE2ySVu6UcCcIMU2IAvAoMgW5i5jJvEC+C6MHRKFjnxH4iSe4B7 7vSnhFXrBptPhQr0GcSQrXT14I4hez7o29p3+aOOj8LWQRgBd0PviEjyv5gIbp4uwm bcn4HYsDj6tw9RKViMbe+zmc/U4VwlgzlSuKqtyjs/dlcjJFZth2x+HAbuPXCsFqZX tSSfywbjMY4kTLqCsCjQKSJ+bKKhNd7Ptt+f0msN9vkCqH7v7iCX/Jbbsa8KLZwUSx dXCa4rIaztussyKOVilRmPWuly8b3BZm0XGXy/z5pzKky9DaGOU37sLA1T/AwpLH5l gZlNjtubxjpbw== Received: by pali.im (Postfix) id CE17575F; Mon, 1 Aug 2022 14:50:42 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Peng Fan Cc: u-boot@lists.denx.de Subject: [PATCH v2] board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot sector Date: Mon, 1 Aug 2022 14:50:12 +0200 Message-Id: <20220801125012.9757-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220405134032.704-3-pali@kernel.org> References: <20220405134032.704-3-pali@kernel.org> MIME-Version: 1.0 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 Correctly calculate offsets between SPL and proper U-Boot when new config option CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR for generating eSDHC boot sector is enabled. Otherwise SPL would not be able to boot proper U-Boot. Signed-off-by: Pali Rohár --- Changes in v2: * rebase on top of master branch, commit 85eb5ac6efee878f3c2ab3269286250e187ca10c --- include/configs/p1_p2_rdb_pc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index ba04029df8d8..d2787136681b 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -80,7 +80,11 @@ #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_MMC_U_BOOT_DST CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MMC_U_BOOT_START CONFIG_SYS_TEXT_BASE +#ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR +#define CONFIG_SYS_MMC_U_BOOT_OFFS (CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512) +#else #define CONFIG_SYS_MMC_U_BOOT_OFFS CONFIG_SPL_PAD_TO +#endif #elif defined(CONFIG_SPIFLASH) #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST CONFIG_SYS_TEXT_BASE