Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1745907/?format=api
{ "id": 1745907, "url": "http://patchwork.ozlabs.org/api/patches/1745907/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-58-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": "<20230221201925.9644-58-pali@kernel.org>", "list_archive_url": null, "date": "2023-02-21T20:19:23", "name": "[RFC,u-boot-mvebu,57/59] arm: mvebu: Define env_sf_get_env_addr() also for Proper U-Boot", "commit_ref": "056808a4bbcc611d8cdedd937d9e1177b441716a", "pull_url": null, "state": "accepted", "archived": false, "hash": "8f215d000c1231f900c4ff44051c444c3e7360d2", "submitter": { "id": 78810, "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api", "name": "Pali Rohár", "email": "pali@kernel.org" }, "delegate": { "id": 1696, "url": "http://patchwork.ozlabs.org/api/users/1696/?format=api", "username": "stroese", "first_name": "Stefan", "last_name": "Roese", "email": "sr@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-58-pali@kernel.org/mbox/", "series": [ { "id": 343058, "url": "http://patchwork.ozlabs.org/api/series/343058/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=343058", "date": "2023-02-21T20:18:27", "name": "arm: mvebu: Various fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/343058/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1745907/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1745907/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "legolas.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=TIKPnhVC;\n\tdkim-atps=neutral", "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=\"TIKPnhVC\";\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\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (P-384))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4PLrbk3XByz23j7\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Feb 2023 07:33:54 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 4A40385BBD;\n\tTue, 21 Feb 2023 21:24:51 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id A673E85B60; Tue, 21 Feb 2023 21:23:59 +0100 (CET)", "from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n bits)) (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 02CA285AF1\n for <u-boot@lists.denx.de>; Tue, 21 Feb 2023 21:22:44 +0100 (CET)", "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 dfw.source.kernel.org (Postfix) with ESMTPS id 0DF12611FE;\n Tue, 21 Feb 2023 20:22:37 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id B6BC1C4339C;\n Tue, 21 Feb 2023 20:22:36 +0000 (UTC)", "by pali.im (Postfix)\n id 7339FA8C; Tue, 21 Feb 2023 21:22:36 +0100 (CET)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 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 autolearn=unavailable autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1677010956;\n bh=Pw5K07BdLIF3myuH4Q86lbGoNhQoO82N6deiAJ13+OM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=TIKPnhVCbMA5agyThDJl9ADe1WzqzOvZoFF03hKBI4I7QzI7qAmI5Q8sXFy7ETpzm\n AwHf+ZnxNnCzI90kTmyw5CrEXBuLNeA7e83dLHwlTv1b4ay8JI4t9w8S30JNXXduk0\n r1kR7TNpLsJlV9CVxdbKsWY3dS8bpDB7dIy0kz6XmcRl8lT5CL3OG+0aShdLzF/WvV\n pKmGsiXHQnAWRkfWDpe5Cp0RBxgQwXfMMa73n+PLa8pWE91+n+n+dmrUvRxRfnVIPP\n Eu7m/aJK+hDgHrxtD0OzR58YSlArsGiCK+x8m3NFV10yw1lOndJrDW+Etua8Wa2AcU\n mLyUb80SpvT2g==", "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>", "To": "u-boot@lists.denx.de", "Cc": "Stefan Roese <sr@denx.de>, Tony Dinh <mibodhi@gmail.com>,\n Josua Mayer <josua@solid-run.com>", "Subject": "[PATCH RFC u-boot-mvebu 57/59] arm: mvebu: Define\n env_sf_get_env_addr() also for Proper U-Boot", "Date": "Tue, 21 Feb 2023 21:19:23 +0100", "Message-Id": "<20230221201925.9644-58-pali@kernel.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20230221201925.9644-1-pali@kernel.org>", "References": "<20230221201925.9644-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.6 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Proper U-Boot moves SPI0 CS0 Flash mapping from 0xD4000000 to 0xF4000000\nand change its size from 64 MB to 8 MB. Definitions are already in\nMBUS_SPI_BASE/MBUS_SPI_SIZE macros. So define these macros also for SPL\nbuild, use them in env_sf_get_env_addr() function and move this function\nfrom spl.c to cpu.c to be available in Proper U-Boot too.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n arch/arm/mach-mvebu/cpu.c | 9 +++++++++\n arch/arm/mach-mvebu/include/mach/cpu.h | 5 +++++\n arch/arm/mach-mvebu/spl.c | 13 -------------\n 3 files changed, 14 insertions(+), 13 deletions(-)", "diff": "diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c\nindex c5089a91c747..97154aaa2a7e 100644\n--- a/arch/arm/mach-mvebu/cpu.c\n+++ b/arch/arm/mach-mvebu/cpu.c\n@@ -35,6 +35,15 @@ static const struct mbus_win windows[] = {\n #endif\n };\n \n+/* SPI0 CS0 Flash of size MBUS_SPI_SIZE is mapped to address MBUS_SPI_BASE */\n+#if CONFIG_ENV_SPI_BUS == 0 && CONFIG_ENV_SPI_CS == 0 && \\\n+ CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE <= MBUS_SPI_SIZE\n+void *env_sf_get_env_addr(void)\n+{\n+\treturn (void *)MBUS_SPI_BASE + CONFIG_ENV_OFFSET;\n+}\n+#endif\n+\n void lowlevel_init(void)\n {\n \t/*\ndiff --git a/arch/arm/mach-mvebu/include/mach/cpu.h b/arch/arm/mach-mvebu/include/mach/cpu.h\nindex c17c2440f1b1..906a8737a401 100644\n--- a/arch/arm/mach-mvebu/include/mach/cpu.h\n+++ b/arch/arm/mach-mvebu/include/mach/cpu.h\n@@ -71,8 +71,13 @@ enum cpu_attrib {\n #define MBUS_PCI_MEM_SIZE\t((MBUS_PCI_MAX_PORTS * 128) << 20)\n #define MBUS_PCI_IO_BASE\t0xF1100000\n #define MBUS_PCI_IO_SIZE\t((MBUS_PCI_MAX_PORTS * 64) << 10)\n+#ifdef CONFIG_SPL_BUILD\n+#define MBUS_SPI_BASE\t\t0xD4000000\n+#define MBUS_SPI_SIZE\t\t(64 << 20)\n+#else\n #define MBUS_SPI_BASE\t\t0xF4000000\n #define MBUS_SPI_SIZE\t\t(8 << 20)\n+#endif\n #define MBUS_DFX_BASE\t\t0xF6000000\n #define MBUS_DFX_SIZE\t\t(1 << 20)\n #define MBUS_BOOTROM_BASE\t0xF8000000\ndiff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c\nindex 02528e025d8c..6b8c72a71dab 100644\n--- a/arch/arm/mach-mvebu/spl.c\n+++ b/arch/arm/mach-mvebu/spl.c\n@@ -308,19 +308,6 @@ int board_return_to_bootrom(struct spl_image_info *spl_image,\n \thang();\n }\n \n-/*\n- * SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.\n- * Proper U-Boot removes this direct mapping. So it is available only in SPL.\n- */\n-#if defined(CONFIG_SPL_ENV_IS_IN_SPI_FLASH) && \\\n- CONFIG_ENV_SPI_BUS == 0 && CONFIG_ENV_SPI_CS == 0 && \\\n- CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE <= 64*1024*1024\n-void *env_sf_get_env_addr(void)\n-{\n-\treturn (void *)0xD4000000 + CONFIG_ENV_OFFSET;\n-}\n-#endif\n-\n void board_init_f(ulong dummy)\n {\n \tint ret;\n", "prefixes": [ "RFC", "u-boot-mvebu", "57/59" ] }