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 29AC9C19F2D for ; Thu, 11 Aug 2022 05:48:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55A67848CC; Thu, 11 Aug 2022 07:48:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com 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=samsung.com header.i=@samsung.com header.b="nnBNWEF1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC3B5848E5; Thu, 11 Aug 2022 07:48:37 +0200 (CEST) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 BCEC38489D for ; Thu, 11 Aug 2022 07:48:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@samsung.com Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220811054825epoutp01f4bad4e5413d3fa0dfa2eabe9788c905~KNEoOTCnm2886928869epoutp01j for ; Thu, 11 Aug 2022 05:48:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220811054825epoutp01f4bad4e5413d3fa0dfa2eabe9788c905~KNEoOTCnm2886928869epoutp01j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1660196905; bh=ONE9nEwJZ2O2E7yPGKZTxp4VbnDd5UqzBRwMuVZ5jTk=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=nnBNWEF1vSiDh3bnjPUEi+GMJ5bpoWqg8JHhs+5LhizeWHsQbogmvMlI7+neK8lQh hfh/jgSTIIYxS9sPkFDVndyPIhhOydb/iHFXRzV0rNs6ZNdxT8l+Xlr6WrONmuWi2x 4LSNFr+h9dU1xirAnH/JnJExxXdqO83CeZWCqGQA= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20220811054823epcas1p1bfcb9e412f553dc1957c202abbb7b8d8~KNEmtxkpJ1586715867epcas1p1Z; Thu, 11 Aug 2022 05:48:23 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.38.236]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4M3G7T5sFYz4x9QP; Thu, 11 Aug 2022 05:48:21 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id BE.04.09678.52894F26; Thu, 11 Aug 2022 14:48:21 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220811054821epcas1p105c8d161e1f64f28c16f47f8767fff29~KNEkrFZRZ1856918569epcas1p1k; Thu, 11 Aug 2022 05:48:21 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220811054821epsmtrp23dc28d6387789f163511d129031e3815~KNEkqWBzE3050230502epsmtrp2U; Thu, 11 Aug 2022 05:48:21 +0000 (GMT) X-AuditID: b6c32a39-e67ff700000025ce-4b-62f4982516bf Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id E8.02.08802.52894F26; Thu, 11 Aug 2022 14:48:21 +0900 (KST) Received: from jh80chung01 (unknown [10.113.111.84]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220811054821epsmtip1545e0ebf1b5bf12c13fe39a30dff465a~KNEkf9ohx1581015810epsmtip1o; Thu, 11 Aug 2022 05:48:21 +0000 (GMT) From: To: "'Pali Rohar'" , "'Peng Fan'" , "'Marek Behun'" Cc: "'Sinan Akman'" , In-Reply-To: <20220805200941.22101-3-pali@kernel.org> Subject: RE: [PATCH v3 3/3] mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS Date: Thu, 11 Aug 2022 14:48:21 +0900 Message-ID: <000601d8ad45$f6cbce10$e4636a30$@samsung.com> X-Mailer: Microsoft Outlook 15.0 Content-Language: ko Thread-Index: AQGi1GP9vY9OQPzHx7HZFbMPHQPgDQGKwiKfAmV/mRkCDYdfka3k9Keg X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCKsWRmVeSWpSXmKPExsWy7bCmrq7qjC9JBq1z9S0+313EbLFgz2k2 ix+rvrBaXJm+nN3i7d5OdgdWj02rOtk8zt7Zweix8d0OJo8Xp1sYA1iism0yUhNTUosUUvOS 81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJzgBYrKZQl5pQChQISi4uV9O1s ivJLS1IVMvKLS2yVUgtScgpMC/SKE3OLS/PS9fJSS6wMDQyMTIEKE7Iz7u87yF7wWbSi+eZe 1gbGG4JdjJwcEgImEr8P/WTtYuTiEBLYwSjx/OIZJgjnE6PE1m0TmSGcz4wSfw51ssG0zFj8 hAUisYtRovPbMaiWl4wSvTu+soNUsQnISay4fhLMFhHIlph94TvQEg4OZgF7iTc/y0HCnAKm EpP+fWIEsYWBSt4tvAJWziKgKtF/dzmYzStgKXHk6QGoxQoSuz8dZQWxmQVEJGZ3tjFDjHeT ePj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xFgFVif67y8FsXgFLiSNPD7BBHKEgsfvTUVaIoSIS szvbmCGWuUk8/HCWZQKjwCwkqQWMjKsYJVMLinPTc4sNC4zyUsv1ihNzi0vz0vWS83M3MYJD VEtrB+OeVR/0DjEycTAeYpTgYFYS4S1b9DlJiDclsbIqtSg/vqg0J7X4EKM0B4uSOO+FrpPx QgLpiSWp2ampBalFMFkmDk6pBia274Fui+pPrl5mNePo0QM9C7QeHRDSfpvUV2qrwfR8nVJ6 wJUy/9zc9txjRceztkRKvb5jyPR/bbjJu8niHW9EzRyv9N8ziXGc9N2VYYFXvtf0vAuenTyp JkZ7Xvg5Hz/Dm60crSBgekemLDHSv+D66ckMawyS/35JX7Ig9qrRijxfz4zTUmrbLsvzfr9W eTFsVoXLbwtF9+luRcsdpNeeaZxvZ/K2zaZtx+/k1bZMto8eqk6t+KS+3SC6L5j1fLh19sw5 5g3ZJ+MYN82pdb8x+zjr6WOGu30WPDY7+d864+6ZKyo7FgV7MO2+VZ69e0rBq1110Sr6quvY vhqxfdz4QjCPa86MKVse7FK4vlqJpTgj0VCLuag4EQCARr13wAIAAA== X-CMS-MailID: 20220811054821epcas1p105c8d161e1f64f28c16f47f8767fff29 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220805201029epcas1p3389d4e6b54d22cdc06bff6415c4b846f References: <20220511183332.1362-1-pali@kernel.org> <20220805200941.22101-1-pali@kernel.org> <20220805200941.22101-3-pali@kernel.org> 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 Hi, > -----Original Message----- > From: Pali Rohar [mailto:pali@kernel.org] > Sent: Saturday, August 6, 2022 5:10 AM > To: Jaehoon Chung; Peng Fan; Marek Behun > Cc: Sinan Akman; u-boot@lists.denx.de > Subject: [PATCH v3 3/3] mmc: fsl_esdhc_spl: Add support for builds without > CONFIG_SYS_MMC_U_BOOT_OFFS > > When fixed offset via CONFIG_SYS_MMC_U_BOOT_OFFS is not specified then > expects that U-Boot proper is placed immediately after SPL without any > additional padding. > > This allows to generate smaller SPL+U-Boot final binary as it is not > required to specify fixed offset to U-Boot proper at SPL compile time. > > In this case offset to U-Boot proper is calculated at SPL compile time in > linker script. > > Signed-off-by: Pali Rohar Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 10 ++++++++++ > drivers/mmc/fsl_esdhc_spl.c | 8 ++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds > index 89df4b5f6f07..f775f6bc4d06 100644 > --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds > +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds > @@ -62,6 +62,13 @@ SECTIONS > __init_begin = .; > __init_end = .; > _end = .; > + > +#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC > +#if defined(CONFIG_SDCARD) && !defined(CONFIG_SYS_MMC_U_BOOT_OFFS) > + mmc_u_boot_offs = .; > +#endif > +#endif > + > #ifdef CONFIG_SPL_SKIP_RELOCATE > . = ALIGN(4); > __bss_start = .; > @@ -94,6 +101,9 @@ SECTIONS > .resetvec IMAGE_TEXT_BASE + RESET_VECTOR_OFFSET : { > KEEP(*(.resetvec)) > } = 0xffff > +#if defined(CONFIG_SDCARD) && !defined(CONFIG_SYS_MMC_U_BOOT_OFFS) > + mmc_u_boot_offs = .; > +#endif > #endif > > #ifndef CONFIG_SPL_SKIP_RELOCATE > diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c > index dd6d5fa81ea6..aa00d7e2014d 100644 > --- a/drivers/mmc/fsl_esdhc_spl.c > +++ b/drivers/mmc/fsl_esdhc_spl.c > @@ -9,6 +9,10 @@ > #include > #include > > +#ifndef CONFIG_SYS_MMC_U_BOOT_OFFS > +extern uchar mmc_u_boot_offs[]; > +#endif > + > /* > * The environment variables are written to just after the u-boot image > * on SDCard, so we must read the MBR to get the start address and code > @@ -149,7 +153,11 @@ again: > val = *(tmp_buf + blk_off + ESDHC_BOOT_IMAGE_ADDR + i); > offset = (offset << 8) + val; > } > +#ifndef CONFIG_SYS_MMC_U_BOOT_OFFS > + offset += (ulong)&mmc_u_boot_offs - CONFIG_SPL_TEXT_BASE; > +#else > offset += CONFIG_SYS_MMC_U_BOOT_OFFS; > +#endif > #endif > /* > * Load U-Boot image from mmc into RAM > -- > 2.20.1