summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig28
-rw-r--r--cmd/Makefile1
-rw-r--r--cmd/bootm.c2
-rw-r--r--cmd/c5_pl330_dma.c49
-rw-r--r--cmd/mem.c40
-rw-r--r--cmd/scmi.c1
-rw-r--r--cmd/spl.c23
-rw-r--r--cmd/temperature.c2
-rw-r--r--cmd/terminal.c2
-rw-r--r--cmd/ubi.c4
10 files changed, 107 insertions, 45 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 21d6db57628..5fcf37e67b9 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1238,6 +1238,7 @@ config CMD_FPGAD
config CMD_FUSE
bool "fuse - support for the fuse subssystem"
+ depends on !COMPILE_TEST
help
(deprecated - needs conversion to driver model)
This allows reading, sensing, programming or overriding fuses
@@ -1289,6 +1290,7 @@ config CMD_GPT_RENAME
config CMD_IDE
bool "ide - Support for IDE drivers"
+ depends on !COMPILE_TEST
select IDE
help
Provides an 'ide' command which allows accessing the IDE drive,
@@ -1306,12 +1308,23 @@ config CMD_IO
config CMD_IOTRACE
bool "iotrace - Support for tracing I/O activity"
+ depends on IO_TRACE
help
Provides an 'iotrace' command which supports recording I/O reads and
writes in a trace buffer in memory . It also maintains a checksum
of the trace records (even if space is exhausted) so that the
sequence of I/O accesses can be verified.
+ Example output from the 'iotrace stats' command is below.
+
+ iotrace is enabled
+ Start: 10000000 (buffer start address)
+ Size: 00010000 (buffer size)
+ Offset: 00000120 (current buffer offset)
+ Output: 10000120 (start + offset)
+ Count: 00000018 (number of trace records)
+ CRC32: 9526fb66 (CRC32 of all trace records)
+
When debugging drivers it is useful to see what I/O accesses were
done and in what order.
@@ -1596,6 +1609,7 @@ config CMD_NVME
config CMD_ONENAND
bool "onenand - access to onenand device"
depends on MTD
+ depends on !COMPILE_TEST
help
OneNAND is a brand of NAND ('Not AND' gate) flash which provides
various useful features. This command allows reading, writing,
@@ -1605,6 +1619,7 @@ config CMD_ONENAND
config USE_ONENAND_BOARD_INIT
bool "Call onenand_board_init() in the onenand command"
depends on CMD_ONENAND
+ depends on !COMPILE_TEST
config CMD_OSD
bool "osd"
@@ -1829,6 +1844,14 @@ endmenu
menu "Shell scripting commands"
+
+config CMD_C5_PL330_DMA
+ bool "Release Reset DMA Channels for PL330 Handshake"
+ depends on TARGET_SOCFPGA_CYCLONE5_SOCDK
+ help
+ Provides access to Reset Manager Per2ModRst. Enables DMA
+ channels for ARM PrimeCell PL330 via reset release.
+
config CMD_CAT
bool "cat"
help
@@ -2463,7 +2486,7 @@ config CMD_SLEEP
config CMD_MP
bool "support for multiprocessor commands"
- depends on MP
+ depends on MP && !CPU
default y
help
This enables commands to bringup different processors
@@ -2921,6 +2944,7 @@ config JFFS2_PART_SIZE
config CMD_MTDPARTS
bool "MTD partition support"
+ depends on !COMPILE_TEST
depends on MTD
select MTD_PARTITIONS
help
@@ -3034,7 +3058,7 @@ config CMD_EVENT
config CMD_IRQ
bool "irq - Show information about interrupts"
- depends on !ARM && !MIPS && !RISCV && !SH
+ depends on NIOS2 || PPC || X86
help
This enables two commands:
diff --git a/cmd/Makefile b/cmd/Makefile
index 36e79cc3c28..25479907797 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_CMD_BOOTZ) += bootz.o
obj-$(CONFIG_CMD_BOOTI) += booti.o
obj-$(CONFIG_CMD_BTRFS) += btrfs.o
obj-$(CONFIG_CMD_BUTTON) += button.o
+obj-$(CONFIG_CMD_C5_PL330_DMA) += c5_pl330_dma.o
obj-$(CONFIG_CMD_CAT) += cat.o
obj-$(CONFIG_CMD_CACHE) += cache.o
obj-$(CONFIG_CMD_CBFS) += cbfs.o
diff --git a/cmd/bootm.c b/cmd/bootm.c
index bee683d0580..2c5aea26d98 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -572,7 +572,7 @@ static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
if (ret_nand)
return ret_nand;
- return (0);
+ return 0;
}
U_BOOT_CMD(
diff --git a/cmd/c5_pl330_dma.c b/cmd/c5_pl330_dma.c
new file mode 100644
index 00000000000..75e8c9b0d92
--- /dev/null
+++ b/cmd/c5_pl330_dma.c
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Brian Sune <briansune@gmail.com>
+ */
+
+#include <vsprintf.h>
+#include <command.h>
+#include <asm/io.h>
+
+#include <asm/arch/base_addr_ac5.h>
+
+#define RSTMGR_PERMODRST 0x18 /* PERMODRST register offset */
+
+static int do_dmareset(struct cmd_tbl *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ u8 val;
+ int i, ch;
+
+ if (argc < 2) {
+ printf("Usage: dmareset <channel 0-7> [<channel 0-7> ...]\n");
+ return CMD_RET_USAGE;
+ }
+
+ /* Read current register value */
+ val = readb(SOCFPGA_RSTMGR_ADDRESS + RSTMGR_PERMODRST);
+
+ /* Iterate over all channels given as arguments */
+ for (i = 1; i < argc; i++) {
+ ch = simple_strtoul(argv[i], NULL, 0);
+ if (ch < 0 || ch > 7) {
+ printf("Error: channel must be 0-7\n");
+ return CMD_RET_USAGE;
+ }
+ val &= ~(1 << ch);
+ printf("PL330 DMA channel %d reset released\n", ch);
+ }
+
+ /* Write back */
+ writeb(val, (SOCFPGA_RSTMGR_ADDRESS + RSTMGR_PERMODRST));
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ dmareset, 8, 0, do_dmareset,
+ "Release PL330 DMA channel reset(s) for SoCFPGA",
+ "dmareset <channel 0-7> [<channel 0-7> ...] - release reset for one or more DMA channels"
+);
diff --git a/cmd/mem.c b/cmd/mem.c
index b8afe62e474..d5d7ca2790b 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -712,19 +712,16 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc,
#endif /* CONFIG_LOOPW */
#ifdef CONFIG_CMD_MEMTEST
-static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
- vu_long *dummy)
+static ulong mem_test_alt(volatile ulong *buf, ulong start_addr, ulong end_addr,
+ volatile ulong *dummy)
{
- vu_long *addr;
+ volatile ulong *addr;
ulong errs = 0;
ulong val, readback;
int j;
- vu_long offset;
- vu_long test_offset;
- vu_long pattern;
- vu_long temp;
- vu_long anti_pattern;
- vu_long num_words;
+ ulong offset, test_offset;
+ ulong pattern, anti_pattern;
+ ulong temp, num_words;
static const ulong bitpattern[] = {
0x00000001, /* single bit */
0x00000003, /* two adjacent bits */
@@ -735,8 +732,10 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
0x00000055, /* four non-adjacent bits */
0xaaaaaaaa, /* alternating 1/0 */
};
+ /* Rate-limit schedule() calls to one for every 256 words. */
+ u8 count = 0;
- num_words = (end_addr - start_addr) / sizeof(vu_long);
+ num_words = (end_addr - start_addr) / sizeof(ulong);
/*
* Data line test: write a pattern to the first
@@ -818,8 +817,8 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
*
* Returns: 0 if the test succeeds, 1 if the test fails.
*/
- pattern = (vu_long)0xaaaaaaaaaaaaaaaa;
- anti_pattern = (vu_long)0x5555555555555555;
+ pattern = (ulong)0xaaaaaaaaaaaaaaaa;
+ anti_pattern = (ulong)0x5555555555555555;
debug("%s:%d: length = 0x%.8lx\n", __func__, __LINE__, num_words);
/*
@@ -840,7 +839,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
if (temp != pattern) {
printf("\nFAILURE: Address bit stuck high @ 0x%.8lx:"
" expected 0x%.8lx, actual 0x%.8lx\n",
- start_addr + offset*sizeof(vu_long),
+ start_addr + offset*sizeof(ulong),
pattern, temp);
errs++;
if (ctrlc())
@@ -862,7 +861,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
printf("\nFAILURE: Address bit stuck low or"
" shorted @ 0x%.8lx: expected 0x%.8lx,"
" actual 0x%.8lx\n",
- start_addr + offset*sizeof(vu_long),
+ start_addr + offset*sizeof(ulong),
pattern, temp);
errs++;
if (ctrlc())
@@ -890,7 +889,8 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Fill memory with a known pattern.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- schedule();
+ if (!count++)
+ schedule();
addr[offset] = pattern;
}
@@ -898,12 +898,13 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Check each location and invert it for the second pass.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- schedule();
+ if (!count++)
+ schedule();
temp = addr[offset];
if (temp != pattern) {
printf("\nFAILURE (read/write) @ 0x%.8lx:"
" expected 0x%.8lx, actual 0x%.8lx)\n",
- start_addr + offset*sizeof(vu_long),
+ start_addr + offset*sizeof(ulong),
pattern, temp);
errs++;
if (ctrlc())
@@ -918,13 +919,14 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Check each location for the inverted pattern and zero it.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- schedule();
+ if (!count++)
+ schedule();
anti_pattern = ~pattern;
temp = addr[offset];
if (temp != anti_pattern) {
printf("\nFAILURE (read/write): @ 0x%.8lx:"
" expected 0x%.8lx, actual 0x%.8lx)\n",
- start_addr + offset*sizeof(vu_long),
+ start_addr + offset*sizeof(ulong),
anti_pattern, temp);
errs++;
if (ctrlc())
diff --git a/cmd/scmi.c b/cmd/scmi.c
index cfbca63e164..d0498b816aa 100644
--- a/cmd/scmi.c
+++ b/cmd/scmi.c
@@ -29,6 +29,7 @@ struct {
{SCMI_PROTOCOL_ID_SENSOR, "Sensor management"},
{SCMI_PROTOCOL_ID_RESET_DOMAIN, "Reset domain management"},
{SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN, "Voltage domain management"},
+ {SCMI_PROTOCOL_ID_PINCTRL, "Pin control management"},
};
/**
diff --git a/cmd/spl.c b/cmd/spl.c
index 379b512f1ff..f591dc07fb6 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -30,19 +30,6 @@ static const char **subcmd_list[] = {
#endif
NULL,
},
- [SPL_EXPORT_ATAGS] = (const char * []) {
-#ifdef CONFIG_SUPPORT_PASSING_ATAGS
- "start",
- "loados",
-#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
- "ramdisk",
-#endif
- "cmdline",
- "bdt",
- "prep",
-#endif
- NULL,
- },
NULL
};
@@ -96,7 +83,6 @@ static int call_bootm(int argc, char *const argv[], const char *subcommand[])
static struct cmd_tbl cmd_spl_export_sub[] = {
U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)SPL_EXPORT_FDT, "", ""),
- U_BOOT_CMD_MKENT(atags, 0, 1, (void *)SPL_EXPORT_ATAGS, "", ""),
};
static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -128,10 +114,6 @@ static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc,
#endif
break;
#endif
- case SPL_EXPORT_ATAGS:
- printf("Argument image is now in RAM at: 0x%p\n",
- (void *)gd->bd->bi_boot_params);
- break;
}
} else {
/* Unrecognized command */
@@ -176,11 +158,10 @@ static int do_spl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
U_BOOT_CMD(
spl, 6 , 1, do_spl, "SPL configuration",
- "export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr]\n"
- "\timg\t\t\"atags\" or \"fdt\"\n"
+ "export fdt [kernel_addr] [initrd_addr] [fdt_addr]\n"
"\tkernel_addr\taddress where a kernel image is stored.\n"
"\t\t\tkernel is loaded as part of the boot process, but it is not started.\n"
"\tinitrd_addr\taddress of initial ramdisk\n"
"\t\t\tcan be set to \"-\" if fdt_addr without initrd_addr is used.\n"
- "\tfdt_addr\tin case of fdt, the address of the device tree.\n"
+ "\tfdt_addr\tthe address of the device tree.\n"
);
diff --git a/cmd/temperature.c b/cmd/temperature.c
index 41e422fc937..c145d019364 100644
--- a/cmd/temperature.c
+++ b/cmd/temperature.c
@@ -32,7 +32,7 @@ static int do_get(struct cmd_tbl *cmdtp, int flag, int argc,
if (ret)
return CMD_RET_FAILURE;
- printf("%s: %d C\n", dev->name, temp);
+ printf("%s: %d mC\n", dev->name, temp);
return CMD_RET_SUCCESS;
}
diff --git a/cmd/terminal.c b/cmd/terminal.c
index d803bc6c896..14610694255 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -24,7 +24,7 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
if (!dev)
return -1;
- if (IS_ENABLED(CONFIG_SERIAL))
+ if (IS_ENABLED(CONFIG_SERIAL) && !IS_ENABLED(CONFIG_DM_SERIAL))
serial_reinit_all();
printf("Entering terminal mode for port %s\n", dev->name);
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 56d7da82629..93de6f3aea2 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -549,6 +549,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
}
len = size > tbuf_size ? tbuf_size : size;
+ led_activity_blink();
tmp = offp;
off = do_div(tmp, vol->usable_leb_size);
lnum = tmp;
@@ -582,6 +583,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
env_set_hex("filesize", len_read);
free(tbuf);
+ led_activity_off();
return err;
}
@@ -600,7 +602,9 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset)
if (err)
return -err;
+ led_activity_blink();
err = ubi_init();
+ led_activity_off();
if (err)
return -err;