diff options
| author | Tom Rini <[email protected]> | 2023-05-08 14:31:04 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-05-08 14:31:04 -0400 |
| commit | 11910550b65e6072b9542d462c0aa93f4ca81836 (patch) | |
| tree | 8308c98ffad76d9693654a28090b03f270a7d250 /doc/usage/cmd | |
| parent | 9876c8c147144db2c120fcc9ffa6de27f6894441 (diff) | |
| parent | f1d33a44ca04fdca241c1d89fd79e2e56c930c7e (diff) | |
Merge branch 'master' into next
Diffstat (limited to 'doc/usage/cmd')
| -rw-r--r-- | doc/usage/cmd/coninfo.rst | 55 | ||||
| -rw-r--r-- | doc/usage/cmd/cp.rst | 83 | ||||
| -rw-r--r-- | doc/usage/cmd/mmc.rst | 4 |
3 files changed, 140 insertions, 2 deletions
diff --git a/doc/usage/cmd/coninfo.rst b/doc/usage/cmd/coninfo.rst new file mode 100644 index 00000000000..f913148c44a --- /dev/null +++ b/doc/usage/cmd/coninfo.rst @@ -0,0 +1,55 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +coninfo command +=============== + +Synopsis +-------- + +:: + + coninfo + +Description +----------- + +The coninfo command provides a list of available console input and output +devices and their assignment as stdin, stdout, stderr console devices. + +If CONFIG_SYS_CONSOLE_IS_IN_ENV=y, the assignment is controlled by the +environment variables stdin, stdout, stderr which contain a comma separated +list of device names. + +Example +-------- + +.. code-block:: console + + => coninfo + List of available devices + |-- pl011@9000000 (IO) + | |-- stdin + | |-- stdout + | |-- stderr + |-- serial (IO) + |-- usbkbd (I) + => setenv stdin pl011@9000000,usbkbd + => coninfo + List of available devices + |-- pl011@9000000 (IO) + | |-- stdin + | |-- stdout + | |-- stderr + |-- serial (IO) + |-- usbkbd (I) + | |-- stdin + +Configuration +------------- + +The coninfo command is only available if CONFIG_CMD_CONSOLE=y. + +Return value +------------ + +The return value $? is always 0 (true). diff --git a/doc/usage/cmd/cp.rst b/doc/usage/cmd/cp.rst new file mode 100644 index 00000000000..12a24e19fee --- /dev/null +++ b/doc/usage/cmd/cp.rst @@ -0,0 +1,83 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +cp command +========== + +Synopsis +-------- + +:: + + cp source target count + cp.b source target count + cp.w source target count + cp.l source target count + cp.q source target count + +Description +----------- + +The cp command is used to copy *count* chunks of memory from the *source* +address to the *target* address. If the *target* address points to NOR flash, +the flash is programmed. + +The number bytes in one chunk is defined by the suffix defaulting to 4 bytes: + +====== ========== +suffix chunk size +====== ========== +.b 1 byte +.w 2 bytes +.l 4 bytes +.q 8 bytes +<none> 4 bytes +====== ========== + +source + source address, hexadecimal + +target + target address, hexadecimal + +count + number of words to be copied, hexadecimal + +Examples +-------- + +The example device has a NOR flash where the lower part of the flash is +protected. We first copy to RAM, then to unprotected flash. Last we try to +write to protectd flash. + +:: + + => mtd list + List of MTD devices: + * nor0 + - device: flash@0 + - parent: root_driver + - driver: cfi_flash + - path: /flash@0 + - type: NOR flash + - block size: 0x20000 bytes + - min I/O: 0x1 bytes + - 0x000000000000-0x000002000000 : "nor0" + => cp.b 4020000 5000000 200000 + => cp.b 4020000 1e00000 20000 + Copy to Flash... done + => cp.b 4020000 0 20000 + Copy to Flash... Can't write to protected Flash sectors + => + +Configuration +------------- + +The cp command is available if CONFIG_CMD_MEMORY=y. Support for 64 bit words +(cp.q) depends on CONFIG_MEM_SUPPORT_64BIT_DATA=y. Copying to flash depends on +CONFIG_MTD_NOR_FLASH=y. + +Return value +------------ + +The return value $? is set to 0 (true) if the command was successfully, +1 (false) otherwise. diff --git a/doc/usage/cmd/mmc.rst b/doc/usage/cmd/mmc.rst index 55e3f9cf98c..71a0303109c 100644 --- a/doc/usage/cmd/mmc.rst +++ b/doc/usage/cmd/mmc.rst @@ -213,10 +213,10 @@ The 'mmc info' command displays device's capabilities: The raw data can be read/written via 'mmc read/write' command: :: - => mmc read 0x40000000 0x5000 0x100 + => mmc read 40000000 5000 100 MMC read: dev # 0, block # 20480, count 256 ... 256 blocks read: OK - => mmc write 0x40000000 0x5000 0x10 + => mmc write 40000000 5000 100 MMC write: dev # 0, block # 20480, count 256 ... 256 blocks written: OK The partition list can be shown via 'mmc part' command: |
