diff --git a/0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch b/0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch deleted file mode 100644 index 30e4ad8..0000000 --- a/0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch +++ /dev/null @@ -1,41 +0,0 @@ -From ed5ffb3b53690a47333b931301a3765b9588b5dc Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 11 Jun 2023 21:22:41 +0100 -Subject: [PATCH] Revert "rockchip: rockpro64: Build u-boot-rockchip-spi.bin" - -This reverts commit 5713135ecc75660684ff3eb6cfba7bc11eb6433c. ---- - configs/rockpro64-rk3399_defconfig | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig -index f41c0306790..0ca2cecade2 100644 ---- a/configs/rockpro64-rk3399_defconfig -+++ b/configs/rockpro64-rk3399_defconfig -@@ -11,7 +11,6 @@ - CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64" - CONFIG_DM_RESET=y - CONFIG_ROCKCHIP_RK3399=y --CONFIG_ROCKCHIP_SPI_IMAGE=y - CONFIG_TARGET_ROCKPRO64_RK3399=y - CONFIG_SPL_STACK=0x400000 - CONFIG_DEBUG_UART_BASE=0xFF1A0000 -@@ -21,7 +20,6 @@ - CONFIG_SYS_LOAD_ADDR=0x800800 - CONFIG_PCI=y - CONFIG_DEBUG_UART=y --CONFIG_LTO=y - CONFIG_SPL_FIT_SIGNATURE=y - CONFIG_LEGACY_IMAGE_FORMAT=y - CONFIG_BOOTSTAGE=y -@@ -40,7 +38,6 @@ - CONFIG_SPL_STACK_R=y - CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 - CONFIG_SPL_SPI_LOAD=y --CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 - CONFIG_TPL=y - CONFIG_CMD_BOOTZ=y - CONFIG_CMD_GPT=y --- -2.41.0 - diff --git a/0001-disable-NFS-support-by-default.patch b/0001-disable-NFS-support-by-default.patch deleted file mode 100644 index b520b15..0000000 --- a/0001-disable-NFS-support-by-default.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 31dc49dee987500b0d5b5b536b6da2f3fbfd5b59 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 13 Jun 2023 09:36:50 +0100 -Subject: [v1] disable NFS support by default - -While NFS is widely used in data centres, and private -networks it's quite a nuanced usecase for device firmware. -A lot of devices already disable it. - -Various network protocols should really be opt in, not opt -out, because they add extra size and are potential attack -vectors from a security PoV. In the NFS case it doesn't -really make sense for a lot of devices like tables, SBCs etc. -It's also something we don't really want for SystemReady-IR -due to security concerns. - -Signed-off-by: Peter Robinson ---- - -v1: drop RFC tag - - cmd/Kconfig | 1 - - -diff --git a/cmd/Kconfig b/cmd/Kconfig -index 365371fb511..a193929cec4 100644 ---- a/cmd/Kconfig -+++ b/cmd/Kconfig -@@ -1848,7 +1848,6 @@ config CMD_RARP - - config CMD_NFS - bool "nfs" -- default y - help - Boot image via network using NFS protocol. - diff --git a/Add-video-damage-tracking.patch b/Add-video-damage-tracking.patch deleted file mode 100644 index 3cfd387..0000000 --- a/Add-video-damage-tracking.patch +++ /dev/null @@ -1,4136 +0,0 @@ -From patchwork Mon Aug 21 13:50:58 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823643 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=jAFdt8C3; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv611rHqz1yg0 - for ; Mon, 21 Aug 2023 23:51:37 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 69F2487066; - Mon, 21 Aug 2023 15:51:29 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="jAFdt8C3"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 71CEC8706D; Mon, 21 Aug 2023 15:51:28 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com - [IPv6:2a00:1450:4864:20::32e]) - (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 3320B87062 - for ; Mon, 21 Aug 2023 15:51:25 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wm1-x32e.google.com with SMTP id - 5b1f17b1804b1-3fef56f7222so2727775e9.2 - for ; Mon, 21 Aug 2023 06:51:25 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625884; x=1693230684; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=0KM0F1+WkNhDdn0zbbXHFFjqAdCr64hX7QvIzy6/iyI=; - b=jAFdt8C3owZgLvkS3GxcS5N+GiTxn30Z/xJkqzPDEYfC0PDH1kIsDI4pb6eHKAFVBt - PLqr4R9Sdmb05o76fez0U9nTmmv97QjcaeHGc0adZliwf33YdMgotCTaUiHc/nhkpLWw - c8rHP6jWgFPGn5Y45QEtPjQFEuV0nP0SkMONJorI+ci6NUadDN8X0tZNK5GoF1lvhF4o - mQZs5xJfJ6evaIBX7srcue8NUq4BtyhQ18vVYm0nCIPEltA23PBpkcejhCv6g5o/4puI - sgF/+jj8BhBQFKhPEIktVLWcqveScR/ngqiv1iDRHrCL6flPhtCsrpShY+rzilzpJdtC - fkJQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625884; x=1693230684; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=0KM0F1+WkNhDdn0zbbXHFFjqAdCr64hX7QvIzy6/iyI=; - b=gWHm6TE1o6bFZMTHoyWCi4QgdvFQkn06zRip9uOn3HqDzCG7KLnrXsFUdYdugOcadS - yQH0TYQ9YCGnJEItFC8+BAPuij69++YczOI2dzUQz6ejqfjFnTORccJmFginC+ZQynSw - ygcqWBt7iXKWwm2BNaTOS0ZbXxZuQrdebM6QD55CSsB+YnJ/21Q4txo4VOIzT+g2LmU4 - YhR1Ec8+2HGk3w1oWalKPpGcBc3y3y7ADgy/Kt0L4pFhAmBewW+wlGtrTxdoIbRmcMwx - 6xx1bS9ZrdHzFpTAB7myHjowwbIvRmhpNDr1e+ROx71myEhCEhnz0o6tjGmHTmebIiZB - Axiw== -X-Gm-Message-State: AOJu0Yw7o7394U5eAr5ipSyfIWmc1YVzBHdp8jslW0qPlsoIXMjiuI6c - SaZaVpf+ZihLZ51797OE439hQFEZL4o= -X-Google-Smtp-Source: - AGHT+IGiiJu3kdw60kWynu1HizRmCX0l3/hesikD0kGHzt9jbq6D24m4A0InLSpbaBLDcUVjniBVKA== -X-Received: by 2002:a05:600c:3799:b0:3fe:2011:a7ce with SMTP id - o25-20020a05600c379900b003fe2011a7cemr5345546wmr.6.1692625884228; - Mon, 21 Aug 2023 06:51:24 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.22 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:23 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 01/13] video: test: Split copy frame buffer check into a - function -Date: Mon, 21 Aug 2023 16:50:58 +0300 -Message-Id: <20230821135111.3558478-2-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -While checking frame buffer contents, the video tests also check if the -copy frame buffer contents match the main frame buffer. To test if only -the modified regions are updated after a sync, we will need to create -situations where the two are mismatched. Split this check into another -function that we can skip calling, since we won't want it to error on -those mismatched cases. - -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Add patch "video: test: Split copy frame buffer check into a function" - - test/dm/video.c | 69 +++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 58 insertions(+), 11 deletions(-) - -diff --git a/test/dm/video.c b/test/dm/video.c -index d907f681600b..641a6250100a 100644 ---- a/test/dm/video.c -+++ b/test/dm/video.c -@@ -55,9 +55,6 @@ DM_TEST(dm_test_video_base, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); - * size of the compressed data. This provides a pretty good level of - * certainty and the resulting tests need only check a single value. - * -- * If the copy framebuffer is enabled, this compares it to the main framebuffer -- * too. -- * - * @uts: Test state - * @dev: Video device - * Return: compressed size of the frame buffer, or -ve on error -@@ -66,7 +63,6 @@ static int compress_frame_buffer(struct unit_test_state *uts, - struct udevice *dev) - { - struct video_priv *priv = dev_get_uclass_priv(dev); -- struct video_priv *uc_priv = dev_get_uclass_priv(dev); - uint destlen; - void *dest; - int ret; -@@ -82,16 +78,34 @@ static int compress_frame_buffer(struct unit_test_state *uts, - if (ret) - return ret; - -- /* Check here that the copy frame buffer is working correctly */ -- if (IS_ENABLED(CONFIG_VIDEO_COPY)) { -- ut_assertf(!memcmp(uc_priv->fb, uc_priv->copy_fb, -- uc_priv->fb_size), -- "Copy framebuffer does not match fb"); -- } -- - return destlen; - } - -+/** -+ * check_copy_frame_buffer() - Compare main frame buffer to copy -+ * -+ * If the copy frame buffer is enabled, this compares it to the main -+ * frame buffer. Normally they should have the same contents after a -+ * sync. -+ * -+ * @uts: Test state -+ * @dev: Video device -+ * Return: 0, or -ve on error -+ */ -+static int check_copy_frame_buffer(struct unit_test_state *uts, -+ struct udevice *dev) -+{ -+ struct video_priv *priv = dev_get_uclass_priv(dev); -+ -+ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) -+ return 0; -+ -+ ut_assertf(!memcmp(priv->fb, priv->copy_fb, priv->fb_size), -+ "Copy framebuffer does not match fb"); -+ -+ return 0; -+} -+ - /* - * Call this function at any point to halt and show the current display. Be - * sure to run the test with the -l flag. -@@ -155,24 +169,30 @@ static int dm_test_video_text(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "8x16", 0)); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_putc_xy(con, 0, 0, 'a'); - ut_asserteq(79, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_putc_xy(con, 0, 0, ' '); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); - ut_asserteq(273, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_set_row(con, 0, WHITE); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); - ut_asserteq(273, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -191,24 +211,30 @@ static int dm_test_video_text_12x22(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "12x22", 0)); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_putc_xy(con, 0, 0, 'a'); - ut_asserteq(89, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_putc_xy(con, 0, 0, ' '); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); - ut_asserteq(363, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_set_row(con, 0, WHITE); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); - ut_asserteq(363, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -226,6 +252,7 @@ static int dm_test_video_chars(struct unit_test_state *uts) - ut_assertok(vidconsole_select_font(con, "8x16", 0)); - vidconsole_put_string(con, test_string); - ut_asserteq(466, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -247,19 +274,23 @@ static int dm_test_video_ansi(struct unit_test_state *uts) - video_clear(con->parent); - video_sync(con->parent, false); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test clear escape sequence: [2J */ - vidconsole_put_string(con, "A\tB\tC"ANSI_ESC"[2J"); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test set-cursor: [%d;%df */ - vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd"); - ut_asserteq(143, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test colors (30-37 fg color, 40-47 bg color) */ - vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */ - vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */ - ut_asserteq(272, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -292,11 +323,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "8x16", 0)); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* Check display wrap */ - for (i = 0; i < 120; i++) - vidconsole_put_char(con, 'A' + i % 50); - ut_asserteq(wrap_size, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* Check display scrolling */ - for (i = 0; i < SCROLL_LINES; i++) { -@@ -304,11 +337,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, - vidconsole_put_char(con, '\n'); - } - ut_asserteq(scroll_size, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* If we scroll enough, the screen becomes blank again */ - for (i = 0; i < SCROLL_LINES; i++) - vidconsole_put_char(con, '\n'); - ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -383,6 +418,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(1368, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -402,6 +438,7 @@ static int dm_test_video_bmp8(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(1247, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -425,6 +462,7 @@ static int dm_test_video_bmp16(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); - ut_asserteq(3700, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -448,6 +486,7 @@ static int dm_test_video_bmp24(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); - ut_asserteq(3656, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -471,6 +510,7 @@ static int dm_test_video_bmp24_32(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); - ut_asserteq(6827, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -489,6 +529,7 @@ static int dm_test_video_bmp32(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(2024, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -505,6 +546,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(1368, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -524,6 +566,7 @@ static int dm_test_video_comp_bmp32(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(2024, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -543,6 +586,7 @@ static int dm_test_video_comp_bmp8(struct unit_test_state *uts) - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); - ut_asserteq(1247, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -558,6 +602,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); - ut_asserteq(12174, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -579,6 +624,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); - ut_asserteq(34287, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } -@@ -600,6 +646,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); - ut_asserteq(29471, compress_frame_buffer(uts, dev)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - } - -From patchwork Mon Aug 21 13:50:59 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823644 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=mYzIbw17; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv6B5sZGz1yYZ - for ; Mon, 21 Aug 2023 23:51:46 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id AD34B8706B; - Mon, 21 Aug 2023 15:51:31 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="mYzIbw17"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 5EF078707C; Mon, 21 Aug 2023 15:51:30 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com - [IPv6:2a00:1450:4864:20::42b]) - (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 8B77787069 - for ; Mon, 21 Aug 2023 15:51:27 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x42b.google.com with SMTP id - ffacd0b85a97d-307d20548adso2907788f8f.0 - for ; Mon, 21 Aug 2023 06:51:27 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625887; x=1693230687; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=2OB7382go0g6JBjezy6TmzGfi6gIlYCFDFe4xM7HRw8=; - b=mYzIbw17s5ut2Lj8TmUyEmZZuMpoWf/YpZMisLloBGvTOI6o9/p8nP2M17yjk++h8P - 8+GH169jMY+6EuzecVUKktHLjLULhqcSGVgb+K8TH4Z0MkPhLZg6u+23TnjErs5v1VYS - +euy4y8wSAudLGdJHtR26NtBqeJHDFiK6ves/aUe6PVWoPVDofUTUC53I4mvF96uWF8K - NxLW9B5KIoY0T2WpxZUDwabQASQORqw1sA33K5oTD5OvFTS081ZnJT9otEq9+EgTySU5 - e9RQTRRZ1lstBqBTAQHRXPAniy7qhyu+ptlO9RhqLC6R08WOBN8Fwz7r4fVsnuuGMEgm - CatQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625887; x=1693230687; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=2OB7382go0g6JBjezy6TmzGfi6gIlYCFDFe4xM7HRw8=; - b=ChLsD8uyfsbRsBr3u3v4RBW8IRqsNDwAduakdrWkASxSDmmx1fr/AROSBC5feYGGDe - hS2CHTTA7mzZBgx65Trp5EItwl/T+Vp9i6ot9yz9QlTUNNEcPawZEdr+wrwsTgDaxH2v - snQjENvBTKP8nVEyAFqDmM2dOMLBHKEnI/a8MuKKZMuMu9dujekXUR7zTMOWyhTLK6Gc - D8F+qwz8FIhnEGMc1i1LvXmjDCs7delvdWCetg6JqpaHZUQQc6Ru03gSKWXkedKTdHsF - IFdkr4qm3W7Rsy2BwYQZN2XrZO5IuLkQjVOtfryPfMGux/37jUX8zNJ0y+TL8k42PlEC - Xicw== -X-Gm-Message-State: AOJu0YwlYwARbrwNV25POhyWxcoym3cQztI8SjGOeCzdsQys/HqRUQV+ - wqnhOKThUMfcGC8MZ8gLFE2KT2+SxVA= -X-Google-Smtp-Source: - AGHT+IHSYU3/G4dWV8P3egqgpph9YxOl4+mH1vDWUtosphrFiVQk7BNu/zdvNsUiJiU3qzGO9VCxdg== -X-Received: by 2002:a5d:44cf:0:b0:313:f33c:24c4 with SMTP id - z15-20020a5d44cf000000b00313f33c24c4mr4457731wrr.39.1692625886757; - Mon, 21 Aug 2023 06:51:26 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.24 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:26 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 02/13] video: test: Support checking copy frame buffer - contents -Date: Mon, 21 Aug 2023 16:50:59 +0300 -Message-Id: <20230821135111.3558478-3-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -The video tests have a helper function to generate a pseudo-digest of -frame buffer contents, but it only does so for the main one. There is -another check that the copy frame buffer is the same as that. But -neither is enough to test if only the modified regions are copied to the -copy frame buffer, since we will want the two to be different in very -specific ways. - -Add a boolean argument to the existing helper function to indicate which -frame buffer we want to inspect, and update the existing callers. - -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Add patch "video: test: Support checking copy frame buffer contents" - - test/dm/video.c | 76 ++++++++++++++++++++++++++----------------------- - 1 file changed, 41 insertions(+), 35 deletions(-) - -diff --git a/test/dm/video.c b/test/dm/video.c -index 641a6250100a..b9ff3da10c18 100644 ---- a/test/dm/video.c -+++ b/test/dm/video.c -@@ -57,22 +57,28 @@ DM_TEST(dm_test_video_base, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); - * - * @uts: Test state - * @dev: Video device -+ * @use_copy: Use copy frame buffer if available - * Return: compressed size of the frame buffer, or -ve on error - */ - static int compress_frame_buffer(struct unit_test_state *uts, -- struct udevice *dev) -+ struct udevice *dev, -+ bool use_copy) - { - struct video_priv *priv = dev_get_uclass_priv(dev); - uint destlen; - void *dest; - int ret; - -+ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) -+ use_copy = false; -+ - destlen = priv->fb_size; - dest = malloc(priv->fb_size); - if (!dest) - return -ENOMEM; - ret = BZ2_bzBuffToBuffCompress(dest, &destlen, -- priv->fb, priv->fb_size, -+ use_copy ? priv->copy_fb : priv->fb, -+ priv->fb_size, - 3, 0, 0); - free(dest); - if (ret) -@@ -168,30 +174,30 @@ static int dm_test_video_text(struct unit_test_state *uts) - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "8x16", 0)); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_putc_xy(con, 0, 0, 'a'); -- ut_asserteq(79, compress_frame_buffer(uts, dev)); -+ ut_asserteq(79, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_putc_xy(con, 0, 0, ' '); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); -- ut_asserteq(273, compress_frame_buffer(uts, dev)); -+ ut_asserteq(273, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_set_row(con, 0, WHITE); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); -- ut_asserteq(273, compress_frame_buffer(uts, dev)); -+ ut_asserteq(273, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -210,30 +216,30 @@ static int dm_test_video_text_12x22(struct unit_test_state *uts) - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "12x22", 0)); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_putc_xy(con, 0, 0, 'a'); -- ut_asserteq(89, compress_frame_buffer(uts, dev)); -+ ut_asserteq(89, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_putc_xy(con, 0, 0, ' '); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); -- ut_asserteq(363, compress_frame_buffer(uts, dev)); -+ ut_asserteq(363, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - vidconsole_set_row(con, 0, WHITE); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - for (i = 0; i < 20; i++) - vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); -- ut_asserteq(363, compress_frame_buffer(uts, dev)); -+ ut_asserteq(363, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -251,7 +257,7 @@ static int dm_test_video_chars(struct unit_test_state *uts) - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "8x16", 0)); - vidconsole_put_string(con, test_string); -- ut_asserteq(466, compress_frame_buffer(uts, dev)); -+ ut_asserteq(466, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -273,23 +279,23 @@ static int dm_test_video_ansi(struct unit_test_state *uts) - /* reference clear: */ - video_clear(con->parent); - video_sync(con->parent, false); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test clear escape sequence: [2J */ - vidconsole_put_string(con, "A\tB\tC"ANSI_ESC"[2J"); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test set-cursor: [%d;%df */ - vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd"); -- ut_asserteq(143, compress_frame_buffer(uts, dev)); -+ ut_asserteq(143, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* test colors (30-37 fg color, 40-47 bg color) */ - vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */ - vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */ -- ut_asserteq(272, compress_frame_buffer(uts, dev)); -+ ut_asserteq(272, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -322,13 +328,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - ut_assertok(vidconsole_select_font(con, "8x16", 0)); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* Check display wrap */ - for (i = 0; i < 120; i++) - vidconsole_put_char(con, 'A' + i % 50); -- ut_asserteq(wrap_size, compress_frame_buffer(uts, dev)); -+ ut_asserteq(wrap_size, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* Check display scrolling */ -@@ -336,13 +342,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, - vidconsole_put_char(con, 'A' + i % 50); - vidconsole_put_char(con, '\n'); - } -- ut_asserteq(scroll_size, compress_frame_buffer(uts, dev)); -+ ut_asserteq(scroll_size, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - /* If we scroll enough, the screen becomes blank again */ - for (i = 0; i < SCROLL_LINES; i++) - vidconsole_put_char(con, '\n'); -- ut_asserteq(46, compress_frame_buffer(uts, dev)); -+ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -417,7 +423,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(1368, compress_frame_buffer(uts, dev)); -+ ut_asserteq(1368, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -437,7 +443,7 @@ static int dm_test_video_bmp8(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(1247, compress_frame_buffer(uts, dev)); -+ ut_asserteq(1247, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -461,7 +467,7 @@ static int dm_test_video_bmp16(struct unit_test_state *uts) - &src_len)); - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); -- ut_asserteq(3700, compress_frame_buffer(uts, dev)); -+ ut_asserteq(3700, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -485,7 +491,7 @@ static int dm_test_video_bmp24(struct unit_test_state *uts) - &src_len)); - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); -- ut_asserteq(3656, compress_frame_buffer(uts, dev)); -+ ut_asserteq(3656, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -509,7 +515,7 @@ static int dm_test_video_bmp24_32(struct unit_test_state *uts) - &src_len)); - - ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); -- ut_asserteq(6827, compress_frame_buffer(uts, dev)); -+ ut_asserteq(6827, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -528,7 +534,7 @@ static int dm_test_video_bmp32(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(2024, compress_frame_buffer(uts, dev)); -+ ut_asserteq(2024, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -545,7 +551,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(1368, compress_frame_buffer(uts, dev)); -+ ut_asserteq(1368, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -565,7 +571,7 @@ static int dm_test_video_comp_bmp32(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(2024, compress_frame_buffer(uts, dev)); -+ ut_asserteq(2024, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -585,7 +591,7 @@ static int dm_test_video_comp_bmp8(struct unit_test_state *uts) - ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); - - ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -- ut_asserteq(1247, compress_frame_buffer(uts, dev)); -+ ut_asserteq(1247, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -601,7 +607,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts) - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); -- ut_asserteq(12174, compress_frame_buffer(uts, dev)); -+ ut_asserteq(12174, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -623,7 +629,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts) - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); -- ut_asserteq(34287, compress_frame_buffer(uts, dev)); -+ ut_asserteq(34287, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; -@@ -645,7 +651,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) - ut_assertok(video_get_nologo(uts, &dev)); - ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); - vidconsole_put_string(con, test_string); -- ut_asserteq(29471, compress_frame_buffer(uts, dev)); -+ ut_asserteq(29471, compress_frame_buffer(uts, dev, false)); - ut_assertok(check_copy_frame_buffer(uts, dev)); - - return 0; - -From patchwork Mon Aug 21 13:51:00 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823645 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=h0nfUUKH; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv6P02TYz1yYZ - for ; Mon, 21 Aug 2023 23:51:56 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id F40E487071; - Mon, 21 Aug 2023 15:51:33 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="h0nfUUKH"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id EFD6D87069; Mon, 21 Aug 2023 15:51:32 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com - [IPv6:2a00:1450:4864:20::42c]) - (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 0028587074 - for ; Mon, 21 Aug 2023 15:51:29 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x42c.google.com with SMTP id - ffacd0b85a97d-319779f0347so2987491f8f.1 - for ; Mon, 21 Aug 2023 06:51:29 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625889; x=1693230689; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=Ls20OKhVk8mknnS6GLFBhmTjxLz0/7fKNgK2nzSEs6M=; - b=h0nfUUKHqteSaQqflnkXT9zc90H1nKLTOoG4B78CtKhSKUI/thuMDU61AtN+enWvFJ - MdvU9OW3jOHeg+LRrxur+6+N4V9k4nGhm2BGwtj56A1DDfCLgk5+Vg38dhi1a24kfBH9 - d5w6HXOg3wdMizdTsyL0PbugSX7K9ByL9XKpH646NdsnqcikQNdmT2OeiGAmonEmHXAa - FII1SypkiZ5TOFcJx9N4X2XqMM3CNxyUsDs6+AV4dTPnjtXaElWj1fQcz8bLn/9q88/X - UCvE35N4Y37FFgb+5uTi+00hcLIavYKYrLEpNAclnl9NKFSUAUJyabqQM0+riy1OSMHF - 5YBw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625889; x=1693230689; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=Ls20OKhVk8mknnS6GLFBhmTjxLz0/7fKNgK2nzSEs6M=; - b=Gmm/6GKzL921nU50fcXK4FdwCaAc1DVbDj7ilfjHfBXRaw/k3mmUZ/l5nbwGsTUYUU - VX6nd+xFgekVSP5Cns7th6+jnbBBaoaCZUfZYGIhQjEH3JMxxpo17+eNdfCTuo7TjTdl - MtWwxmceukhRiNql2W7VOHfb5CXBxorcXXcy3szcEJOlzxIqqUDQcLjNgoe5d2Kpkv9Y - 6qkNp6XFyfQCMAMGjF68T5eViaLcvFHFIsvmjXlMU7Ohhhm2We4SK9nBsr6gUgyaxmNs - qBLKVZKf+iC9WptVFbXhAML6gJZJo+JQu/tGHHfLf7rm/WT+1VhmDKBgpU1CzA8BRqcG - t+og== -X-Gm-Message-State: AOJu0YxCm+p57uF96KzOW9kggq2KLZimSeriKFH9gpv8fgoy+ddR1X7S - 9HsUigoZFUND3/u7rp+XB9qHn3dcZTU= -X-Google-Smtp-Source: - AGHT+IEwSW6rIF+3ua5ruA0V/p8R0SXlrxBIJRwdiP9dn7nhkL8gMfhxYppZ2c8jWSzauubY8xUVnQ== -X-Received: by 2002:adf:e482:0:b0:31a:dc27:e10 with SMTP id - i2-20020adfe482000000b0031adc270e10mr4721868wrm.65.1692625889315; - Mon, 21 Aug 2023 06:51:29 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.27 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:28 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 03/13] video: test: Test partial updates of hardware frame - buffer -Date: Mon, 21 Aug 2023 16:51:00 +0300 -Message-Id: <20230821135111.3558478-4-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -With VIDEO_COPY enabled, only the modified parts of the frame buffer are -intended to be copied to the hardware. Add a test that checks this, by -overwriting contents we prepared without telling the video uclass and -then checking if the overwritten contents have been redrawn on the next -sync. - -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Add patch "video: test: Test partial updates of hardware frame buffer" - - test/dm/video.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 54 insertions(+) - -diff --git a/test/dm/video.c b/test/dm/video.c -index b9ff3da10c18..e4bd27a6b76f 100644 ---- a/test/dm/video.c -+++ b/test/dm/video.c -@@ -657,3 +657,57 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) - return 0; - } - DM_TEST(dm_test_video_truetype_bs, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); -+ -+/* Test partial rendering onto hardware frame buffer */ -+static int dm_test_video_copy(struct unit_test_state *uts) -+{ -+ struct sandbox_sdl_plat *plat; -+ struct video_uc_plat *uc_plat; -+ struct udevice *dev, *con; -+ struct video_priv *priv; -+ const char *test_string = "\n\tCriticism may not be agreeable, but it is necessary.\t"; -+ ulong addr; -+ -+ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) -+ return -EAGAIN; -+ -+ ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev)); -+ ut_assertnonnull(dev); -+ uc_plat = dev_get_uclass_plat(dev); -+ uc_plat->hide_logo = true; -+ plat = dev_get_plat(dev); -+ plat->font_size = 32; -+ ut_assert(!device_active(dev)); -+ ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev)); -+ ut_assertnonnull(dev); -+ priv = dev_get_uclass_priv(dev); -+ -+ ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); -+ ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); -+ -+ ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); -+ vidconsole_put_string(con, "\n\n\n\n\n"); -+ vidconsole_put_string(con, test_string); -+ vidconsole_put_string(con, test_string); -+ -+ ut_asserteq(6678, compress_frame_buffer(uts, dev, false)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); -+ -+ /* -+ * Secretly clear the hardware frame buffer, but in a different -+ * color (black) to see which parts will be overwritten. -+ */ -+ memset(priv->copy_fb, 0, priv->fb_size); -+ -+ /* -+ * We should have the full content on the main buffer, but only -+ * the new content should have been copied to the copy buffer. -+ */ -+ vidconsole_put_string(con, test_string); -+ vidconsole_put_string(con, test_string); -+ ut_asserteq(7589, compress_frame_buffer(uts, dev, false)); -+ ut_asserteq(5278, compress_frame_buffer(uts, dev, true)); -+ -+ return 0; -+} -+DM_TEST(dm_test_video_copy, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); - -From patchwork Mon Aug 21 13:51:01 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823647 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=bU3qjQR0; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv6c2SWvz1yYZ - for ; Mon, 21 Aug 2023 23:52:08 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 4441F87070; - Mon, 21 Aug 2023 15:51:36 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="bU3qjQR0"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 3848287075; Mon, 21 Aug 2023 15:51:35 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com - [IPv6:2a00:1450:4864:20::42c]) - (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 841D2869B6 - for ; Mon, 21 Aug 2023 15:51:32 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x42c.google.com with SMTP id - ffacd0b85a97d-31aec0a1a8bso1211537f8f.0 - for ; Mon, 21 Aug 2023 06:51:32 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625892; x=1693230692; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=edVipA0fXjfO2+yIw/Pp5VvEle3RKuzWiUXEb/KCl5I=; - b=bU3qjQR0xHT3knwMAc4fOHXpeWOGcUonKhClh1IfqxsqOHWeRbIi1W1OtDuPIyv8dX - CyIHX30R+SQr8o+T5xSFf4E4kwRpsqOzh2mXOD3dzuYzJPkreOM5clQMgmyn2JGs+nON - KDztnOSqesV2IvPZqdr61bxJTw/SjXqRXGc7/YkT7OWwlaug26E+DbzP7Xt+plHDVz/9 - 6OB5zFxUapwX0mqxb6jbNAz17TvjQ5qIviNkCRZUZ2vseEB78BwHajxkNCG4jVOaQDON - aJWc+UOFyWJ3jLmQ+cOJgR+J0SoF3VAVYhbYaYviNV2DiaBPLPL9axirby/hW4Kx2waB - YKAg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625892; x=1693230692; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=edVipA0fXjfO2+yIw/Pp5VvEle3RKuzWiUXEb/KCl5I=; - b=STc6gYqDRe7JtT56BIezfKTd0PQe87I83hDC5mL+8D0AqUp1RiJPnPt9MWIAVfO63j - plu8RveodelqOd26zWzlFDepTA+jfvcAgOePHLLLx3YiAidxIWD6d0SVlG+zagmUlHzm - HGscQ+3iGYhTHAGxc10UHaQcMlCmyeWecwIjxXBpM85g6puunYrN14aYfsp6E0ODCLMg - 9HAD2Zx5b++HK3yE7Ld6hientRzVXxwURTL5ehSSO2AX95YMagfKaP767VvupWtB18du - 5Lfk0k60qTxe3Xlamnm8bdoRofuIyLLaSZ+0M7lAsEPPsS4QRGn+m7MwI8YTlRIU8wFQ - cYSQ== -X-Gm-Message-State: AOJu0YwPPIi0QLYKGPNa9T+XPhwof7rD3VBA3kfub7MM4xEG6u6r8puq - cSLl/n+w1P2LSAPH1AWswz3SS227DdQ= -X-Google-Smtp-Source: - AGHT+IFAUyNsvOmdhjdIygYhsv/SH6hvXItfwiWsY14vr3nwQ9J7A0Q0Y71M8WvaFJdxn7mmOeZlrg== -X-Received: by 2002:a5d:44c8:0:b0:317:e9d7:9387 with SMTP id - z8-20020a5d44c8000000b00317e9d79387mr7196865wrr.25.1692625891911; - Mon, 21 Aug 2023 06:51:31 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.30 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:31 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 04/13] dm: video: Add damage tracking API -Date: Mon, 21 Aug 2023 16:51:01 +0300 -Message-Id: <20230821135111.3558478-5-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -We are going to introduce image damage tracking to fasten up screen -refresh on large displays. This patch adds damage tracking for up to -one rectangle of the screen which is typically enough to hold blt or -text print updates. Callers into this API and a reduced dcache flush -code path will follow in later patches. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -[Alper: Use xstart/yend, document new fields, return void from - video_damage(), declare priv, drop headers, use IS_ENABLED()] -Co-developed-by: Alper Nebi Yasak -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Use xstart, ystart, xend, yend as names for damage region -- Document damage struct and fields in struct video_priv comment -- Return void from video_damage() -- Fix undeclared priv error in video_sync() -- Drop unused headers from video-uclass.c -- Use IS_ENABLED() instead of CONFIG_IS_ENABLED() - -Changes in v4: -- Move damage clear to patch "dm: video: Add damage tracking API" -- Simplify first damage logic -- Remove VIDEO_DAMAGE default for ARM - -Changes in v3: -- Adapt to always assume DM is used - -Changes in v2: -- Remove ifdefs - - drivers/video/Kconfig | 13 ++++++++++++ - drivers/video/video-uclass.c | 41 +++++++++++++++++++++++++++++++++--- - include/video.h | 32 ++++++++++++++++++++++++++-- - 3 files changed, 81 insertions(+), 5 deletions(-) - -diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig -index fe43fbd7004a..97f494a1340b 100644 ---- a/drivers/video/Kconfig -+++ b/drivers/video/Kconfig -@@ -92,6 +92,19 @@ config VIDEO_COPY - To use this, your video driver must set @copy_base in - struct video_uc_plat. - -+config VIDEO_DAMAGE -+ bool "Enable damage tracking of frame buffer regions" -+ help -+ On some machines (most ARM), the display frame buffer resides in -+ RAM. To make the display controller pick up screen updates, we -+ have to flush frame buffer contents from CPU caches into RAM which -+ can be a slow operation. -+ -+ This feature adds damage tracking to collect information about regions -+ that received updates. When we want to sync, we then only flush -+ regions of the frame buffer that were modified before, speeding up -+ screen refreshes significantly. -+ - config BACKLIGHT_PWM - bool "Generic PWM based Backlight Driver" - depends on BACKLIGHT && DM_PWM -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index 8f268fc4063f..447689581668 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -351,9 +351,39 @@ void video_set_default_colors(struct udevice *dev, bool invert) - priv->colour_bg = video_index_to_colour(priv, back); - } - -+/* Notify about changes in the frame buffer */ -+void video_damage(struct udevice *vid, int x, int y, int width, int height) -+{ -+ struct video_priv *priv = dev_get_uclass_priv(vid); -+ int xend = x + width; -+ int yend = y + height; -+ -+ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) -+ return; -+ -+ if (x > priv->xsize) -+ return; -+ -+ if (y > priv->ysize) -+ return; -+ -+ if (xend > priv->xsize) -+ xend = priv->xsize; -+ -+ if (yend > priv->ysize) -+ yend = priv->ysize; -+ -+ /* Span a rectangle across all old and new damage */ -+ priv->damage.xstart = min(x, priv->damage.xstart); -+ priv->damage.ystart = min(y, priv->damage.ystart); -+ priv->damage.xend = max(xend, priv->damage.xend); -+ priv->damage.yend = max(yend, priv->damage.yend); -+} -+ - /* Flush video activity to the caches */ - int video_sync(struct udevice *vid, bool force) - { -+ struct video_priv *priv = dev_get_uclass_priv(vid); - struct video_ops *ops = video_get_ops(vid); - int ret; - -@@ -369,15 +399,12 @@ int video_sync(struct udevice *vid, bool force) - * out whether it exists? For now, ARM is safe. - */ - #if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) -- struct video_priv *priv = dev_get_uclass_priv(vid); -- - if (priv->flush_dcache) { - flush_dcache_range((ulong)priv->fb, - ALIGN((ulong)priv->fb + priv->fb_size, - CONFIG_SYS_CACHELINE_SIZE)); - } - #elif defined(CONFIG_VIDEO_SANDBOX_SDL) -- struct video_priv *priv = dev_get_uclass_priv(vid); - static ulong last_sync; - - if (force || get_timer(last_sync) > 100) { -@@ -385,6 +412,14 @@ int video_sync(struct udevice *vid, bool force) - last_sync = get_timer(0); - } - #endif -+ -+ if (IS_ENABLED(CONFIG_VIDEO_DAMAGE)) { -+ priv->damage.xstart = priv->xsize; -+ priv->damage.ystart = priv->ysize; -+ priv->damage.xend = 0; -+ priv->damage.yend = 0; -+ } -+ - return 0; - } - -diff --git a/include/video.h b/include/video.h -index 66d109ca5da6..a522f33949e5 100644 ---- a/include/video.h -+++ b/include/video.h -@@ -85,6 +85,11 @@ enum video_format { - * @fb_size: Frame buffer size - * @copy_fb: Copy of the frame buffer to keep up to date; see struct - * video_uc_plat -+ * @damage: A bounding box of framebuffer regions updated since last sync -+ * @damage.xstart: X start position in pixels from the left -+ * @damage.ystart: Y start position in pixels from the top -+ * @damage.xend: X end position in pixels from the left -+ * @damage.xend: Y end position in pixels from the top - * @line_length: Length of each frame buffer line, in bytes. This can be - * set by the driver, but if not, the uclass will set it after - * probing -@@ -112,6 +117,12 @@ struct video_priv { - void *fb; - int fb_size; - void *copy_fb; -+ struct { -+ int xstart; -+ int ystart; -+ int xend; -+ int yend; -+ } damage; - int line_length; - u32 colour_fg; - u32 colour_bg; -@@ -254,8 +265,9 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, - * @return: 0 on success, error code otherwise - * - * Some frame buffers are cached or have a secondary frame buffer. This -- * function syncs these up so that the current contents of the U-Boot frame -- * buffer are displayed to the user. -+ * function syncs the damaged parts of them up so that the current contents -+ * of the U-Boot frame buffer are displayed to the user. It clears the damage -+ * buffer. - */ - int video_sync(struct udevice *vid, bool force); - -@@ -375,6 +387,22 @@ static inline int video_sync_copy_all(struct udevice *dev) - - #endif - -+/** -+ * video_damage() - Notify the video subsystem about screen updates. -+ * -+ * @vid: Device to sync -+ * @x: Upper left X coordinate of the damaged rectangle -+ * @y: Upper left Y coordinate of the damaged rectangle -+ * @width: Width of the damaged rectangle -+ * @height: Height of the damaged rectangle -+ * -+ * Some frame buffers are cached or have a secondary frame buffer. This -+ * function notifies the video subsystem about rectangles that were updated -+ * within the frame buffer. They may only get written to the screen on the -+ * next call to video_sync(). -+ */ -+void video_damage(struct udevice *vid, int x, int y, int width, int height); -+ - /** - * video_is_active() - Test if one video device it active - * - -From patchwork Mon Aug 21 13:51:02 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823648 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=BdIntNrw; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1) server-digest SHA384) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv6p6cj3z1yYZ - for ; Mon, 21 Aug 2023 23:52:18 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 8A59F87086; - Mon, 21 Aug 2023 15:51:40 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="BdIntNrw"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 3C3FD867A0; Mon, 21 Aug 2023 15:51:39 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com - [IPv6:2a00:1450:4864:20::42c]) - (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 546E686F0A - for ; Mon, 21 Aug 2023 15:51:35 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x42c.google.com with SMTP id - ffacd0b85a97d-31c3df710bdso1066363f8f.1 - for ; Mon, 21 Aug 2023 06:51:35 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625895; x=1693230695; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=rfyiNp4RS7b8BQCxsUs1afKXNK4WMu1bUdXxDQXJn1U=; - b=BdIntNrw+JbVTri7AodJPuA4KoTwuid2ByavDMP+gEZwSfMkjrlWlFROWNdM4E2KeC - btsSXcPQO3jMnyoxVbS5g4DL2PkXPHNZO/Lw5Db4La4RGjoB4ks8w4G1nQ5kVo8NIXlQ - 7da1BVmm9tlV2cmt2LVuLp3WDWvgE5vJ9kVj8BH8fjD+gKc5wVOKtRIPJnqL8Eqj55A5 - y8xjVcW5ldxVps2jj0kE7Mq8LG2R6Bd37Zsw+Dq3Cj/1khMgLkYog8/Nf+k2uYXPQpjA - TS03XR6eJ7GQcRUf0iWft80hVZMVk6KF2AWuF04HcJ/goyNj4MGGFun0tanDYNImJzv0 - A/8A== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625895; x=1693230695; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=rfyiNp4RS7b8BQCxsUs1afKXNK4WMu1bUdXxDQXJn1U=; - b=N71LYmMnxX45xKNJxNk72goiD3Cf5e0f3znUaZ/B4Ue95/rqpwn6vLQvhNkxjyJjKz - QxOUGBKeP4pdGPJD2eVZgEA1+8cyBu3q0BssvtHzLuXCZtgGmVE+jhS1ZplzCePV5HDq - cpjabmm8tLydQpgXN42bXGeg5S7C2hbuWb9P1yFz0T2VRKDhKfnBacDMMyCM77q885Xq - scmyG9QS6JjzzhlNCx2LAvunQyb5Ub3Jeac6w62kdW5d82X5hQ7R5IuMhO6HB9cXSoIL - q4cciYJYPkkgJo7cJBCGs9hpoG7mAiYugMX3xvTX0AozIxV+I0RqRnIaeK4YPRctAqDa - B+ZQ== -X-Gm-Message-State: AOJu0Yzo17fP4SdOljTzWNaDUk2p0KMalzHe92zD3l/uyJxeFYnVtZ6Z - JKO6vwp7AEEfITHacMlSfDnu20sRQPA= -X-Google-Smtp-Source: - AGHT+IEaweUWG6MdegfaF+T8dg4D4mXuTL2UTLikuqRhtfAyLWNc6xApEfO0HHPUExbseBScRw20SA== -X-Received: by 2002:a5d:44d1:0:b0:313:f94f:3b15 with SMTP id - z17-20020a5d44d1000000b00313f94f3b15mr5140696wrr.2.1692625894567; - Mon, 21 Aug 2023 06:51:34 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.32 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:34 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 05/13] dm: video: Add damage notification on display fills -Date: Mon, 21 Aug 2023 16:51:02 +0300 -Message-Id: <20230821135111.3558478-6-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Let's report the video damage when we fill parts of the screen. This -way we can later lazily flush only relevant regions to hardware. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -[Alper: Call video_damage() in video_fill_part(), edit commit message] -Signed-off-by: Alper Nebi Yasak ---- -Does video_fill_part() need a video_sync(dev, false) here? - -Changes in v5: -- Call video_damage() also in video_fill_part() - - drivers/video/video-uclass.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index 447689581668..ebf409d839f0 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -203,6 +203,8 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, - if (ret) - return ret; - -+ video_damage(dev, xstart, ystart, xend - xstart, yend - ystart); -+ - return 0; - } - -@@ -249,6 +251,8 @@ int video_fill(struct udevice *dev, u32 colour) - if (ret) - return ret; - -+ video_damage(dev, 0, 0, priv->xsize, priv->ysize); -+ - return video_sync(dev, false); - } - - -From patchwork Mon Aug 21 13:51:03 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823649 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=oaK1+upy; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv712FN9z1yYZ - for ; Mon, 21 Aug 2023 23:52:29 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id D08B3867A0; - Mon, 21 Aug 2023 15:51:42 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="oaK1+upy"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 8D15587084; Mon, 21 Aug 2023 15:51:40 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com - [IPv6:2a00:1450:4864:20::436]) - (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 DA4E1869B6 - for ; Mon, 21 Aug 2023 15:51:37 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x436.google.com with SMTP id - ffacd0b85a97d-317f1c480eeso3049475f8f.2 - for ; Mon, 21 Aug 2023 06:51:37 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625897; x=1693230697; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=7yrfRyMChh1ygDQtR1jl9BYhd6F+V0coaR3saA65Ao8=; - b=oaK1+upyGYfwOr4/nZR8RIRT+Yn2PZ+2dy2+GMSjffIkOUvAA4SwUrsuBUHVmQ+cIg - Q0F+D60Mp5/MzkFm9rwAnrQpO2uJb9esI/U8crcERtM+p1p5iKU9VNHrwRjlzB4VfG3E - 1rFRNOOhGpyPBS6RY+cJD557cLeGMoVUsQbv3xfnShrQg142CAOgzdQ4AtJ3FYRDngOc - QiczfO53zpeOnZjhBAa5aw7TDgIqHuR1bYCYIRraWJdIl9Cxa6ZDN1IozoPg6hutV+SE - 77oOM9VfIYyC8B3q6wdaduzcH0Qgeq3IEzfE54DLVtS/yT5z2vJiPtnfnV2pXzjU01Iq - l7Fg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625897; x=1693230697; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=7yrfRyMChh1ygDQtR1jl9BYhd6F+V0coaR3saA65Ao8=; - b=NgyE/5/ABpribqDY5ykRBi/ftUfa+3meGxemZJPAl2gCi2+PfUEbrdHMbSPz/8nbY9 - qS/5UPv+41yRmDLmqeaNK/RXif7qV+CdVrg4K7xD0x/HbezXsIvKSc6rs5IqPqQvp0lx - JDuescRAcyrjtBjBFIAsrOx0+GynSijvWQArLcJRL330eiNnBn0HYRiVFqfEy3jpv5Hz - 13zk9q/GW8Hc7GRtA+FAkeUqJ3t8VaRzHLfoUJO3zFS8bWXgnWUAbCx0OOB9MahUqvyv - s/jpw79ZhFlhzO/Nwa63SlfQi+T3dAiYQ3kpBDgz7YFjSxvYaFYJDW3ihVDv8VTIiLdl - WB8Q== -X-Gm-Message-State: AOJu0YwqmT7iLKiUZblbrZz+UE4GebW514Sdllsg7NS//fk35AzXbHd7 - 7wXdC1ugEQP9Gez3jIRiAyQs4cDTcVc= -X-Google-Smtp-Source: - AGHT+IHO/arCmWeM8GYL18CXATu4Sh++TdyEswajL5QnvTaImLdSHvMUo+xc/gBkyHdBnNYS/qgvaQ== -X-Received: by 2002:adf:cd0b:0:b0:31c:3013:9fa5 with SMTP id - w11-20020adfcd0b000000b0031c30139fa5mr3560706wrm.59.1692625897248; - Mon, 21 Aug 2023 06:51:37 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.35 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:36 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 06/13] vidconsole: Add damage notifications to all - vidconsole drivers -Date: Mon, 21 Aug 2023 16:51:03 +0300 -Message-Id: <20230821135111.3558478-7-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Now that we have a damage tracking API, let's populate damage done by -vidconsole drivers. We try to declare as little memory as damaged as -possible. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -[Alper: Rebase for met->baseline, fontdata->height/width, make rotated - console_putc_xy() damages pass tests, edit patch message] -Co-developed-by: Alper Nebi Yasak -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Use met->baseline instead of priv->baseline -- Use fontdata->height/width instead of VIDEO_FONT_HEIGHT/WIDTH -- Update console_rotate.c video_damage() calls to pass video tests -- Remove mention about not having minimal damage for console_rotate.c - -Changes in v2: -- Fix ranges in truetype target -- Limit rotate to necessary damage - - drivers/video/console_normal.c | 18 +++++++++++ - drivers/video/console_rotate.c | 54 ++++++++++++++++++++++++++++++++ - drivers/video/console_truetype.c | 21 +++++++++++++ - drivers/video/video-uclass.c | 1 + - 4 files changed, 94 insertions(+) - -diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c -index 413c7abee9e1..a19ce6a2bc11 100644 ---- a/drivers/video/console_normal.c -+++ b/drivers/video/console_normal.c -@@ -39,6 +39,12 @@ static int console_set_row(struct udevice *dev, uint row, int clr) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ 0, -+ fontdata->height * row, -+ vid_priv->xsize, -+ fontdata->height); -+ - return 0; - } - -@@ -60,6 +66,12 @@ static int console_move_rows(struct udevice *dev, uint rowdst, - if (ret) - return ret; - -+ video_damage(dev->parent, -+ 0, -+ fontdata->height * rowdst, -+ vid_priv->xsize, -+ fontdata->height * count); -+ - return 0; - } - -@@ -90,6 +102,12 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, char ch) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ x, -+ y, -+ fontdata->width, -+ fontdata->height); -+ - ret = vidconsole_sync_copy(dev, start, line); - if (ret) - return ret; -diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c -index 65358a1c6e74..6c3e7c1bb8dc 100644 ---- a/drivers/video/console_rotate.c -+++ b/drivers/video/console_rotate.c -@@ -36,6 +36,12 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ vid_priv->xsize - ((row + 1) * fontdata->height), -+ 0, -+ fontdata->height, -+ vid_priv->ysize); -+ - return 0; - } - -@@ -64,6 +70,12 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, - dst += vid_priv->line_length; - } - -+ video_damage(dev->parent, -+ vid_priv->xsize - ((rowdst + count) * fontdata->height), -+ 0, -+ count * fontdata->height, -+ vid_priv->ysize); -+ - return 0; - } - -@@ -96,6 +108,12 @@ static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, char ch) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ vid_priv->xsize - y - fontdata->height, -+ linenum - 1, -+ fontdata->height, -+ fontdata->width); -+ - return VID_TO_POS(fontdata->width); - } - -@@ -121,6 +139,12 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ 0, -+ vid_priv->ysize - (row + 1) * fontdata->height, -+ vid_priv->xsize, -+ fontdata->height); -+ - return 0; - } - -@@ -142,6 +166,12 @@ static int console_move_rows_2(struct udevice *dev, uint rowdst, uint rowsrc, - vidconsole_memmove(dev, dst, src, - fontdata->height * vid_priv->line_length * count); - -+ video_damage(dev->parent, -+ 0, -+ vid_priv->ysize - (rowdst + count) * fontdata->height, -+ vid_priv->xsize, -+ count * fontdata->height); -+ - return 0; - } - -@@ -174,6 +204,12 @@ static int console_putc_xy_2(struct udevice *dev, uint x_frac, uint y, char ch) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ x - fontdata->width + 1, -+ linenum - fontdata->height + 1, -+ fontdata->width, -+ fontdata->height); -+ - return VID_TO_POS(fontdata->width); - } - -@@ -198,6 +234,12 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ row * fontdata->height, -+ 0, -+ fontdata->height, -+ vid_priv->ysize); -+ - return 0; - } - -@@ -224,6 +266,12 @@ static int console_move_rows_3(struct udevice *dev, uint rowdst, uint rowsrc, - dst += vid_priv->line_length; - } - -+ video_damage(dev->parent, -+ rowdst * fontdata->height, -+ 0, -+ count * fontdata->height, -+ vid_priv->ysize); -+ - return 0; - } - -@@ -255,6 +303,12 @@ static int console_putc_xy_3(struct udevice *dev, uint x_frac, uint y, char ch) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ y, -+ linenum - fontdata->width + 1, -+ fontdata->height, -+ fontdata->width); -+ - return VID_TO_POS(fontdata->width); - } - -diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c -index 0f9bb49e44f7..0adbf9cc3d67 100644 ---- a/drivers/video/console_truetype.c -+++ b/drivers/video/console_truetype.c -@@ -178,6 +178,7 @@ struct console_tt_priv { - static int console_truetype_set_row(struct udevice *dev, uint row, int clr) - { - struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent); -+ struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); - struct console_tt_priv *priv = dev_get_priv(dev); - struct console_tt_metrics *met = priv->cur_met; - void *end, *line; -@@ -221,6 +222,12 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) - if (ret) - return ret; - -+ video_damage(dev->parent, -+ 0, -+ vc_priv->y_charsize * row, -+ vid_priv->xsize, -+ vc_priv->y_charsize); -+ - return 0; - } - -@@ -228,6 +235,7 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, - uint rowsrc, uint count) - { - struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent); -+ struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); - struct console_tt_priv *priv = dev_get_priv(dev); - struct console_tt_metrics *met = priv->cur_met; - void *dst; -@@ -246,6 +254,12 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, - for (i = 0; i < priv->pos_ptr; i++) - priv->pos[i].ypos -= diff; - -+ video_damage(dev->parent, -+ 0, -+ vc_priv->y_charsize * rowdst, -+ vid_priv->xsize, -+ vc_priv->y_charsize * count); -+ - return 0; - } - -@@ -403,6 +417,13 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, - - line += vid_priv->line_length; - } -+ -+ video_damage(dev->parent, -+ VID_TO_PIXEL(x) + xoff, -+ y + met->baseline + yoff, -+ width, -+ height); -+ - ret = vidconsole_sync_copy(dev, start, line); - if (ret) - return ret; -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index ebf409d839f0..8bfcbc88dda7 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -199,6 +199,7 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, - } - line += priv->line_length; - } -+ - ret = video_sync_copy(dev, start, line); - if (ret) - return ret; - -From patchwork Mon Aug 21 13:51:04 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823650 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=i+1wSJUC; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv7B5SVxz1yYZ - for ; Mon, 21 Aug 2023 23:52:38 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 2380887084; - Mon, 21 Aug 2023 15:51:45 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="i+1wSJUC"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 2081087081; Mon, 21 Aug 2023 15:51:43 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com - [IPv6:2a00:1450:4864:20::329]) - (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 45F8E8707A - for ; Mon, 21 Aug 2023 15:51:40 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wm1-x329.google.com with SMTP id - 5b1f17b1804b1-3fee600dce6so18065515e9.1 - for ; Mon, 21 Aug 2023 06:51:40 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625900; x=1693230700; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=du9K8HAMfjDBv9t9zq9p8Zs+vCZHJ6g2zmB7iSzSF7o=; - b=i+1wSJUCYpv3D2Y4WhFT+a+eXACMjCfu9K5FQkWQdC2smyIukzPLOT9TKll1BIlZ+S - 0BSrF+Vp8/DGT40HSh+wXWV4jYRbGaai6uC9HETzas7pJ6Qhy+ffz2UKdEYLi1VLHsaq - X75Z5dWmXphu9f83rAKezE9CYHm+PJtfCCmN6nzYmKby9xzdvEmPjC4JmCjqvh+sqORE - Bzxq55zbOUyTxIzqT01tuFNOw/v8W0H5dQ6fFOCzvxrMmYV1xWY68YL/0QqfqG2DG5q1 - XPDS0Sgg6L+yzBD2e/I0iNDZaFfXRDq4jvWBkELBWMrWm1880C9/qHFlPwFRRUlHYf+M - 4DSQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625900; x=1693230700; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=du9K8HAMfjDBv9t9zq9p8Zs+vCZHJ6g2zmB7iSzSF7o=; - b=ejVU1hfEMyFZ7BfMSqaYec4EUOoA0M467Rm/YLD9WqMi6MKcePqHndqYIVtBdIb8pl - jE/EUHhBvvRp1Bn9zpDfUbCUk27iKZaqWwqAa4ZLknDsCStzGovzG2+wKem8yoP2H1jp - e5tUVYZa2/MESz/zDnwWZV528p3+eHhCUUWBwTCt3plzb+SWqR1j0T40nBrUB+tDj1b0 - VYDTZvDCxDhQRGlLmMYX8QtWf/waAzPl5ePXvPhus06aR5+7O2V28M8yF2xRcceFSIQR - 4T2k/MBwCdM1+mpz6TnKB+zjN6Kj0TmPzEo9o6Pcc/lXWY0kRniuHFu0fzE84gOcGlOi - Xfyw== -X-Gm-Message-State: AOJu0YxMuk5t4Hh2FasrdRfRr0tLxX8vAgGS5cfNm5tZpbvKz9V6ip/a - g8C3FsqqNAKybynks3ECaaBXn+kLAr4= -X-Google-Smtp-Source: - AGHT+IE0aHC9IeAZ9om6v+CX5lhGhaikzyvs7K+JjasiPPxFotFPaEOG+0SHfy/L4wW7iRlvWFh0mw== -X-Received: by 2002:a5d:568f:0:b0:317:e5ec:8767 with SMTP id - f15-20020a5d568f000000b00317e5ec8767mr4615501wrv.21.1692625899711; - Mon, 21 Aug 2023 06:51:39 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.37 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:39 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 07/13] video: test: Test video damage tracking via - vidconsole -Date: Mon, 21 Aug 2023 16:51:04 +0300 -Message-Id: <20230821135111.3558478-8-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -With VIDEO_DAMAGE, the video uclass tracks updated regions of the frame -buffer in order to avoid unnecessary work during a video sync. Enable -the config in sandbox and add a test for it, by printing strings at a -few locations and checking the tracked region. - -Signed-off-by: Alper Nebi Yasak ---- -This is hard to test because most things issue video syncs that process -and reset the damaged region. - -Changes in v5: -- Add patch "video: test: Test video damage tracking via vidconsole" - - configs/sandbox_defconfig | 1 + - test/dm/video.c | 56 +++++++++++++++++++++++++++++++++++++++ - 2 files changed, 57 insertions(+) - -diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig -index 259f31f26cee..51b820f13121 100644 ---- a/configs/sandbox_defconfig -+++ b/configs/sandbox_defconfig -@@ -307,6 +307,7 @@ CONFIG_USB_ETH_CDC=y - CONFIG_VIDEO=y - CONFIG_VIDEO_FONT_SUN12X22=y - CONFIG_VIDEO_COPY=y -+CONFIG_VIDEO_DAMAGE=y - CONFIG_CONSOLE_ROTATION=y - CONFIG_CONSOLE_TRUETYPE=y - CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y -diff --git a/test/dm/video.c b/test/dm/video.c -index e4bd27a6b76f..8c7d9800a42e 100644 ---- a/test/dm/video.c -+++ b/test/dm/video.c -@@ -711,3 +711,59 @@ static int dm_test_video_copy(struct unit_test_state *uts) - return 0; - } - DM_TEST(dm_test_video_copy, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); -+ -+/* Test video damage tracking */ -+static int dm_test_video_damage(struct unit_test_state *uts) -+{ -+ struct sandbox_sdl_plat *plat; -+ struct udevice *dev, *con; -+ struct video_priv *priv; -+ const char *test_string_1 = "Criticism may not be agreeable, "; -+ const char *test_string_2 = "but it is necessary."; -+ const char *test_string_3 = "It fulfils the same function as pain in the human body."; -+ -+ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) -+ return -EAGAIN; -+ -+ ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev)); -+ ut_assert(!device_active(dev)); -+ plat = dev_get_plat(dev); -+ plat->font_size = 32; -+ -+ ut_assertok(video_get_nologo(uts, &dev)); -+ ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); -+ priv = dev_get_uclass_priv(dev); -+ -+ vidconsole_position_cursor(con, 14, 10); -+ vidconsole_put_string(con, test_string_2); -+ ut_asserteq(449, priv->damage.xstart); -+ ut_asserteq(325, priv->damage.ystart); -+ ut_asserteq(661, priv->damage.xend); -+ ut_asserteq(350, priv->damage.yend); -+ -+ vidconsole_position_cursor(con, 7, 5); -+ vidconsole_put_string(con, test_string_1); -+ ut_asserteq(225, priv->damage.xstart); -+ ut_asserteq(164, priv->damage.ystart); -+ ut_asserteq(661, priv->damage.xend); -+ ut_asserteq(350, priv->damage.yend); -+ -+ vidconsole_position_cursor(con, 21, 15); -+ vidconsole_put_string(con, test_string_3); -+ ut_asserteq(225, priv->damage.xstart); -+ ut_asserteq(164, priv->damage.ystart); -+ ut_asserteq(1280, priv->damage.xend); -+ ut_asserteq(510, priv->damage.yend); -+ -+ video_sync(dev, false); -+ ut_asserteq(priv->xsize, priv->damage.xstart); -+ ut_asserteq(priv->ysize, priv->damage.ystart); -+ ut_asserteq(0, priv->damage.xend); -+ ut_asserteq(0, priv->damage.yend); -+ -+ ut_asserteq(7339, compress_frame_buffer(uts, dev, false)); -+ ut_assertok(check_copy_frame_buffer(uts, dev)); -+ -+ return 0; -+} -+DM_TEST(dm_test_video_damage, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); - -From patchwork Mon Aug 21 13:51:05 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823651 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=mvjKik+t; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv7M6kVWz1yYZ - for ; Mon, 21 Aug 2023 23:52:47 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 6CAC987085; - Mon, 21 Aug 2023 15:51:46 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="mvjKik+t"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 6192687085; Mon, 21 Aug 2023 15:51:45 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com - [IPv6:2a00:1450:4864:20::336]) - (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 D1E718706A - for ; Mon, 21 Aug 2023 15:51:42 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wm1-x336.google.com with SMTP id - 5b1f17b1804b1-3fee17aebc8so20256405e9.0 - for ; Mon, 21 Aug 2023 06:51:42 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625902; x=1693230702; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=OUPwGyIUGhu07FwRipI6J5nz3cUBWpffvk0k2vprnLg=; - b=mvjKik+ts2RRqakLQOi9t7J1i101HYF0aguRZ/P4y3h8SvaC+jrWNXPy+MyUiGFatO - EW5N4iqonVrCvE+i19nnSxA3TW5G5ItgSDTN6yq5TEp806h08MC17nKgCuRk/Urg+Nkj - ZewK+CW+lOR6k2kB8LtZylmeke1YHCeGMXq9VMK1hsm4co4hgSx0ZJ1OXiP5+tc4mVug - L2WSO1+ILyeHTT0N/dHw3FHShX08Y0SisUe32K946KofaqN6teHjb172uNMPVvd4Nk1S - G2GYNvIigYOzyXNzeBRUDXG3TkK8+ioXwBLZ4iqTsf77Dc0p2ePFbhc23gHzBcKBpUSc - O2nA== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625902; x=1693230702; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=OUPwGyIUGhu07FwRipI6J5nz3cUBWpffvk0k2vprnLg=; - b=PY5C635/8jWW5ixQ4L1L3j9qeTGHNNV7zdPW6utGplgCgNorieSsCHQweRvRmMeEuD - MFr4iXeMz4fuhtbE79McVeS1D2v3BXvw2DX52qn7G6MlWSp/OVuocmhZPavm+DsYq7wJ - D//vupLeuSNo0SXsniHXWL8NlKNfz7qnozFFui+kEvO0IwOmVbDRI99V9uZM3ng9hERg - y3hKkIFQSgXYtPJ+4h3reOPhrZLXW5t/o9rXjgeC+l6WyxkI6UASNgww0aC0iwiIg40B - enEpHJN00lL6FOkCuYsMay4itv3ydNVuzZHbW7w6tmgDHIWKLg4yi4tFuiSgl+EnJluq - pqDw== -X-Gm-Message-State: AOJu0YzfIxtWigpVmRfL01E4NvwPLzRkCCjd173t25icCTVna47obihz - mXXbV/Xvlo7hwqge7/MU2LnnCJaUcgE= -X-Google-Smtp-Source: - AGHT+IFzj3fGJ3yOnSTVNmg3QQIrMsHdzvHVI7a3IQjx0jS8kD0qBSvWJ3Z5+c4jA0D6oPZBiuGxwA== -X-Received: by 2002:a5d:6811:0:b0:319:8a5a:ab5e with SMTP id - w17-20020a5d6811000000b003198a5aab5emr4349395wru.38.1692625902291; - Mon, 21 Aug 2023 06:51:42 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.40 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:41 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 08/13] video: Add damage notification on bmp display -Date: Mon, 21 Aug 2023 16:51:05 +0300 -Message-Id: <20230821135111.3558478-9-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Let's report the video damage when we draw a bitmap on the screen. This -way we can later lazily flush only relevant regions to hardware. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -Reviewed-by: Simon Glass -Signed-off-by: Alper Nebi Yasak ---- - -(no changes since v1) - - drivers/video/video_bmp.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c -index 45f003c8251a..10943b9ca19f 100644 ---- a/drivers/video/video_bmp.c -+++ b/drivers/video/video_bmp.c -@@ -460,6 +460,8 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, - break; - }; - -+ video_damage(dev, x, y, width, height); -+ - /* Find the position of the top left of the image in the framebuffer */ - fb = (uchar *)(priv->fb + y * priv->line_length + x * bpix / 8); - ret = video_sync_copy(dev, start, fb); - -From patchwork Mon Aug 21 13:51:06 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823652 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=rvkBTDGo; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv7Y6TNDz1yYZ - for ; Mon, 21 Aug 2023 23:52:57 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id B23478708D; - Mon, 21 Aug 2023 15:51:48 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="rvkBTDGo"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id E994E87081; Mon, 21 Aug 2023 15:51:47 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com - [IPv6:2a00:1450:4864:20::430]) - (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 4A29E8708E - for ; Mon, 21 Aug 2023 15:51:45 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x430.google.com with SMTP id - ffacd0b85a97d-31427ddd3fbso3057122f8f.0 - for ; Mon, 21 Aug 2023 06:51:45 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625905; x=1693230705; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=NHWfOmBWnCfG15vLo7N7Y/b5x/nSoPE0dmgy30xOm9Q=; - b=rvkBTDGokSsZ+zHSmCyephYHOa1zCgYEH1V/eHcDIaJehG3LF1h3ZetBhv0F1WCnRL - dg0OqSl4nhT+d01IqkhLNI1FTeIJQeE/FHwY83jActydA9RdIKB97V7VAmOnABjsedPs - n/m1fNRUpKdpm/TBglBcCWTlhrozxmO+plcVOAjMhNlQQGUGkRo1eq/yHOw8pzfiIQVT - 4G4hJi3ePKSsEYbd1YuMZSkrzN70N+Erw/eeRb2QAdkn4J6xcJyPMEWirh7uNV2erutB - ZzxtmQOTBV9y19HeQkYKJeCnpReJ2LaLzTJj72ehPZpZqbYfj67OE+MeCC6Yt/m3YILh - fpGQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625905; x=1693230705; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=NHWfOmBWnCfG15vLo7N7Y/b5x/nSoPE0dmgy30xOm9Q=; - b=i5Ecd9fdl1ZJU0VqAc78F3Pmf9jo/gquJagwYJOv+0Gs8ayWCAJVUNkBV1a10fi3YU - uHNi0JjDvPtp8HPET+X5ywPbVDMbGOtad+ZjijeZL+mbC+Zc+lN2Oy35AoZjAeiYYqcL - qr+tjpJBWmj7lsr4rZ+Tqpc5m93dDUcxAeKZeOas3KQ+oM/S5zaPEb6puDJuVXTGbx9/ - NF+fyUg6I5MN+ZrT/+2pj8da5MpJaSlYzzymyg7JmdELwMKcBJsOuVNFfj+kXHLAmapY - MCO+hRidacGMoSYFLc/PHU7rU1qZqAWuizW35JPJmGYWschbDBhU5HWTPkJ8ifdZ9dqO - 7kkA== -X-Gm-Message-State: AOJu0YxlhwAy04+v9sqR7+z6BpzMYlqGrKNxnrBV5TAuFHvCn94+0y5X - UCsHr11K/guiHrF8/+oTMNTEUjwCaRQ= -X-Google-Smtp-Source: - AGHT+IF9A6Dqme3W/tV3JyovhEsU6i4A15qi8QyYKIlOrt7P6EPMkzmv+B+4oB2S58BxD/9oTr/SHQ== -X-Received: by 2002:a5d:4988:0:b0:31a:e6c2:770d with SMTP id - r8-20020a5d4988000000b0031ae6c2770dmr4196623wrq.36.1692625904737; - Mon, 21 Aug 2023 06:51:44 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.42 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:44 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 09/13] efi_loader: GOP: Add damage notification on BLT -Date: Mon, 21 Aug 2023 16:51:06 +0300 -Message-Id: <20230821135111.3558478-10-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Now that we have a damage tracking API, let's populate damage done by -UEFI payloads when they BLT data onto the screen. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -Reviewed-by: Heinrich Schuchardt -[Alper: Add struct comment for new member] -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Document new vdev field in struct efi_gop_obj comment - -Changes in v4: -- Skip damage on EfiBltVideoToBltBuffer - -Changes in v3: -- Adapt to always assume DM is used - -Changes in v2: -- Remove ifdefs from gop - - lib/efi_loader/efi_gop.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c -index 778b693f983a..db6535e080c4 100644 ---- a/lib/efi_loader/efi_gop.c -+++ b/lib/efi_loader/efi_gop.c -@@ -24,6 +24,7 @@ static const efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; - * @ops: graphical output protocol interface - * @info: graphical output mode information - * @mode: graphical output mode -+ * @vdev: backing video device - * @bpix: bits per pixel - * @fb: frame buffer - */ -@@ -32,6 +33,7 @@ struct efi_gop_obj { - struct efi_gop ops; - struct efi_gop_mode_info info; - struct efi_gop_mode mode; -+ struct udevice *vdev; - /* Fields we only have access to during init */ - u32 bpix; - void *fb; -@@ -120,6 +122,7 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, - u32 *fb32 = gopobj->fb; - u16 *fb16 = gopobj->fb; - struct efi_gop_pixel *buffer = __builtin_assume_aligned(bufferp, 4); -+ bool blt_to_video = (operation != EFI_BLT_VIDEO_TO_BLT_BUFFER); - - if (delta) { - /* Check for 4 byte alignment */ -@@ -243,6 +246,9 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, - dlineoff += dwidth; - } - -+ if (blt_to_video) -+ video_damage(gopobj->vdev, dx, dy, width, height); -+ - return EFI_SUCCESS; - } - -@@ -548,6 +554,7 @@ efi_status_t efi_gop_register(void) - gopobj->info.pixels_per_scanline = col; - gopobj->bpix = bpix; - gopobj->fb = fb; -+ gopobj->vdev = vdev; - - return EFI_SUCCESS; - } - -From patchwork Mon Aug 21 13:51:07 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823653 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=SJ3CoTwS; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv7l6Gwbz1yYZ - for ; Mon, 21 Aug 2023 23:53:07 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 04C3A87091; - Mon, 21 Aug 2023 15:51:52 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="SJ3CoTwS"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 79C6786F0A; Mon, 21 Aug 2023 15:51:50 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com - [IPv6:2a00:1450:4864:20::435]) - (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 E3F3B86E80 - for ; Mon, 21 Aug 2023 15:51:47 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x435.google.com with SMTP id - ffacd0b85a97d-31aeef88a55so1551204f8f.2 - for ; Mon, 21 Aug 2023 06:51:47 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625907; x=1693230707; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=l/DCoXVnGlEMqWseytQAYuhC9MvrFlVv7QEu+lzOB9U=; - b=SJ3CoTwShv0m1a2l77IYGRiPJhE773qxJozbJ8TLkbWb/Fs3vzMjaetMjO1LteCIix - nxWVY9KC93yaMYqJT6SqYWKi1BaFToYnd6muvummJcQpRouAllJWg2nVkF0e6rb8GdHn - kEvHDvCo4Xq4Lrpvs6/W0ONesn+kGcCJbX3+BARXOoTD87bHAQpb5gcTr6FjYwUraYf/ - 31t1qEak7+tRD5cuPx0ItVaX8KSHeAMuueL0gEw6Wt64zNUyAO7W7cCRNJFMIsBkB2Lw - IOsoOk7kBgIqU/InShFLnIoLlW9EafAood5bDff+/ADKYaXgkgxpBbWQWgtF6tmmvjGO - gfgg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625907; x=1693230707; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=l/DCoXVnGlEMqWseytQAYuhC9MvrFlVv7QEu+lzOB9U=; - b=Tx8Anl+tKgGLw4YpMhb5VbWFhDaaZ7izCBtT/Mun3zxxONGjrw/1uYrQVf/HxeEzcw - 0VQqKGIC9Kek3RaHw20BGPdbmmDTmaVo3IGNrikhp2qDmM0bBH2AVbn0K5MV5t9dwKsA - U5D/cFon6pqj8sco6Dd5oVBskjrgqlgNtd3HXzCrfuFmFtsXxecVmlgKOnnE8Kj+CGGI - D2EMM/0yQCq/vuxC4/ISIiaRk0/6GCX55V8DYg+claM+h691kk/LGeEGXJqs5X1wFGQU - EZeKiKrY2VvqZ7yOXoriyel6QE7BvHmCmurDC+oji/do1hnGp/6NPxPFV/ABKsRmjPGY - V6Eg== -X-Gm-Message-State: AOJu0YxqpYt8rTBNvBZ9hiz/qYI+xhkc2uURaJNeyYssFbd+tACGWJtX - 6fE/7qVWobRKTs1ZWXtn3qcomaeF/nc= -X-Google-Smtp-Source: - AGHT+IHlrJ5IlwhVESQ4N6S+FeCJPNau4Ry7TWJN4H6yUmdpI19HJsGEPwtYtoPvcLuI4yNltjc9CQ== -X-Received: by 2002:a5d:4483:0:b0:317:dada:2417 with SMTP id - j3-20020a5d4483000000b00317dada2417mr4326536wrq.31.1692625907186; - Mon, 21 Aug 2023 06:51:47 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.45 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:46 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 10/13] video: Only dcache flush damaged lines -Date: Mon, 21 Aug 2023 16:51:07 +0300 -Message-Id: <20230821135111.3558478-11-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Now that we have a damage area tells us which parts of the frame buffer -actually need updating, let's only dcache flush those on video_sync() -calls. With this optimization in place, frame buffer updates - especially -on large screen such as 4k displays - speed up significantly. - -Signed-off-by: Alexander Graf -Reported-by: Da Xue -[Alper: Use damage.xstart/yend, IS_ENABLED()] -Co-developed-by: Alper Nebi Yasak -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Use xstart, ystart, xend, yend as names for damage region -- Use IS_ENABLED() instead of CONFIG_IS_ENABLED() - -Changes in v2: -- Fix dcache range; we were flushing too much before -- Remove ifdefs - - drivers/video/video-uclass.c | 41 +++++++++++++++++++++++++++++++----- - 1 file changed, 36 insertions(+), 5 deletions(-) - -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index 8bfcbc88dda7..a50220bcc684 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -385,6 +385,41 @@ void video_damage(struct udevice *vid, int x, int y, int width, int height) - priv->damage.yend = max(yend, priv->damage.yend); - } - -+#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) -+static void video_flush_dcache(struct udevice *vid) -+{ -+ struct video_priv *priv = dev_get_uclass_priv(vid); -+ -+ if (!priv->flush_dcache) -+ return; -+ -+ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) { -+ flush_dcache_range((ulong)priv->fb, -+ ALIGN((ulong)priv->fb + priv->fb_size, -+ CONFIG_SYS_CACHELINE_SIZE)); -+ -+ return; -+ } -+ -+ if (priv->damage.xend && priv->damage.yend) { -+ int lstart = priv->damage.xstart * VNBYTES(priv->bpix); -+ int lend = priv->damage.xend * VNBYTES(priv->bpix); -+ int y; -+ -+ for (y = priv->damage.ystart; y < priv->damage.yend; y++) { -+ ulong fb = (ulong)priv->fb; -+ ulong start = fb + (y * priv->line_length) + lstart; -+ ulong end = start + lend - lstart; -+ -+ start = ALIGN_DOWN(start, CONFIG_SYS_CACHELINE_SIZE); -+ end = ALIGN(end, CONFIG_SYS_CACHELINE_SIZE); -+ -+ flush_dcache_range(start, end); -+ } -+ } -+} -+#endif -+ - /* Flush video activity to the caches */ - int video_sync(struct udevice *vid, bool force) - { -@@ -404,11 +439,7 @@ int video_sync(struct udevice *vid, bool force) - * out whether it exists? For now, ARM is safe. - */ - #if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) -- if (priv->flush_dcache) { -- flush_dcache_range((ulong)priv->fb, -- ALIGN((ulong)priv->fb + priv->fb_size, -- CONFIG_SYS_CACHELINE_SIZE)); -- } -+ video_flush_dcache(vid); - #elif defined(CONFIG_VIDEO_SANDBOX_SDL) - static ulong last_sync; - - -From patchwork Mon Aug 21 13:51:08 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823654 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=JgtEabWc; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv7w4Mskz1yYZ - for ; Mon, 21 Aug 2023 23:53:16 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 4790487096; - Mon, 21 Aug 2023 15:51:54 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="JgtEabWc"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 102DC87096; Mon, 21 Aug 2023 15:51:54 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com - [IPv6:2a00:1450:4864:20::429]) - (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 4AFE187098 - for ; Mon, 21 Aug 2023 15:51:50 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x429.google.com with SMTP id - ffacd0b85a97d-31c3726cc45so1247414f8f.0 - for ; Mon, 21 Aug 2023 06:51:50 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625910; x=1693230710; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=NdoZCMaizC3Y759MOjDBPu1VoZ+fIm/Lqzoh+gR4stQ=; - b=JgtEabWcIca2ALjUCCqGgXmUf5MREa+Jm3Yt8fmf6mwr8MrhP5Iu7KssN+MMQbAxKO - cl+LarTpXoK8lh4x2WmdcUKViUJdCAMCFJCk6vdMhIFAjaBH1Sqhudg315eFGharTw6G - 7FFSDdE1ZAablttQmfgcm59Ilk5+2QRAFycWcOiue5yFfF8RSAAAF8UHkl7rKxgQKHCO - NWC3P4PdjYEtaQFoJ4R5txJ07Wdvoptc9JVL9WGf4wSL5X6fm+SbalQaW3YgFuKNy0fk - 0+lmUOMDOXmwx4iGWZd6+LRFXYEZGCZ95AvjoDF83ZlL9Nu1oUvB/qzH7PRJatx6j/mw - J8Zw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625910; x=1693230710; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=NdoZCMaizC3Y759MOjDBPu1VoZ+fIm/Lqzoh+gR4stQ=; - b=ATA2PnRfDc2gQVzxEqGIcgBsTvJvkOPNl2NSZEoxqmZfEe/94an/QM50JhcxX0wNEA - 0HpCsEsyDLhFnjW4APp/TYwLoc0mbRD/T517DYROiuJLUSRxyO/NApA1qyRJpVQTqpRc - dRZ5hG5VoUH3oHfwZN1abRKxbIogLNiJhSSNDvjA01RYJwTZY6Fq8xUJCYp9gI28/OI0 - oZ0SA+qdXZ4UvNR/uqun2tysI+JnatTKlbwSfCF7q/sj5AfH/VNk3EqNROuXlIBRMWI8 - pgosvMd73/GvTMQvsWPgGNNc3fhZgcnLKIoQFKdoqCeSFAufSLREsoWPLMMH1xXuh1lG - JKFQ== -X-Gm-Message-State: AOJu0YyKi/tYIN4uVjau5AbbNkJPzybGF79aUx+ls+uiyxVTGeu0zy64 - aMCSasGPaxyg+ogYkqU0Dx/1q3mIbnM= -X-Google-Smtp-Source: - AGHT+IHsb00O74X0NrGSp+Znx7MktY8oHr2PL7yyjJMmEkZVU5lzx7Wg/Yr0hFddlw1zsptntp6etA== -X-Received: by 2002:a05:6000:1cce:b0:314:ca7:f30b with SMTP id - bf14-20020a0560001cce00b003140ca7f30bmr5251008wrb.54.1692625909678; - Mon, 21 Aug 2023 06:51:49 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.47 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:49 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 11/13] video: Use VIDEO_DAMAGE for VIDEO_COPY -Date: Mon, 21 Aug 2023 16:51:08 +0300 -Message-Id: <20230821135111.3558478-12-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -CONFIG_VIDEO_COPY implemented a range-based copying mechanism: If we -print a single character, it will always copy the full range of bytes -from the top left corner of the character to the lower right onto the -uncached frame buffer. This includes pretty much the full line contents -of the printed character. - -Since we now have proper damage tracking, let's make use of that to reduce -the amount of data we need to copy. With this patch applied, we will only -copy the tiny rectangle surrounding characters when we print them, -speeding up the video console. - -After this, changes to the main frame buffer are not immediately copied -to the copy frame buffer, but postponed until the next video device -sync. So issue an explicit sync before inspecting the copy frame buffer -contents for the video tests. - -Signed-off-by: Alexander Graf -[Alper: Rebase for fontdata->height/w, fill_part(), fix memmove(dev), - drop from defconfig, use damage.xstart/yend, use IS_ENABLED(), - call video_sync() before copy_fb check, update video_copy test] -Co-developed-by: Alper Nebi Yasak -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Remove video_sync_copy() also from video_fill(), video_fill_part() -- Fix memmove() calls by removing the extra dev argument -- Call video_sync() before checking copy_fb in video tests -- Use xstart, ystart, xend, yend as names for damage region -- Use met->baseline instead of priv->baseline -- Use fontdata->height/width instead of VIDEO_FONT_HEIGHT/WIDTH -- Use xstart, ystart, xend, yend as names for damage region -- Use IS_ENABLED() instead of CONFIG_IS_ENABLED() -- Drop VIDEO_DAMAGE from sandbox defconfig added in a new patch -- Update dm_test_video_copy test added in a new patch - -Changes in v3: -- Make VIDEO_COPY always select VIDEO_DAMAGE - -Changes in v2: -- Add patch "video: Use VIDEO_DAMAGE for VIDEO_COPY" - - configs/sandbox_defconfig | 1 - - drivers/video/Kconfig | 5 ++ - drivers/video/console_normal.c | 13 +---- - drivers/video/console_rotate.c | 44 +++----------- - drivers/video/console_truetype.c | 16 +---- - drivers/video/vidconsole-uclass.c | 16 ----- - drivers/video/video-uclass.c | 97 ++++++++----------------------- - drivers/video/video_bmp.c | 7 --- - include/video.h | 37 ------------ - include/video_console.h | 52 ----------------- - test/dm/video.c | 3 +- - 11 files changed, 43 insertions(+), 248 deletions(-) - -diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig -index 51b820f13121..259f31f26cee 100644 ---- a/configs/sandbox_defconfig -+++ b/configs/sandbox_defconfig -@@ -307,7 +307,6 @@ CONFIG_USB_ETH_CDC=y - CONFIG_VIDEO=y - CONFIG_VIDEO_FONT_SUN12X22=y - CONFIG_VIDEO_COPY=y --CONFIG_VIDEO_DAMAGE=y - CONFIG_CONSOLE_ROTATION=y - CONFIG_CONSOLE_TRUETYPE=y - CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y -diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig -index 97f494a1340b..b3fbd9d7d9ca 100644 ---- a/drivers/video/Kconfig -+++ b/drivers/video/Kconfig -@@ -83,11 +83,14 @@ config VIDEO_PCI_DEFAULT_FB_SIZE - - config VIDEO_COPY - bool "Enable copying the frame buffer to a hardware copy" -+ select VIDEO_DAMAGE - help - On some machines (e.g. x86), reading from the frame buffer is very - slow because it is uncached. To improve performance, this feature - allows the frame buffer to be kept in cached memory (allocated by - U-Boot) and then copied to the hardware frame-buffer as needed. -+ It uses the VIDEO_DAMAGE feature to keep track of regions to copy -+ and will only copy actually touched regions. - - To use this, your video driver must set @copy_base in - struct video_uc_plat. -@@ -105,6 +108,8 @@ config VIDEO_DAMAGE - regions of the frame buffer that were modified before, speeding up - screen refreshes significantly. - -+ It is also used by VIDEO_COPY to identify which regions changed. -+ - config BACKLIGHT_PWM - bool "Generic PWM based Backlight Driver" - depends on BACKLIGHT && DM_PWM -diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c -index a19ce6a2bc11..c44aa09473a3 100644 ---- a/drivers/video/console_normal.c -+++ b/drivers/video/console_normal.c -@@ -35,10 +35,6 @@ static int console_set_row(struct udevice *dev, uint row, int clr) - fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); - end = dst; - -- ret = vidconsole_sync_copy(dev, line, end); -- if (ret) -- return ret; -- - video_damage(dev->parent, - 0, - fontdata->height * row, -@@ -57,14 +53,11 @@ static int console_move_rows(struct udevice *dev, uint rowdst, - void *dst; - void *src; - int size; -- int ret; - - dst = vid_priv->fb + rowdst * fontdata->height * vid_priv->line_length; - src = vid_priv->fb + rowsrc * fontdata->height * vid_priv->line_length; - size = fontdata->height * vid_priv->line_length * count; -- ret = vidconsole_memmove(dev, dst, src, size); -- if (ret) -- return ret; -+ memmove(dst, src, size); - - video_damage(dev->parent, - 0, -@@ -108,10 +101,6 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, char ch) - fontdata->width, - fontdata->height); - -- ret = vidconsole_sync_copy(dev, start, line); -- if (ret) -- return ret; -- - return VID_TO_POS(fontdata->width); - } - -diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c -index 6c3e7c1bb8dc..6e9067d1c7fb 100644 ---- a/drivers/video/console_rotate.c -+++ b/drivers/video/console_rotate.c -@@ -21,7 +21,6 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) - int pbytes = VNBYTES(vid_priv->bpix); - void *start, *dst, *line; - int i, j; -- int ret; - - start = vid_priv->fb + vid_priv->line_length - - (row + 1) * fontdata->height * pbytes; -@@ -32,9 +31,6 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) - fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); - line += vid_priv->line_length; - } -- ret = vidconsole_sync_copy(dev, start, line); -- if (ret) -- return ret; - - video_damage(dev->parent, - vid_priv->xsize - ((row + 1) * fontdata->height), -@@ -54,7 +50,7 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, - int pbytes = VNBYTES(vid_priv->bpix); - void *dst; - void *src; -- int j, ret; -+ int j; - - dst = vid_priv->fb + vid_priv->line_length - - (rowdst + count) * fontdata->height * pbytes; -@@ -62,10 +58,7 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, - (rowsrc + count) * fontdata->height * pbytes; - - for (j = 0; j < vid_priv->ysize; j++) { -- ret = vidconsole_memmove(dev, dst, src, -- fontdata->height * pbytes * count); -- if (ret) -- return ret; -+ memmove(dst, src, fontdata->height * pbytes * count); - src += vid_priv->line_length; - dst += vid_priv->line_length; - } -@@ -104,10 +97,6 @@ static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, char ch) - return ret; - - /* We draw backwards from 'start, so account for the first line */ -- ret = vidconsole_sync_copy(dev, start - vid_priv->line_length, line); -- if (ret) -- return ret; -- - video_damage(dev->parent, - vid_priv->xsize - y - fontdata->height, - linenum - 1, -@@ -125,7 +114,7 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) - struct video_fontdata *fontdata = priv->fontdata; - void *start, *line, *dst, *end; - int pixels = fontdata->height * vid_priv->xsize; -- int i, ret; -+ int i; - int pbytes = VNBYTES(vid_priv->bpix); - - start = vid_priv->fb + vid_priv->ysize * vid_priv->line_length - -@@ -135,9 +124,6 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) - for (i = 0; i < pixels; i++) - fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); - end = dst; -- ret = vidconsole_sync_copy(dev, start, end); -- if (ret) -- return ret; - - video_damage(dev->parent, - 0, -@@ -163,8 +149,7 @@ static int console_move_rows_2(struct udevice *dev, uint rowdst, uint rowsrc, - vid_priv->line_length; - src = end - (rowsrc + count) * fontdata->height * - vid_priv->line_length; -- vidconsole_memmove(dev, dst, src, -- fontdata->height * vid_priv->line_length * count); -+ memmove(dst, src, fontdata->height * vid_priv->line_length * count); - - video_damage(dev->parent, - 0, -@@ -199,11 +184,6 @@ static int console_putc_xy_2(struct udevice *dev, uint x_frac, uint y, char ch) - if (ret) - return ret; - -- /* Add 4 bytes to allow for the first pixel writen */ -- ret = vidconsole_sync_copy(dev, start + 4, line); -- if (ret) -- return ret; -- - video_damage(dev->parent, - x - fontdata->width + 1, - linenum - fontdata->height + 1, -@@ -220,7 +200,7 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) - struct video_fontdata *fontdata = priv->fontdata; - int pbytes = VNBYTES(vid_priv->bpix); - void *start, *dst, *line; -- int i, j, ret; -+ int i, j; - - start = vid_priv->fb + row * fontdata->height * pbytes; - line = start; -@@ -230,9 +210,6 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) - fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); - line += vid_priv->line_length; - } -- ret = vidconsole_sync_copy(dev, start, line); -- if (ret) -- return ret; - - video_damage(dev->parent, - row * fontdata->height, -@@ -252,16 +229,13 @@ static int console_move_rows_3(struct udevice *dev, uint rowdst, uint rowsrc, - int pbytes = VNBYTES(vid_priv->bpix); - void *dst; - void *src; -- int j, ret; -+ int j; - - dst = vid_priv->fb + rowdst * fontdata->height * pbytes; - src = vid_priv->fb + rowsrc * fontdata->height * pbytes; - - for (j = 0; j < vid_priv->ysize; j++) { -- ret = vidconsole_memmove(dev, dst, src, -- fontdata->height * pbytes * count); -- if (ret) -- return ret; -+ memmove(dst, src, fontdata->height * pbytes * count); - src += vid_priv->line_length; - dst += vid_priv->line_length; - } -@@ -296,10 +270,6 @@ static int console_putc_xy_3(struct udevice *dev, uint x_frac, uint y, char ch) - line = start; - - ret = fill_char_horizontally(pfont, &line, vid_priv, fontdata, NORMAL_DIRECTION); -- if (ret) -- return ret; -- /* Add a line to allow for the first pixels writen */ -- ret = vidconsole_sync_copy(dev, start + vid_priv->line_length, line); - if (ret) - return ret; - -diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c -index 0adbf9cc3d67..07bb0af71311 100644 ---- a/drivers/video/console_truetype.c -+++ b/drivers/video/console_truetype.c -@@ -182,7 +182,6 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) - struct console_tt_priv *priv = dev_get_priv(dev); - struct console_tt_metrics *met = priv->cur_met; - void *end, *line; -- int ret; - - line = vid_priv->fb + row * met->font_size * vid_priv->line_length; - end = line + met->font_size * vid_priv->line_length; -@@ -218,9 +217,6 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) - default: - return -ENOSYS; - } -- ret = vidconsole_sync_copy(dev, line, end); -- if (ret) -- return ret; - - video_damage(dev->parent, - 0, -@@ -240,14 +236,11 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, - struct console_tt_metrics *met = priv->cur_met; - void *dst; - void *src; -- int i, diff, ret; -+ int i, diff; - - dst = vid_priv->fb + rowdst * met->font_size * vid_priv->line_length; - src = vid_priv->fb + rowsrc * met->font_size * vid_priv->line_length; -- ret = vidconsole_memmove(dev, dst, src, met->font_size * -- vid_priv->line_length * count); -- if (ret) -- return ret; -+ memmove(dst, src, met->font_size * vid_priv->line_length * count); - - /* Scroll up our position history */ - diff = (rowsrc - rowdst) * met->font_size; -@@ -280,7 +273,7 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, - u8 *bits, *data; - int advance; - void *start, *end, *line; -- int row, ret; -+ int row; - - /* First get some basic metrics about this character */ - stbtt_GetCodepointHMetrics(font, ch, &advance, &lsb); -@@ -424,9 +417,6 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, - width, - height); - -- ret = vidconsole_sync_copy(dev, start, line); -- if (ret) -- return ret; - free(data); - - return width_frac; -diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c -index 05f930478096..27a1e8ec3e49 100644 ---- a/drivers/video/vidconsole-uclass.c -+++ b/drivers/video/vidconsole-uclass.c -@@ -682,22 +682,6 @@ UCLASS_DRIVER(vidconsole) = { - .per_device_auto = sizeof(struct vidconsole_priv), - }; - --#ifdef CONFIG_VIDEO_COPY --int vidconsole_sync_copy(struct udevice *dev, void *from, void *to) --{ -- struct udevice *vid = dev_get_parent(dev); -- -- return video_sync_copy(vid, from, to); --} -- --int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, -- int size) --{ -- memmove(dst, src, size); -- return vidconsole_sync_copy(dev, dst, dst + size); --} --#endif -- - int vidconsole_clear_and_reset(struct udevice *dev) - { - int ret; -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index a50220bcc684..c79499252a22 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -160,7 +160,7 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, - struct video_priv *priv = dev_get_uclass_priv(dev); - void *start, *line; - int pixels = xend - xstart; -- int row, i, ret; -+ int row, i; - - start = priv->fb + ystart * priv->line_length; - start += xstart * VNBYTES(priv->bpix); -@@ -200,10 +200,6 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, - line += priv->line_length; - } - -- ret = video_sync_copy(dev, start, line); -- if (ret) -- return ret; -- - video_damage(dev, xstart, ystart, xend - xstart, yend - ystart); - - return 0; -@@ -223,7 +219,6 @@ int video_reserve_from_bloblist(struct video_handoff *ho) - int video_fill(struct udevice *dev, u32 colour) - { - struct video_priv *priv = dev_get_uclass_priv(dev); -- int ret; - - switch (priv->bpix) { - case VIDEO_BPP16: -@@ -248,9 +243,6 @@ int video_fill(struct udevice *dev, u32 colour) - memset(priv->fb, colour, priv->fb_size); - break; - } -- ret = video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size); -- if (ret) -- return ret; - - video_damage(dev, 0, 0, priv->xsize, priv->ysize); - -@@ -420,6 +412,27 @@ static void video_flush_dcache(struct udevice *vid) - } - #endif - -+static void video_flush_copy(struct udevice *vid) -+{ -+ struct video_priv *priv = dev_get_uclass_priv(vid); -+ -+ if (!priv->copy_fb) -+ return; -+ -+ if (priv->damage.xend && priv->damage.yend) { -+ int lstart = priv->damage.xstart * VNBYTES(priv->bpix); -+ int lend = priv->damage.xend * VNBYTES(priv->bpix); -+ int y; -+ -+ for (y = priv->damage.ystart; y < priv->damage.yend; y++) { -+ ulong offset = (y * priv->line_length) + lstart; -+ ulong len = lend - lstart; -+ -+ memcpy(priv->copy_fb + offset, priv->fb + offset, len); -+ } -+ } -+} -+ - /* Flush video activity to the caches */ - int video_sync(struct udevice *vid, bool force) - { -@@ -427,6 +440,9 @@ int video_sync(struct udevice *vid, bool force) - struct video_ops *ops = video_get_ops(vid); - int ret; - -+ if (IS_ENABLED(CONFIG_VIDEO_COPY)) -+ video_flush_copy(vid); -+ - if (ops && ops->video_sync) { - ret = ops->video_sync(vid); - if (ret) -@@ -503,69 +519,6 @@ int video_get_ysize(struct udevice *dev) - return priv->ysize; - } - --#ifdef CONFIG_VIDEO_COPY --int video_sync_copy(struct udevice *dev, void *from, void *to) --{ -- struct video_priv *priv = dev_get_uclass_priv(dev); -- -- if (priv->copy_fb) { -- long offset, size; -- -- /* Find the offset of the first byte to copy */ -- if ((ulong)to > (ulong)from) { -- size = to - from; -- offset = from - priv->fb; -- } else { -- size = from - to; -- offset = to - priv->fb; -- } -- -- /* -- * Allow a bit of leeway for valid requests somewhere near the -- * frame buffer -- */ -- if (offset < -priv->fb_size || offset > 2 * priv->fb_size) { --#ifdef DEBUG -- char str[120]; -- -- snprintf(str, sizeof(str), -- "[** FAULT sync_copy fb=%p, from=%p, to=%p, offset=%lx]", -- priv->fb, from, to, offset); -- console_puts_select_stderr(true, str); --#endif -- return -EFAULT; -- } -- -- /* -- * Silently crop the memcpy. This allows callers to avoid doing -- * this themselves. It is common for the end pointer to go a -- * few lines after the end of the frame buffer, since most of -- * the update algorithms terminate a line after their last write -- */ -- if (offset + size > priv->fb_size) { -- size = priv->fb_size - offset; -- } else if (offset < 0) { -- size += offset; -- offset = 0; -- } -- -- memcpy(priv->copy_fb + offset, priv->fb + offset, size); -- } -- -- return 0; --} -- --int video_sync_copy_all(struct udevice *dev) --{ -- struct video_priv *priv = dev_get_uclass_priv(dev); -- -- video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size); -- -- return 0; --} -- --#endif -- - #define SPLASH_DECL(_name) \ - extern u8 __splash_ ## _name ## _begin[]; \ - extern u8 __splash_ ## _name ## _end[] -diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c -index 10943b9ca19f..da2bbe864a03 100644 ---- a/drivers/video/video_bmp.c -+++ b/drivers/video/video_bmp.c -@@ -268,7 +268,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, - enum video_format eformat; - struct bmp_color_table_entry *palette; - int hdr_size; -- int ret; - - if (!bmp || !(bmp->header.signature[0] == 'B' && - bmp->header.signature[1] == 'M')) { -@@ -462,11 +461,5 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, - - video_damage(dev, x, y, width, height); - -- /* Find the position of the top left of the image in the framebuffer */ -- fb = (uchar *)(priv->fb + y * priv->line_length + x * bpix / 8); -- ret = video_sync_copy(dev, start, fb); -- if (ret) -- return log_ret(ret); -- - return video_sync(dev, false); - } -diff --git a/include/video.h b/include/video.h -index a522f33949e5..42e57b44188d 100644 ---- a/include/video.h -+++ b/include/video.h -@@ -350,43 +350,6 @@ void video_set_default_colors(struct udevice *dev, bool invert); - */ - int video_default_font_height(struct udevice *dev); - --#ifdef CONFIG_VIDEO_COPY --/** -- * vidconsole_sync_copy() - Sync back to the copy framebuffer -- * -- * This ensures that the copy framebuffer has the same data as the framebuffer -- * for a particular region. It should be called after the framebuffer is updated -- * -- * @from and @to can be in either order. The region between them is synced. -- * -- * @dev: Vidconsole device being updated -- * @from: Start/end address within the framebuffer (->fb) -- * @to: Other address within the frame buffer -- * Return: 0 if OK, -EFAULT if the start address is before the start of the -- * frame buffer start -- */ --int video_sync_copy(struct udevice *dev, void *from, void *to); -- --/** -- * video_sync_copy_all() - Sync the entire framebuffer to the copy -- * -- * @dev: Vidconsole device being updated -- * Return: 0 (always) -- */ --int video_sync_copy_all(struct udevice *dev); --#else --static inline int video_sync_copy(struct udevice *dev, void *from, void *to) --{ -- return 0; --} -- --static inline int video_sync_copy_all(struct udevice *dev) --{ -- return 0; --} -- --#endif -- - /** - * video_damage() - Notify the video subsystem about screen updates. - * -diff --git a/include/video_console.h b/include/video_console.h -index 2694e44f6ecf..caadeb878989 100644 ---- a/include/video_console.h -+++ b/include/video_console.h -@@ -404,56 +404,4 @@ void vidconsole_list_fonts(struct udevice *dev); - */ - int vidconsole_get_font_size(struct udevice *dev, const char **name, uint *sizep); - --#ifdef CONFIG_VIDEO_COPY --/** -- * vidconsole_sync_copy() - Sync back to the copy framebuffer -- * -- * This ensures that the copy framebuffer has the same data as the framebuffer -- * for a particular region. It should be called after the framebuffer is updated -- * -- * @from and @to can be in either order. The region between them is synced. -- * -- * @dev: Vidconsole device being updated -- * @from: Start/end address within the framebuffer (->fb) -- * @to: Other address within the frame buffer -- * Return: 0 if OK, -EFAULT if the start address is before the start of the -- * frame buffer start -- */ --int vidconsole_sync_copy(struct udevice *dev, void *from, void *to); -- --/** -- * vidconsole_memmove() - Perform a memmove() within the frame buffer -- * -- * This handles a memmove(), e.g. for scrolling. It also updates the copy -- * framebuffer. -- * -- * @dev: Vidconsole device being updated -- * @dst: Destination address within the framebuffer (->fb) -- * @src: Source address within the framebuffer (->fb) -- * @size: Number of bytes to transfer -- * Return: 0 if OK, -EFAULT if the start address is before the start of the -- * frame buffer start -- */ --int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, -- int size); --#else -- --#include -- --static inline int vidconsole_sync_copy(struct udevice *dev, void *from, -- void *to) --{ -- return 0; --} -- --static inline int vidconsole_memmove(struct udevice *dev, void *dst, -- const void *src, int size) --{ -- memmove(dst, src, size); -- -- return 0; --} -- --#endif -- - #endif -diff --git a/test/dm/video.c b/test/dm/video.c -index 8c7d9800a42e..4c3bcd26e94f 100644 ---- a/test/dm/video.c -+++ b/test/dm/video.c -@@ -106,6 +106,7 @@ static int check_copy_frame_buffer(struct unit_test_state *uts, - if (!IS_ENABLED(CONFIG_VIDEO_COPY)) - return 0; - -+ video_sync(dev, false); - ut_assertf(!memcmp(priv->fb, priv->copy_fb, priv->fb_size), - "Copy framebuffer does not match fb"); - -@@ -706,7 +707,7 @@ static int dm_test_video_copy(struct unit_test_state *uts) - vidconsole_put_string(con, test_string); - vidconsole_put_string(con, test_string); - ut_asserteq(7589, compress_frame_buffer(uts, dev, false)); -- ut_asserteq(5278, compress_frame_buffer(uts, dev, true)); -+ ut_asserteq(4127, compress_frame_buffer(uts, dev, true)); - - return 0; - } - -From patchwork Mon Aug 21 13:51:09 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823655 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=Q9fX66MT; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv8541j7z1yYZ - for ; Mon, 21 Aug 2023 23:53:25 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 909B287075; - Mon, 21 Aug 2023 15:51:56 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="Q9fX66MT"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 801C187082; Mon, 21 Aug 2023 15:51:55 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 -Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com - [IPv6:2a00:1450:4864:20::431]) - (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 D67548709E - for ; Mon, 21 Aug 2023 15:51:52 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wr1-x431.google.com with SMTP id - ffacd0b85a97d-317716a4622so3055294f8f.1 - for ; Mon, 21 Aug 2023 06:51:52 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625912; x=1693230712; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=pB2qI48avq9qUXnFEl+wSnmS8SG0cxx3SZjicfp6H7M=; - b=Q9fX66MTTcUQaIK9Ypbt13c6159mxahNRVYZb/qRcTZRgB9DWf7SyL5B6iwaerzl6H - V/NgeKQknUqjdF1rx5cN+0oUlRjL/uqf2PRT1u/2iPSTrLx9ImfxO59U1v7bkAyqsRHD - 9d/OLcbkmN2dqLKXGEJEhw9wRWn6PflMZfMjZfJ6PgDh1lldO8RAGdA+f9Wv0Uqs/CHY - M6HHFEIenHnWt15i3RWPMrP09rbx4OkOqYNXz1V/3BWUxb3tRe+1IqwA2n/oEpR5c0PM - YcGRP1tNM3yqfxG53IdsPPiujOtSHSbvtWSyefvk7z3wSlVPYMzicea8BirSi8/Ag/R0 - CJ5A== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625912; x=1693230712; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=pB2qI48avq9qUXnFEl+wSnmS8SG0cxx3SZjicfp6H7M=; - b=L5dQ5I1/r76Ec7WfGFYq1iqhI4RaRdXt+61BNvttoSzkuI28cDeE9IYg5h41YdBzNd - t6sNriBN4Qc+mGdOBHQb7hoI62tzka68Qd18eexmWznS1lz73CJWNA6nW0T2heZpmRnx - frQSxlPNxv5FZ2eXSdZLRIhWG0T0L+B+G/6B665+1/N1tvTFCLsToL2GaiGnEskSn3rJ - wQPY7b2lG/xkfWZiNERig8/6ZMW5R3QQDdOucA/FVYuHY4/dr+9UuPEHaimYzTwzN6AM - aehqXj0h7YO8NjF9HG1n1T4hEYq0FKqbcb2t+hLAUBpzGBjLNrpCdWa9LzQWN0EEJw8H - /ijQ== -X-Gm-Message-State: AOJu0YwwdmeqIA0FUSFZkbrYH8d4F3YWnny6MkSqZvX6DQEtu9Y/TVK7 - x418Ed0mXh7BUNyNIuPNquOOpbM3J+o= -X-Google-Smtp-Source: - AGHT+IFpiAY2BjXpJaKJJodzwN7aKj9YFF3eAkfmZgRFnB94o3W7mQtEZgXERHeKNVbIpRB5HlMypw== -X-Received: by 2002:a05:6000:1205:b0:31c:4f80:9f7 with SMTP id - e5-20020a056000120500b0031c4f8009f7mr1593479wrx.45.1692625912317; - Mon, 21 Aug 2023 06:51:52 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.50 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:51 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 12/13] video: Always compile cache flushing code -Date: Mon, 21 Aug 2023 16:51:09 +0300 -Message-Id: <20230821135111.3558478-13-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -The dcache flushing code path was conditional on ARM && !DCACHE config -options. However, dcaches exist on other platforms as well and may need -clearing if their driver requires it. - -Simplify the compile logic and always enable the dcache flush logic in -the video core. That way, drivers can always rely on it to call the arch -specific callbacks. - -This will increase code size for non-ARM platforms with CONFIG_VIDEO=y -slightly. - -Reported-by: Heinrich Schuchardt -Signed-off-by: Alexander Graf -Reviewed-by: Simon Glass -Signed-off-by: Alper Nebi Yasak ---- - -(no changes since v4) - -Changes in v4: -- Add patch "video: Always compile cache flushing code" - - drivers/video/video-uclass.c | 14 +++++--------- - 1 file changed, 5 insertions(+), 9 deletions(-) - -diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c -index c79499252a22..3f9ddaadd15d 100644 ---- a/drivers/video/video-uclass.c -+++ b/drivers/video/video-uclass.c -@@ -377,11 +377,13 @@ void video_damage(struct udevice *vid, int x, int y, int width, int height) - priv->damage.yend = max(yend, priv->damage.yend); - } - --#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) - static void video_flush_dcache(struct udevice *vid) - { - struct video_priv *priv = dev_get_uclass_priv(vid); - -+ if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) -+ return; -+ - if (!priv->flush_dcache) - return; - -@@ -410,7 +412,6 @@ static void video_flush_dcache(struct udevice *vid) - } - } - } --#endif - - static void video_flush_copy(struct udevice *vid) - { -@@ -449,14 +450,9 @@ int video_sync(struct udevice *vid, bool force) - return ret; - } - -- /* -- * flush_dcache_range() is declared in common.h but it seems that some -- * architectures do not actually implement it. Is there a way to find -- * out whether it exists? For now, ARM is safe. -- */ --#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) - video_flush_dcache(vid); --#elif defined(CONFIG_VIDEO_SANDBOX_SDL) -+ -+#if defined(CONFIG_VIDEO_SANDBOX_SDL) - static ulong last_sync; - - if (force || get_timer(last_sync) > 100) { - -From patchwork Mon Aug 21 13:51:10 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Alper Nebi Yasak -X-Patchwork-Id: 1823656 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20221208 header.b=LXQ9F9oF; - dkim-atps=neutral -Authentication-Results: legolas.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=patchwork.ozlabs.org) -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 ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RTv8G1ylrz1yYZ - for ; Mon, 21 Aug 2023 23:53:34 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id D63BC87082; - Mon, 21 Aug 2023 15:51:59 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="LXQ9F9oF"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 6DC358709F; Mon, 21 Aug 2023 15:51:58 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com - [IPv6:2a00:1450:4864:20::329]) - (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 B9E5887094 - for ; Mon, 21 Aug 2023 15:51:55 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=alpernebiyasak@gmail.com -Received: by mail-wm1-x329.google.com with SMTP id - 5b1f17b1804b1-3fee5ddc23eso19328245e9.1 - for ; Mon, 21 Aug 2023 06:51:55 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20221208; t=1692625915; x=1693230715; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=q4KbQNgBgg/jRM/b8KJaE0YjvGZTzMRikT8MXE6mjwI=; - b=LXQ9F9oF17Es3W44Ien7NWJ7ymwABfjmSOFUn1nlvsBdcyw9b3O/o8ulQCpUwqhXho - Lsoff11Pmwlo87siidtGiRDX/BRiaZ8rBVWjS3jgK+U6RDPcwNCfR7otgNlLLaNyAd4w - BCXHT1+90WvAX/9alOvPUYlvUkP1t/S15/C+bUJWxok5Nf6l5iGthuNMWvZFFiUdQ8yR - 02AJastvoFpsYlAJI+JY69q6OhIhuxvdeDVc81dEOKzKkkEOdENJDmT6pJI4fiWlgwEE - iSJz97xC4lCSs+y5RPJTJfxE97zWwduKphPAN75dLRw0vnBYyqeXIo4ERx4uO7ku2jHf - 8feQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1692625915; x=1693230715; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=q4KbQNgBgg/jRM/b8KJaE0YjvGZTzMRikT8MXE6mjwI=; - b=VOZaSadRyfgFoQTc22AZ+r/0BSY4/MskC2GhVnMFg1gAc1bBAg7PJOyNu3x0V3ICuX - w68LWLVRLSaTmnF46xARtATTh8hJhyj7k3/oD4mNclUIyfmx/9vTSXJLn1MsG6m3TL8z - l5QNyUjNlgAK+YeuYH6zQl/yp5lmAF4EaOg5ITz+eLN2lf10QPYS18/bVbvNQ0Q2cwIN - FH+i7NhTRVoeExDFNVEFO11ZI3CJiAzpMC4WhI6OucHDWGIzEGcQKOYu9FfgwOfF5dVY - Yc6qjX3w9zhbwV3LA/grMncdSA9joMxVkWJwvFFD+6AlVLgin7DH8EDaIOtENT/RD/qq - Hjvw== -X-Gm-Message-State: AOJu0YyYX84n+767GB59OryFC5m/WbElRHO2Ix8D2HaL8Wnef45wnjme - 9nuXLuU5B1juuVwSn7QqTlnSVvjWNGQ= -X-Google-Smtp-Source: - AGHT+IER2mHBuKBsYnQ3qf+DOtUzSQystkj8v17bWgFVK+zSLUhwLW9BOExvB2cO0RXSrx1vnjzR/w== -X-Received: by 2002:adf:e711:0:b0:317:e542:80a8 with SMTP id - c17-20020adfe711000000b00317e54280a8mr4968619wrm.15.1692625915025; - Mon, 21 Aug 2023 06:51:55 -0700 (PDT) -Received: from ALPER-PC.. ([178.233.24.1]) by smtp.gmail.com with ESMTPSA id - r11-20020a5d4e4b000000b00317b063590fsm12600049wrt.55.2023.08.21.06.51.52 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Mon, 21 Aug 2023 06:51:54 -0700 (PDT) -From: Alper Nebi Yasak -To: u-boot@lists.denx.de -Cc: Kever Yang , - Jagan Teki , - Andre Przywara , - Svyatoslav Ryhel , Alexander Graf , - Philipp Tomsich , Andrew Davis , - Da Xue , Heinrich Schuchardt , - Patrice Chotard , - Patrick Delaunay , - Derald Woods , - Anatolij Gustschin , - uboot-stm32@st-md-mailman.stormreply.com, Simon Glass , - Matthias Brugger , u-boot-amlogic@groups.io, - Ilias Apalodimas , - Neil Armstrong , - Alper Nebi Yasak -Subject: [PATCH v5 13/13] video: Enable VIDEO_DAMAGE for drivers that need it -Date: Mon, 21 Aug 2023 16:51:10 +0300 -Message-Id: <20230821135111.3558478-14-alpernebiyasak@gmail.com> -X-Mailer: git-send-email 2.40.1 -In-Reply-To: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -References: <20230821135111.3558478-1-alpernebiyasak@gmail.com> -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.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Alexander Graf - -Some drivers call video_set_flush_dcache() to indicate that they want to -have the dcache flushed for the frame buffer. These drivers benefit from -our new video damage control, because we can reduce the amount of memory -that gets flushed significantly. - -This patch enables video damage control for all device drivers that call -video_set_flush_dcache() to make sure they benefit from it. - -Signed-off-by: Alexander Graf -[Alper: Add to VIDEO_TIDSS, imply instead of select] -Co-developed-by: Alper Nebi Yasak -Signed-off-by: Alper Nebi Yasak ---- - -Changes in v5: -- Imply VIDEO_DAMAGE for video drivers instead of selecting it -- Imply VIDEO_DAMAGE also for VIDEO_TIDSS - -Changes in v4: -- Add patch "video: Enable VIDEO_DAMAGE for drivers that need it" - - arch/arm/mach-omap2/omap3/Kconfig | 1 + - arch/arm/mach-sunxi/Kconfig | 1 + - drivers/video/Kconfig | 8 ++++++++ - drivers/video/exynos/Kconfig | 1 + - drivers/video/imx/Kconfig | 1 + - drivers/video/meson/Kconfig | 1 + - drivers/video/rockchip/Kconfig | 1 + - drivers/video/stm32/Kconfig | 1 + - drivers/video/tegra20/Kconfig | 1 + - drivers/video/tidss/Kconfig | 1 + - 10 files changed, 17 insertions(+) - -diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig -index 671e4791c67f..fd858f7b50f2 100644 ---- a/arch/arm/mach-omap2/omap3/Kconfig -+++ b/arch/arm/mach-omap2/omap3/Kconfig -@@ -113,6 +113,7 @@ config TARGET_NOKIA_RX51 - select CMDLINE_TAG - select INITRD_TAG - select REVISION_TAG -+ imply VIDEO_DAMAGE - - config TARGET_TAO3530 - bool "TAO3530" -diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig -index 9d5df2c10273..fb4478ea32e8 100644 ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -813,6 +813,7 @@ config VIDEO_SUNXI - depends on !SUN50I_GEN_H6 - select VIDEO - select DISPLAY -+ imply VIDEO_DAMAGE - imply VIDEO_DT_SIMPLEFB - default y - ---help--- -diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig -index b3fbd9d7d9ca..185dbb1f8390 100644 ---- a/drivers/video/Kconfig -+++ b/drivers/video/Kconfig -@@ -499,6 +499,7 @@ config VIDEO_LCD_ANX9804 - - config ATMEL_LCD - bool "Atmel LCD panel support" -+ imply VIDEO_DAMAGE - depends on ARCH_AT91 - - config ATMEL_LCD_BGR555 -@@ -508,6 +509,7 @@ config ATMEL_LCD_BGR555 - - config VIDEO_BCM2835 - bool "Display support for BCM2835" -+ imply VIDEO_DAMAGE - help - The graphics processor already sets up the display so this driver - simply checks the resolution and then sets up the frame buffer with -@@ -654,6 +656,7 @@ source "drivers/video/meson/Kconfig" - - config VIDEO_MVEBU - bool "Armada XP LCD controller" -+ imply VIDEO_DAMAGE - ---help--- - Support for the LCD controller integrated in the Marvell - Armada XP SoC. -@@ -688,6 +691,7 @@ config NXP_TDA19988 - - config ATMEL_HLCD - bool "Enable ATMEL video support using HLCDC" -+ imply VIDEO_DAMAGE - help - HLCDC supports video output to an attached LCD panel. - -@@ -764,6 +768,7 @@ source "drivers/video/tidss/Kconfig" - - config VIDEO_TEGRA124 - bool "Enable video support on Tegra124" -+ imply VIDEO_DAMAGE - help - Tegra124 supports many video output options including eDP and - HDMI. At present only eDP is supported by U-Boot. This option -@@ -778,6 +783,7 @@ source "drivers/video/imx/Kconfig" - - config VIDEO_MXS - bool "Enable video support on i.MX28/i.MX6UL/i.MX7 SoCs" -+ imply VIDEO_DAMAGE - help - Enable framebuffer driver for i.MX28/i.MX6UL/i.MX7 processors - -@@ -840,6 +846,7 @@ config VIDEO_DW_MIPI_DSI - - config VIDEO_SIMPLE - bool "Simple display driver for preconfigured display" -+ imply VIDEO_DAMAGE - help - Enables a simple generic display driver which utilizes the - simple-framebuffer devicetree bindings. -@@ -858,6 +865,7 @@ config VIDEO_DT_SIMPLEFB - - config VIDEO_MCDE_SIMPLE - bool "Simple driver for ST-Ericsson MCDE with preconfigured display" -+ imply VIDEO_DAMAGE - help - Enables a simple display driver for ST-Ericsson MCDE - (Multichannel Display Engine), which reads the configuration from -diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig -index 599d19d5ecc2..a2cf752aac03 100644 ---- a/drivers/video/exynos/Kconfig -+++ b/drivers/video/exynos/Kconfig -@@ -12,6 +12,7 @@ config EXYNOS_DP - - config EXYNOS_FB - bool "Exynos FIMD support" -+ imply VIDEO_DAMAGE - - config EXYNOS_MIPI_DSIM - bool "Exynos MIPI DSI support" -diff --git a/drivers/video/imx/Kconfig b/drivers/video/imx/Kconfig -index 34e8b640595b..5db3e5c0499e 100644 ---- a/drivers/video/imx/Kconfig -+++ b/drivers/video/imx/Kconfig -@@ -2,6 +2,7 @@ - config VIDEO_IPUV3 - bool "i.MX IPUv3 Core video support" - depends on VIDEO && (MX5 || MX6) -+ imply VIDEO_DAMAGE - help - This enables framebuffer driver for i.MX processors working - on the IPUv3(Image Processing Unit) internal graphic processor. -diff --git a/drivers/video/meson/Kconfig b/drivers/video/meson/Kconfig -index 3c2d72d019b8..fcf486ca0a3a 100644 ---- a/drivers/video/meson/Kconfig -+++ b/drivers/video/meson/Kconfig -@@ -8,5 +8,6 @@ config VIDEO_MESON - bool "Enable Amlogic Meson video support" - depends on VIDEO - select DISPLAY -+ imply VIDEO_DAMAGE - help - Enable Amlogic Meson Video Processing Unit video support. -diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig -index 01804dcb1cc8..0f4550a29e38 100644 ---- a/drivers/video/rockchip/Kconfig -+++ b/drivers/video/rockchip/Kconfig -@@ -11,6 +11,7 @@ - menuconfig VIDEO_ROCKCHIP - bool "Enable Rockchip Video Support" - depends on VIDEO -+ imply VIDEO_DAMAGE - help - Rockchip SoCs provide video output capabilities for High-Definition - Multimedia Interface (HDMI), Low-voltage Differential Signalling -diff --git a/drivers/video/stm32/Kconfig b/drivers/video/stm32/Kconfig -index 48066063e4c5..c354c402c288 100644 ---- a/drivers/video/stm32/Kconfig -+++ b/drivers/video/stm32/Kconfig -@@ -8,6 +8,7 @@ - menuconfig VIDEO_STM32 - bool "Enable STM32 video support" - depends on VIDEO -+ imply VIDEO_DAMAGE - help - STM32 supports many video output options including RGB and - DSI. This option enables these supports which can be used on -diff --git a/drivers/video/tegra20/Kconfig b/drivers/video/tegra20/Kconfig -index f5c4843e1191..2232b0b3ff53 100644 ---- a/drivers/video/tegra20/Kconfig -+++ b/drivers/video/tegra20/Kconfig -@@ -1,6 +1,7 @@ - config VIDEO_TEGRA20 - bool "Enable Display Controller support on Tegra20 and Tegra 30" - depends on OF_CONTROL -+ imply VIDEO_DAMAGE - help - T20/T30 support video output to an attached LCD panel as well as - other options such as HDMI. Only the LCD is supported in U-Boot. -diff --git a/drivers/video/tidss/Kconfig b/drivers/video/tidss/Kconfig -index 95086f3a5d66..3291b3ceb8d5 100644 ---- a/drivers/video/tidss/Kconfig -+++ b/drivers/video/tidss/Kconfig -@@ -11,6 +11,7 @@ - menuconfig VIDEO_TIDSS - bool "Enable TIDSS video support" - depends on VIDEO -+ imply VIDEO_DAMAGE - help - TIDSS supports video output options LVDS and - DPI . This option enables these supports which can be used on diff --git a/Allwinner-fix-booting-on-a-number-of-devices.patch b/Allwinner-fix-booting-on-a-number-of-devices.patch new file mode 100644 index 0000000..2b08e13 --- /dev/null +++ b/Allwinner-fix-booting-on-a-number-of-devices.patch @@ -0,0 +1,27 @@ +From b8ea3cebde98866b7cbb4e8f9bb6dfdee529a549 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Wed, 27 Aug 2025 00:23:28 +0100 +Subject: [PATCH] Allwinner: fix booting on a number of devices + +Revert "sunxi: enable MMU_PGPROT proper page table protection" + +This reverts commit 16cfccda4dbf0b53473b8212897f5c63bfbeb6e1. +--- + arch/arm/Kconfig | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 40368abc297..b8be270e4d7 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1207,7 +1207,6 @@ config ARCH_SUNXI + select DM_SPI_FLASH if SPI && MTD + select DM_KEYBOARD + select DM_SERIAL +- select MMU_PGPROT if ARM64 + select OF_BOARD_SETUP + select OF_CONTROL + select PINCTRL +-- +2.51.0 + diff --git a/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch b/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch new file mode 100644 index 0000000..a52ce84 --- /dev/null +++ b/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch @@ -0,0 +1,405 @@ +From patchwork Mon Jul 6 17:21:47 2026 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Torsten Duwe +X-Patchwork-Id: 2265604 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de + (client-ip=85.214.62.61; helo=phobos.denx.de; + envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) +Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB431Qwzz1xqc + for ; Tue, 07 Jul 2026 03:21:55 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 179C084942; + Mon, 6 Jul 2026 19:21:52 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Received: by phobos.denx.de (Postfix, from userid 109) + id 82ADE8490A; Mon, 6 Jul 2026 19:21:51 +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=-1.9 required=5.0 tests=BAYES_00, + RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham + autolearn_force=no version=3.4.2 +Received: from verein.lst.de (verein.lst.de [213.95.11.211]) + (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 9F24C846B4 + for ; Mon, 6 Jul 2026 19:21:49 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de +Received: by verein.lst.de (Postfix, from userid 2005) + id C934268B05; Mon, 6 Jul 2026 19:21:47 +0200 (CEST) +In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> +References: <20260706172028.C148E68BEB@verein.lst.de> +Subject: [PATCH v2 1/4] core: Skip parent device nodes without a DT reference + when looking for dma-ranges +To: Neil Armstrong , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + u-boot@lists.denx.de +Message-Id: <20260706172147.C934268B05@verein.lst.de> +Date: Mon, 6 Jul 2026 19:21:47 +0200 (CEST) +From: duwe@lst.de (Torsten Duwe) +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.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +If a device node got created dynamically, there is no guarantee that the +parent node has an associated device tree node which could specify dma +constraints. Especially PCI(e) enumeration adds intermediate "bus nodes", +also dynamically. + +Try harder to find the correct configuration by walking up the tree until +a DT association is found. + +Suggested-by: Neil Armstrong +Signed-off-by: Torsten Duwe +Reviewed-by: Peter Robinson +Tested-by: Peter Robinson +--- + drivers/core/device.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/drivers/core/device.c b/drivers/core/device.c +index d365204ba11..b6d00cf4714 100644 +--- a/drivers/core/device.c ++++ b/drivers/core/device.c +@@ -459,7 +459,19 @@ static int device_get_dma_constraints(struct udevice *dev) + u64 size = 0; + int ret; + +- if (!CONFIG_IS_ENABLED(DM_DMA) || !parent || !dev_has_ofnode(parent)) ++ if (!CONFIG_IS_ENABLED(DM_DMA) || !parent) ++ return 0; ++ ++ /* Look for the first node in the parent chain */ ++ while (parent) { ++ if (dev_has_ofnode(parent)) ++ break; ++ ++ parent = dev_get_parent(parent); ++ } ++ ++ /* No parents have a node, bail out */ ++ if (!parent) + return 0; + + /* + +From patchwork Mon Jul 6 17:21:50 2026 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Torsten Duwe +X-Patchwork-Id: 2265605 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.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=patchwork.ozlabs.org) +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) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB481pfXz1xqc + for ; Tue, 07 Jul 2026 03:22:00 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 9A59684994; + Mon, 6 Jul 2026 19:21:55 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Received: by phobos.denx.de (Postfix, from userid 109) + id EB7D384979; Mon, 6 Jul 2026 19:21:53 +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=-1.9 required=5.0 tests=BAYES_00, + RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham + autolearn_force=no version=3.4.2 +Received: from verein.lst.de (verein.lst.de [213.95.11.211]) + (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 EE61C846B4 + for ; Mon, 6 Jul 2026 19:21:51 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de +Received: by verein.lst.de (Postfix, from userid 2005) + id 464E868BEB; Mon, 6 Jul 2026 19:21:50 +0200 (CEST) +In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> +References: <20260706172028.C148E68BEB@verein.lst.de> +Subject: [PATCH v2 2/4] test: Add a unit test in phys_to_bus for dynamically + created device nodes +To: Neil Armstrong , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + u-boot@lists.denx.de +Message-Id: <20260706172150.464E868BEB@verein.lst.de> +Date: Mon, 6 Jul 2026 19:21:50 +0200 (CEST) +From: duwe@lst.de (Torsten Duwe) +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.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +In order to test whether device_get_dma_constraints() is now able to skip +device nodes without a DT association, temporarily remove those on 2 newly- +created nodes. + +Signed-off-by: Torsten Duwe +--- + +This test indeed makes a different whether the previous change is +applied or not, but *only* reliably for the non-flat-tree case (!?). +On the flat tree, it always fails after (reverse) applying it. + +Either the previous patch is incomplete, or, more likely, the test +assumptions here are not all valid. Suggestions welcome (especially +how to create device nodes from a device tree without a reference to +their origin ;-) + +--- + arch/sandbox/dts/test.dts | 9 +++++++++ + test/dm/phys2bus.c | 25 ++++++++++++++++++++++++- + 2 files changed, 33 insertions(+), 1 deletion(-) + +diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts +index 0887de4333b..1d92e85c739 100644 +--- a/arch/sandbox/dts/test.dts ++++ b/arch/sandbox/dts/test.dts +@@ -656,6 +656,15 @@ + subnode@0 { + compatible = "denx,u-boot-fdt-test"; + }; ++ bus@7 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "denx,u-boot-test-bus"; ++ ++ subnode@8 { ++ compatible = "denx,u-boot-fdt-test"; ++ }; ++ }; + }; + + mmio-bus@1 { +diff --git a/test/dm/phys2bus.c b/test/dm/phys2bus.c +index 67f33904943..858ed5410e2 100644 +--- a/test/dm/phys2bus.c ++++ b/test/dm/phys2bus.c +@@ -15,7 +15,8 @@ + + static int dm_test_phys_to_bus(struct unit_test_state *uts) + { +- struct udevice *dev; ++ struct udevice *dev, *pdev; ++ ofnode psave, nsave; + ofnode node; + + node = ofnode_path("/mmio-bus@0"); +@@ -31,6 +32,29 @@ static int dm_test_phys_to_bus(struct unit_test_state *uts) + ut_asserteq_addr((void*)0x1003ffffULL, (void*)dev_phys_to_bus(dev, 0x3ffff)); + ut_asserteq_addr((void*)0x3ffffULL, (void*)(ulong)dev_bus_to_phys(dev, 0x1003ffff)); + ++#if CONFIG_IS_ENABLED(OF_REAL) ++ /* dma-ranges are on the grandparent bus node, ++ * OF nodes neither here nor at parent ++ */ ++ node = ofnode_path("/mmio-bus@0/bus@7"); ++ ut_assert(ofnode_valid(node)); ++ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_BUS, node, &pdev)); ++ ++ /* pretend the devices were discovered dynamically and have no OF node */ ++ psave = pdev->node_; ++ pdev->node_.np = NULL; ++ node = ofnode_path("/mmio-bus@0/bus@7/subnode@8"); ++ ut_assert(ofnode_valid(node)); ++ nsave = dev->node_; ++ dev->node_.np = NULL; ++ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_FDT, node, &dev)); ++ ++ ut_asserteq_addr((void *)0x1003ffffULL, (void *)dev_phys_to_bus(dev, 0x3ffff)); ++ ut_asserteq_addr((void *)0x3ffffULL, (void *)(ulong)dev_bus_to_phys(dev, 0x1003ffff)); ++ ++ pdev->node_ = psave; ++ dev->node_ = nsave; ++#endif + return 0; + } + DM_TEST(dm_test_phys_to_bus, UTF_SCAN_PDATA | UTF_SCAN_FDT); + +From patchwork Mon Jul 6 17:21:54 2026 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Torsten Duwe +X-Patchwork-Id: 2265607 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.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=patchwork.ozlabs.org) +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) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB4R378Lz1xqc + for ; Tue, 07 Jul 2026 03:22:15 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 3FDAE8490A; + Mon, 6 Jul 2026 19:21:59 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Received: by phobos.denx.de (Postfix, from userid 109) + id 17F418490A; Mon, 6 Jul 2026 19:21:58 +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=-1.9 required=5.0 tests=BAYES_00, + RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham + autolearn_force=no version=3.4.2 +Received: from verein.lst.de (verein.lst.de [213.95.11.211]) + (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 1D593849A4 + for ; Mon, 6 Jul 2026 19:21:56 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=lst.de +Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de +Received: by verein.lst.de (Postfix, from userid 2005) + id B506B68CFE; Mon, 6 Jul 2026 19:21:54 +0200 (CEST) +In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> +References: <20260706172028.C148E68BEB@verein.lst.de> +Subject: [PATCH v2 4/4] configs: enable NVMe +To: Neil Armstrong , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + u-boot@lists.denx.de +Message-Id: <20260706172154.B506B68CFE@verein.lst.de> +Date: Mon, 6 Jul 2026 19:21:54 +0200 (CEST) +From: duwe@lst.de (Torsten Duwe) +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.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +Enable NVMe in the Raspberry Pi 64-Bit default config and scan for devices. + +Signed-off-by: Torsten Duwe +Reviewed-by: Peter Robinson +Tested-by: Peter Robinson +--- + configs/rpi_arm64_defconfig | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig +index cdcf05ea6db..fb0fdce1d7f 100644 +--- a/configs/rpi_arm64_defconfig ++++ b/configs/rpi_arm64_defconfig +@@ -16,7 +16,7 @@ CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_FDT_SIMPLEFB=y + CONFIG_USE_PREBOOT=y +-CONFIG_PREBOOT="pci enum; usb start;" ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_SYS_PBSIZE=1049 + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +@@ -44,6 +44,7 @@ CONFIG_MMC_SDHCI_SDMA=y + CONFIG_MMC_SDHCI_BCM2835=y + CONFIG_MMC_SDHCI_BCMSTB=y + CONFIG_BCMGENET=y ++CONFIG_NVME_PCI=y + CONFIG_PCI_BRCMSTB=y + CONFIG_PINCTRL=y + # CONFIG_PINCTRL_GENERIC is not set diff --git a/JetsonTX2-Fix-upstream-device-tree-naming.patch b/JetsonTX2-Fix-upstream-device-tree-naming.patch new file mode 100644 index 0000000..14242ce --- /dev/null +++ b/JetsonTX2-Fix-upstream-device-tree-naming.patch @@ -0,0 +1,50 @@ +From 4ee5ba36570d94ce27e4023f15b8b3a6b8b9daf9 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Mon, 13 Oct 2025 21:41:13 +0100 +Subject: [PATCH] config: JetsonTX2: Fix upstream device tree naming + +The upstream naming for the Jetson TX2 is p2771-0000 so fix +the device tree name so the firmware will find the right +name on disk. + +Signed-off-by: Peter Robinson +--- + arch/arm/dts/Makefile | 2 +- + .../{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} | 0 + configs/p2771-0000-500_defconfig | 2 +- + 3 files changed, 2 insertions(+), 2 deletions(-) + rename arch/arm/dts/{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} (100%) + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 7c8cf3a5a1d..86a7b4fda35 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -134,7 +134,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \ + tegra124-venice2.dtb \ + tegra124-xiaomi-mocha.dtb \ + tegra186-p2771-0000-000.dtb \ +- tegra186-p2771-0000-500.dtb \ ++ tegra186-p2771-0000.dtb \ + tegra210-p2371-0000.dtb \ + tegra210-p2371-2180.dtb \ + tegra210-p2571.dtb \ +diff --git a/arch/arm/dts/tegra186-p2771-0000-500.dts b/arch/arm/dts/tegra186-p2771-0000.dts +similarity index 100% +rename from arch/arm/dts/tegra186-p2771-0000-500.dts +rename to arch/arm/dts/tegra186-p2771-0000.dts +diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig +index 42043277e2d..e1e5c47ddfa 100644 +--- a/configs/p2771-0000-500_defconfig ++++ b/configs/p2771-0000-500_defconfig +@@ -7,7 +7,7 @@ CONFIG_TEXT_BASE=0x80080000 + CONFIG_NR_DRAM_BANKS=1026 + CONFIG_ENV_SIZE=0x2000 + CONFIG_ENV_OFFSET=0xFFFFE000 +-CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500" ++CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000" + CONFIG_SYS_BOOTM_LEN=0x800000 + CONFIG_SYS_LOAD_ADDR=0x80080000 + CONFIG_TEGRA186=y +-- +2.51.0 + diff --git a/USB-PD-TCPM-improvements.patch b/USB-PD-TCPM-improvements.patch new file mode 100644 index 0000000..f84e6f3 --- /dev/null +++ b/USB-PD-TCPM-improvements.patch @@ -0,0 +1,717 @@ +From patchwork Wed Feb 26 18:44:44 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sebastian Reichel +X-Patchwork-Id: 2052544 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=collabora.com header.i=@collabora.com + header.a=rsa-sha256 header.s=mail header.b=IthL1Z+m; + dkim-atps=neutral +Authentication-Results: legolas.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=patchwork.ozlabs.org) +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 ECDSA (secp384r1)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M03Hhjz1yCp + for ; Thu, 27 Feb 2025 05:45:32 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id BFF7680FF0; + Wed, 26 Feb 2025 19:45:16 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com + header.b="IthL1Z+m"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 7614F810F9; Wed, 26 Feb 2025 19:45:13 +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,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, + SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 +Received: from bali.collaboradmins.com (bali.collaboradmins.com + [IPv6:2a01:4f8:201:9162::2]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 2173180FDE + for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=sebastian.reichel@collabora.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; + s=mail; t=1740595507; + bh=Fnp6a8opSCXiH5NJdu5uivbBBZF3pe1CXyluh8+n8/c=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=IthL1Z+mDeIRy9MWEa0lGyJWuHk/Pu+yUpLly7RG6NIpC0lCgla3ssiy2x+8/G+bz + DWjrKUMxgWtqfjfffRiKEJZ6Z2sAXJ1ePvDmMtbGoolWSrzsV2+cWh0byYrEBuVBe9 + Vp0ye7gJ4Wt610s4QHa4xoYcm7h9KGmE3IEjb+XYFv1HMJIOoACl04BwkLctza1KBr + XlIqC+snvRP/yQxa2+6RYGXgQD5JnJxCM1orXVIJxyyJxTzb3XgNir60Gb4HI9724H + LDZy0Hq7NQ1zF0h1yVUOklDotw17isbNoI4K3JCExR+r7GsdESsGY6cwAbZY71iWlf + OsSSrV6TZtAMg== +Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de + [91.249.76.32]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature RSA-PSS (4096 bits)) + (No client certificate requested) (Authenticated sender: sre) + by bali.collaboradmins.com (Postfix) with ESMTPSA id A18CC17E0881; + Wed, 26 Feb 2025 19:45:07 +0100 (CET) +Received: by jupiter.universe (Postfix, from userid 1000) + id 32E35480034; Wed, 26 Feb 2025 19:45:07 +0100 (CET) +From: Sebastian Reichel +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +Subject: [PATCH v2 1/4] usb: tcpm: improve handling of some power-supplies +Date: Wed, 26 Feb 2025 19:44:44 +0100 +Message-ID: <20250226184506.64114-2-sebastian.reichel@collabora.com> +X-Mailer: git-send-email 2.47.2 +In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> +References: <20250226184506.64114-1-sebastian.reichel@collabora.com> +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.8 at phobos.denx.de +X-Virus-Status: Clean + +When the Rock 5B is booted with the current TCPM with its power supplied +by a "Cambrionix PDSync-C4" port it reaches the power-supply ready state. +Once that has happened the hub starts sending GetSinkCap messages, but +U-Boot already stopped processing PD messages. After retrying a bunch of +times the hub instead sends soft resets. Since U-Boot will also not +react to them, the USB hub will follow-up with a hard reset and that +cuts off the supply voltage. + +Since the state machine is already prepared to handle GetSinkCap +messages, try to avoid this by handling incoming messages for another +50ms after reaching the ready state. + +Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") +Signed-off-by: Sebastian Reichel +--- + drivers/usb/tcpm/tcpm.c | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c +index 0aee57cb2f4a..b754b4dcd0b5 100644 +--- a/drivers/usb/tcpm/tcpm.c ++++ b/drivers/usb/tcpm/tcpm.c +@@ -2229,6 +2229,17 @@ static int tcpm_port_init(struct udevice *dev) + return 0; + } + ++static inline void tcpm_poll_one_event(struct udevice *dev) ++{ ++ const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev); ++ struct tcpm_port *port = dev_get_uclass_plat(dev); ++ ++ drvops->poll_event(dev); ++ port->poll_event_cnt++; ++ udelay(500); ++ tcpm_check_and_run_delayed_work(dev); ++} ++ + static void tcpm_poll_event(struct udevice *dev) + { + const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev); +@@ -2242,15 +2253,25 @@ static void tcpm_poll_event(struct udevice *dev) + (port->state == SNK_READY || port->state == SRC_READY)) + break; + +- drvops->poll_event(dev); +- port->poll_event_cnt++; +- udelay(500); +- tcpm_check_and_run_delayed_work(dev); ++ tcpm_poll_one_event(dev); + } + +- if (port->state != SNK_READY && port->state != SRC_READY) ++ /* ++ * Some power-supplies send GetSinkCap shortly after they are ready. ++ * If they do not receive a response after a few retries they will issue ++ * a soft-reset followed by a hard reset, which kills the board power. ++ * Let's poll for 50ms after reaching the ready state to check if the ++ * power-supply wants something from us. ++ */ ++ if (port->state == SNK_READY) { ++ port->poll_event_cnt = 0; ++ ++ while (port->poll_event_cnt < 100) ++ tcpm_poll_one_event(dev); ++ } else { + dev_warn(dev, "TCPM: exit in state %s\n", + tcpm_states[port->state]); ++ } + + /* + * At this time, call the callback function of the respective pd chip + +From patchwork Wed Feb 26 18:44:45 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sebastian Reichel +X-Patchwork-Id: 2052546 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=collabora.com header.i=@collabora.com + header.a=rsa-sha256 header.s=mail header.b=hgX6o5vZ; + dkim-atps=neutral +Authentication-Results: legolas.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=patchwork.ozlabs.org) +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 ECDSA (secp384r1)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33MJ5sFGz1yCp + for ; Thu, 27 Feb 2025 05:45:48 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 69A29811C5; + Wed, 26 Feb 2025 19:45:17 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com + header.b="hgX6o5vZ"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 832B180FB9; Wed, 26 Feb 2025 19:45:14 +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,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, + RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, + SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 +Received: from bali.collaboradmins.com (bali.collaboradmins.com + [148.251.105.195]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 2178380FF0 + for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=sebastian.reichel@collabora.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; + s=mail; t=1740595507; + bh=H/gQCZCWVmLNRIaBLvWsE35SaDMWvta2+rTkymkHQJE=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=hgX6o5vZwM72CR2hgo76tgo2eE00qHM7oNja381ACl8gIUUVioy8RTeqXtum89tBf + aIwKm/oNQNvGxy92pX5/1Jg/MwYZKS8jDukz6ZgsLKu22rJXf58FFoV095AcEkUMB2 + lrO4KJgFW/x1FK8GmSVSXXH+iUYJLkzsfZKgHKoQYHZcVXJRgFjHR5ytGKsA/fq4el + 7Wrx3lmLNjL7fYlDF5AyY+Wl6hqzjDq58nFedXHv8TEHx6fzfB0IBzOL/F8bGqVcyy + lal7bjJvMPoA9zfgIC77R1neWktg5FSro75YciSRSj9lmMNCmESnSPCgsZ4wBW0V6f + ppD77gOtjDfLQ== +Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de + [91.249.76.32]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature RSA-PSS (4096 bits)) + (No client certificate requested) (Authenticated sender: sre) + by bali.collaboradmins.com (Postfix) with ESMTPSA id 9725D17E087F; + Wed, 26 Feb 2025 19:45:07 +0100 (CET) +Received: by jupiter.universe (Postfix, from userid 1000) + id 34511480037; Wed, 26 Feb 2025 19:45:07 +0100 (CET) +From: Sebastian Reichel +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +Subject: [PATCH v2 2/4] usb: tcpm: avoid resets for missing source capability + messages +Date: Wed, 26 Feb 2025 19:44:45 +0100 +Message-ID: <20250226184506.64114-3-sebastian.reichel@collabora.com> +X-Mailer: git-send-email 2.47.2 +In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> +References: <20250226184506.64114-1-sebastian.reichel@collabora.com> +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.8 at phobos.denx.de +X-Virus-Status: Clean + +The current TCPM code implements source capability message handling +according to the USB-PD specification. Unfortunately some USB PD +sources do not properly follow the specification and do not send +source capability messages after a soft reset when they already +negotiated a specific contract before. The currently implemented way +(and what is described in the specificiation) to resolve this problem +is triggering a hard reset. + +But a hard reset is fatal on batteryless platforms powered via USB-C PD, +since that removes VBUS for some time. Since this is triggered at boot +time, the system may get stuck in a boot loop. + +For example I noticed the following behaviour on a Radxa Rock 5B +combined with an affected power-supply: + +1. The system is booted up with current code +2. A reboot is requested +3. U-Boot TCPM / fusb302 driver sends soft reset and waits for the + source capability message +4. No new source capability message is send by the power-supply + after the soft reset +5. U-Boot sends a hard reset +6. The board resets, but the fusb302 registers are not reset. This + is because of a hardware glitch. The serial pins are high when + no data is exchanged. Apparently the RK3588 has protection diodes, + which leak some voltage into the power-domain. The Rock 5B serial + pins and the fusb302 are using the same 3.3V power domain and the + leaked voltage is enough to keep the fusb302 registers alive. +7. After the hard reset the power-supply sends another source capability + message, which is auto-acked by fusb302 (because the register state + is kept) even though the U-Boot driver has not yet probed. Once the + U-Boot driver probes it sends another soft reset and waits for a new + source capability message, which never arrives. + +Fortunately the affected power-supplies (I have two setups showing this +behaviour) support sending a source capability message when explicitly +being asked. Thus an easy workaround to handle this is deviating from +the USB-PD specification and sending a Get_Source_Cap message and +waiting some time longer before doing the hard reset. + +Note, that I recently added the same workaround to the Linux kernel +with a slightly different rationale (since it needs to take over from +U-Boot). + +Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") +Signed-off-by: Sebastian Reichel +--- + drivers/usb/tcpm/tcpm-internal.h | 1 + + drivers/usb/tcpm/tcpm.c | 32 +++++++++++++++++++++++++++++--- + 2 files changed, 30 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/tcpm/tcpm-internal.h b/drivers/usb/tcpm/tcpm-internal.h +index 561442090027..4861f4d13866 100644 +--- a/drivers/usb/tcpm/tcpm-internal.h ++++ b/drivers/usb/tcpm/tcpm-internal.h +@@ -30,6 +30,7 @@ + S(SNK_DISCOVERY_DEBOUNCE), \ + S(SNK_DISCOVERY_DEBOUNCE_DONE), \ + S(SNK_WAIT_CAPABILITIES), \ ++ S(SNK_WAIT_CAPABILITIES_TIMEOUT), \ + S(SNK_NEGOTIATE_CAPABILITIES), \ + S(SNK_TRANSITION_SINK), \ + S(SNK_TRANSITION_SINK_VBUS), \ +diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c +index b754b4dcd0b5..786d92fa4c6f 100644 +--- a/drivers/usb/tcpm/tcpm.c ++++ b/drivers/usb/tcpm/tcpm.c +@@ -1424,7 +1424,8 @@ static inline enum tcpm_state hard_reset_state(struct tcpm_port *port) + return ERROR_RECOVERY; + if (port->pwr_role == TYPEC_SOURCE) + return SRC_UNATTACHED; +- if (port->state == SNK_WAIT_CAPABILITIES) ++ if (port->state == SNK_WAIT_CAPABILITIES || ++ port->state == SNK_WAIT_CAPABILITIES_TIMEOUT) + return SNK_READY; + return SNK_UNATTACHED; + } +@@ -1650,10 +1651,35 @@ static void run_state_machine(struct udevice *dev) + tcpm_set_state(dev, SOFT_RESET_SEND, + PD_T_SINK_WAIT_CAP); + } else { +- tcpm_set_state(dev, hard_reset_state(port), +- PD_T_SINK_WAIT_CAP); ++ if (!port->self_powered) ++ tcpm_set_state(dev, SNK_WAIT_CAPABILITIES_TIMEOUT, ++ PD_T_SINK_WAIT_CAP); ++ else ++ tcpm_set_state(dev, hard_reset_state(port), ++ PD_T_SINK_WAIT_CAP); + } + break; ++ case SNK_WAIT_CAPABILITIES_TIMEOUT: ++ /* ++ * There are some USB PD sources in the field, which do not ++ * properly implement the specification and fail to start ++ * sending Source Capability messages after a soft reset. The ++ * specification suggests to do a hard reset when no Source ++ * capability message is received within PD_T_SINK_WAIT_CAP, ++ * but that might effectively kil the machine's power source. ++ * ++ * This slightly diverges from the specification and tries to ++ * recover from this by explicitly asking for the capabilities ++ * using the Get_Source_Cap control message before falling back ++ * to a hard reset. The control message should also be supported ++ * and handled by all USB PD source and dual role devices ++ * according to the specification. ++ */ ++ if (tcpm_pd_send_control(dev, PD_CTRL_GET_SOURCE_CAP)) ++ tcpm_set_state_cond(dev, hard_reset_state(port), 0); ++ else ++ tcpm_set_state(dev, hard_reset_state(port), PD_T_SINK_WAIT_CAP); ++ break; + case SNK_NEGOTIATE_CAPABILITIES: + port->pd_capable = true; + port->hard_reset_count = 0; + +From patchwork Wed Feb 26 18:44:46 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sebastian Reichel +X-Patchwork-Id: 2052545 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=collabora.com header.i=@collabora.com + header.a=rsa-sha256 header.s=mail header.b=BxTv7Lfo; + dkim-atps=neutral +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de + (client-ip=85.214.62.61; helo=phobos.denx.de; + envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) +Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M971h7z1yCp + for ; Thu, 27 Feb 2025 05:45:41 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 1B09C8118B; + Wed, 26 Feb 2025 19:45:17 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com + header.b="BxTv7Lfo"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 4399E810F9; Wed, 26 Feb 2025 19:45:14 +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,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, + SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 +Received: from bali.collaboradmins.com (bali.collaboradmins.com + [IPv6:2a01:4f8:201:9162::2]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 2163F80FB9 + for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=sebastian.reichel@collabora.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; + s=mail; t=1740595507; + bh=7OaDpd2idE5ETWAiOZte0kuOU6ZYitEVWkDgDmqaQU8=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=BxTv7LfoAae43YSXPquVPmmwStgQirXCxaSBD0fo554R5O/si/Iif5L+zXXJocATJ + z7+I7ZKbknkTeVyzoRDCXvXIVz2bFdTRWQN4Z2iwJbVI1covAv/Gn4wIE2Q6hbNKbU + qV5AKg7gvrKkbztbo7N9bHNjkrlAbd8B4Ew3SR8FM46DMAOwNzVsoX3rLMcPtlWzHj + 4OBKCx22H/4ASIWjMbYoDE09DyQ+CPOf8JcX8OPwFcH9j6vW6cEWvyjiAyDj6LnwOq + KD+ZYVIkWhkIzAkE2NHB2IpA4xlxW8i18BJzNBD8N1eBx/HCgb0camb4KanY1Hta/d + 4ipLyuFaCkMog== +Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de + [91.249.76.32]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest + SHA256) + (No client certificate requested) (Authenticated sender: sre) + by bali.collaboradmins.com (Postfix) with ESMTPSA id 816AA17E0861; + Wed, 26 Feb 2025 19:45:07 +0100 (CET) +Received: by jupiter.universe (Postfix, from userid 1000) + id 361F2480038; Wed, 26 Feb 2025 19:45:07 +0100 (CET) +From: Sebastian Reichel +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +Subject: [PATCH v2 3/4] usb: tcpm: print error on hard reset +Date: Wed, 26 Feb 2025 19:44:46 +0100 +Message-ID: <20250226184506.64114-4-sebastian.reichel@collabora.com> +X-Mailer: git-send-email 2.47.2 +In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> +References: <20250226184506.64114-1-sebastian.reichel@collabora.com> +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.8 at phobos.denx.de +X-Virus-Status: Clean + +A USB-PD hard reset involves removing the voltage from VBUS for some +time. So basically it has the same effect as removing the USB-C plug +for a short moment. If the machine is powered from the USB-C port and +does not have a fallback supply (e.g. a battery), this will result in +a full machine reset due to power loss. + +Ideally we want to avoid triggering a hard reset on these boards. A +non-working USB-C port is probably better than unplanned reboots. But +boards with a backup supply should do the hard reset to get everything +working again. + +In theory it would be enough to check the self_powered property, but +it seems the property might not be configured consistently enough in +system firmwares. + +USB-PD hard resets should happen rarely in general, so let's at least +print an error message before the potential board reset happens. This +is also useful, since it immediately gives away which device triggered +the hard reset. + +Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") +Signed-off-by: Sebastian Reichel +--- + drivers/usb/tcpm/tcpm.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c +index 786d92fa4c6f..909fe2ef4fcb 100644 +--- a/drivers/usb/tcpm/tcpm.c ++++ b/drivers/usb/tcpm/tcpm.c +@@ -1711,6 +1711,8 @@ static void run_state_machine(struct udevice *dev) + + /* Hard_Reset states */ + case HARD_RESET_SEND: ++ if (!port->self_powered && port->port_type == TYPEC_PORT_SNK) ++ dev_err(dev, "Initiating hard-reset, which might result in machine power-loss.\n"); + tcpm_pd_transmit(dev, TCPC_TX_HARD_RESET, NULL); + tcpm_set_state(dev, HARD_RESET_START, 0); + port->wait_dr_swap_message = false; + +From patchwork Wed Feb 26 18:44:47 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sebastian Reichel +X-Patchwork-Id: 2052542 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=collabora.com header.i=@collabora.com + header.a=rsa-sha256 header.s=mail header.b=K4mNmlOy; + dkim-atps=neutral +Authentication-Results: legolas.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=patchwork.ozlabs.org) +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 ECDSA (secp384r1)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33Lk40FPz1yCp + for ; Thu, 27 Feb 2025 05:45:18 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id DAFC780FF2; + Wed, 26 Feb 2025 19:45:12 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com + header.b="K4mNmlOy"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 56A22810F9; Wed, 26 Feb 2025 19:45:11 +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,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, + SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 +Received: from bali.collaboradmins.com (bali.collaboradmins.com + [IPv6:2a01:4f8:201:9162::2]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 217E080FF2 + for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=collabora.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=sebastian.reichel@collabora.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; + s=mail; t=1740595507; + bh=FeXZr6pfjIqGXvnsLHDigD702EmgVNH91IWVsD16udQ=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=K4mNmlOycXzLuJnNeDxyXLVCeZWNr//ycRqDt3ld9634ThDvJ0+y49X3z2nYW+fei + HCqH2AoFiXj7khjiFpwCA4xOlYaTrF9yb0M9ApRxJ8vGuslNIK2k9osj8IJMoWmY8S + fEez4H6Wso4VamCnXKCze2G5np5mhola5QxSnIJ2CXdFP9TM1x54P+XyeJMX6IZK0X + lpZ0R8mACHGgXnkBASRMbo0CnLfSVrUgA83A0FHT7UgxfW8399wHol/FBakg5WS8nt + 47154TDW4ikoGF4dHBeD0KemJSR7I4F+nnUVQfgg8sXZKVm4yilBT+yx3WWBVCjQDl + 3igqfexnaUKnA== +Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de + [91.249.76.32]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest + SHA256) + (No client certificate requested) (Authenticated sender: sre) + by bali.collaboradmins.com (Postfix) with ESMTPSA id 7FBB317E065A; + Wed, 26 Feb 2025 19:45:07 +0100 (CET) +Received: by jupiter.universe (Postfix, from userid 1000) + id 37B6A480039; Wed, 26 Feb 2025 19:45:07 +0100 (CET) +From: Sebastian Reichel +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +Subject: [PATCH v2 4/4] usb: tcpm: improve data role mismatch error recovery +Date: Wed, 26 Feb 2025 19:44:47 +0100 +Message-ID: <20250226184506.64114-5-sebastian.reichel@collabora.com> +X-Mailer: git-send-email 2.47.2 +In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> +References: <20250226184506.64114-1-sebastian.reichel@collabora.com> +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.8 at phobos.denx.de +X-Virus-Status: Clean + +On Radxa ROCK 5B I managed to get U-Boot into an endless loop of +printing + +fusb302 usb-typec@22: TCPM: data role mismatch, initiating error recovery + +messages by changing the data role in Linux and then rebooting the +system. This is happening because the external device (A cheap USB-C hub +powered through a USB-C PD power-supply) kept its state and the error +recovery path for non self-powered devices is not enough to change it. + +Avoid this by swapping our own data role when the error recovery stage +is reached for a port, which is not self-powered. Right now data support +is limited anyways and once proper support is added we can use the data +role swap request to get the desired data direction after the initial +negotiation completed. + +Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") +Signed-off-by: Sebastian Reichel +--- + drivers/usb/tcpm/tcpm.c | 30 +++++++++++++++++++++++++++--- + 1 file changed, 27 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c +index 909fe2ef4fcb..12d66d470f9a 100644 +--- a/drivers/usb/tcpm/tcpm.c ++++ b/drivers/usb/tcpm/tcpm.c +@@ -833,6 +833,28 @@ static void tcpm_pd_ctrl_request(struct udevice *dev, + } + } + ++static void tcpm_recover_data_role_mismatch(struct udevice *dev) ++{ ++ struct tcpm_port *port = dev_get_uclass_plat(dev); ++ ++ dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n"); ++ if (port->self_powered) { ++ tcpm_set_state(dev, ERROR_RECOVERY, 0); ++ return; ++ } ++ ++ /* ++ * The error recovery will not help for devices, which are not ++ * self-powered because the error recovery avoids killing the board ++ * power. Since this can happen early on sending ++ * a DR_SWAP request is not sensible. Instead let's change our own ++ * data role. It can be swapped back once USB-PD reached the ready ++ * state. ++ */ ++ tcpm_set_roles(dev, true, port->pwr_role, ++ port->data_role == TYPEC_HOST ? TYPEC_DEVICE : TYPEC_HOST); ++} ++ + static void tcpm_pd_rx_handler(struct udevice *dev, + const struct pd_message *msg) + { +@@ -867,9 +889,11 @@ static void tcpm_pd_rx_handler(struct udevice *dev, + remote_is_host = !!(le16_to_cpu(msg->header) & PD_HEADER_DATA_ROLE); + local_is_host = port->data_role == TYPEC_HOST; + if (remote_is_host == local_is_host) { +- dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n"); +- tcpm_set_state(dev, ERROR_RECOVERY, 0); +- } else { ++ tcpm_recover_data_role_mismatch(dev); ++ local_is_host = port->data_role == TYPEC_HOST; ++ } ++ ++ if (remote_is_host != local_is_host) { + if (cnt) + tcpm_pd_data_request(dev, msg); + else diff --git a/aarch64-boards b/aarch64-boards index 63adc19..366d0c8 100644 --- a/aarch64-boards +++ b/aarch64-boards @@ -1,19 +1,23 @@ a64-olinuxino +a64-olinuxino-emmc amarula_a64_relic +anbernic_rg35xx_h700 apple_m1 bananapi_m2_plus_h5 bananapi_m64 beelink_gs1 dragonboard410c dragonboard820c -dragonboard845c eaidk-610-rk3399 +emlid_neutis_n5_devboard +evb-px5 evb-rk3328 evb-rk3399 ficus-rk3399 firefly-rk3399 geekbox hikey +hmibsc khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 @@ -39,23 +43,30 @@ nanopi_neo2 nanopi-neo4-rk3399 nanopi_neo_plus2 nanopi_r1s_h5 +nanopi-r2c-plus-rk3328 +nanopi-r2c-rk3328 +nanopi-r2s-plus-rk3328 nanopi-r2s-rk3328 nanopi-r4s-rk3399 +oceanic_5205_5inmfd odroid-c2 orangepi_3 orangepi_lite2 orangepi_one_plus orangepi_pc2 orangepi_prime +orangepi-r1-plus-lts-rk3328 +orangepi-r1-plus-rk3328 orangepi-rk3399 orangepi_win orangepi_zero2 +orangepi_zero2w +orangepi_zero3 orangepi_zero_plus orangepi_zero_plus2 p212 p2371-2180 p2771-0000-500 -p3450-0000 pine64-lts pine64_plus pinebook @@ -66,23 +77,30 @@ pinephone-pro-rk3399 pinetab poplar puma-rk3399 +qcm6490 +qcom +qcom_qcs8300 +qcom_qcs9100 +qemu_arm64 +qemu_arm64_lwip roc-cc-rk3328 +rock-4c-plus-rk3399 +rock-4se-rk3399 rock64-rk3328 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-e-rk3328 +rock-pi-e-v3-rk3328 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399 -rpi_3 -rpi_4 rpi_arm64 sopine_baseboard -starqltechn tanix_tx6 teres_i +transpeed-8k618-t turris_mox vexpress_aemv8a_juno -xilinx_zynqmp_virt +x96_mate diff --git a/disable-VBE-by-default.patch b/disable-VBE-by-default.patch index dffa9fc..1f1b710 100644 --- a/disable-VBE-by-default.patch +++ b/disable-VBE-by-default.patch @@ -1,10 +1,14 @@ -From 02513d9ecc38d11ffc051ed59529e11f82164785 Mon Sep 17 00:00:00 2001 +From d9e3a49bc2a29922da5bddd95772279f6edba802 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 18 Aug 2023 13:28:05 +0100 Subject: [PATCH] disable VBE by default -Fedora doesn't support the VBE boot method, disable it -to reduce size and remove a possible boot attack vector. +The VBE protocol needs explicit device support and as +such isn't particularly useful by itself without that, +it also adds size and the potential of an attack vector +so devices that wish to use this protocol should +explicitly opt in to it like all other large features +in U-Boot. Signed-off-by: Peter Robinson --- @@ -12,10 +16,10 @@ Signed-off-by: Peter Robinson 1 file changed, 1 deletion(-) diff --git a/boot/Kconfig b/boot/Kconfig -index e8fb03b8016..467b09e2350 100644 +index 30eb5b328d7..e8c3fbcb11d 100644 --- a/boot/Kconfig +++ b/boot/Kconfig -@@ -526,7 +526,6 @@ config BOOTMETH_EFILOADER +@@ -635,7 +635,6 @@ config BOOTMETH_QFW config BOOTMETH_VBE bool "Bootdev support for Verified Boot for Embedded" depends on FIT @@ -24,5 +28,5 @@ index e8fb03b8016..467b09e2350 100644 select EVENT help -- -2.41.0 +2.49.0 diff --git a/fix-release-rev.patch b/fix-release-rev.patch deleted file mode 100644 index ad78eeb..0000000 --- a/fix-release-rev.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- u-boot-2023.07/Makefile.orig 2023-07-11 11:47:16.996315851 +0100 -+++ u-boot-2023.07/Makefile 2023-07-11 11:47:31.049391730 +0100 -@@ -3,7 +3,7 @@ - VERSION = 2023 - PATCHLEVEL = 07 - SUBLEVEL = --EXTRAVERSION = -rc6 -+EXTRAVERSION = - NAME = - - # *DOCUMENTATION* diff --git a/p3450-fix-board.patch b/p3450-fix-board.patch new file mode 100644 index 0000000..74475d5 --- /dev/null +++ b/p3450-fix-board.patch @@ -0,0 +1,25 @@ +From c9b65320d64a60cde74c4c1f9cb4a05198a456c2 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Wed, 10 Sep 2025 13:27:52 +0100 +Subject: [PATCH] further size reductions + +--- + configs/p3450-0000_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig +index 2ebcf8b83fc..a5e717a02ed 100644 +--- a/configs/p3450-0000_defconfig ++++ b/configs/p3450-0000_defconfig +@@ -27,6 +27,8 @@ CONFIG_CONSOLE_MUX=y + CONFIG_SYS_STDIO_DEREGISTER=y + CONFIG_SYS_PROMPT="Tegra210 (P3450-0000) # " + # CONFIG_BOOTM_PLAN9 is not set ++# CONFIG_SYS_DTC_PAD_BYTES is not set ++# CONFIG_LEGACY_IMAGE_FORMAT is not set + # CONFIG_BOOTM_RTEMS is not set + # CONFIG_BOOTM_VXWORKS is not set + # CONFIG_CMD_ELF is not set +-- +2.51.0 + diff --git a/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch b/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch new file mode 100644 index 0000000..d6612ee --- /dev/null +++ b/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch @@ -0,0 +1,32 @@ +From 72fd4fdb54721a31d2b4e9f95fdd3b3e398bb2c0 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 12 Apr 2026 01:14:12 +0100 +Subject: [PATCH] board/raspberrypi: Add quirk for RPi5 2Gb rev 1.0 + +All 2Gb Raspberry Pi 5s use the BCM2712D0 silicon, but +the early boards were still rev 1.0 so we need a quirk +to ensure the correct device tree is used. + +Signed-off-by: Peter Robinson +--- + board/raspberrypi/rpi/rpi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index b0a1484c0fa..ff9cab6521b 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -371,6 +371,10 @@ static void set_fdtfile(void) + const char *fdtfile; + int rev = revision & 0x0f; + ++ /* 2GB Pi 5B board rev 1.0 always has BCM2712D0 silicon */ ++ if (revision == 0xb04170) ++ rev = 1; ++ + if (env_get("fdtfile")) + return; + +-- +2.53.0 + diff --git a/riscv64-boards b/riscv64-boards new file mode 100644 index 0000000..f96e775 --- /dev/null +++ b/riscv64-boards @@ -0,0 +1,4 @@ +qemu-riscv64_spl +sifive_unleashed +sifive_unmatched +starfive_visionfive2 diff --git a/rockchip-Add-initial-support-for-the-PinePhone-Pro.patch b/rockchip-Add-initial-support-for-the-PinePhone-Pro.patch deleted file mode 100644 index 337ea8c..0000000 --- a/rockchip-Add-initial-support-for-the-PinePhone-Pro.patch +++ /dev/null @@ -1,236 +0,0 @@ -From 72400858605c085cf94a6cf5599269c8c39e3e72 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 14 Mar 2023 12:30:36 +0000 -Subject: [PATCH] rockchip: pinephone pro: add initial display support - -Add proposed upstream DT patches for display, disable edp, -enable mipi and backlight, add required clocks. - -Clocks may not be required based on upstream review. Still -need to add panel pieces, the rk3288-evb has an example for -panel DT for u-boot, or may need to do a mipi addition to -simple-panel, or something else. - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/rk3399-pinephone-pro.dts | 123 +++++++++++++++++++++++++ - configs/pinephone-pro-rk3399_defconfig | 3 +- - include/dt-bindings/clock/rk3399-cru.h | 2 + - 3 files changed, 127 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/dts/rk3399-pinephone-pro.dts b/arch/arm/dts/rk3399-pinephone-pro.dts -index 04403a76238..d0609d1b534 100644 ---- a/arch/arm/dts/rk3399-pinephone-pro.dts -+++ b/arch/arm/dts/rk3399-pinephone-pro.dts -@@ -29,6 +29,12 @@ - stdout-path = "serial2:115200n8"; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm0 0 1000000 0>; -+ pwm-delay-us = <10000>; -+ }; -+ - gpio-keys { - compatible = "gpio-keys"; - pinctrl-names = "default"; -@@ -102,6 +108,32 @@ - /* WL_REG_ON on module */ - reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; - }; -+ -+ /* MIPI DSI panel 1.8v supply */ -+ vcc1v8_lcd: vcc1v8-lcd-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ regulator-name = "vcc1v8_lcd"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc3v3_sys>; -+ gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&display_pwren1>; -+ }; -+ -+ /* MIPI DSI panel 2.8v supply */ -+ vcc2v8_lcd: vcc2v8-lcd-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ regulator-name = "vcc2v8_lcd"; -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ vin-supply = <&vcc3v3_sys>; -+ gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&display_pwren>; -+ }; - }; - - &cpu_l0 { -@@ -132,6 +164,11 @@ - status = "okay"; - }; - -+&gpu { -+ mali-supply = <&vdd_gpu>; -+ status = "okay"; -+}; -+ - &i2c0 { - clock-frequency = <400000>; - i2c-scl-rising-time-ns = <168>; -@@ -214,6 +251,9 @@ - regulator-name = "vcc3v0_touch"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; - }; - - vcca1v8_codec: LDO_REG3 { -@@ -347,6 +387,25 @@ - }; - }; - -+&i2c3 { -+ i2c-scl-rising-time-ns = <450>; -+ i2c-scl-falling-time-ns = <15>; -+ status = "okay"; -+ -+ touchscreen@14 { -+ compatible = "goodix,gt917s"; -+ reg = <0x14>; -+ interrupt-parent = <&gpio3>; -+ interrupts = ; -+ irq-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>; -+ reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>; -+ AVDD28-supply = <&vcc3v0_touch>; -+ VDDIO-supply = <&vcc3v0_touch>; -+ touchscreen-size-x = <720>; -+ touchscreen-size-y = <1440>; -+ }; -+}; -+ - &io_domains { - bt656-supply = <&vcc1v8_dvp>; - audio-supply = <&vcca1v8_codec>; -@@ -355,6 +414,40 @@ - status = "okay"; - }; - -+&mipi_dsi { -+ status = "okay"; -+ clock-master; -+ -+ ports { -+ mipi_out: port@1 { -+ #address-cells = <0>; -+ #size-cells = <0>; -+ reg = <1>; -+ -+ mipi_out_panel: endpoint { -+ remote-endpoint = <&mipi_in_panel>; -+ }; -+ }; -+ }; -+ -+ panel@0 { -+ compatible = "hannstar,hsd060bhw4"; -+ reg = <0>; -+ backlight = <&backlight>; -+ reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>; -+ vcc-supply = <&vcc2v8_lcd>; -+ iovcc-supply = <&vcc1v8_lcd>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&display_rst_l>; -+ -+ port { -+ mipi_in_panel: endpoint { -+ remote-endpoint = <&mipi_out_panel>; -+ }; -+ }; -+ }; -+}; -+ - &pmu_io_domains { - pmu1830-supply = <&vcc_1v8>; - status = "okay"; -@@ -387,6 +480,20 @@ - }; - }; - -+ dsi { -+ display_rst_l: display-rst-l { -+ rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ -+ display_pwren: display-pwren { -+ rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ -+ display_pwren1: display-pwren1 { -+ rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ }; -+ - sound { - vcc1v8_codec_en: vcc1v8-codec-en { - rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>; -@@ -422,6 +529,10 @@ - status = "okay"; - }; - -+&pwm0 { -+ status = "okay"; -+}; -+ - &sdmmc { - bus-width = <4>; - cap-sd-highspeed; -@@ -472,3 +583,15 @@ - &uart2 { - status = "okay"; - }; -+ -+&vopb { -+ status = "okay"; -+ assigned-clocks = <&cru DCLK_VOP0_DIV>, <&cru DCLK_VOP0>, -+ <&cru ACLK_VOP0>, <&cru HCLK_VOP0>; -+ assigned-clock-rates = <0>, <0>, <400000000>, <100000000>; -+ assigned-clock-parents = <&cru PLL_CPLL>, <&cru DCLK_VOP0_FRAC>; -+}; -+ -+&vopb_mmu { -+ status = "okay"; -+}; -diff --git a/configs/pinephone-pro-rk3399_defconfig b/configs/pinephone-pro-rk3399_defconfig -index 54f9b90536c..1982131c805 100644 ---- a/configs/pinephone-pro-rk3399_defconfig -+++ b/configs/pinephone-pro-rk3399_defconfig -@@ -96,6 +96,7 @@ CONFIG_USB_ETHER_RTL8152=y - CONFIG_VIDEO=y - CONFIG_DISPLAY=y - CONFIG_VIDEO_ROCKCHIP=y --CONFIG_DISPLAY_ROCKCHIP_EDP=y -+CONFIG_DISPLAY_ROCKCHIP_MIPI=y -+CONFIG_BACKLIGHT_PWM=y - CONFIG_SPL_TINY_MEMSET=y - CONFIG_ERRNO_STR=y -diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h -index 211faf8fa89..7866e5266d2 100644 ---- a/include/dt-bindings/clock/rk3399-cru.h -+++ b/include/dt-bindings/clock/rk3399-cru.h -@@ -131,6 +131,8 @@ - #define DCLK_VOP0_DIV 182 - #define DCLK_VOP1_DIV 183 - #define DCLK_M0_PERILP 184 -+#define DCLK_VOP0_FRAC 185 -+#define DCLK_VOP1_FRAC 186 - - #define FCLK_CM0S 190 - --- -2.39.2 - diff --git a/rockchip-Enable-preboot-start-for-pci-usb.patch b/rockchip-Enable-preboot-start-for-pci-usb.patch new file mode 100644 index 0000000..30aad4d --- /dev/null +++ b/rockchip-Enable-preboot-start-for-pci-usb.patch @@ -0,0 +1,860 @@ +From a6909a16b4cc301f1007d9e75d02abb6d06a1ea7 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Thu, 28 May 2026 21:29:29 +0100 +Subject: [PATCH] rockchip: Enable preboot start for pci/usb + +Enable the preboot so nvme works OOTB + +Signed-off-by: Peter Robinson +--- + configs/anbernic-rgxx3-rk3566_defconfig | 2 ++ + configs/bpi-r2-pro-rk3568_defconfig | 2 ++ + configs/cm3588-nas-rk3588_defconfig | 2 ++ + configs/coolpi-4b-rk3588s_defconfig | 2 ++ + configs/coolpi-cm5-evb-rk3588_defconfig | 2 ++ + configs/evb-rk3568_defconfig | 2 ++ + configs/evb-rk3588_defconfig | 2 ++ + configs/firefly-rk3399_defconfig | 2 ++ + configs/generic-rk3568_defconfig | 2 ++ + configs/generic-rk3588_defconfig | 2 ++ + configs/jaguar-rk3588_defconfig | 2 ++ + configs/lubancat-2-rk3568_defconfig | 2 ++ + configs/nanopc-t4-rk3399_defconfig | 2 ++ + configs/nanopc-t6-rk3588_defconfig | 2 ++ + configs/nanopi-r5c-rk3568_defconfig | 2 ++ + configs/nanopi-r5s-rk3568_defconfig | 2 ++ + configs/nanopi-r6c-rk3588s_defconfig | 2 ++ + configs/nanopi-r6s-rk3588s_defconfig | 2 ++ + configs/neu6a-io-rk3588_defconfig | 2 ++ + configs/neu6b-io-rk3588_defconfig | 2 ++ + configs/nova-rk3588s_defconfig | 2 ++ + configs/odroid-m1-rk3568_defconfig | 2 ++ + configs/odroid-m1s-rk3566_defconfig | 2 ++ + configs/odroid-m2-rk3588s_defconfig | 2 ++ + configs/orangepi-3b-rk3566_defconfig | 2 ++ + configs/orangepi-5-max-rk3588_defconfig | 2 ++ + configs/orangepi-5-plus-rk3588_defconfig | 2 ++ + configs/orangepi-5-rk3588s_defconfig | 2 ++ + configs/orangepi-5-ultra-rk3588_defconfig | 2 ++ + configs/pinebook-pro-rk3399_defconfig | 1 + + configs/pinetab2-rk3566_defconfig | 2 ++ + configs/powkiddy-x55-rk3566_defconfig | 2 ++ + configs/quartz64-a-rk3566_defconfig | 2 ++ + configs/quartz64-b-rk3566_defconfig | 4 ++++ + configs/quartzpro64-rk3588_defconfig | 2 ++ + configs/radxa-cm3-io-rk3566_defconfig | 2 ++ + configs/radxa-e25-rk3568_defconfig | 2 ++ + configs/radxa-zero-3-rk3566_defconfig | 2 ++ + configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ + configs/rock-3a-rk3568_defconfig | 2 ++ + configs/rock-3b-rk3568_defconfig | 2 ++ + configs/rock-3c-rk3566_defconfig | 2 ++ + configs/rock-4c-plus-rk3399_defconfig | 2 ++ + configs/rock-4se-rk3399_defconfig | 2 ++ + configs/rock-5-itx-rk3588_defconfig | 2 ++ + configs/rock-5c-rk3588s_defconfig | 2 ++ + configs/rock-pi-4-rk3399_defconfig | 2 ++ + configs/rock-pi-4c-rk3399_defconfig | 2 ++ + configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ + configs/rock5a-rk3588s_defconfig | 2 ++ + configs/rock5b-rk3588_defconfig | 2 ++ + configs/rock960-rk3399_defconfig | 2 ++ + configs/rockpro64-rk3399_defconfig | 2 ++ + configs/sige7-rk3588_defconfig | 2 ++ + configs/soquartz-blade-rk3566_defconfig | 2 ++ + configs/soquartz-cm4-rk3566_defconfig | 2 ++ + configs/soquartz-model-a-rk3566_defconfig | 2 ++ + configs/tiger-rk3588_defconfig | 2 ++ + configs/toybrick-rk3588_defconfig | 2 ++ + configs/turing-rk1-rk3588_defconfig | 2 ++ + 60 files changed, 121 insertions(+) + +diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig +index 854de8b00a4..cd91f18ba80 100644 +--- a/configs/anbernic-rgxx3-rk3566_defconfig ++++ b/configs/anbernic-rgxx3-rk3566_defconfig +@@ -12,6 +12,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_EFI_LOADER is not set + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y +diff --git a/configs/bpi-r2-pro-rk3568_defconfig b/configs/bpi-r2-pro-rk3568_defconfig +index c5199a39448..603e07f2456 100644 +--- a/configs/bpi-r2-pro-rk3568_defconfig ++++ b/configs/bpi-r2-pro-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/cm3588-nas-rk3588_defconfig b/configs/cm3588-nas-rk3588_defconfig +index 5b5ef8d5ac1..53147d115dd 100644 +--- a/configs/cm3588-nas-rk3588_defconfig ++++ b/configs/cm3588-nas-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/coolpi-4b-rk3588s_defconfig b/configs/coolpi-4b-rk3588s_defconfig +index e6772622403..75e0b373ce9 100644 +--- a/configs/coolpi-4b-rk3588s_defconfig ++++ b/configs/coolpi-4b-rk3588s_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/coolpi-cm5-evb-rk3588_defconfig b/configs/coolpi-cm5-evb-rk3588_defconfig +index 4326e116849..a005e4441d3 100644 +--- a/configs/coolpi-cm5-evb-rk3588_defconfig ++++ b/configs/coolpi-cm5-evb-rk3588_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/evb-rk3568_defconfig b/configs/evb-rk3568_defconfig +index 4a5a7454e10..7ec199a08af 100644 +--- a/configs/evb-rk3568_defconfig ++++ b/configs/evb-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig +index c7f6256a626..cfa73c660e7 100644 +--- a/configs/evb-rk3588_defconfig ++++ b/configs/evb-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig +index 83b9de5feb9..2ba8f5029c3 100644 +--- a/configs/firefly-rk3399_defconfig ++++ b/configs/firefly-rk3399_defconfig +@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-firefly.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig +index a33c3af9255..20966793568 100644 +--- a/configs/generic-rk3568_defconfig ++++ b/configs/generic-rk3568_defconfig +@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig +index ac450e6d757..b5424ac9f16 100644 +--- a/configs/generic-rk3588_defconfig ++++ b/configs/generic-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/jaguar-rk3588_defconfig b/configs/jaguar-rk3588_defconfig +index ed3883b4f9c..47dbd834f30 100644 +--- a/configs/jaguar-rk3588_defconfig ++++ b/configs/jaguar-rk3588_defconfig +@@ -16,6 +16,8 @@ CONFIG_DEBUG_UART_BASE=0xfeb50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/lubancat-2-rk3568_defconfig b/configs/lubancat-2-rk3568_defconfig +index 7548bf60b06..2fb8a432503 100644 +--- a/configs/lubancat-2-rk3568_defconfig ++++ b/configs/lubancat-2-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_VAR_BUF_SIZE=16384 + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y +diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig +index f8ae436a1ee..7aa8e1a8d42 100644 +--- a/configs/nanopc-t4-rk3399_defconfig ++++ b/configs/nanopc-t4-rk3399_defconfig +@@ -15,6 +15,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/nanopc-t6-rk3588_defconfig b/configs/nanopc-t6-rk3588_defconfig +index ba9a5adece7..eaf7fa5a0fc 100644 +--- a/configs/nanopc-t6-rk3588_defconfig ++++ b/configs/nanopc-t6-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r5c-rk3568_defconfig b/configs/nanopi-r5c-rk3568_defconfig +index e75a24dadc8..159ef033932 100644 +--- a/configs/nanopi-r5c-rk3568_defconfig ++++ b/configs/nanopi-r5c-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="usb start;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r5s-rk3568_defconfig b/configs/nanopi-r5s-rk3568_defconfig +index c971f376b38..60b5e8fa014 100644 +--- a/configs/nanopi-r5s-rk3568_defconfig ++++ b/configs/nanopi-r5s-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="usb start;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r6c-rk3588s_defconfig b/configs/nanopi-r6c-rk3588s_defconfig +index 861e3234d29..bb6e2082e3b 100644 +--- a/configs/nanopi-r6c-rk3588s_defconfig ++++ b/configs/nanopi-r6c-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r6s-rk3588s_defconfig b/configs/nanopi-r6s-rk3588s_defconfig +index 743dfca441b..903ec56ad6f 100644 +--- a/configs/nanopi-r6s-rk3588s_defconfig ++++ b/configs/nanopi-r6s-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig +index 19f129e96f0..08ed699b01d 100644 +--- a/configs/neu6a-io-rk3588_defconfig ++++ b/configs/neu6a-io-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig +index 2cf5aeccf51..8cafd779a1c 100644 +--- a/configs/neu6b-io-rk3588_defconfig ++++ b/configs/neu6b-io-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nova-rk3588s_defconfig b/configs/nova-rk3588s_defconfig +index f7d7492ff46..5abb6ebbe18 100644 +--- a/configs/nova-rk3588s_defconfig ++++ b/configs/nova-rk3588s_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig +index b00985b0405..19d7af53c7f 100644 +--- a/configs/odroid-m1-rk3568_defconfig ++++ b/configs/odroid-m1-rk3568_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig +index d59882a2a59..20f6dc3c26e 100644 +--- a/configs/odroid-m1s-rk3566_defconfig ++++ b/configs/odroid-m1s-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m2-rk3588s_defconfig b/configs/odroid-m2-rk3588s_defconfig +index e71e61ddb0b..561c2b28b7a 100644 +--- a/configs/odroid-m2-rk3588s_defconfig ++++ b/configs/odroid-m2-rk3588s_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-3b-rk3566_defconfig b/configs/orangepi-3b-rk3566_defconfig +index 1cd78789fa1..dcf182231da 100644 +--- a/configs/orangepi-3b-rk3566_defconfig ++++ b/configs/orangepi-3b-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-max-rk3588_defconfig b/configs/orangepi-5-max-rk3588_defconfig +index 0861df962cf..744aad89c4a 100644 +--- a/configs/orangepi-5-max-rk3588_defconfig ++++ b/configs/orangepi-5-max-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-plus-rk3588_defconfig b/configs/orangepi-5-plus-rk3588_defconfig +index 52523f87aec..e3bb4e43da9 100644 +--- a/configs/orangepi-5-plus-rk3588_defconfig ++++ b/configs/orangepi-5-plus-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-rk3588s_defconfig b/configs/orangepi-5-rk3588s_defconfig +index e0eba389289..33fe68add7b 100644 +--- a/configs/orangepi-5-rk3588s_defconfig ++++ b/configs/orangepi-5-rk3588s_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-ultra-rk3588_defconfig b/configs/orangepi-5-ultra-rk3588_defconfig +index fb7f4432983..62419609695 100644 +--- a/configs/orangepi-5-ultra-rk3588_defconfig ++++ b/configs/orangepi-5-ultra-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig +index cbf95b4692f..9e4d1b1061d 100644 +--- a/configs/pinebook-pro-rk3399_defconfig ++++ b/configs/pinebook-pro-rk3399_defconfig +@@ -22,6 +22,7 @@ CONFIG_PCI=y + CONFIG_DEBUG_UART=y + CONFIG_BOOTDELAY=3 + CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/pinetab2-rk3566_defconfig b/configs/pinetab2-rk3566_defconfig +index f284dadb99d..d87849f0a45 100644 +--- a/configs/pinetab2-rk3566_defconfig ++++ b/configs/pinetab2-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/powkiddy-x55-rk3566_defconfig b/configs/powkiddy-x55-rk3566_defconfig +index 37a359c91a9..70bc5ab6402 100644 +--- a/configs/powkiddy-x55-rk3566_defconfig ++++ b/configs/powkiddy-x55-rk3566_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartz64-a-rk3566_defconfig b/configs/quartz64-a-rk3566_defconfig +index 780fd581f0a..7938b5c0d1b 100644 +--- a/configs/quartz64-a-rk3566_defconfig ++++ b/configs/quartz64-a-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartz64-b-rk3566_defconfig b/configs/quartz64-b-rk3566_defconfig +index 4d92a67cd73..fe8a168373d 100644 +--- a/configs/quartz64-b-rk3566_defconfig ++++ b/configs/quartz64-b-rk3566_defconfig +@@ -1,4 +1,6 @@ + CONFIG_ARM=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +@@ -17,6 +19,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartzpro64-rk3588_defconfig b/configs/quartzpro64-rk3588_defconfig +index 0ad74e8bbef..b9cbddfae77 100644 +--- a/configs/quartzpro64-rk3588_defconfig ++++ b/configs/quartzpro64-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-cm3-io-rk3566_defconfig b/configs/radxa-cm3-io-rk3566_defconfig +index 875f0b76fa5..2523dccd6a3 100644 +--- a/configs/radxa-cm3-io-rk3566_defconfig ++++ b/configs/radxa-cm3-io-rk3566_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-e25-rk3568_defconfig b/configs/radxa-e25-rk3568_defconfig +index 779d540e22d..7e003e74520 100644 +--- a/configs/radxa-e25-rk3568_defconfig ++++ b/configs/radxa-e25-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-zero-3-rk3566_defconfig b/configs/radxa-zero-3-rk3566_defconfig +index f5cf09a5e4a..7db7e3fcd3d 100644 +--- a/configs/radxa-zero-3-rk3566_defconfig ++++ b/configs/radxa-zero-3-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig +index 8b4d8c1b0aa..54baa07aeae 100644 +--- a/configs/roc-pc-mezzanine-rk3399_defconfig ++++ b/configs/roc-pc-mezzanine-rk3399_defconfig +@@ -21,6 +21,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_ANDROID_BOOT_IMAGE is not set + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-mezzanine.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y +diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig +index e753185610f..19d303e7f70 100644 +--- a/configs/rock-3a-rk3568_defconfig ++++ b/configs/rock-3a-rk3568_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-3b-rk3568_defconfig b/configs/rock-3b-rk3568_defconfig +index c3bf48b9e34..0cfa8eba168 100644 +--- a/configs/rock-3b-rk3568_defconfig ++++ b/configs/rock-3b-rk3568_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-3c-rk3566_defconfig b/configs/rock-3c-rk3566_defconfig +index 417aa33a663..61d0e1b8c6a 100644 +--- a/configs/rock-3c-rk3566_defconfig ++++ b/configs/rock-3c-rk3566_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-4c-plus-rk3399_defconfig b/configs/rock-4c-plus-rk3399_defconfig +index 0f6bdfdfb06..f31cb061a83 100644 +--- a/configs/rock-4c-plus-rk3399_defconfig ++++ b/configs/rock-4c-plus-rk3399_defconfig +@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-4se-rk3399_defconfig b/configs/rock-4se-rk3399_defconfig +index 7f22aede912..caf8e02bece 100644 +--- a/configs/rock-4se-rk3399_defconfig ++++ b/configs/rock-4se-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-5-itx-rk3588_defconfig b/configs/rock-5-itx-rk3588_defconfig +index cb014de4188..e26a126533c 100644 +--- a/configs/rock-5-itx-rk3588_defconfig ++++ b/configs/rock-5-itx-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-5c-rk3588s_defconfig b/configs/rock-5c-rk3588s_defconfig +index 3d044a81498..27234c250d1 100644 +--- a/configs/rock-5c-rk3588s_defconfig ++++ b/configs/rock-5c-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig +index e5c9072c27f..35852c017da 100644 +--- a/configs/rock-pi-4-rk3399_defconfig ++++ b/configs/rock-pi-4-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig +index 4be7b0f8130..eeee446a5bd 100644 +--- a/configs/rock-pi-4c-rk3399_defconfig ++++ b/configs/rock-pi-4c-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig +index 602a723ea7d..3dcc2932ae3 100644 +--- a/configs/rock-pi-n10-rk3399pro_defconfig ++++ b/configs/rock-pi-n10-rk3399pro_defconfig +@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_ANDROID_BOOT_IMAGE is not set + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399pro-rock-pi-n10.dtb" + # CONFIG_CONSOLE_MUX is not set +diff --git a/configs/rock5a-rk3588s_defconfig b/configs/rock5a-rk3588s_defconfig +index 24b2eef35f2..c5830054921 100644 +--- a/configs/rock5a-rk3588s_defconfig ++++ b/configs/rock5a-rk3588s_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig +index da5fb3a2c30..053346fc035 100644 +--- a/configs/rock5b-rk3588_defconfig ++++ b/configs/rock5b-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig +index db121f03ae6..e55f1b6a034 100644 +--- a/configs/rock960-rk3399_defconfig ++++ b/configs/rock960-rk3399_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb" + CONFIG_SYS_PBSIZE=1052 + CONFIG_DISPLAY_BOARDINFO_LATE=y +diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig +index 1d2bff35fc0..ea8e90b9f6a 100644 +--- a/configs/rockpro64-rk3399_defconfig ++++ b/configs/rockpro64-rk3399_defconfig +@@ -20,6 +20,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/sige7-rk3588_defconfig b/configs/sige7-rk3588_defconfig +index 00b9759715b..1b837bd554c 100644 +--- a/configs/sige7-rk3588_defconfig ++++ b/configs/sige7-rk3588_defconfig +@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-blade-rk3566_defconfig b/configs/soquartz-blade-rk3566_defconfig +index 7de159a8881..4137f0459b5 100644 +--- a/configs/soquartz-blade-rk3566_defconfig ++++ b/configs/soquartz-blade-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-cm4-rk3566_defconfig b/configs/soquartz-cm4-rk3566_defconfig +index 4455ee5b5aa..ad63ba0204f 100644 +--- a/configs/soquartz-cm4-rk3566_defconfig ++++ b/configs/soquartz-cm4-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-model-a-rk3566_defconfig b/configs/soquartz-model-a-rk3566_defconfig +index abdab514496..9e01345bdaa 100644 +--- a/configs/soquartz-model-a-rk3566_defconfig ++++ b/configs/soquartz-model-a-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/tiger-rk3588_defconfig b/configs/tiger-rk3588_defconfig +index 105e8e10e0b..bcc2ae302a5 100644 +--- a/configs/tiger-rk3588_defconfig ++++ b/configs/tiger-rk3588_defconfig +@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + # CONFIG_DEBUG_UART_BOARD_INIT is not set + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/toybrick-rk3588_defconfig b/configs/toybrick-rk3588_defconfig +index 14b231ae3e2..7af393731cd 100644 +--- a/configs/toybrick-rk3588_defconfig ++++ b/configs/toybrick-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/turing-rk1-rk3588_defconfig b/configs/turing-rk1-rk3588_defconfig +index 0b3efec23e6..515db2a2b0c 100644 +--- a/configs/turing-rk1-rk3588_defconfig ++++ b/configs/turing-rk1-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEBC0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +-- +2.54.0 + diff --git a/rockchip-PinePhone-Pro-fixes.patch b/rockchip-PinePhone-Pro-fixes.patch deleted file mode 100644 index 5e07490..0000000 --- a/rockchip-PinePhone-Pro-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 1af5e42f170d2c4b944beeb875b80ec7f061038a Mon Sep 17 00:00:00 2001 -From: Ondrej Jirman -Date: Thu, 25 May 2023 15:27:08 +0200 -Subject: [PATCH] pinephone-pro: Fix I/O port voltage (GPIO3D4A is 1.8V) - -This fixes access to camera sensor over I2C during probe time in -the kernel. (Kernel will fix I/0 port voltage by itself, but the -timing depends on probe order of the drivers, so the fix can -come after the camera sensor driver already failed to probe.) - -Signed-off-by: Ondrej Jirman -Cc: Kever Yang -Reviewed-by: Kever Yang ---- - board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c -index eb639cd0d07..b6ccbb9c1c4 100644 ---- a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c -+++ b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c -@@ -15,7 +15,8 @@ - #include - #include - --#define GRF_IO_VSEL_BT565_SHIFT 0 -+#define GRF_IO_VSEL_BT565_GPIO2AB 1 -+#define GRF_IO_VSEL_AUDIO_GPIO3D4A 2 - #define PMUGRF_CON0_VSEL_SHIFT 8 - - #ifndef CONFIG_SPL_BUILD -@@ -48,7 +49,8 @@ static void setup_iodomain(void) - syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); - - /* BT565 is in 1.8v domain */ -- rk_setreg(&grf->io_vsel, 1 << GRF_IO_VSEL_BT565_SHIFT); -+ rk_setreg(&grf->io_vsel, -+ GRF_IO_VSEL_BT565_GPIO2AB | GRF_IO_VSEL_AUDIO_GPIO3D4A); - - /* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ - rk_setreg(&pmugrf->soc_con0, 1 << PMUGRF_CON0_VSEL_SHIFT); --- -2.41.0 diff --git a/rockchip-general-fixes.patch b/rockchip-general-fixes.patch deleted file mode 100644 index 00e78f5..0000000 --- a/rockchip-general-fixes.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 2d9350c50a9659cc2a247cdea07f0eacffa3cb32 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 12 Jun 2022 14:44:44 +0100 -Subject: [PATCH] rockchip: pinebook-pro: minor SPI flash fixes - -Set a default offset for environment so it doesn't write it to -unexpected locations, drop unneeded mtd config option. - -Signed-off-by: Peter Robinson ---- - configs/pinebook-pro-rk3399_defconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig -index 8ca1d0708f9..aaa52c6ea70 100644 ---- a/configs/pinebook-pro-rk3399_defconfig -+++ b/configs/pinebook-pro-rk3399_defconfig -@@ -5,6 +5,7 @@ CONFIG_ARCH_ROCKCHIP=y - CONFIG_SYS_TEXT_BASE=0x00200000 - CONFIG_NR_DRAM_BANKS=1 - CONFIG_ENV_SIZE=0x8000 -+CONFIG_ENV_OFFSET=0x3F8000 - CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro" - CONFIG_ROCKCHIP_RK3399=y - CONFIG_TARGET_PINEBOOK_PRO_RK3399=y -@@ -22,7 +23,6 @@ CONFIG_MISC_INIT_R=y - # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set - CONFIG_SPL_STACK_R=y - CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 --CONFIG_SPL_MTD_SUPPORT=y - CONFIG_SPL_SPI_LOAD=y - CONFIG_TPL=y - CONFIG_CMD_BOOTZ=y --- -2.36.1 - -From 27ba8e2f904063aec5196f86dd0332bf58a60259 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 12 Jun 2022 14:50:42 +0100 -Subject: [PATCH] rockchip: rockpro64: enable leds - -The Rockpro64 has some GPIO leds so let's enable them so the -user gets some output in early boot. - -Signed-off-by: Peter Robinson ---- - configs/rockpro64-rk3399_defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig -index e6f7a8469a3..b0c3527fab0 100644 ---- a/configs/rockpro64-rk3399_defconfig -+++ b/configs/rockpro64-rk3399_defconfig -@@ -42,6 +42,8 @@ CONFIG_AHCI_PCI=y - CONFIG_SATA_SIL=y - CONFIG_ROCKCHIP_GPIO=y - CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_LED=y -+CONFIG_LED_GPIO=y - CONFIG_MISC=y - CONFIG_ROCKCHIP_EFUSE=y - CONFIG_MMC_DW=y --- -2.36.1 - -From 8bca90472e0d71e5344711b6f5fe8dc95e19af5a Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 12 Jun 2022 15:12:47 +0100 -Subject: [PATCH] rockchip: pinebook-pro: sync PBP dtb to 5.18 - -Sync the pinebook pro to upstream 5.18, in particular this brings -brings in a fix so the DP is disabled so Linux will actually boot. - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/rk3399-pinebook-pro.dts | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/dts/rk3399-pinebook-pro.dts b/arch/arm/dts/rk3399-pinebook-pro.dts -index 2b5f001ff4a..d6b68d77d63 100644 ---- a/arch/arm/dts/rk3399-pinebook-pro.dts -+++ b/arch/arm/dts/rk3399-pinebook-pro.dts -@@ -17,6 +17,7 @@ - / { - model = "Pine64 Pinebook Pro"; - compatible = "pine64,pinebook-pro", "rockchip,rk3399"; -+ chassis-type = "laptop"; - - aliases { - mmc0 = &sdio0; -@@ -242,12 +243,12 @@ - vdd_log: vdd-log { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 1>; -+ pwm-supply = <&vcc_sysin>; - regulator-name = "vdd_log"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <1400000>; -- vin-supply = <&vcc_sysin>; - - regulator-state-mem { - regulator-on-in-suspend; -@@ -385,10 +386,6 @@ - }; - }; - --&cdn_dp { -- status = "okay"; --}; -- - &cpu_b0 { - cpu-supply = <&vdd_cpu_b>; - }; -@@ -475,8 +472,6 @@ - vcc10-supply = <&vcc_sysin>; - vcc11-supply = <&vcc_sysin>; - vcc12-supply = <&vcc3v3_sys>; -- vcc13-supply = <&vcc_sysin>; -- vcc14-supply = <&vcc_sysin>; - - regulators { - /* rk3399 center logic supply */ -@@ -711,7 +706,7 @@ - - connector { - compatible = "usb-c-connector"; -- data-role = "host"; -+ data-role = "dual"; - label = "USB-C"; - op-sink-microwatt = <1000000>; - power-role = "dual"; --- -2.36.1 - diff --git a/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch b/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch new file mode 100644 index 0000000..bef5a9e --- /dev/null +++ b/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch @@ -0,0 +1,39 @@ +From aef38432fbc93621b434836b95b10c28aa880e84 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 9 Dec 2025 20:51:06 +0000 +Subject: [PATCH 1/2] rockchip: rk3568-nanopi-r5: Drop duplicated/extra sdhci + +The pinctrl settings are now upstream, with the upstream +voltage supplies, and the HS200 mode is confirmed to work +fine but the HS400 mode had reported issues so let's just +consume what the upstream DT has now as it's all known good. + +Reported-by: Dusty Mabe +Tested-by: Dusty Mabe +Signed-off-by: Peter Robinson +--- + arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi +index 64c43374c04..7e24be1a5e7 100644 +--- a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi ++++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi +@@ -12,14 +12,6 @@ + /delete-property/ vpcie3v3-supply; + }; + +-&sdhci { +- cap-mmc-highspeed; +- mmc-hs200-1_8v; +- mmc-hs400-1_8v; +- mmc-hs400-enhanced-strobe; +- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; +-}; +- + &vcc5v0_usb_host { + /delete-property/ regulator-always-on; + /delete-property/ regulator-boot-on; +-- +2.52.0 + diff --git a/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch b/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch new file mode 100644 index 0000000..c67e4af --- /dev/null +++ b/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch @@ -0,0 +1,33 @@ +From 29efc0396809384cf37bfcfb01c62e63216fa998 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 9 Dec 2025 21:13:46 +0000 +Subject: [PATCH 2/2] rockchip: rk356x: Stop overriding sdhci/mmc aliases + +Upstream device tree has rules where the aliases are board +specific settings, no SoC settings. Looking at upstream +rk356x boards there's a lot of variation in the setting of +mmc0/mmc1 based on the device so we should not be overriding +this here and now we sync to upstream we should just consume +those settings, to do otherwise confuses users. + +Signed-off-by: Peter Robinson +--- + arch/arm/dts/rk356x-u-boot.dtsi | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi +index 738b9673d35..f25c7970208 100644 +--- a/arch/arm/dts/rk356x-u-boot.dtsi ++++ b/arch/arm/dts/rk356x-u-boot.dtsi +@@ -7,8 +7,6 @@ + + / { + aliases { +- mmc0 = &sdhci; +- mmc1 = &sdmmc0; + spi4 = &sfc; + }; + +-- +2.52.0 + diff --git a/rpi-Convert-to-standard-boot.patch b/rpi-Convert-to-standard-boot.patch deleted file mode 100644 index de02728..0000000 --- a/rpi-Convert-to-standard-boot.patch +++ /dev/null @@ -1,892 +0,0 @@ -From patchwork Thu Jul 27 21:54:28 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Simon Glass -X-Patchwork-Id: 1813968 -X-Patchwork-Delegate: pbrobinson@gmail.com -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.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=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (1024-bit key; - unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 - header.s=google header.b=N1JBl/Ip; - dkim-atps=neutral -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 ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1V3MSFz1yZb - for ; Fri, 28 Jul 2023 07:55:10 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 29D6686883; - Thu, 27 Jul 2023 23:54:50 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -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=chromium.org header.i=@chromium.org - header.b="N1JBl/Ip"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id BFC74863EE; Thu, 27 Jul 2023 23:54:44 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, - SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no - version=3.4.2 -Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com - [IPv6:2607:f8b0:4864:20::12d]) - (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 A9CE3867A8 - for ; Thu, 27 Jul 2023 23:54:41 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sjg@chromium.org -Received: by mail-il1-x12d.google.com with SMTP id - e9e14a558f8ab-3466725f0beso6233385ab.1 - for ; Thu, 27 Jul 2023 14:54:41 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=chromium.org; s=google; t=1690494880; x=1691099680; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=; - b=N1JBl/IpuUO0bR2jxCF4K6S6GW+xv1r7HlydRFhGC+Y0jR6zVXjPOQITlZBrwEARlk - THRvjpw5qRIedk0NNo/pQCKKQqruScbjKPYX1OBI4dK8j/HkC/GExnZkrzqJlvtCNqRi - vd32bzFnA0G7Sw/tWm/fMJuxGDvemFLzoLQgg= -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1690494880; x=1691099680; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=; - b=htLAMKMTT/T5aB5rrz1DwCj312u/yXPKNVhy1hUQl0xUxGmuV261y4snpFJIp92LWY - bPTp84aFfLtyyJhH6BRikYrtWYDX1XpPE35ADFLtlQMM5GIU9q0hkifkPd7abPqf9CjN - 34tE1/jfbEQ9DVjGSSH+XObnLtGLjO2UX0/c9ws1veWcDD9e9lre0Tr0FdMyy+r4RdCC - V39BVGSWBW9Mr3+y6MVHLCblg21I+/bjRp2nviWmZbeJhx4cKepnzFGfm5KjWnIujj0D - Y86K9+ZBDN2NRnIyfK6oPrQqLMSObWKrzxurO93MsbUXmBc8FJqZwyN2XUixqo8t6Kso - pNvg== -X-Gm-Message-State: ABy/qLb0K45Zq6AUJT2FpWarTb3YBaFoeytG1lXRxYdhcArX6FKSUhG7 - DkuKoL8etDw0hNEDFIyMz2KF4qEO37wmml3Qc3M= -X-Google-Smtp-Source: - APBJJlG54VUHOmyZVhkSmMpIiz5S/hblBzg2zwJFl+9fxJRZJWQN2zHspMrpRxc36G3YPyvYcXHJ4A== -X-Received: by 2002:a05:6e02:1ba5:b0:347:6f47:bb2 with SMTP id - n5-20020a056e021ba500b003476f470bb2mr889940ili.19.1690494880268; - Thu, 27 Jul 2023 14:54:40 -0700 (PDT) -Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) - by smtp.gmail.com with ESMTPSA id - n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.39 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 27 Jul 2023 14:54:40 -0700 (PDT) -From: Simon Glass -To: U-Boot Mailing List -Cc: Tom Rini , Peter Robinson , - Simon Glass , Albert Aribaud , - Matthias Brugger , Stephen Warren , - Stephen Warren -Subject: [RESEND PATCH v3 1/3] arm: rpi: Switch to standard boot -Date: Thu, 27 Jul 2023 15:54:28 -0600 -Message-ID: <20230727215433.578830-2-sjg@chromium.org> -X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog -In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> -References: <20230727215433.578830-1-sjg@chromium.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.8 at phobos.denx.de -X-Virus-Status: Clean - -Drop use of the distro scripts and use standard boot instead. - -We don't need to specify the mmc devices individually, since they are -used in order from 0 to 2, and standard boot uses that order anyway. - -Signed-off-by: Simon Glass ---- - -Changes in v3: -- Rebase to -master - -Changes in v2: -- Rebase to -next - - configs/rpi_0_w_defconfig | 1 + - configs/rpi_2_defconfig | 1 + - configs/rpi_3_32b_defconfig | 1 + - configs/rpi_3_b_plus_defconfig | 1 + - configs/rpi_3_defconfig | 1 + - configs/rpi_4_32b_defconfig | 1 + - configs/rpi_4_defconfig | 1 + - configs/rpi_arm64_defconfig | 1 + - configs/rpi_defconfig | 1 + - include/configs/rpi.h | 38 ++-------------------------------- - 10 files changed, 11 insertions(+), 36 deletions(-) - -diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig -index 5da334a8bcf9..7554e671e2ca 100644 ---- a/configs/rpi_0_w_defconfig -+++ b/configs/rpi_0_w_defconfig -@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig -index 990862160712..653f78bec1e8 100644 ---- a/configs/rpi_2_defconfig -+++ b/configs/rpi_2_defconfig -@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index 80885aa9488d..305f1dacfd46 100644 ---- a/configs/rpi_3_32b_defconfig -+++ b/configs/rpi_3_32b_defconfig -@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig -index 0acce8b883f8..f36f1258aa6d 100644 ---- a/configs/rpi_3_b_plus_defconfig -+++ b/configs/rpi_3_b_plus_defconfig -@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b-plus" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index bb6fe128061b..a0d8be42537f 100644 ---- a/configs/rpi_3_defconfig -+++ b/configs/rpi_3_defconfig -@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig -index f6213340971e..71f61c52e52d 100644 ---- a/configs/rpi_4_32b_defconfig -+++ b/configs/rpi_4_32b_defconfig -@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_DM_RESET=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y -diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig -index bbc0fd6c649a..fa2c05da21e8 100644 ---- a/configs/rpi_4_defconfig -+++ b/configs/rpi_4_defconfig -@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_DM_RESET=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y -diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig -index 5d9a273cb920..3e64573b70b1 100644 ---- a/configs/rpi_arm64_defconfig -+++ b/configs/rpi_arm64_defconfig -@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_DM_RESET=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y -diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig -index 550b8dcb9587..4b8e402c89d4 100644 ---- a/configs/rpi_defconfig -+++ b/configs/rpi_defconfig -@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b" - CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y -diff --git a/include/configs/rpi.h b/include/configs/rpi.h -index 4da982f73578..4160db2d8e14 100644 ---- a/include/configs/rpi.h -+++ b/include/configs/rpi.h -@@ -122,47 +122,13 @@ - "fdt_addr_r=0x02600000\0" \ - "ramdisk_addr_r=0x02700000\0" - --#if IS_ENABLED(CONFIG_CMD_MMC) -- #define BOOT_TARGET_MMC(func) \ -- func(MMC, mmc, 0) \ -- func(MMC, mmc, 1) \ -- func(MMC, mmc, 2) --#else -- #define BOOT_TARGET_MMC(func) --#endif -- --#if IS_ENABLED(CONFIG_CMD_USB) -- #define BOOT_TARGET_USB(func) func(USB, usb, 0) --#else -- #define BOOT_TARGET_USB(func) --#endif -- --#if CONFIG_IS_ENABLED(CMD_PXE) -- #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) --#else -- #define BOOT_TARGET_PXE(func) --#endif -- --#if CONFIG_IS_ENABLED(CMD_DHCP) -- #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) --#else -- #define BOOT_TARGET_DHCP(func) --#endif -- --#define BOOT_TARGET_DEVICES(func) \ -- BOOT_TARGET_MMC(func) \ -- BOOT_TARGET_USB(func) \ -- BOOT_TARGET_PXE(func) \ -- BOOT_TARGET_DHCP(func) -- --#include -+#define BOOT_TARGETS "mmc usb pxe dhcp" - - #define CFG_EXTRA_ENV_SETTINGS \ - "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ - ENV_DEVICE_SETTINGS \ - ENV_DFU_SETTINGS \ - ENV_MEM_LAYOUT_SETTINGS \ -- BOOTENV -- -+ "boot_targets=" BOOT_TARGETS "\0" - - #endif - -From patchwork Thu Jul 27 21:54:29 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Simon Glass -X-Patchwork-Id: 1813969 -X-Patchwork-Delegate: pbrobinson@gmail.com -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (1024-bit key; - unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 - header.s=google header.b=nzf25ZVl; - dkim-atps=neutral -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1p1S1xz1yZb - for ; Fri, 28 Jul 2023 07:55:26 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id CEB4186898; - Thu, 27 Jul 2023 23:55:12 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -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=chromium.org header.i=@chromium.org - header.b="nzf25ZVl"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id A550186437; Thu, 27 Jul 2023 23:54:46 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, - SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no - version=3.4.2 -Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com - [IPv6:2607:f8b0:4864:20::d35]) - (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 848728687F - for ; Thu, 27 Jul 2023 23:54:42 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sjg@chromium.org -Received: by mail-io1-xd35.google.com with SMTP id - ca18e2360f4ac-7906614bc90so37744039f.3 - for ; Thu, 27 Jul 2023 14:54:42 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=chromium.org; s=google; t=1690494881; x=1691099681; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=; - b=nzf25ZVlr+TPb8i9KPe94q+xnslw0eiim8ufkD20J+REgYqV1+bfKhPYKo45AkO/Cs - 4b6fZA33NLf5U7qgGo7v+urHNiAPER6YN1bXI9hJSNAEtM13z2v621IsEFffyVMcM85C - 4AMfUiBclfET9Wn0oQnsQ5JK94HV4jlQugZzQ= -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1690494881; x=1691099681; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=; - b=SWZg15tnmLFbQbK+nDA8NsoxsfTOrSK/kUZE8JUBjXnb/EfYfPfZWjBXdTlOT0hTzs - Do1oyQ0GpF9az6Cx1cJaNL+6/ndCRmpmhbQqCvSRgBsAKnQp00cgnet2sm4yVWfiF5PX - 2qaBEeb9gg636lDes6X4aWDvc+t+OzxAlyoh09leqtoNsYaZ9IaM0yoiS8fr0BiqJMrg - MSYnMIsBLMm+jhgQFf2e8ur5tdy7JpF2W9IWlzTu24aMYaDO7jzv2OPLE4yabyZoUIxZ - VGKiZBQssS0Xb/sjea7V65wIws1WhJUfrh088lrlqAdsj+ZlnkWnVhBhlZPR+tkRHWJZ - HcHw== -X-Gm-Message-State: ABy/qLaVdYCT7tOkUReGBSdg/9KznV2sYfo8iTdWbZcW3wegZxOZfpEX - rfBbszTe7MI5Zzj4HA69r3jTlgsxblkKBaKi4I0= -X-Google-Smtp-Source: - APBJJlGWO4DcArS83mKgiEVe92ZPEk/c3kJN6Gj7ZAwNVPMXoPhbtveScu/4+gTrfnrjCxTkZP9a3g== -X-Received: by 2002:a05:6602:682:b0:787:1d53:e6cc with SMTP id - dp2-20020a056602068200b007871d53e6ccmr874039iob.21.1690494881076; - Thu, 27 Jul 2023 14:54:41 -0700 (PDT) -Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) - by smtp.gmail.com with ESMTPSA id - n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.40 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 27 Jul 2023 14:54:40 -0700 (PDT) -From: Simon Glass -To: U-Boot Mailing List -Cc: Tom Rini , Peter Robinson , - Simon Glass , Matthias Brugger , - Stephen Warren , Stephen Warren -Subject: [RESEND PATCH v3 2/3] rpi: Disable DISTRO_DEFAULTS -Date: Thu, 27 Jul 2023 15:54:29 -0600 -Message-ID: <20230727215433.578830-3-sjg@chromium.org> -X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog -In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> -References: <20230727215433.578830-1-sjg@chromium.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.8 at phobos.denx.de -X-Virus-Status: Clean - -Disable this option to reclaim some space, since bootstd requires less -functionality to operate (e.g. hush parser). - -Signed-off-by: Simon Glass ---- - -(no changes since v2) - -Changes in v2: -- Add new patch to disable DISTRO_DEFAULTS - - configs/rpi_0_w_defconfig | 1 - - configs/rpi_2_defconfig | 1 - - configs/rpi_3_32b_defconfig | 1 - - configs/rpi_3_b_plus_defconfig | 1 - - configs/rpi_3_defconfig | 1 - - configs/rpi_4_32b_defconfig | 1 - - configs/rpi_4_defconfig | 1 - - configs/rpi_arm64_defconfig | 1 - - configs/rpi_defconfig | 1 - - 9 files changed, 9 deletions(-) - -diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig -index 7554e671e2ca..3167bfbe48f7 100644 ---- a/configs/rpi_0_w_defconfig -+++ b/configs/rpi_0_w_defconfig -@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig -index 653f78bec1e8..883dab161702 100644 ---- a/configs/rpi_2_defconfig -+++ b/configs/rpi_2_defconfig -@@ -15,7 +15,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index 305f1dacfd46..5ff7d987a431 100644 ---- a/configs/rpi_3_32b_defconfig -+++ b/configs/rpi_3_32b_defconfig -@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig -index f36f1258aa6d..31f2a6eb310c 100644 ---- a/configs/rpi_3_b_plus_defconfig -+++ b/configs/rpi_3_b_plus_defconfig -@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index a0d8be42537f..fa6e1507d640 100644 ---- a/configs/rpi_3_defconfig -+++ b/configs/rpi_3_defconfig -@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig -index 71f61c52e52d..55bf6c0770f0 100644 ---- a/configs/rpi_4_32b_defconfig -+++ b/configs/rpi_4_32b_defconfig -@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - CONFIG_PREBOOT="pci enum; usb start;" - # CONFIG_DISPLAY_CPUINFO is not set -diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig -index fa2c05da21e8..6679cce9a165 100644 ---- a/configs/rpi_4_defconfig -+++ b/configs/rpi_4_defconfig -@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - CONFIG_PREBOOT="pci enum; usb start;" - # CONFIG_DISPLAY_CPUINFO is not set -diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig -index 3e64573b70b1..26e29ffb5a1f 100644 ---- a/configs/rpi_arm64_defconfig -+++ b/configs/rpi_arm64_defconfig -@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_PCI=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - CONFIG_PREBOOT="pci enum; usb start;" - # CONFIG_DISPLAY_CPUINFO is not set -diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig -index 4b8e402c89d4..0ac5efec717b 100644 ---- a/configs/rpi_defconfig -+++ b/configs/rpi_defconfig -@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_SYS_LOAD_ADDR=0x1000000 - CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y --CONFIG_DISTRO_DEFAULTS=y - CONFIG_USE_PREBOOT=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set - -From patchwork Thu Jul 27 21:54:30 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Simon Glass -X-Patchwork-Id: 1813970 -X-Patchwork-Delegate: pbrobinson@gmail.com -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.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=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (1024-bit key; - unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 - header.s=google header.b=mBws8fys; - dkim-atps=neutral -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 ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl220N1zz1yZb - for ; Fri, 28 Jul 2023 07:55:38 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 7E187868A9; - Thu, 27 Jul 2023 23:55:29 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -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=chromium.org header.i=@chromium.org - header.b="mBws8fys"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 7F3798687F; Thu, 27 Jul 2023 23:54:47 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, - SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no - version=3.4.2 -Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com - [IPv6:2607:f8b0:4864:20::d31]) - (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 6FD6A86883 - for ; Thu, 27 Jul 2023 23:54:43 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=chromium.org -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sjg@chromium.org -Received: by mail-io1-xd31.google.com with SMTP id - ca18e2360f4ac-7878e573827so57883239f.1 - for ; Thu, 27 Jul 2023 14:54:43 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=chromium.org; s=google; t=1690494882; x=1691099682; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=; - b=mBws8fysMfDnws5xSckJmwYoFnbO4f08B6wlUEznhDpb/FVohJO+FmfQbnHUDUDsSy - Ee6d5JuG8wVUQSapqqsi2JXsNwfvnzsA0e7QaUoJptoauwkl1oKG+AZ91ThkEcjXdL6O - RK775AhnEeLE5jMuVBfe9uFq6Re05aeM+vdsU= -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1690494882; x=1691099682; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=; - b=JCEGP9SG2bCGvzpYyon4ZvzAorqfIf8zfk2pJUGBNzjUUgshrJ61sNPKq511ECI9Iq - 4yxAoqYQDXgSv32IWK7fI0cGnv7QlyXjPSVE42G6W+gO2BZAnd0nUhwVSoV4Llz1vwx5 - RVOUfXyUZVtm/98JYyMavbvbNvnFy2RmefMLDz3Q3ES8eb7l8KclgtnPTpvsNdO4pw4W - MVzDzaNyuZq1tfHjYJz1UTC7G5rfiqkgThZbvc0VAa3wEnxtT4xxFIfebHKkyqbLqQ/6 - CfuFspsQDYnNZ4pVUaM9P6SWPzRKLIFCThE3AZDKEjW9hb9O1MOTzablkioHKNFipH2v - 8aPw== -X-Gm-Message-State: ABy/qLbiMvFNCnHAWkxWhayqbqcbzPbE/txTwyh8SaP8/5b7BdEzsSap - DdDHhSzoDCe+X4IQmkeApNsbmjJmALrfhBJBa1E= -X-Google-Smtp-Source: - APBJJlE+7X+YHtsSdv0glv6+7e+JF2c+SP9bOM3kvNRjEtcpLydgTQTDsxizlaaU3s5ZzSPXDsW9LQ== -X-Received: by 2002:a6b:d902:0:b0:786:cd9b:1ccd with SMTP id - r2-20020a6bd902000000b00786cd9b1ccdmr812254ioc.0.1690494881976; - Thu, 27 Jul 2023 14:54:41 -0700 (PDT) -Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) - by smtp.gmail.com with ESMTPSA id - n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.41 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 27 Jul 2023 14:54:41 -0700 (PDT) -From: Simon Glass -To: U-Boot Mailing List -Cc: Tom Rini , Peter Robinson , - Simon Glass , Albert Aribaud , - Matthias Brugger , Stephen Warren , - Stephen Warren -Subject: [RESEND PATCH v3 3/3] arm: rpi: Switch to a text environment -Date: Thu, 27 Jul 2023 15:54:30 -0600 -Message-ID: <20230727215433.578830-4-sjg@chromium.org> -X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog -In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> -References: <20230727215433.578830-1-sjg@chromium.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.8 at phobos.denx.de -X-Virus-Status: Clean - -Use the new environment format so we can drop most of the config.h file. - -Signed-off-by: Simon Glass ---- - -(no changes since v1) - - board/raspberrypi/rpi/rpi.env | 77 ++++++++++++++++++++++++++ - include/configs/rpi.h | 100 ---------------------------------- - 2 files changed, 77 insertions(+), 100 deletions(-) - create mode 100644 board/raspberrypi/rpi/rpi.env - -diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env -new file mode 100644 -index 000000000000..30228285edde ---- /dev/null -+++ b/board/raspberrypi/rpi/rpi.env -@@ -0,0 +1,77 @@ -+/* SPDX-License-Identifier: GPL-2.0+ */ -+ -+/* environment for Raspberry Pi boards */ -+ -+dhcpuboot=usb start; dhcp u-boot.uimg; bootm -+ -+/* Environment */ -+stdin=serial,usbkbd -+stdout=serial,vidconsole -+stderr=serial,vidconsole -+ -+/* DFU over USB/UDC */ -+#ifdef CONFIG_CMD_DFU -+dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1; -+ config.txt fat 0 1; -+#ifdef CONFIG_ARM64 -+dfu_alt_info+=Image fat 0 1 -+#else -+dfu_alt_info+=zImage fat 0 1 -+#endif -+#endif /* CONFIG_CMD_DFU */ -+ -+/* -+ * Memory layout for where various images get loaded by boot scripts: -+ * -+ * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. -+ * -+ * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, -+ * newer versions place it in high memory. So prevent U-Boot from doing its own -+ * DTB + initrd relocation so that we won't accidentally relocate the initrd -+ * over the firmware-loaded DTB and generally try to lay out things starting -+ * from the bottom of RAM. -+ * -+ * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, -+ * it must be within the first 128M of RAM in order for the kernel's -+ * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed -+ * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The -+ * decompressor also likes to relocate itself to right past the end of the -+ * decompressed kernel, so in total the sum of the compressed and -+ * decompressed kernel needs to be reserved. -+ * -+ * For Aarch64, the kernel image is uncompressed and must be loaded at -+ * text_offset bytes (specified in the header of the Image) into a 2MB -+ * boundary. The 'booti' command relocates the image if necessary. Linux uses -+ * a default text_offset of 0x80000. In summary, loading at 0x80000 -+ * satisfies all these constraints and reserving memory up to 0x02400000 -+ * permits fairly large (roughly 36M) kernels. -+ * -+ * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't -+ * conflict with something else. Reserving 1M for each of them at -+ * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. -+ * -+ * On ARM, both the DTB and any possible initrd must be loaded such that they -+ * fit inside the lowmem mapping in Linux. In practice, this usually means not -+ * more than ~700M away from the start of the kernel image but this number can -+ * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line -+ * parameter given to the kernel. So reserving memory from low to high -+ * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for -+ * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. -+ * Even with the smallest possible CPU-GPU memory split of the CPU getting -+ * only 64M, the remaining 25M starting at 0x02700000 should allow quite -+ * large initrds before they start colliding with U-Boot. -+ */ -+#ifdef CONFIG_ARM64 -+fdt_high=ffffffffffffffff -+initrd_high=ffffffffffffffff -+#else -+fdt_high=ffffffff -+initrd_high=ffffffff -+#endif -+kernel_addr_r=0x00080000 -+scriptaddr=0x02400000 -+pxefile_addr_r=0x02500000 -+fdt_addr_r=0x02600000 -+ramdisk_addr_r=0x02700000 -+ -+boot_targets=mmc usb pxe dhcp -diff --git a/include/configs/rpi.h b/include/configs/rpi.h -index 4160db2d8e14..8e56bdc84a89 100644 ---- a/include/configs/rpi.h -+++ b/include/configs/rpi.h -@@ -13,8 +13,6 @@ - #include - #endif - --/* Architecture, CPU, etc.*/ -- - /* Use SoC timer for AArch32, but architected timer for AArch64 */ - #ifndef CONFIG_ARM64 - #define CFG_SYS_TIMER_RATE 1000000 -@@ -33,102 +31,4 @@ - */ - #define CFG_SYS_SDRAM_SIZE SZ_128M - --/* Devices */ --/* LCD */ -- --/* DFU over USB/UDC */ --#ifdef CONFIG_CMD_DFU --#ifdef CONFIG_ARM64 --#define KERNEL_FILENAME "Image" --#else --#define KERNEL_FILENAME "zImage" --#endif -- --#define ENV_DFU_SETTINGS \ -- "dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;" \ -- "config.txt fat 0 1;" \ -- KERNEL_FILENAME " fat 0 1\0" --#else --#define ENV_DFU_SETTINGS "" --#endif -- --/* Console configuration */ -- --/* Environment */ -- --/* Shell */ -- --/* Environment */ --#define ENV_DEVICE_SETTINGS \ -- "stdin=serial,usbkbd\0" \ -- "stdout=serial,vidconsole\0" \ -- "stderr=serial,vidconsole\0" -- --#ifdef CONFIG_ARM64 --#define FDT_HIGH "ffffffffffffffff" --#define INITRD_HIGH "ffffffffffffffff" --#else --#define FDT_HIGH "ffffffff" --#define INITRD_HIGH "ffffffff" --#endif -- --/* -- * Memory layout for where various images get loaded by boot scripts: -- * -- * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. -- * -- * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, -- * newer versions place it in high memory. So prevent U-Boot from doing its own -- * DTB + initrd relocation so that we won't accidentally relocate the initrd -- * over the firmware-loaded DTB and generally try to lay out things starting -- * from the bottom of RAM. -- * -- * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, -- * it must be within the first 128M of RAM in order for the kernel's -- * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed -- * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The -- * decompressor also likes to relocate itself to right past the end of the -- * decompressed kernel, so in total the sum of the compressed and and -- * decompressed kernel needs to be reserved. -- * -- * For Aarch64, the kernel image is uncompressed and must be loaded at -- * text_offset bytes (specified in the header of the Image) into a 2MB -- * boundary. The 'booti' command relocates the image if necessary. Linux uses -- * a default text_offset of 0x80000. In summary, loading at 0x80000 -- * satisfies all these constraints and reserving memory up to 0x02400000 -- * permits fairly large (roughly 36M) kernels. -- * -- * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't -- * conflict with something else. Reserving 1M for each of them at -- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. -- * -- * On ARM, both the DTB and any possible initrd must be loaded such that they -- * fit inside the lowmem mapping in Linux. In practice, this usually means not -- * more than ~700M away from the start of the kernel image but this number can -- * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line -- * parameter given to the kernel. So reserving memory from low to high -- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for -- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. -- * Even with the smallest possible CPU-GPU memory split of the CPU getting -- * only 64M, the remaining 25M starting at 0x02700000 should allow quite -- * large initrds before they start colliding with U-Boot. -- */ --#define ENV_MEM_LAYOUT_SETTINGS \ -- "fdt_high=" FDT_HIGH "\0" \ -- "initrd_high=" INITRD_HIGH "\0" \ -- "kernel_addr_r=0x00080000\0" \ -- "scriptaddr=0x02400000\0" \ -- "pxefile_addr_r=0x02500000\0" \ -- "fdt_addr_r=0x02600000\0" \ -- "ramdisk_addr_r=0x02700000\0" -- --#define BOOT_TARGETS "mmc usb pxe dhcp" -- --#define CFG_EXTRA_ENV_SETTINGS \ -- "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ -- ENV_DEVICE_SETTINGS \ -- ENV_DFU_SETTINGS \ -- ENV_MEM_LAYOUT_SETTINGS \ -- "boot_targets=" BOOT_TARGETS "\0" -- - #endif diff --git a/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch deleted file mode 100644 index fd032fe..0000000 --- a/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 52b75976133683dc9fe66e8ad35127125f938bed Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 28 Feb 2023 12:04:34 +0000 -Subject: [PATCH 2/2] rpi: Use OF_BOARD rather than OF_EMBED - -The use of OF_EMBED isn't recommended for standard use and the OF_BOARD -is actually a better fit for the Raspberry Pi as the prior firmware -provides a DT that can be used by U-Boot and the subsequent OS too, but -it still allows the loading of a DT from disk as well if users wish -to use the upstream kernel DT. - -Signed-off-by: Peter Robinson ---- - configs/rpi_0_w_defconfig | 2 +- - configs/rpi_2_defconfig | 2 +- - configs/rpi_3_32b_defconfig | 2 +- - configs/rpi_3_b_plus_defconfig | 2 +- - configs/rpi_3_defconfig | 2 +- - configs/rpi_4_32b_defconfig | 1 + - configs/rpi_4_defconfig | 1 + - configs/rpi_arm64_defconfig | 1 + - configs/rpi_defconfig | 2 +- - 9 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig -index 5249b29d76c..8c217848ca2 100644 ---- a/configs/rpi_0_w_defconfig -+++ b/configs/rpi_0_w_defconfig -@@ -23,7 +23,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig -index 154284765f4..bfc5679fb7e 100644 ---- a/configs/rpi_2_defconfig -+++ b/configs/rpi_2_defconfig -@@ -24,7 +24,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index ef1f25d2ad7..54cdcee980a 100644 ---- a/configs/rpi_3_32b_defconfig -+++ b/configs/rpi_3_32b_defconfig -@@ -23,7 +23,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig -index 154615d78a1..3008c7a1c18 100644 ---- a/configs/rpi_3_b_plus_defconfig -+++ b/configs/rpi_3_b_plus_defconfig -@@ -22,7 +22,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index f0cf7f8e236..f7b9108ba00 100644 ---- a/configs/rpi_3_defconfig -+++ b/configs/rpi_3_defconfig -@@ -22,7 +22,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig -index 713b2ee231c..fa20ab767fe 100644 ---- a/configs/rpi_4_32b_defconfig -+++ b/configs/rpi_4_32b_defconfig -@@ -24,6 +24,7 @@ CONFIG_CMD_MMC=y - CONFIG_CMD_PCI=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig -index 24f70b14fe8..741d4dbbbf4 100644 ---- a/configs/rpi_4_defconfig -+++ b/configs/rpi_4_defconfig -@@ -24,6 +24,7 @@ CONFIG_CMD_MMC=y - CONFIG_CMD_PCI=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig -index 1d1ff12a58c..5e1195dd786 100644 ---- a/configs/rpi_arm64_defconfig -+++ b/configs/rpi_arm64_defconfig -@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y - CONFIG_CMD_PCI=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y - CONFIG_TFTP_TSIZE=y -diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig -index 28b92b14456..1504093eddf 100644 ---- a/configs/rpi_defconfig -+++ b/configs/rpi_defconfig -@@ -23,7 +23,7 @@ CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y - CONFIG_CMD_FS_UUID=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y --- -2.39.2 - diff --git a/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch b/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch new file mode 100644 index 0000000..6d54fa7 --- /dev/null +++ b/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch @@ -0,0 +1,256 @@ +From patchwork Tue Aug 4 13:39:15 2026 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Gregor Herburger +X-Patchwork-Id: 2280865 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=fail reason="signature verification failed" (2048-bit key; + unprotected) header.d=lists.u-boot-project.org + header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default + header.b=DFFhfbAr; + dkim-atps=neutral +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org + (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; + envelope-from=u-boot-bounces@lists.u-boot-project.org; + receiver=patchwork.ozlabs.org) +Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4hDvm8025rz1xqD + for ; Tue, 04 Aug 2026 23:39:35 +1000 (AEST) +Received: from localhost (localhost [127.0.0.1]) + by smtp3.osuosl.org (Postfix) with ESMTP id 2536960600; + Tue, 4 Aug 2026 13:39:34 +0000 (UTC) +X-Virus-Scanned: amavis at osuosl.org +Received: from smtp3.osuosl.org ([127.0.0.1]) + by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP + id T9Kb3BtsvOX4; Tue, 4 Aug 2026 13:39:33 +0000 (UTC) +X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; + helo=lists1.osuosl.org; + envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= +DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4350560615 +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=lists.u-boot-project.org ; s=default; t=1785850773; + bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; + h=From:Date:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive: + List-Post:List-Help:List-Subscribe:From; + b=DFFhfbArDuHrxJEuZryw3QEVVVcavwAril7tcxulQVs6jkVOCAjh7GEuhkq8EyLIq + suopR14b5dkKpVbbSr23u2v9jRgpynJQ5WBq6kIJSqjmZt58tZeMbaX76PRHjOs8+s + QHatP0Vxf1ny0BOpVlZLZ/LlAsQhypNhW6/qjH0X9OLeNq0IFjSZ5faD3z463b62m0 + yMuPrAXa/kuPPInxGG6HsCPkRzFH3x9hM15r7ipSbXODTRXaVBSVScp03eAeo6zw/d + nll/wcjCEe/78XX5o1Tsug951g7H8meDRnGQHJZtvbEmHdDB1wkTXYdFI2EGwnDxsz + W3dcHoUveJgqQ== +Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) + by smtp3.osuosl.org (Postfix) with ESMTP id 4350560615; + Tue, 4 Aug 2026 13:39:33 +0000 (UTC) +X-Original-To: u-boot@lists.u-boot-project.org +Delivered-To: u-boot@lists.u-boot-project.org +Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) + by lists1.osuosl.org (Postfix) with ESMTP id 3009E2BF + for ; Tue, 4 Aug 2026 13:39:31 +0000 (UTC) +Received: from localhost (localhost [127.0.0.1]) + by smtp1.osuosl.org (Postfix) with ESMTP id 222DC8086C + for ; Tue, 4 Aug 2026 13:39:31 +0000 (UTC) +X-Virus-Scanned: amavis at osuosl.org +Received: from smtp1.osuosl.org ([127.0.0.1]) + by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP + id W5OoNRat257d for ; + Tue, 4 Aug 2026 13:39:30 +0000 (UTC) +X-Greylist: delayed 94239 seconds by postgrey-1.37 at util1.osuosl.org; + Tue, 04 Aug 2026 13:39:29 UTC +DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1B0B580827 +DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1B0B580827 +Received-SPF: Pass (mailfrom) identity=mailfrom; + client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; + envelope-from=gregor.herburger@linutronix.de; receiver= +Received: from galois.linutronix.de (Galois.linutronix.de + [IPv6:2a0a:51c0:0:12e:550::1]) + by smtp1.osuosl.org (Postfix) with ESMTPS id 1B0B580827 + for ; Tue, 4 Aug 2026 13:39:29 +0000 (UTC) +From: Gregor Herburger +Date: Tue, 04 Aug 2026 15:39:15 +0200 +Subject: [PATCH v3] rpi: copy /chosen/bootloader partition and set + boot_partition +MIME-Version: 1.0 +Message-Id: <20260804-tryboot2-v3-1-b0bc282a923b@linutronix.de> +X-B4-Tracking: v=1; b=H4sIAILrcWoC/22OywrCMBBFf0WyNpKHbYor/0O6SNOJjWgiSRpaS + v/dpCKCyKwO3HvmLiiANxDQabcgD8kE42wGvt8hNUh7BWz6zIgRVpOGcBz93DkXGW5UxRjlooZ + Kohx/etBm2lSX9s1h7G6gYumXhPbugePgQX6VgjQfJU4U5+OSHiVIpQU9340do3fWTIceimIwI + To/b3MTK6/+LEssezhRRFDNAGj142nXdX0BG/Mh6/kAAAA= +X-Change-ID: 20260803-tryboot2-8c5221376e5a +To: u-boot@lists.u-boot-project.org +Cc: Matthias Brugger , + Peter Robinson , Tom Rini , + =?utf-8?q?Filip_Kokosi=C5=84ski?= , + Ilias Apalodimas , + Gregor Herburger +X-Developer-Signature: v=1; a=ed25519-sha256; t=1785850764; l=3191; + i=gregor.herburger@linutronix.de; s=20260226; h=from:subject:message-id; + bh=4mVT/kFDHBnjUUlqljWBZ+t7aLa+t+gE+t/hUJ4uc5g=; + b=TBKoGScdkXGUfpGLvpVtYHkg4LDoOR/8M/do2dqU2QlR+9Z9YFNN6x88pDC7UIDeXrJS+Hpeg + e3YsfK6fOcoBgXOuzz3Aabmmn9//OQN7WG6Vz15rSxX0uVZ96TFcvf5 +X-Developer-Key: i=gregor.herburger@linutronix.de; a=ed25519; + pk=u72Lv7+/lS5CC1hmSrb17lv/6CK7HBh4Lvz77PHA5LM= +X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=linutronix.de; s=2020; t=1785850765; + h=from:from:reply-to:subject:subject:date:date:message-id:message-id: + to:to:cc:cc:mime-version:mime-version:content-type:content-type: + content-transfer-encoding:content-transfer-encoding; + bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; + b=plU5oAFojHvTlDhOGINsdXnnc0AnS9OY0C4LB9dSy9uyrPKBBpLWGWj3xmNoX87lLZlhO9 + z0H+R5gqw5NfxbTVYFHqZnW+pW4xJQFW9fMYSU8/k2RRg9JEqP+NrZ8Y720ujlycxn05vP + sF7cD+TEsxvyBhnbRyq82obvpdQIYj0D6T3UkHyz0U4G+5k8dVhhv/mqGaSfY8xW4cCl5G + gIE2QIsuzB4g4pQoW70DrLd7cyqqDM0iDrrXFZL2a7DlnYgbe1ULVXMl05UMMQGfBkHmog + pt8e+zvO4AVA3G8CKcUQhhWOZm7uycUpdrNuyPKg9K7JB6MEd9dHbucVa+v8Yg== +X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; + d=linutronix.de; s=2020e; t=1785850765; + h=from:from:reply-to:subject:subject:date:date:message-id:message-id: + to:to:cc:cc:mime-version:mime-version:content-type:content-type: + content-transfer-encoding:content-transfer-encoding; + bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; + b=NAMrZHs0ETYIMiwBHLvCoR3NOcg/kwkAxVRq6Q/pdhfkQJjxtHU3mZFV520QjbE1yeix0S + nJyAqHgyKVlRiZCw== +X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; + dmarc=pass (p=none dis=none) + header.from=linutronix.de +X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; + dkim=pass (2048-bit key, unprotected) header.d=linutronix.de + header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=plU5oAFo; + dkim=pass header.d=linutronix.de header.i=@linutronix.de + header.a=ed25519-sha256 header.s=2020e header.b=NAMrZHs0 +X-BeenThere: u-boot@lists.u-boot-project.org +X-Mailman-Version: 2.1.30 +Precedence: list +List-Id: U-Boot discussion +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.u-boot-project.org +Sender: "U-Boot" + +The Raspberry Pi has the "tryboot" feature where it can boot from a +different partition enabling failsafe A/B updates. After boot the +firmware sets 'partition' property in /chosen/bootloader. + +Copy the /chosen/bootloader node to the device tree. + +Set the env variable boot_partition accordingly to allow boards to +create a bootcmd based on the boot partition. + +Reviewed-by: Matthias Brugger +Signed-off-by: Gregor Herburger +--- +Changes in v3: +- Copy the complete '/chosen/bootloader' node instead of only the + partition property +- Link to v2: https://patch.msgid.link/20260803-tryboot2-v2-1-30c071f2ee15@linutronix.de + +Changes in v2: +- update Reviewed-by tag +--- + board/raspberrypi/rpi/rpi.c | 51 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 51 insertions(+) + + +--- +base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5 +change-id: 20260803-tryboot2-8c5221376e5a + +Best regards, +-- +Gregor Herburger + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 1da5df92351c..ba8a2c1ba4cf 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -480,6 +480,20 @@ static void set_serial_number(void) + env_set("serial#", serial_string); + } + ++static void set_boot_partition_fdt(void) ++{ ++ void *fdtp = (void *)gd->fdt_blob; ++ u32 partition; ++ ++ partition = fdt_getprop_u32_default(fdtp, "/chosen/bootloader", "partition", 1); ++ if (!partition) { ++ printf("Failed to the get partition property.\n"); ++ return; ++ } ++ ++ env_set_ulong("boot_partition", partition); ++} ++ + int misc_init_r(void) + { + set_fdt_addr(); +@@ -489,6 +503,7 @@ int misc_init_r(void) + set_board_info(); + #endif + set_serial_number(); ++ set_boot_partition_fdt(); + + return 0; + } +@@ -579,6 +594,39 @@ int board_fdt_blob_setup(void **fdtp) + return 0; + } + ++int copy_node_all_properties(void *dst, void *src, const char *path, const char *node) ++{ ++ int src_parent, dst_parent; ++ int src_node, dst_node; ++ int prop; ++ int len; ++ ++ src_parent = fdt_path_offset(src, path); ++ dst_parent = fdt_path_offset(dst, path); ++ if (src_parent < 0 || dst_parent < 0) ++ return -1; ++ ++ src_node = fdt_subnode_offset(src, src_parent, node); ++ if (src_node < 0) ++ return -1; ++ ++ dst_node = fdt_find_or_add_subnode(dst, dst_parent, node); ++ if (dst_node < 0) ++ return -1; ++ ++ fdt_for_each_property_offset(prop, src, src_node) { ++ const char *name; ++ const void *value = fdt_getprop_by_offset(src, prop, &name, &len); ++ ++ if (!value || !name) ++ continue; ++ ++ fdt_setprop(dst, dst_node, name, value, len); ++ } ++ ++ return 0; ++} ++ + int copy_property(void *dst, void *src, char *path, char *property) + { + int dst_offset, src_offset; +@@ -641,6 +689,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) + + /* copy uart clk as provided by the firmware */ + copy_property(fdt, fw_fdt, "/clocks/clk-uart", "clock-frequency"); ++ ++ /* Copy the bootloader node */ ++ copy_node_all_properties(fdt, fw_fdt, "/chosen", "bootloader"); + } + + int ft_board_setup(void *blob, struct bd_info *bd) diff --git a/smbios-Simplify-reporting-of-unknown-values.patch b/smbios-Simplify-reporting-of-unknown-values.patch deleted file mode 100644 index 0aef8e7..0000000 --- a/smbios-Simplify-reporting-of-unknown-values.patch +++ /dev/null @@ -1,544 +0,0 @@ -From patchwork Tue Sep 6 13:44:25 2022 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Ilias Apalodimas -X-Patchwork-Id: 1674857 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.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=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 - header.s=google header.b=wUY2RcfH; - dkim-atps=neutral -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 ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4MMRT72TCPz1yhd - for ; Tue, 6 Sep 2022 23:44:43 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 498F2849CE; - Tue, 6 Sep 2022 15:44:39 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="wUY2RcfH"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id A8842849CF; Tue, 6 Sep 2022 15:44:37 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, - T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com - [IPv6:2a00:1450:4864:20::52d]) - (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 403A5849AA - for ; Tue, 6 Sep 2022 15:44:35 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=linaro.org -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org -Received: by mail-ed1-x52d.google.com with SMTP id x73so8243364ede.10 - for ; Tue, 06 Sep 2022 06:44:35 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:from:to:cc:subject:date; - bh=YBbhuTYZcGSI4FSsstTIADofj6ZEC8vsTpd/U8gWDlU=; - b=wUY2RcfHqhMQ1dgd2my7jtmfsgHjAF8xFa3HnTkB/tUGQL/oQyls7ODcVui/VImHlf - Ah33xwYqK1nwEuoS8HqkWcksTr48pKf/EikkkBbHif0XnfS4oySI3RHo7WW6Yi8HQUoP - tbuQ3LPSYgo+62HaqTYVoJ2g6jc1qiEFe/+y6hR2BfmyKd0g/SxwLS9P1QuQosdhX+uO - DKWWukFYFV06Nn7x/3oiyoXq33VAWatgQBv/sPC7dBgh/EpnobDpI8NhNhJAkFIcAUrU - B91PBwNRtB1Lsf+Eo3WjLtQbinL3h/VvogRSvZEoKCmHY5dbTYB8G1uNzksnK6QecIRu - q9qA== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:x-gm-message-state:from:to:cc:subject:date; - bh=YBbhuTYZcGSI4FSsstTIADofj6ZEC8vsTpd/U8gWDlU=; - b=KfQ/P0sYI7szdfgs6GA5oPXctzQ8yfxjRs7PgVHFg7jl09SeFl3jpKzaMGbC7GlEgM - JXt2VP6w9TndL/D71cR8w9BObY2mZJoLRP/s25LpSU6izkisnuueyGeqKegGEfGE+4B3 - 9xaG/EUlPZmHlAem6bOf9Dl6lE5WkT6SnTDopwODIbcTAWlIa8Gjtw9XBaaa8iRnVuTn - S3IwY9R7DLaSFBQXTVHmAYnhCc2b5XCRKlSNwmDE65+LqvOdAu3MTbA5/YyL9pEPjHi9 - 4q0ZQksAE0olpQQwxyjHrvz7h7ktSuJoesa/A4dX3PEbzSbBmPI1CGtPy27/luAUCH3F - e8Vw== -X-Gm-Message-State: ACgBeo2YRons+T+T1+BdP4+uyEFge3LrQ/gS2VYwuVZg325XGZ8HVnXH - Lq8no+qriMaFPrto6+L889ufiYLHsm+dZQ== -X-Google-Smtp-Source: - AA6agR6coLdFIB45xwZJzpltd9Qfi6bEAn6J22G77ibwSDNyt1L1YbxRL9dlK4pmf9A6n2RN31Ug2w== -X-Received: by 2002:aa7:c84f:0:b0:446:2bfb:5a63 with SMTP id - g15-20020aa7c84f000000b004462bfb5a63mr17498596edt.172.1662471874779; - Tue, 06 Sep 2022 06:44:34 -0700 (PDT) -Received: from localhost.localdomain ([46.103.15.185]) - by smtp.gmail.com with ESMTPSA id - p23-20020a056402501700b0043ba7df7a42sm8473330eda.26.2022.09.06.06.44.33 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 06 Sep 2022 06:44:34 -0700 (PDT) -From: Ilias Apalodimas -To: u-boot@lists.denx.de -Cc: trini@konsulko.com, sjg@chromium.org, heinrich.schuchardt@canonical.com, - pbrobinson@gmail.com, Ilias Apalodimas -Subject: [PATCH 1/2] smbios: Simplify reporting of unknown values -Date: Tue, 6 Sep 2022 16:44:25 +0300 -Message-Id: <20220906134426.53748-1-ilias.apalodimas@linaro.org> -X-Mailer: git-send-email 2.37.2 -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 - -If a value is not valid during the DT or SYSINFO parsing, we explicitly -set that to "Unknown Product" and "Unknown" for the product and -manufacturer respectively. It's cleaner if we move the checks insisde -smbios_add_string() and always report "Unknown" regardless of the missing -field. - -pre-patch dmidecode - -Handle 0x0001, DMI type 1, 27 bytes -System Information - Manufacturer: Unknown - Product Name: Unknown Product - Version: Not Specified - Serial Number: Not Specified - UUID: Not Settable - Wake-up Type: Reserved - SKU Number: Not Specified - Family: Not Specified - -Handle 0x0002, DMI type 2, 14 bytes -Base Board Information - Manufacturer: Unknown - Product Name: Unknown Product - Version: Not Specified - Serial Number: Not Specified - Asset Tag: Not Specified - Features: - Board is a hosting board - Location In Chassis: Not Specified - Chassis Handle: 0x0000 - Type: Motherboard - - -post-patch dmidecode: - -Handle 0x0001, DMI type 1, 27 bytes -System Information - Manufacturer: Unknown - Product Name: Unknown - Version: Unknown - Serial Number: Unknown - UUID: Not Settable - Wake-up Type: Reserved - SKU Number: Unknown - Family: Unknown - -Handle 0x0002, DMI type 2, 14 bytes -Base Board Information - Manufacturer: Unknown - Product Name: Unknown - Version: Unknown - Serial Number: Not Specified - Asset Tag: Unknown - Features: - Board is a hosting board - Location In Chassis: Not Specified - Chassis Handle: 0x0000 - Type: Motherboard - -Signed-off-by: Ilias Apalodimas ---- - lib/smbios.c | 17 +++-------------- - 1 file changed, 3 insertions(+), 14 deletions(-) - -diff --git a/lib/smbios.c b/lib/smbios.c -index d7f4999e8b2a..fcc8686993ef 100644 ---- a/lib/smbios.c -+++ b/lib/smbios.c -@@ -102,7 +102,7 @@ static int smbios_add_string(struct smbios_ctx *ctx, const char *str) - int i = 1; - char *p = ctx->eos; - -- if (!*str) -+ if (!str || !*str) - str = "Unknown"; - - for (;;) { -@@ -151,8 +151,7 @@ static int smbios_add_prop_si(struct smbios_ctx *ctx, const char *prop, - const char *str; - - str = ofnode_read_string(ctx->node, prop); -- if (str) -- return smbios_add_string(ctx, str); -+ return smbios_add_string(ctx, str); - } - - return 0; -@@ -231,7 +230,7 @@ static int smbios_write_type0(ulong *current, int handle, - t->vendor = smbios_add_string(ctx, "U-Boot"); - - t->bios_ver = smbios_add_prop(ctx, "version"); -- if (!t->bios_ver) -+ if (!strcmp(ctx->last_str, "Unknown")) - t->bios_ver = smbios_add_string(ctx, PLAIN_VERSION); - if (t->bios_ver) - gd->smbios_version = ctx->last_str; -@@ -281,11 +280,7 @@ static int smbios_write_type1(ulong *current, int handle, - fill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, handle); - smbios_set_eos(ctx, t->eos); - t->manufacturer = smbios_add_prop(ctx, "manufacturer"); -- if (!t->manufacturer) -- t->manufacturer = smbios_add_string(ctx, "Unknown"); - t->product_name = smbios_add_prop(ctx, "product"); -- if (!t->product_name) -- t->product_name = smbios_add_string(ctx, "Unknown Product"); - t->version = smbios_add_prop_si(ctx, "version", - SYSINFO_ID_SMBIOS_SYSTEM_VERSION); - if (serial_str) { -@@ -315,11 +310,7 @@ static int smbios_write_type2(ulong *current, int handle, - fill_smbios_header(t, SMBIOS_BOARD_INFORMATION, len, handle); - smbios_set_eos(ctx, t->eos); - t->manufacturer = smbios_add_prop(ctx, "manufacturer"); -- if (!t->manufacturer) -- t->manufacturer = smbios_add_string(ctx, "Unknown"); - t->product_name = smbios_add_prop(ctx, "product"); -- if (!t->product_name) -- t->product_name = smbios_add_string(ctx, "Unknown Product"); - t->version = smbios_add_prop_si(ctx, "version", - SYSINFO_ID_SMBIOS_BASEBOARD_VERSION); - t->asset_tag_number = smbios_add_prop(ctx, "asset-tag"); -@@ -344,8 +335,6 @@ static int smbios_write_type3(ulong *current, int handle, - fill_smbios_header(t, SMBIOS_SYSTEM_ENCLOSURE, len, handle); - smbios_set_eos(ctx, t->eos); - t->manufacturer = smbios_add_prop(ctx, "manufacturer"); -- if (!t->manufacturer) -- t->manufacturer = smbios_add_string(ctx, "Unknown"); - t->chassis_type = SMBIOS_ENCLOSURE_DESKTOP; - t->bootup_state = SMBIOS_STATE_SAFE; - t->power_supply_state = SMBIOS_STATE_SAFE; - -From patchwork Tue Sep 6 13:44:26 2022 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Ilias Apalodimas -X-Patchwork-Id: 1674858 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.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=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 - header.s=google header.b=wBCOiKYw; - dkim-atps=neutral -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 ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4MMRTM5pHRz1yhk - for ; Tue, 6 Sep 2022 23:44:55 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 3639F849EA; - Tue, 6 Sep 2022 15:44:53 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="wBCOiKYw"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id E57FC84A1A; Tue, 6 Sep 2022 15:44:51 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, - T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com - [IPv6:2a00:1450:4864:20::52f]) - (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 60CD0849AA - for ; Tue, 6 Sep 2022 15:44:49 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=linaro.org -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org -Received: by mail-ed1-x52f.google.com with SMTP id z21so5172669edi.1 - for ; Tue, 06 Sep 2022 06:44:49 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date; - bh=KsGBN7dLy4q3TeQQmsDywPtn2m3V5eSK1ppBgO8D3xg=; - b=wBCOiKYwM4mGDZUo6l68tblLVt57cCnO0dlzFPj9+m6cwKXe3agxiM3w4t9T5c822i - vHmFd2F08bUrX81t/h4PDzg0mngbB9Rc9o4i3td1G9Zw6NdmogU7T7gEUyKKcTc80AWl - QbbYgxulWB5Eg2dTQ3tlb2xmb5BU1/X0zl/rOC6l89urohdQtpIJ4XgFlijFlBgxh8XD - aHytniLKGTLlVdJAIobcF9aM/ihpO7LPTDZ4SPCBt4t9+UWGW7vuTPDPDkCRiaaFestv - 9P32ZrGj43CH92zBQtpgZICS0UhzD3oYWJkwsmFbfxddgY5VD5SQi69VzD1CfFOvTGgX - 5HBg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date; - bh=KsGBN7dLy4q3TeQQmsDywPtn2m3V5eSK1ppBgO8D3xg=; - b=h1yL2aMN8ooI48PrqxwSNjw+MAj6qGtRMJjV8AWmRfv7nVQ97I/cXbauy/NItVEWP0 - eO4WFqVMQO+xyGn1S5w0MXYGVbEpVNxf0gwM7n7Ad+K2E2PDHyu6glGTvcqCW11gPGOJ - uNDyo6pu7OtmOBso2OaL5eMGhw66ZGqQbzlQtO0mhqJf1RtQ9fRduRZrfTzAR9wIrM4Y - qR3iK6b4O97tu0W0SctGf3rCNzI2bDv/zBKRvfSJ6q7s4DhLDxBJyQjySBo0Ee6UIwKc - 5q8zldycF/JfIbqzlJe6DaeoeDbzJ7qLBPvDmxQ7owSV9ftEa8lh/IIdPn13uDL2Bxjz - WLbg== -X-Gm-Message-State: ACgBeo0DsGDn9dDw7GQ5K44iwyXJqKH0pM3NWFxuDlmBNzKLyzH8SEzb - 03ImCopxuD/6oyVtH7ygeEl2Cc6GlNzVNQ== -X-Google-Smtp-Source: - AA6agR6kpp8KIkqO+/pui5Dy7mRTrk+S2U0k99eVOJv3PGkIDZ8H0oqIBypOwW5nogFds0FAjF4TXg== -X-Received: by 2002:a05:6402:f18:b0:44d:9a45:394 with SMTP id - i24-20020a0564020f1800b0044d9a450394mr12375719eda.138.1662471889015; - Tue, 06 Sep 2022 06:44:49 -0700 (PDT) -Received: from localhost.localdomain ([46.103.15.185]) - by smtp.gmail.com with ESMTPSA id - p23-20020a056402501700b0043ba7df7a42sm8473330eda.26.2022.09.06.06.44.48 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 06 Sep 2022 06:44:48 -0700 (PDT) -From: Ilias Apalodimas -To: u-boot@lists.denx.de -Cc: trini@konsulko.com, sjg@chromium.org, heinrich.schuchardt@canonical.com, - pbrobinson@gmail.com, Ilias Apalodimas -Subject: [PATCH 2/2] smbios: Fallback to the default DT if sysinfo nodes are - missing -Date: Tue, 6 Sep 2022 16:44:26 +0300 -Message-Id: <20220906134426.53748-2-ilias.apalodimas@linaro.org> -X-Mailer: git-send-email 2.37.2 -In-Reply-To: <20220906134426.53748-1-ilias.apalodimas@linaro.org> -References: <20220906134426.53748-1-ilias.apalodimas@linaro.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 - -In order to fill in the SMBIOS tables U-Boot currently relies on a -"u-boot,sysinfo-smbios" compatible node. This is fine for the boards -that already include such nodes. However with some recent EFI changes, -the majority of boards can boot up distros, which usually rely on -things like dmidecode etc for their reporting. For boards that -lack this special node the SMBIOS output looks like: - -System Information - Manufacturer: Unknown - Product Name: Unknown - Version: Unknown - Serial Number: Unknown - UUID: Not Settable - Wake-up Type: Reserved - SKU Number: Unknown - Family: Unknown - -This looks problematic since most of the info are "Unknown". The DT spec -specifies standard properties containing relevant information like -'model' and 'compatible' for which the suggested format is -. So let's add a last resort to our current -smbios parsing. If none of the sysinfo properties are found, we can -scan the root node for 'model' and 'compatible'. - -pre-patch dmidecode: - -Handle 0x0001, DMI type 1, 27 bytes -System Information - Manufacturer: Unknown - Product Name: Unknown - Version: Unknown - Serial Number: Unknown - UUID: Not Settable - Wake-up Type: Reserved - SKU Number: Unknown - Family: Unknown - -Handle 0x0002, DMI type 2, 14 bytes -Base Board Information - Manufacturer: Unknown - Product Name: Unknown - Version: Unknown - Serial Number: Not Specified - Asset Tag: Unknown - Features: - Board is a hosting board - Location In Chassis: Not Specified - Chassis Handle: 0x0000 - Type: Motherboard - -Handle 0x0003, DMI type 3, 21 bytes -Chassis Information - Manufacturer: Unknown - Type: Desktop - Lock: Not Present - Version: Not Specified - Serial Number: Not Specified - Asset Tag: Not Specified - Boot-up State: Safe - Power Supply State: Safe - Thermal State: Safe - Security Status: None - OEM Information: 0x00000000 - Height: Unspecified - Number Of Power Cords: Unspecified - Contained Elements: 0 - - -post-pastch dmidecode: - -Handle 0x0001, DMI type 1, 27 bytes -System Information - Manufacturer: socionext,developer-box - Product Name: Socionext Developer Box - Version: Unknown - Serial Number: Unknown - UUID: Not Settable - Wake-up Type: Reserved - SKU Number: Unknown - Family: Unknown - -Handle 0x0002, DMI type 2, 14 bytes -Base Board Information - Manufacturer: socionext,developer-box - Product Name: Socionext Developer Box - Version: Unknown - Serial Number: Not Specified - Asset Tag: Unknown - Features: - Board is a hosting board - Location In Chassis: Not Specified - Chassis Handle: 0x0000 - Type: Motherboard - -Handle 0x0003, DMI type 3, 21 bytes -Chassis Information - Manufacturer: socionext,developer-box - Type: Desktop - Lock: Not Present - Version: Not Specified - Serial Number: Not Specified - Asset Tag: Not Specified - Boot-up State: Safe - Power Supply State: Safe - Thermal State: Safe - Security Status: None - OEM Information: 0x00000000 - Height: Unspecified - Number Of Power Cords: Unspecified - Contained Elements: 0 - - -Signed-off-by: Ilias Apalodimas ---- - lib/smbios.c | 41 +++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 39 insertions(+), 2 deletions(-) - -diff --git a/lib/smbios.c b/lib/smbios.c -index fcc8686993ef..f2eb961f514b 100644 ---- a/lib/smbios.c -+++ b/lib/smbios.c -@@ -43,6 +43,20 @@ - - DECLARE_GLOBAL_DATA_PTR; - -+/** -+ * struct sysifno_to_dt - Mapping of sysinfo strings to DT -+ * -+ * @sysinfo_str: sysinfo string -+ * @dt_str: DT string -+ */ -+static const struct { -+ const char *sysinfo_str; -+ const char *dt_str; -+} sysifno_to_dt[] = { -+ { .sysinfo_str = "product", .dt_str = "model" }, -+ { .sysinfo_str = "manufacturer", .dt_str = "compatible" }, -+}; -+ - /** - * struct smbios_ctx - context for writing SMBIOS tables - * -@@ -87,6 +101,18 @@ struct smbios_write_method { - const char *subnode_name; - }; - -+static const char *convert_sysinfo_to_dt(const char *sysinfo_str) -+{ -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(sysifno_to_dt); i++) { -+ if (!strcmp(sysinfo_str, sysifno_to_dt[i].sysinfo_str)) -+ return sysifno_to_dt[i].dt_str; -+ } -+ -+ return NULL; -+} -+ - /** - * smbios_add_string() - add a string to the string area - * -@@ -148,9 +174,20 @@ static int smbios_add_prop_si(struct smbios_ctx *ctx, const char *prop, - return smbios_add_string(ctx, val); - } - if (IS_ENABLED(CONFIG_OF_CONTROL)) { -- const char *str; -+ const char *str = NULL; - -- str = ofnode_read_string(ctx->node, prop); -+ /* -+ * If the node is not valid fallback and try the entire DT -+ * so we can at least fill in maufacturer and board type -+ */ -+ if (!ofnode_valid(ctx->node)) { -+ const char *nprop = convert_sysinfo_to_dt(prop); -+ -+ if (nprop) -+ str = ofnode_read_string(ofnode_root(), nprop); -+ } else { -+ str = ofnode_read_string(ctx->node, prop); -+ } - return smbios_add_string(ctx, str); - } - diff --git a/sources b/sources index 150374f..08618e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-2023.07.tar.bz2) = c11c2dd8e44babf7d5c15c28587139f0fa7e73833bf6d4902b46780a6ed2199d007db4fec579f10b041da478dfa8c6c21e6cee76cfd65ec6cc6860c116bbc0fb +SHA512 (u-boot-v2026.10-rc3.tar.bz2) = e993f5d78a1ac0eb11f00e3730ff23eb880e206036f78c3eb74852b846a23d59111b4b07f4ced2c88c61a8c1627036c3cc32717c0efcf819376c5cd0a34183d2 diff --git a/uboot-tools.spec b/uboot-tools.spec index 22ab014..056cc94 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,37 +1,56 @@ -#global candidate rc0 +%global candidate rc3 %if 0%{?rhel} %bcond_with toolsonly %else %bcond_without toolsonly %endif +# Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git) +%global opensbi opensbi + Name: uboot-tools -Version: 2023.07 -Release: 3%{?candidate:.%{candidate}}%{?dist} +Version: 2026.10 +Release: 0.3%{?candidate:.%{candidate}}%{?dist} Epoch: 1 Summary: U-Boot utilities -License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ -URL: http://www.denx.de/wiki/U-Boot - +# Automatically converted from old format: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ - review is highly recommended. +License: GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LGPL-2.1-or-later AND LGPL-2.0-or-later +URL: https://u-boot-project.org/ ExcludeArch: s390x -Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 +Source0: https://git.u-boot-project.org/u-boot/u-boot/-/archive/v%{version}%{?candidate:-%{candidate}}/u-boot-v%{version}%{?candidate:-%{candidate}}.tar.bz2 Source1: aarch64-boards +Source2: riscv64-boards +Source3: x86_64-boards -# Fedoraisms patches -# Needed to find DT on boot partition that's not the first partition -Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch -Patch2: smbios-Simplify-reporting-of-unknown-values.patch -Patch3: 0001-disable-NFS-support-by-default.patch -Patch4: fix-release-rev.patch +# Fedora patches to enable/disable features +Patch1: disable-VBE-by-default.patch +Patch2: enable-bootmenu-by-default.patch +# This is now legacy, most devices use bootflow, we keep this for the laggards +Patch3: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch +# Identify VFAT partitions as ESP, allows EFI setvar on our images +Patch4: uefi-Add-all-options-for-EFI-System-Partitions.patch +# New function to find fdt for loading from disk +Patch5: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch +# Enable UEFI SetVariable for devices without backed storage +Patch6: uefi-enable-SetVariableRT-with-volotile-storage.patch +# Enable UEFI HTTPS boot for all Fedora firmware +Patch7: uefi-enable-https-boot-by-default.patch -# Board fixes and enablement -# RPi - uses RPI firmware device tree for HAT support -Patch5: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch +# Device improvments +# USB-PD improvements +Patch10: USB-PD-TCPM-improvements.patch # Rockchips improvements -Patch6: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch -Patch7: 0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch -# Other fixes -Patch8: disable-VBE-by-default.patch +Patch11: rockchip-Enable-preboot-start-for-pci-usb.patch +Patch13: rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch +# Jetson fixes +Patch14: p3450-fix-board.patch +Patch15: JetsonTX2-Fix-upstream-device-tree-naming.patch +# Fix AllWinner +Patch16: Allwinner-fix-booting-on-a-number-of-devices.patch +# RPi +Patch20: Fix-NVMe-not-only-on-Raspberry-Pi-5.patch +Patch21: raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch +Patch22: rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch BuildRequires: bc BuildRequires: bison @@ -42,7 +61,13 @@ BuildRequires: gnutls-devel BuildRequires: libuuid-devel BuildRequires: make BuildRequires: ncurses-devel +%if 0%{?fedora} > 44 +BuildRequires: openssl3-devel +BuildRequires: openssl3-devel-engine +%else BuildRequires: openssl-devel +BuildRequires: openssl-devel-engine +%endif BuildRequires: perl-interpreter BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -52,7 +77,13 @@ BuildRequires: swig %if %{with toolsonly} %ifarch aarch64 BuildRequires: arm-trusted-firmware-armv8 +BuildRequires: optee-os-firmware-armv8 +BuildRequires: crust-firmware BuildRequires: python3-pyelftools +BuildRequires: xxd +%endif +%ifarch riscv64 +BuildRequires: %{opensbi} %endif %endif Requires: dtc @@ -70,12 +101,30 @@ BuildArch: noarch %description -n uboot-images-armv8 U-Boot firmware binaries for aarch64 boards %endif + +%ifarch riscv64 +%package -n uboot-images-riscv64 +Summary: U-Boot firmware images for riscv64 boards +BuildArch: noarch + +%description -n uboot-images-riscv64 +U-Boot firmware binaries for riscv64 boards +%endif + +%ifarch x86_64 +%package -n uboot-images-x86_64 +Summary: U-Boot firmware images for x86_64 boards +BuildArch: noarch + +%description -n uboot-images-x86_64 +U-Boot firmware binaries for x86_64 boards +%endif %endif %prep -%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}} +%autosetup -p1 -n u-boot-v%{version}%{?candidate:-%{candidate}} -cp %SOURCE1 . +cp %SOURCE1 %SOURCE2 %SOURCE3 . %build mkdir builds @@ -84,50 +133,67 @@ mkdir builds %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/ %if %{with toolsonly} -%ifarch aarch64 +# OpenSBI firmware is distributed in U-Boot SPL images +%ifarch riscv64 +export OPENSBI=%{_datadir}/%{opensbi}/generic/firmware/fw_dynamic.bin +%endif + +%ifarch aarch64 riscv64 x86_64 for board in $(cat %{_arch}-boards) do echo "Building board: $board" mkdir builds/$(echo $board)/ # ATF selection, needs improving, suggestions of ATF SoC to Board matrix welcome - sun50i=(a64-olinuxino amarula_a64_relic bananapi_m2_plus_h5 bananapi_m64 libretech_all_h3_cc_h5 nanopi_a64 nanopi_neo2 nanopi_neo_plus2 orangepi_pc2 orangepi_prime orangepi_win orangepi_zero_plus orangepi_zero_plus2 pine64-lts pine64_plus pinebook pinephone pinetab sopine_baseboard teres_i) + sun50i=(a64-olinuxino a64-olinuxino-emmc amarula_a64_relic bananapi_m64 nanopi_a64 oceanic_5205_5inmfd orangepi_win pine64-lts pine64_plus pine64_plus pinebook pinephone pinephone pinetab sopine_baseboard teres_i) if [[ " ${sun50i[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_a64" - cp /usr/share/arm-trusted-firmware/sun50i_a64/* builds/$(echo $board)/ + cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 + cp /usr/share/crust-firmware/a64/scp.bin builds/$(echo $board)/ fi - sun50h6=(beelink_gs1 orangepi_3 orangepi_lite2 orangepi_one_plus orangepi_zero2 pine_h64 tanix_tx6) + sun50h5=(bananapi_m2_plus_h5 emlid_neutis_n5_devboard libretech_all_h3_cc_h5 libretech_all_h3_it_h5 libretech_all_h5_cc_h5 nanopi_neo2 nanopi_neo_plus2 nanopi_r1s_h5 orangepi_pc2 orangepi_prime orangepi_zero_plus2 orangepi_zero_plus) + if [[ " ${sun50h5[*]} " == *" $board "* ]]; then + echo "Board: $board using sun50i_h6" + cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 + cp /usr/share/crust-firmware/h5/scp.bin builds/$(echo $board)/ + fi + sun50h6=(beelink_gs1 emlid_neutis_n5_devboard orangepi_3 orangepi_lite2 orangepi_one_plus pine_h64 tanix_tx6) if [[ " ${sun50h6[*]} " == *" $board "* ]]; then echo "Board: $board using sun50i_h6" - cp /usr/share/arm-trusted-firmware/sun50i_h6/* builds/$(echo $board)/ + cp /usr/share/arm-trusted-firmware/sun50i_h6/bl31.bin builds/$(echo $board)/atf-bl31 + cp /usr/share/crust-firmware/h6/scp.bin builds/$(echo $board)/ fi - rk3328=(evb-rk3328 nanopi-r2s-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328) + sun50i_h616=(anbernic_rg35xx_h700 orangepi_zero2 orangepi_zero2w orangepi_zero3 transpeed-8k618-t x96_mate) + if [[ " ${sun50i_h616[*]} " == *" $board "* ]]; then + echo "Board: $board using sun50i_h616" + cp /usr/share/arm-trusted-firmware/sun50i_h616/bl31.bin builds/$(echo $board)/atf-bl31 + fi + rk3328=(evb-rk3328 generic-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 nanopi-r2s-plus-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328 rock-pi-e-v3-rk3328) if [[ " ${rk3328[*]} " == *" $board "* ]]; then echo "Board: $board using rk3328" cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31 fi - rk3399=(evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399 eaidk-610-rk3399) + rk3368=(evb-px5 geekbox) + if [[ " ${rk3368[*]} " == *" $board "* ]]; then + echo "Board: $board using rk3368" + cp /usr/share/arm-trusted-firmware/rk3368/bl31.elf builds/$(echo $board)/atf-bl31 + fi + rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 generic-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) if [[ " ${rk3399[*]} " == *" $board "* ]]; then echo "Board: $board using rk3399" cp /usr/share/arm-trusted-firmware/rk3399/* builds/$(echo $board)/ cp builds/$(echo $board)/bl31.elf builds/$(echo $board)/atf-bl31 fi + zynqmp=(xilinx_zynqmp_kria xilinx_zynqmp_virt) + if [[ " ${zynqmp[*]} " == *" $board "* ]]; then + echo "Board: $board using zynqmp" + cp /usr/share/arm-trusted-firmware/zynqmp/bl31.bin builds/$(echo $board)/atf-bl31 + fi # End ATF - BINMAN_ALLOW_MISSING=1 make $(echo $board)_defconfig O=builds/$(echo $board)/ - BINMAN_ALLOW_MISSING=1 %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ + make $(echo $board)_defconfig O=builds/$(echo $board)/ + BL31=builds/$(echo $board)/atf-bl31 %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ - # build spi images for rockchip boards with SPI flash - rkspi=(rock64-rk3328) - if [[ " ${rkspi[*]} " == *" $board "* ]]; then - echo "Board: $board with SPI flash" - builds/$(echo $board)/tools/mkimage -n rk3328 -T rkspi -d builds/$(echo $board)/tpl/u-boot-tpl.bin:builds/$(echo $board)/spl/u-boot-spl.bin builds/$(echo $board)/idbloader.spi - fi - rkspi=(evb-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) - if [[ " ${rkspi[*]} " == *" $board "* ]]; then - echo "Board: $board with SPI flash" - builds/$(echo $board)/tools/mkimage -n rk3399 -T rkspi -d builds/$(echo $board)/tpl/u-boot-tpl.bin:builds/$(echo $board)/spl/u-boot-spl.bin builds/$(echo $board)/idbloader.spi - fi done %endif @@ -142,436 +208,366 @@ mkdir -p %{buildroot}%{_datadir}/uboot/ %ifarch aarch64 for board in $(ls builds) do - mkdir -p %{buildroot}%{_datadir}/uboot/$(echo $board)/ - for file in u-boot.bin u-boot.dtb u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip.bin idbloader.img idbloader.spi spl/boot.bin spl/sunxi-spl.bin + for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin do if [ -f builds/$(echo $board)/$(echo $file) ]; then - install -p -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/ + install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) fi done done -# For Apple M1 we also need the nodtb variant -install -p -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin +# Just for xilinx_zynqmp +for board in "xilinx_zynqmp_kria xilinx_zynqmp_virt" +do + for file in u-boot.itb spl/boot.bin + do + if [ -f builds/$(echo $board)/$(echo $file) ]; then + install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) + fi + done +done + +# For Apple M-series we also need the nodtb variant +install -pD -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin +%endif + +%ifarch riscv64 +for board in $(ls builds) +do + for file in u-boot.itb spl/u-boot-spl.bin spl/u-boot-spl.bin.normal.out + do + if [ -f builds/$(echo $board)/$(echo $file) ]; then + install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) + fi + done +done +%endif + +%ifarch x86_64 +for board in $(ls builds) +do + for file in u-boot.rom + do + if [ -f builds/$(echo $board)/$(echo $file) ]; then + install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) + fi + done +done %endif # Bit of a hack to remove binaries we don't use as they're large -%ifarch aarch64 for board in $(ls builds) do rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.dtb if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.* fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/MLO ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin - fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/SPL ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin - fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.imx ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin - fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.kwb ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.* - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.bin - fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/idbloader.img ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.img + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-rockchip.bin ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.* fi done %endif -%endif -for tool in dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder +for tool in dumpimage env/fw_printenv fdt_add_pubkey fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder do install -p -m 0755 builds/tools/$tool %{buildroot}%{_bindir} done -install -p -m 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1 +for tool in dumpimage kwboot mkeficapsule mkimage +do +install -p -m 0644 doc/$tool.1 %{buildroot}%{_mandir}/man1 +done install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir} ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv ) -# Copy some useful docs over -mkdir -p builds/docs -cp -p board/hisilicon/hikey/README builds/docs/README.hikey -cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399 -cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64 -cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand - %files +%license Licenses/* %doc README doc/develop/distro.rst doc/README.gpt -%doc doc/README.rockchip doc/develop/uefi doc/usage doc/arch/arm64.rst -%doc builds/docs/* doc/board/amlogic/ doc/board/rockchip/ +%doc doc/develop/uefi doc/usage doc/arch/arm64.rst %{_bindir}/* +%{_mandir}/man1/dumpimage.1* +%{_mandir}/man1/kwboot.1* +%{_mandir}/man1/mkeficapsule.1* %{_mandir}/man1/mkimage.1* -%dir %{_datadir}/uboot/ %if %{with toolsonly} %ifarch aarch64 %files -n uboot-images-armv8 +%license Licenses/* +%dir %{_datadir}/uboot/ +%{_datadir}/uboot/* +%endif + +%ifarch riscv64 +%files -n uboot-images-riscv64 +%license Licenses/* +%dir %{_datadir}/uboot/ +%{_datadir}/uboot/* +%endif + +%ifarch x86_64 +%files -n uboot-images-x86_64 +%license Licenses/* +%dir %{_datadir}/uboot/ %{_datadir}/uboot/* %endif %endif %changelog -* Wed Oct 25 2023 Peter Robinson - 1:2023.07-3 -- Rebuild for rebase +* Thu Aug 27 2026 Peter Robinson - 1:2026.10-0.3.rc3 +- Update to 2026.10 RC3 -* Wed Oct 25 2023 Peter Robinson - 1:2023.07-2 -- Fixes for release +* Wed Aug 12 2026 Peter Robinson - 1:2026.10-0.2.rc2 +- Update to 2026.10 RC2 -* Tue Jul 11 2023 Peter Robinson - 2023.07-1 -- Update to 2023.07 GA +* Thu Jul 30 2026 Peter Robinson - 1:2026.10-0.1.rc1 +- Update to 2026.10 RC1 +- Update source URL -* Fri Jun 16 2023 Peter Robinson - 2023.07-0.4.rc4 -- Disable NFS by default +* Fri Jul 17 2026 Fedora Release Engineering - 1:2026.07-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild -* Mon Jun 12 2023 Peter Robinson - 2023.07-0.3.rc4 -- Update to 2023.07 RC4 +* Tue Jul 07 2026 Peter Robinson - 1:2026.07-1 +- Update to 2026.07 GA -* Sun Jun 11 2023 Peter Robinson - 2023.07-0.2.rc3 -- Update to 2023.07 RC3 -- Fixes for the Pinephone Pro, RockPro64 +* Tue Jun 23 2026 Peter Robinson - 1:2026.07-0.4.rc5 +- Update to 2026.07 RC5 -* Wed May 17 2023 Peter Robinson - 2023.07-0.1.rc2 -- Update to 2023.07 RC2 +* Mon Jun 08 2026 Peter Robinson - 1:2026.07-0.3.rc4 +- Update to 2026.07 RC4 -* Tue Apr 04 2023 Peter Robinson - 2023.04-1 -- Update to 2023.04 GA +* Fri May 29 2026 Peter Robinson - 1:2026.07-0.2.rc3 +- Update to 2026.07 RC3 +- Update U-Boot Project URL +- Update RPi PCIe patches +- Various RPi fixes -* Tue Mar 28 2023 Peter Robinson - 2023.04-0.4.rc5 -- Update to 2023.04 RC5 -- Drop upstreamed patches -- Rockchip boot fixes +* Fri May 01 2026 Peter Robinson - 1:2026.07-0.1.rc1 +- Update to 2026.07 RC1 -* Tue Mar 14 2023 Peter Robinson - 2023.04-0.3.rc4 -- Update to 2023.04 RC4 +* Sat Apr 11 2026 Peter Robinson - 1:2026.04-2 +- Fix PCIe/USB on Raspberry Pi 4 (rhbz#2448365) +- Fix detection of some revisions of RPi5 -* Fri Feb 17 2023 Peter Robinson - 2023.04-0.2.rc2 -- Update to 2023.04 RC2 +* Tue Apr 07 2026 Peter Robinson - 1:2026.04-1 +- Update to 2026.04 GA -* Tue Jan 31 2023 Peter Robinson - 2023.04-0.1.rc1 -- Update to 2023.04 RC1 -- Drop bmp_logo tool +* Sun Mar 29 2026 Peter Robinson - 1:2026.04-0.9.rc5 +- Enable NVME booting on RPi5 -* Sat Jan 21 2023 Fedora Release Engineering - 2023.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild +* Tue Mar 24 2026 Peter Robinson - 1:2026.04-0.8.rc5 +- Update to 2026.04 RC5 -* Wed Jan 18 2023 Peter Robinson - 2023.01-1 -- Update to 2023.01 GA +* Sat Mar 14 2026 Peter Robinson - 1:2026.04-0.7.rc4 +- Raspberry Pi fixes -* Sat Dec 31 2022 Peter Robinson - 2023.01-0.4.rc4 -- Update PinePhone Pro to latest rev +* Tue Mar 10 2026 Peter Robinson - 1:2026.04-0.6.rc4 +- Update to 2026.04 RC4 -* Tue Dec 20 2022 Peter Robinson - 2023.01-0.3.rc4 -- Update to 2023.01 RC4 +* Fri Feb 27 2026 Peter Robinson - 1:2026.04-0.5.rc3 +- Update to 2026.04 RC3 -* Mon Dec 05 2022 Peter Robinson - 2023.01-0.2.rc3 -- Update to 2023.01 RC3 +* Tue Feb 17 2026 Peter Robinson - 1:2026.04-0.4.rc2 +- Add initial bcm2712d0 identification -* Thu Nov 24 2022 Peter Robinson - 2023.01-0.1.rc2 -- Update to U-Boot 2023.01 RC2 -- Update Pinephone Pro patches +* Mon Feb 09 2026 Peter Robinson - 1:2026.04-0.3.rc2 +- Update to 2026.04 RC2 -* Mon Oct 10 2022 Peter Robinson - 2022.10-1 -- Update to 2022.10 GA +* Tue Jan 27 2026 Peter Robinson - 1:2026.04-0.2.rc1 +- Update to 2026.04 RC1 -* Tue Sep 06 2022 Peter Robinson - 2022.10-0.6.rc4 -- Update SMBIOS patch +* Mon Jan 19 2026 Javier Martinez Canillas - 1:2026.01-3 +- Add a uboot-images-x86_64 subpackage -* Tue Sep 06 2022 Peter Robinson - 2022.10-0.5.rc4 -- Update to 2022.10 RC4 -- Fix for booting Rockchip devices from NVME +* Sat Jan 17 2026 Fedora Release Engineering - 1:2026.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild -* Tue Aug 23 2022 Peter Robinson - 2022.10-0.4.rc3 -- Update to 2022.10 RC3 +* Tue Jan 06 2026 Peter Robinson - 1:2026.01-1 +- Update to 2026.01 GA -* Mon Aug 22 2022 Davide Cavalca - 2022.10-0.3.rc1 -- Install nodtb variant for Apple M1 (rhbz#2068958) +* Mon Dec 29 2025 Peter Robinson - 1:2026.01-0.4.rc5 +- Update to 2026.01 RC5 -* Tue Aug 16 2022 Peter Robinson - 2022.10-0.2.rc1 -- Fix for DT property propogation via firmware +* Mon Dec 08 2025 Peter Robinson - 1:2026.01-0.3.rc4 +- Update to 2026.01 RC4 -* Thu Jul 28 2022 Peter Robinson - 2022.10-0.1.rc1 -- Update to 2022.10 RC1 -- Enable LTO for firmware builds +* Fri Nov 28 2025 Peter Robinson - 1:2026.01-0.2.rc3 +- Updates for RPi -* Sat Jul 23 2022 Fedora Release Engineering - 2022.07-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild +* Mon Nov 24 2025 Peter Robinson - 1:2026.01-0.1.rc3 +- Update to 2026.01 RC3 -* Sun Jul 17 2022 Peter Robinson - 2022.07-1 -- Update to 2022.07 GA +* Thu Oct 16 2025 Peter Robinson - 1:2025.10-2 +- Drop residual Rockchip firmware (saves ~150Mb) -* Mon Jul 04 2022 Peter Robinson - 2022.07-0.6.rc6 -- Update to 2022.07 RC6 +* Mon Oct 13 2025 Peter Robinson - 1:2025.10-1 +- Update to 2025.10 GA (rhbz#2401964) +- Fix booting when using FW device-tree (rhbz#2402498) +- Fix for some variants of Raspberry Pi +- Fixes for Jetson device booting -* Mon Jun 20 2022 Peter Robinson - 2022.07-0.5.rc5 -- Update to 2022.07 RC5 +* Fri Sep 26 2025 Peter Robinson - 1:2025.10-0.7.rc5 +- Update to 2025.10 RC5 -* Sun Jun 12 2022 Peter Robinson - 2022.07-0.4.rc4 -- Update to 2022.07 RC4 -- Some minor Rockchips device fixes +* Mon Sep 08 2025 Peter Robinson - 1:2025.10-0.6.rc4 +- Update to 2025.10 RC4 -* Wed May 25 2022 Peter Robinson - 2022.07-0.3.rc3 -- Update to 2022.07 RC3 +* Sun Sep 07 2025 Peter Robinson - 1:2025.10-0.5.rc3 +- Boot fixes for some Raspberry Pi variants -* Sat May 14 2022 Peter Robinson - 2022.07-0.2.rc2 -- Update to 2022.07 RC2 +* Wed Aug 27 2025 Peter Robinson - 1:2025.10-0.4.rc3 +- Fix booting on some Allwinner devices -* Tue Apr 26 2022 Peter Robinson - 2022.07-0.1.rc1 -- Update to 2022.07 RC1 +* Mon Aug 25 2025 Peter Robinson - 1:2025.10-0.3.rc3 +- Update to 2025.10 RC3 -* Mon Apr 04 2022 Peter Robinson - 2022.04-1 -- Update to 2022.04 GA +* Tue Aug 19 2025 Peter Robinson - 1:2025.10-0.2.rc2 +- Fix and re-enable Jetson Nano -* Mon Mar 28 2022 Peter Robinson - 2022.04-0.4.rc5 -- Update to 2022.04 RC5 +* Mon Aug 18 2025 Peter Robinson - 1:2025.10-0.1.rc2 +- Update to 2025.10 RC2 -* Tue Mar 08 2022 Peter Robinson - 2022.04-0.3.rc3 -- Update to 2022.04 RC3 -- Enable new Rockchip devices +* Fri Jul 25 2025 Fedora Release Engineering - 1:2025.07-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Tue Feb 15 2022 Peter Robinson - 2022.04-0.2.rc2 -- Update to 2022.04 RC2 +* Thu Jul 10 2025 Peter Robinson - 1:2025.07-2 +- Update patch for rebase issue -* Wed Feb 02 2022 Peter Robinson - 2022.04-0.1.rc1 -- Update to 2022.04 RC1 +* Wed Jul 09 2025 Peter Robinson - 1:2025.07-1 +- Update to 2025.07 GA -* Sat Jan 22 2022 Fedora Release Engineering - 2022.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild +* Fri Jun 27 2025 Peter Robinson - 1:2025.07-0.5.rc5 +- Update to 2025.07 RC5 +- Enable LWIP stack by default +- Enable HTTP(s) boot support -* Mon Jan 10 2022 Peter Robinson - 2022.01-1 -- Update to 2022.01 +* Thu Jun 26 2025 Javier Martinez Canillas - 1:2025.07-0.4.rc4 +- Add EFI_PARTITION_INFO_PROTOCOL support -* Wed Jan 05 2022 Peter Robinson - 2022.01-0.3.rc4 -- Upstream fixes for PHY and UEFI +* Sun Jun 15 2025 Peter Robinson - 1:2025.07-0.3.rc4 +- Update to 2025.07 RC4 -* Mon Dec 20 2021 Peter Robinson - 2022.01-0.2.rc4 -- Update to 2022.01 RC4 +* Tue May 13 2025 Peter Robinson - 1:2025.07-0.2.rc2 +- Update to 2025.07 RC2 -* Mon Nov 15 2021 Peter Robinson - 2022.01-0.1.rc2 -- Update to 2022.01 RC2 +* Thu May 01 2025 Peter Robinson - 1:2025.07-0.1.rc1 +- Update to 2025.07 RC1 -* Mon Nov 15 2021 Peter Robinson - 2021.10-3 -- Fixes for rk3399 devices +* Sun Apr 20 2025 Peter Robinson - 1:2025.04-2 +- Fix for RPi5 serial console -* Thu Oct 14 2021 Peter Robinson - 2021.10-2 -- Fix booting from MMC for Rockchip 3399 (rhbz #2014182) -- Enable new rk3399 devices (Leez, NanoPi-M4B, NanoPi-4S, NanoPi-T4) (rhbz #2009126) +* Tue Apr 08 2025 Peter Robinson - 1:2025.04-1 +- Update to 2025.04 GA -* Mon Oct 04 2021 Peter Robinson - 2021.10-1 -- Update to 2021.10 +* Tue Mar 25 2025 Peter Robinson - 1:2025.04-0.7.rc5 +- Update to 2025.04 RC5 -* Mon Sep 27 2021 Peter Robinson - 2021.10-0.7.rc5 -- Update to 2021.10 RC5 +* Wed Mar 12 2025 Peter Robinson - 1:2025.04-0.6.rc4 +- Update to 2025.04 RC4 -* Wed Sep 15 2021 Peter Robinson - 2021.10-0.6.rc4 -- Update to 2021.10 RC4 -- Proposed fix for RPi MMC clock issue +* Wed Feb 26 2025 Peter Robinson - 1:2025.04-0.5.rc3 +- Update to 2025.04 RC3 -* Tue Sep 14 2021 Sahana Prasad - 2021.10-0.6.rc3 -- Rebuilt with OpenSSL 3.0.0 +* Tue Feb 18 2025 David Abdurachmanov - 1:2025.04-0.4.rc2 +- Add support for riscv64 -* Mon Aug 30 2021 Peter Robinson - 2021.10-0.5.rc3 -- Update to 2021.10 RC3 +* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.3.rc2 +- Update to 2025.05 RC2 -* Tue Aug 24 2021 Peter Robinson - 2021.10-0.4.rc2 -- Fix for Raspberry Pi firmware properties +* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.2.rc1 +- Update to 2025.05 RC1 -* Mon Aug 23 2021 Peter Robinson - 2021.10-0.3.rc2 -- Fix for rockchip SPI +* Tue Jan 28 2025 Peter Robinson - 1:2025.01-3 +- Add new fdt_add_pubkey tool -* Mon Aug 16 2021 Peter Robinson - 2021.10-0.2.rc2 -- Update to 2021.10 RC2 +* Sun Jan 19 2025 Fedora Release Engineering - 1:2025.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild -* Sun Aug 08 2021 Peter Robinson - 2021.10-0.1.rc1 -- Update to 2021.10 RC1 +* Tue Jan 07 2025 Peter Robinson - 1:2025.01-1 +- Update to 2025.01 GA -* Thu Jul 22 2021 Peter Robinson - 2021.07-2 -- Fix regression for Rockchip devices running firmware from SPI flash +* Mon Jan 06 2025 Peter Robinson - 1:2025.01-0.2.rc6 +- Rebuild for TF-A 2.12 -* Mon Jul 05 2021 Peter Robinson - 2021.07-1 -- Update to 2021.07 GA +* Tue Dec 31 2024 Peter Robinson - 1:2025.01-0.1.rc6 +- Update to 2025.01 RC6 -* Mon Jun 28 2021 Peter Robinson - 2021.07-0.6.rc5 -- Update to 2021.07 RC5 -- Build SPI fash images for ROC-PC-RK3399 +* Fri Oct 11 2024 Peter Robinson - 1:2024.10-1 +- Update to 2024.10 GA +- Fix passing RPi firmware CMA setting to kernel DT +- Update Geekbox -* Mon Jun 07 2021 Peter Robinson - 2021.07-0.5.rc4 -- Update to 2021.07 RC4 +* Thu Oct 03 2024 Peter Robinson - 1:2024.10-0.8.rc6 +- Pass CMA FW setting through to kernel DT for Raspberry Pi -* Sat Jun 05 2021 Peter Robinson - 2021.07-0.4.rc3 -- Fix AllWinner devices booting from mSD/MMC +* Tue Oct 01 2024 Peter Robinson - 1:2024.10-0.7.rc6 +- Update to 2024.10 RC6 -* Tue May 25 2021 Peter Robinson - 2021.07-0.3.rc3 -- Update to 2021.07 RC3 -- Build against ATF 2.5 GA +* Mon Sep 16 2024 Peter Robinson - 1:2024.10-0.6.rc5 +- Update to 2024.10 RC5 -* Thu May 13 2021 Peter Robinson - 2021.07-0.2.rc2 -- Build against new ATF 2.5-rc1 +* Fri Sep 6 2024 Peter Robinson - 1:2024.10-0.5.rc4 +- Add missing licenses directory -* Mon May 10 2021 Peter Robinson - 2021.07-0.1.rc2 -- Update to 2021.07 RC2 +* Tue Sep 03 2024 Peter Robinson - 1:2024.10-0.4.rc4 +- Update to 2024.10 RC4 -* Wed Apr 28 2021 Peter Robinson - 2021.04-3 -- Upstream fix for console regression (rhbz 1946278) -- Fix for fallback.efi crash (rhbz 1733817) +* Mon Sep 02 2024 Peter Robinson - 1:2024.10-0.3.rc3 +- Fix Allwinner firmware chainloading (rhbz#2309138) +- Fix ATF firmware selection on a number of devices +- Support Allwinner SCP firmware (fixes suspend/resume) -* Wed Apr 21 2021 Peter Robinson - 2021.04-2 -- Revert keyboard console regression change (rhbz 1946278) +* Tue Aug 27 2024 Peter Robinson - 1:2024.10-0.2.rc3 +- Update to 2024.10 RC3 +- Enable initial QCM6490 SoC support -* Sun Apr 18 2021 Peter Robinson - 2021.04-1 -- Update to 2021.04 GA -- Fix DTB load check (rhbz 1946278) -- Build Rockchip SPI support as idbloader.spi -- Fixes for Rockchip devices -- Build Turris Omnia for MMC/SPI/UART +* Thu Aug 15 2024 Peter Robinson - 1:2024.10-0.1.rc2 +- Update to 2024.10 RC2 -* Wed Mar 17 2021 Peter Robinson - 2021.04-0.6.rc4 -- Update to 2021.04 RC4 -- Move to upstream fix for SMP on RPi3B and RPi3B+ +* Tue Jul 23 2024 Peter Robinson - 1:2024.07-1 +- Update to 2024.07 -* Sat Mar 13 2021 Peter Robinson - 2021.04-0.5.rc3 -- Fix for SMP on RPi3B and RPi3B+ -- Initial support for Pinephone 3Gb edition +* Sat Jul 20 2024 Fedora Release Engineering - 1:2024.07-0.3.rc4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild -* Mon Mar 08 2021 Peter Robinson - 2021.04-0.4.rc3 -- Update to 2021.04 RC3 +* Tue Jun 18 2024 Peter Robinson - 1:2024.07-0.2.rc4 +- Update to 2024.07 RC4 -* Tue Feb 16 2021 Peter Robinson - 2021.04-0.3.rc2 -- Update to 2021.04 RC2 +* Sat May 25 2024 Peter Robinson - 1:2024.07-0.1.rc3 +- Update to 2024.07 RC3 -* Mon Feb 15 2021 Dennis Gilmore -- build spi and uart images in addition to mmc for helios4 and clearfog +* Wed Apr 03 2024 Peter Robinson - 1:2024.04-1 +- Update to 2024.04 GA +- Rockchip rk3328 USB fixes -* Wed Feb 10 2021 Peter Robinson - 2021.04-0.2.rc1 -- Fixes for network issues on some Allwinner devices +* Wed Mar 27 2024 Peter Robinson - 1:2024.04-0.8.rc5 +- Update to 2024.04 RC5 -* Mon Feb 01 2021 Peter Robinson - 2021.04-0.1.rc1 -- Update to 2021.04 RC1 -- Add new upstream devices +* Thu Mar 21 2024 Peter Robinson - 1:2024.04-0.7.rc4 +- Updated patch for DTB loading -* Wed Jan 27 2021 Fedora Release Engineering - 2021.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild +* Fri Mar 15 2024 Peter Robinson - 1:2024.04-0.6.rc4 +- Updated fix for FDT load -* Mon Jan 11 2021 Peter Robinson - 2021.01-1 -- Update to 2021.01 GA -- Updates for Raspberry Pi 4 Series of devices +* Wed Mar 13 2024 Peter Robinson - 1:2024.04-0.5.rc4 +- Fixes for Rockchip rk3399 autoboot -* Tue Jan 5 2021 Peter Robinson - 2021.01-0.5.rc5 -- Update to 2021.01 RC5 +* Tue Mar 12 2024 Peter Robinson - 1:2024.04-0.4.rc4 +- Update to 2024.04 RC4 +- Initial fix for loading DT off /boot (rhbz 2247873) -* Sun Dec 27 2020 Peter Robinson - 2021.01-0.4.rc4 -- Update to 2021.01 RC4 -- Latest RPi-400/CM4 support patch +* Thu Feb 29 2024 Peter Robinson - 1:2024.04-0.3.rc3 +- Update to 2024.04 RC3 +- Enable a number of new upstream devices +- Upstream now builds Rockchip SPI artifacts +- Various cleanups +- Fix ESP partition detection to enable EFI vars -* Tue Dec 15 2020 Peter Robinson - 2021.01-0.3.rc3 -- Update to 2021.01 RC3 -- Latest RPi-400/CM4 support patch -- Re-enable previously disabled device support +* Wed Feb 14 2024 Peter Robinson - 1:2024.04-0.2.rc2 +- Update to 2024.04 RC2 -* Mon Dec 14 2020 Javier Martinez Canillas - 2021.01-0.2.rc2 -- Fix a "scan_dev_for_efi" not defined error +* Sat Jan 27 2024 Fedora Release Engineering - 1:2024.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Sun Nov 22 2020 Peter Robinson - 2021.01-0.1.rc2 -- Update to 2021.01 RC2 -- Latest Pinebook Pro display patches -- Initial RPi-400 support patch -- Update Fedora specific patches - -* Sun Nov 8 2020 Peter Robinson - 2020.10-3 -- Fix SPI on Rockchip devices -- Latest Pinebook Pro display patches -- Fix Keyboard and USB-A ports on Pinebook Pro - -* Wed Oct 28 2020 Peter Robinson - 2020.10-2 -- Fix kernel installs for non EBBR systems -- Fix for wired networks on some Allwinner devices - -* Tue Oct 06 2020 Peter Robinson - 2020.10-1 -- Update to 2020.10 - -* Sun Sep 27 2020 Peter Robinson - 2020.10-0.6.rc5 -- Initial support for display output on Pinebook Pro - -* Tue Sep 22 2020 Peter Robinson - 2020.10-0.5.rc5 -- Update to 2020.10 RC5 - -* Wed Sep 09 2020 Peter Robinson - 2020.10-0.4.rc4 -- Update to 2020.10 RC4 - -* Wed Aug 19 2020 Peter Robinson - 2020.10-0.3.rc2 -- Enable a number of new Rockchip devices - -* Mon Aug 10 2020 Peter Robinson - 2020.10-0.2.rc2 -- Update to 2020.10 RC2 - -* Tue Jul 28 2020 Peter Robinson - 2020.10-0.1.rc1 -- 2020.10 RC1 - -* Tue Jul 14 2020 Tom Stellard - 2020.07-2 -- Use make macros -- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro - -* Mon Jul 06 2020 Peter Robinson - 2020.07-1 -- 2020.07 GA - -* Tue Jun 23 2020 Peter Robinson - 2020.07-0.5.rc5 -- 2020.07 RC5 - -* Thu Jun 18 2020 Peter Robinson - 2020.07-0.4.rc4 -- Update various patches to latest upstream - -* Wed Jun 10 2020 Peter Robinson - 2020.07-0.3.rc4 -- 2020.07 RC4 -- Minor updates and other fixes - -* Tue May 12 2020 Peter Robinson - 2020.07-0.2.rc2 -- 2020.07 RC2 -- Minor device updates - -* Wed Apr 29 2020 Peter Robinson - 2020.07-0.1.rc1 -- 2020.07 RC1 - -* Tue Apr 21 2020 Peter Robinson - 2020.04-4 -- Initial support for USB on Rasperry Pi 4 - -* Tue Apr 21 2020 Peter Robinson - 2020.04-3 -- Ship u-boot-rockchip.bin for SPI flash - -* Mon Apr 20 2020 Peter Robinson - 2020.04-2 -- Fix ATF for new aarch64 devices -- Fix Wandboard board detection (rhbz 1825247) -- Fix mSD card on RockPro64 -- Enable (inital) Pinebook Pro - -* Tue Apr 14 2020 Peter Robinson - 2020.04-1 -- 2020.04 - -* Tue Apr 7 2020 Peter Robinson 2020.04-0.7-rc5 -- 2020.04 RC5 - -* Tue Mar 31 2020 Peter Robinson 2020.04-0.6-rc4 -- 2020.04 RC4 -- Updates for NVIDIA Jetson platforms -- Support RNG for random seed for KASLR on some Rockchip devices - -* Thu Mar 26 2020 Peter Robinson 2020.04-0.5-rc3 -- Fix ext4 alignment issue seen on some NXP i.MX devices - -* Wed Feb 26 2020 Peter Robinson 2020.04-0.4-rc3 -- 2020.04 RC3 - -* Thu Feb 13 2020 Peter Robinson 2020.04-0.3-rc2 -- 2020.04 RC2 - -* Sun Feb 2 2020 Peter Robinson 2020.04-0.2-rc1 -- Update genet NIC driver - -* Wed Jan 29 2020 Peter Robinson 2020.04-0.1-rc1 -- 2020.04 RC1 - -* Tue Jan 7 2020 Peter Robinson 2020.01-1 -- 2020.01 +* Mon Jan 08 2024 Peter Robinson - 1:2024.01-1 +- Update to 2024.01 diff --git a/uefi-Add-all-options-for-EFI-System-Partitions.patch b/uefi-Add-all-options-for-EFI-System-Partitions.patch new file mode 100644 index 0000000..3bf1ec8 --- /dev/null +++ b/uefi-Add-all-options-for-EFI-System-Partitions.patch @@ -0,0 +1,57 @@ +From 86782e882e9542f5f402e00cd87efb36ad0552d3 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sat, 2 Mar 2024 11:17:42 +0000 +Subject: [PATCH v4] disk: dos: Add all options for EFI System Partitions + +The EFI spec states that the ESP can be any of FAT12/16/32 but for +compatibility doesn't necssarily require the partition to be the +EFI partition table ID of 0xef. A number of arm devices will not +find their firmware on a FAT partition with an ID of 0xef so also +allow the original FAT12/16/32 partition IDs as they are also +permissable for an ESP. + +Signed-off-by: Peter Robinson +--- + +v2: +- Add 0x0c option +- Make hex constants consistent +- Move from if to switch statement +v3: +- Fix switch brain fart +v4: +- Drop boot_ind out of switch + + disk/part_dos.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/disk/part_dos.c b/disk/part_dos.c +index 567ead7511d..a35181dff4f 100644 +--- a/disk/part_dos.c ++++ b/disk/part_dos.c +@@ -40,10 +40,21 @@ static int get_bootable(dos_partition_t *p) + { + int ret = 0; + +- if (p->sys_ind == 0xef) ++ switch (p->sys_ind) { ++ case 0x01: ++ case 0x06: ++ case 0x0b: ++ case 0x0c: ++ case 0xef: + ret |= PART_EFI_SYSTEM_PARTITION; ++ break; ++ default: ++ break; ++ } ++ + if (p->boot_ind == 0x80) + ret |= PART_BOOTABLE; ++ + return ret; + } + +-- +2.44.0 + diff --git a/uefi-enable-SetVariableRT-with-volotile-storage.patch b/uefi-enable-SetVariableRT-with-volotile-storage.patch new file mode 100644 index 0000000..ee9bcf4 --- /dev/null +++ b/uefi-enable-SetVariableRT-with-volotile-storage.patch @@ -0,0 +1,33 @@ +From fd736dd720b29fa69a4bb87492f3f94dc6076996 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 25 Mar 2025 17:13:44 +0000 +Subject: [PATCH] efi: enable SetVariableRT with volotile storage + +Signed-off-by: Peter Robinson +--- + lib/efi_loader/Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig +index d4f6b56afaa..3e522131b01 100644 +--- a/lib/efi_loader/Kconfig ++++ b/lib/efi_loader/Kconfig +@@ -108,6 +108,7 @@ choice + config EFI_VARIABLE_FILE_STORE + bool "Store non-volatile UEFI variables as file" + depends on FAT_WRITE ++ default y + help + Select this option if you want non-volatile UEFI variables to be + stored as file /ubootefi.var on the EFI system partition. +@@ -115,6 +116,7 @@ config EFI_VARIABLE_FILE_STORE + config EFI_RT_VOLATILE_STORE + bool "Allow variable runtime services in volatile storage (e.g RAM)" + depends on EFI_VARIABLE_FILE_STORE ++ default y + help + When EFI variables are stored on file we don't allow SetVariableRT, + since the OS doesn't know how to write that file. At the same time +-- +2.49.0 + diff --git a/uefi-enable-https-boot-by-default.patch b/uefi-enable-https-boot-by-default.patch new file mode 100644 index 0000000..dc0a683 --- /dev/null +++ b/uefi-enable-https-boot-by-default.patch @@ -0,0 +1,82 @@ +From 7eabab2fda12b7a4417e5c7f29a507dfa9e7fffd Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 3 May 2026 09:24:34 +0100 +Subject: [PATCH] enable https boot by default + +Signed-off-by: Peter Robinson +--- + cmd/Kconfig | 1 + + lib/efi_loader/Kconfig | 1 + + lib/mbedtls/Kconfig | 3 ++- + net/Kconfig | 3 ++- + 4 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cmd/Kconfig b/cmd/Kconfig +index c71c6824a19..8ff14adffe1 100644 +--- a/cmd/Kconfig ++++ b/cmd/Kconfig +@@ -2289,6 +2289,7 @@ config CMD_WGET + + config WGET_HTTPS + bool "wget https" ++ default y + depends on CMD_WGET + depends on PROT_TCP_LWIP + depends on MBEDTLS_LIB +diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig +index 4cb13ae7c8a..20733429962 100644 +--- a/lib/efi_loader/Kconfig ++++ b/lib/efi_loader/Kconfig +@@ -609,6 +609,7 @@ config EFI_BOOTMGR + + config EFI_HTTP_BOOT + bool "EFI HTTP Boot support" ++ default y + depends on NET + depends on CMDLINE + select CMD_NET +diff --git a/lib/mbedtls/Kconfig b/lib/mbedtls/Kconfig +index 789721ee6cd..7a241c2bc26 100644 +--- a/lib/mbedtls/Kconfig ++++ b/lib/mbedtls/Kconfig +@@ -2,7 +2,7 @@ + + choice + prompt "Crypto libraries (U-Boot Proper)" +- default LEGACY_HASHING_AND_CRYPTO ++ default MBEDTLS_LIB + help + Select crypto libraries. + LEGACY_HASHING_AND_CRYPTO for legacy crypto libraries, +@@ -15,6 +15,7 @@ config LEGACY_HASHING_AND_CRYPTO + + config MBEDTLS_LIB + bool "MbedTLS libraries" ++ default y + select MBEDTLS_LIB_X509 + endchoice + +diff --git a/net/Kconfig b/net/Kconfig +index e712a0dd2ac..3158d37dff7 100644 +--- a/net/Kconfig ++++ b/net/Kconfig +@@ -16,7 +16,7 @@ if NET + + choice + prompt "Networking stack" +- default NET_LEGACY ++ default NET_LWIP + + config NET_LEGACY + bool "Legacy U-Boot networking stack" +@@ -27,6 +27,7 @@ config NET_LEGACY + + config NET_LWIP + bool "Use lwIP for networking stack" ++ default y + select NETDEVICES + help + Include networking support based on the lwIP (lightweight IP) +-- +2.54.0 + diff --git a/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch new file mode 100644 index 0000000..ac58bad --- /dev/null +++ b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch @@ -0,0 +1,190 @@ +From 56a985cec8592a8de88e7f254df82f5d444a5ecc Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Thu, 28 May 2026 22:08:07 +0100 +Subject: [PATCH] initial find_fdt_location for finding the DT on disk + +The old distro boot looked for a DT on the first boot partition +in the /dtb or /dtb/current directories, and Fedora extended this +to look not just on the boot partition but all the partitions on +that disk. + +The new ways of booting, both bootstd and bootefi bootmgr processes +don't properly look for those options. This provides a function +to search for the DTB on disk so that if the other DT mechanisms +don't work this will look for one on disk to provide a working DT +so that devices will continue to work as they did previously. + +Signed-off-by: Peter Robinson +--- + cmd/bootmenu.c | 5 ++ + include/efi_loader.h | 2 + + lib/efi_loader/efi_helper.c | 106 +++++++++++++++++++++++++++++++++++- + 3 files changed, 112 insertions(+), 1 deletion(-) + +diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c +index 528afd221d0..a10ea35a687 100644 +--- a/cmd/bootmenu.c ++++ b/cmd/bootmenu.c +@@ -502,6 +502,11 @@ static void handle_uefi_bootnext(void) + u16 bootnext; + efi_status_t ret; + efi_uintn_t size; ++ const char *fdt_opt; ++ ++ /* Find the DTB on disk */ ++ log_debug("We will load the DTB\n"); ++ fdt_opt = find_fdt_location(); + + /* Initialize EFI drivers */ + ret = efi_init_obj_list(); +diff --git a/include/efi_loader.h b/include/efi_loader.h +index 3a4d502631c..b11f8a2cb42 100644 +--- a/include/efi_loader.h ++++ b/include/efi_loader.h +@@ -574,6 +574,8 @@ struct efi_register_notify_event { + struct list_head handles; + }; + ++/* Find the FDT on any partition */ ++char *find_fdt_location(void); + /* called at pre-initialization */ + int efi_init_early(void); + /* Initialize efi execution environment */ +diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c +index 44b806aadc4..61e982091b9 100644 +--- a/lib/efi_loader/efi_helper.c ++++ b/lib/efi_loader/efi_helper.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -98,6 +99,99 @@ int efi_get_pxe_arch(void) + return -EINVAL; + } + ++/* We need to pass a blk device in and return a location, or a loaded DT */ ++char *find_fdt_location(void) ++{ ++ const char *fdt_filename; ++ /* FIXME: dynamic size */ ++ char fdt_fullpath[60]; ++ const char *prefix; ++ struct udevice *blk; ++ /* FIXME: Fedora really only cares about first 2*/ ++ int MAX_PART = 8; ++ int part; ++ struct disk_partition info; ++ int fdtext; ++ int ret; ++ int retfdt; ++ int retload; ++ loff_t fdtsize; ++ ulong pbraddr; ++ loff_t len_read; ++ ++ /* step one logic: we have the DT name we're hunting for */ ++ fdt_filename = env_get("fdtfile"); ++ if (fdt_filename) { ++ log_debug("FFL: We're looking for the DTB now!: %s\n", fdt_filename); ++ ++ /* probe all block disks to search for fdt */ ++ uclass_foreach_dev_probe(UCLASS_BLK, blk) { ++ log_debug("FFL: dev name: %s\n", blk->name); ++ struct blk_desc *desc; ++ desc = dev_get_uclass_plat(blk); ++ /* we should get a partition count here for looping */ ++ /* For loop for each partition */ ++ /* Need to also deal with zero part whole disk - part_get_info_whole_disk */ ++ for (part = 1; part <= MAX_PART; part++) { ++ log_debug("FFL: part num: %d\n", part); ++ ret = part_get_info(desc, part, &info); ++ /* if we have partition check it for DT */ ++ if (ret < 0) { ++ log_debug("FFL: no partition\n"); ++ } else { ++ log_debug("FFL: we have a partition\n"); ++ /* we should have a case/for prefix in =/ /dtb/ /dtb/current/ */ ++ /* but for now we hard code if for Fedora */ ++ prefix = "/dtb"; ++ snprintf(fdt_fullpath, sizeof(fdt_fullpath), "%s/%s", prefix, fdt_filename); ++ log_debug("FFL: full name: %s\n", fdt_fullpath); ++ /* search for DT on partition and either find and exit or continue */ ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ log_debug("FFL: set block part pass\n"); ++ fdtext = fs_exists(fdt_fullpath); ++ if (fdtext) { ++ /* we have a fdt!*/ ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ retfdt = fs_size(fdt_fullpath, &fdtsize); ++ if (retfdt == 0) { ++ log_debug("FFL: we have found a DT on disk, size %lld\n", fdtsize); ++ /* Get the main fdt and map it */ ++ const char *fdt_pbr; ++ fdt_pbr = env_get("fdt_addr_r"); ++ pbraddr = hextoul(fdt_pbr, NULL); ++ log_debug("FFL: fdr addr: %s\n", fdt_pbr); ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ retload = fs_read(fdt_fullpath, pbraddr, 0, fdtsize, &len_read); ++ if (retload == 0) { ++ log_debug("FFL: we have a loaded DT, size %lld we can return\n", fdtsize); ++ log_info("Found DTB: %s\n", fdt_filename); ++ return fdt_pbr; ++ } else { ++ log_debug("FFL: DT load failed\n"); ++ } ++ } ++ } else { ++ log_debug("FFL: we DON'T have a DT with size\n"); ++ } ++ } ++ } else { ++ /* we don't have a fdt!*/ ++ log_debug("FFL: we DON'T have a DT\n"); ++ } ++ } else { ++ log_debug("FFL: set block part FAIL\n"); ++ } ++ } ++ } ++ } ++ } else { ++ log_debug("FFL: fdt_filename not defined!!\n"); ++ } ++ ++ /* We didn't find a FDT */ ++ return NULL; ++} ++ + /** + * efi_create_current_boot_var() - Return Boot#### name were #### is replaced by + * the value of BootCurrent +@@ -558,11 +652,21 @@ efi_status_t efi_install_fdt(void *fdt) + const char *fdt_opt; + uintptr_t fdt_addr; + ++ /* Check if there is device tree loaded from disk */ ++ fdt_opt = find_fdt_location(); ++ if (fdt_opt) ++ log_info("Found DTB on disk\n"); ++ + /* Check if there is a hardware device tree */ +- fdt_opt = env_get("fdt_addr"); ++ if (!fdt_opt) { ++ fdt_opt = env_get("fdt_addr"); ++ if (fdt_opt) ++ log_info("Found DTB: Prior firmware\n"); ++ } + /* Use our own device tree as fallback */ + if (!fdt_opt) { + fdt_opt = env_get("fdtcontroladdr"); ++ log_info("Using DT from U-Boot\n"); + if (!fdt_opt) { + log_err("need device tree\n"); + return EFI_NOT_FOUND; +-- +2.54.0 + diff --git a/x86_64-boards b/x86_64-boards new file mode 100644 index 0000000..dec8df3 --- /dev/null +++ b/x86_64-boards @@ -0,0 +1 @@ +qemu-x86_64