Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1629717/?format=api
{ "id": 1629717, "url": "http://patchwork.ozlabs.org/api/patches/1629717/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-2-pali@kernel.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20220511183332.1362-2-pali@kernel.org>", "list_archive_url": null, "date": "2022-05-11T18:33:31", "name": "[2/3] mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "eade161cdf4a36620e9453a035db16c4f269b7eb", "submitter": { "id": 78810, "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api", "name": "Pali Rohár", "email": "pali@kernel.org" }, "delegate": { "id": 55230, "url": "http://patchwork.ozlabs.org/api/users/55230/?format=api", "username": "freenix", "first_name": "Peng", "last_name": "Fan", "email": "van.freenix@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-2-pali@kernel.org/mbox/", "series": [ { "id": 299695, "url": "http://patchwork.ozlabs.org/api/series/299695/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=299695", "date": "2022-05-11T18:33:32", "name": "[1/3] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot from unaligned location", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/299695/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1629717/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1629717/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=mfyztNCl;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"mfyztNCl\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kz4nS41W5z9sFk\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 May 2022 05:33:00 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 5C3278436F;\n\tWed, 11 May 2022 21:22:58 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 719FD84387; Wed, 11 May 2022 21:22:54 +0200 (CEST)", "from ams.source.kernel.org (ams.source.kernel.org\n [IPv6:2604:1380:4601:e00::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 346028436F\n for <u-boot@lists.denx.de>; Wed, 11 May 2022 21:22:48 +0200 (CEST)", "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by ams.source.kernel.org (Postfix) with ESMTPS id A98BCB825EA;\n Wed, 11 May 2022 18:34:25 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 4AD3AC34100;\n Wed, 11 May 2022 18:34:24 +0000 (UTC)", "by pali.im (Postfix)\n id EA50922D3; Wed, 11 May 2022 20:34:21 +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,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1652294064;\n bh=DXqYyTHxr/QB0v/eGkEF28QQOKV99RwXKBZgB/Vjet0=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=mfyztNCl6GvGRkrTtbqEkbUb4AtczWC86ch/unpBZQ4bynzXhZNdchl4uGksyduKL\n 7fxva2cInOMFS3q891x0UzyI/FBlhpjhSzXDc82RArsAnKLn0mKtUy9BKeaHm0L72U\n zDD2myASFrCP7oKpznNoLCqIrTZAdLApaVCekVsTHfjMCw7rNfp6V31a83ggWLWbXO\n rBoq0lnKAA5ccmUZkPU6qxMPMVNTaD5iz/syPtHji8cn8NC8eJaWDGuczgYL9KkI+J\n nzANXs0bEAGn1OxrkkKrauoykFJ9Vqpp3ZnDmD4BD3VhQAh+ABlxRw489FwKRKWFyc\n nLnQKsSTuactQ==", "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>", "To": "Peng Fan <peng.fan@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>,\n Priyanka Jain <priyanka.jain@nxp.com>, Sinan Akman <sinan@writeme.com>", "Cc": "u-boot@lists.denx.de", "Subject": "[PATCH 2/3] mmc: fsl_esdhc_spl: Add support for builds without\n CONFIG_SYS_MMC_U_BOOT_OFFS", "Date": "Wed, 11 May 2022 20:33:31 +0200", "Message-Id": "<20220511183332.1362-2-pali@kernel.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20220511183332.1362-1-pali@kernel.org>", "References": "<20220511183332.1362-1-pali@kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.5 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "When fixed offset via CONFIG_SYS_MMC_U_BOOT_OFFS is not specified then\nexpects that U-Boot proper is placed immediately after SPL without any\nadditional padding.\n\nThis allows to generate smaller SPL+U-Boot final binary as it is not\nrequired to specify fixed offset to U-Boot proper at SPL compile time.\n\nIn this case offset to U-Boot proper is calculated at SPL compile time in\nlinker script.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 10 ++++++++++\n drivers/mmc/fsl_esdhc_spl.c | 8 ++++++++\n 2 files changed, 18 insertions(+)", "diff": "diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds\nindex 272e94a1f169..cfb55939468a 100644\n--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds\n+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds\n@@ -59,6 +59,13 @@ SECTIONS\n \t__init_begin = .;\n \t__init_end = .;\n \t_end = .;\n+\n+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC\n+#if defined(CONFIG_SDCARD) && !defined(CONFIG_SYS_MMC_U_BOOT_OFFS)\n+\tmmc_u_boot_offs = .;\n+#endif\n+#endif\n+\n #ifdef CONFIG_SPL_SKIP_RELOCATE\n \t. = ALIGN(4);\n \t__bss_start = .;\n@@ -91,6 +98,9 @@ SECTIONS\n \t.resetvec IMAGE_TEXT_BASE + RESET_VECTOR_OFFSET : {\n \t\tKEEP(*(.resetvec))\n \t} = 0xffff\n+#if defined(CONFIG_SDCARD) && !defined(CONFIG_SYS_MMC_U_BOOT_OFFS)\n+\tmmc_u_boot_offs = .;\n+#endif\n #endif\n \n #ifndef CONFIG_SPL_SKIP_RELOCATE\ndiff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c\nindex e3175de16bab..139b4d853b7a 100644\n--- a/drivers/mmc/fsl_esdhc_spl.c\n+++ b/drivers/mmc/fsl_esdhc_spl.c\n@@ -9,6 +9,10 @@\n #include <mmc.h>\n #include <malloc.h>\n \n+#ifndef CONFIG_SYS_MMC_U_BOOT_OFFS\n+extern uchar mmc_u_boot_offs[];\n+#endif\n+\n /*\n * The environment variables are written to just after the u-boot image\n * on SDCard, so we must read the MBR to get the start address and code\n@@ -149,7 +153,11 @@ again:\n \t\tval = *(tmp_buf + blk_off + ESDHC_BOOT_IMAGE_ADDR + i);\n \t\toffset = (offset << 8) + val;\n \t}\n+#ifndef CONFIG_SYS_MMC_U_BOOT_OFFS\n+\toffset += (ulong)&mmc_u_boot_offs - CONFIG_SPL_TEXT_BASE;\n+#else\n \toffset += CONFIG_SYS_MMC_U_BOOT_OFFS;\n+#endif\n #endif\n \t/*\n \t* Load U-Boot image from mmc into RAM\n", "prefixes": [ "2/3" ] }