summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-11-19 08:15:58 -0600
committerTom Rini <[email protected]>2025-11-19 08:15:58 -0600
commit942b85636fcf840210672f76cf242cc94bf24e66 (patch)
tree82516f3fffd1080882e593cf5a9b61bf3b8305b3 /cmd
parentc2b25f8f66a31e3fe435c93c4339f95ab4c24b9b (diff)
parent19548adfe9ea1d12963b3959b8ad2c94a4647878 (diff)
Merge branch 'u-boot-nand-20250918' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/28408 This pull request enhances NAND and SPI flash support, primarily focusing on the Airoha EN7523 platform. The Airoha SPI driver receives a major update, adding DMA, dual/quad-wire modes, and a critical workaround to prevent flash damage if the UART_TXD pin shorts to Ground. New chips supported include FudanMicro FM25S01A SPI-NAND and several Winbond SPI NOR devices. Fixes include correcting Kconfig dependencies, updating the mtd benchmark command to use lldiv(), and addressing minor bugs in the generic spi-mem and SPL NAND code.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mtd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/mtd.c b/cmd/mtd.c
index d0072129659..7f25144098b 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <console.h>
+#include <div64.h>
#include <led.h>
#if CONFIG_IS_ENABLED(CMD_MTD_OTP)
#include <hexdump.h>
@@ -595,10 +596,10 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc,
if (benchmark && bench_start) {
bench_end = timer_get_us();
- speed = (len * 1000000) / (bench_end - bench_start);
+ speed = lldiv(len * 1000000, bench_end - bench_start);
printf("%s speed: %lukiB/s\n",
read ? "Read" : "Write",
- (unsigned long)(speed / 1024));
+ (unsigned long)(speed >> 10));
}
led_activity_off();