summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/README.commands84
-rw-r--r--doc/README.qemu-arm7
-rw-r--r--doc/device-tree-bindings/tpm2/sandbox.txt11
-rw-r--r--doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt18
-rw-r--r--doc/driver-model/i2c-howto.txt2
5 files changed, 106 insertions, 16 deletions
diff --git a/doc/README.commands b/doc/README.commands
index afd5577b0a..1d29c4d91d 100644
--- a/doc/README.commands
+++ b/doc/README.commands
@@ -1,19 +1,83 @@
+Command definition
+------------------
Commands are added to U-Boot by creating a new command structure.
-This is done by first including command.h, then using the U_BOOT_CMD() macro
-to fill in a cmd_tbl_t struct.
+This is done by first including command.h, then using the U_BOOT_CMD() or the
+U_BOOT_CMD_COMPLETE macro to fill in a cmd_tbl_t struct.
-U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help")
+U_BOOT_CMD(name, maxargs, repeatable, command, "usage", "help")
+U_BOOT_CMD_COMPLETE(name, maxargs, repeatable, command, "usage, "help", comp)
-name: is the name of the commad. THIS IS NOT a string.
-maxargs: the maximum number of arguments this function takes
-repeatable: either 0 or 1 to indicate if autorepeat is allowed
-command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
-usage: Short description. This is a string
-help: Long description. This is a string
+name: The name of the command. THIS IS NOT a string.
+maxargs: The maximum number of arguments this function takes including
+ the command itself.
-**** Behind the scene ******
+repeatable: Either 0 or 1 to indicate if autorepeat is allowed.
+
+command: Pointer to the command function. This is the function that is
+ called when the command is issued.
+
+usage: Short description. This is a string.
+
+help: Long description. This is a string. The long description is
+ only available if CONFIG_SYS_LONGHELP is defined.
+
+comp: Pointer to the completion function. May be NULL.
+ This function is called if the user hits the TAB key while
+ entering the command arguments to complete the entry. Command
+ completion is only available if CONFIG_AUTO_COMPLETE is defined.
+
+Command function
+----------------
+
+The commmand function pointer has to be of type
+int (*cmd)(struct cmd_tbl_s *cmdtp, int flag, int argc, const char *argv[]);
+
+cmdtp: Table entry describing the command (see above).
+
+flag: A bitmap which may contain the following bit:
+ CMD_FLAG_REPEAT - The last command is repeated.
+ CMD_FLAG_BOOTD - The command is called by the bootd command.
+ CMD_FLAG_ENV - The command is called by the run command.
+
+argc: Number of arguments including the command.
+
+argv: Arguments.
+
+Allowable return value are:
+
+CMD_SUCCESS The command was successfully executed.
+
+CMD_FAILURE The command failed.
+
+CMD_RET_USAGE The command was called with invalid parameters. This value
+ leads to the display of the usage string.
+
+Completion function
+-------------------
+
+The completion function pointer has to be of type
+int (*complete)(int argc, char *const argv[], char last_char,
+ int maxv, char *cmdv[]);
+
+argc: Number of arguments including the command.
+
+argv: Arguments.
+
+last_char: The last character in the command line buffer.
+
+maxv: Maximum number of possible completions that may be returned by
+ the function.
+
+cmdv: Used to return possible values for the last argument. The last
+ possible completion must be followed by NULL.
+
+The function returns the number of possible completions (without the terminating
+NULL value).
+
+Behind the scene
+----------------
The structure created is named with a special prefix and placed by
the linker in a special section using the linker lists mechanism
diff --git a/doc/README.qemu-arm b/doc/README.qemu-arm
index 6f6f07d8bb..260165638a 100644
--- a/doc/README.qemu-arm
+++ b/doc/README.qemu-arm
@@ -39,13 +39,12 @@ Running U-Boot
The minimal QEMU command line to get U-Boot up and running is:
- For ARM:
- qemu-system-arm -machine virt,highmem=off -bios u-boot.bin
+ qemu-system-arm -machine virt -bios u-boot.bin
- For AArch64:
- qemu-system-aarch64 -machine virt,highmem=off -cpu cortex-a57 -bios u-boot.bin
+ qemu-system-aarch64 -machine virt -cpu cortex-a57 -bios u-boot.bin
-The 'highmem=off' parameter to the 'virt' machine is required for PCI to work
-in U-Boot. Also, for some odd reason qemu-system-aarch64 needs to be explicitly
+Note that for some odd reason qemu-system-aarch64 needs to be explicitly
told to use a 64-bit CPU or it will boot in 32-bit mode.
Additional peripherals that have been tested to work in both U-Boot and Linux
diff --git a/doc/device-tree-bindings/tpm2/sandbox.txt b/doc/device-tree-bindings/tpm2/sandbox.txt
new file mode 100644
index 0000000000..3d0f727cc4
--- /dev/null
+++ b/doc/device-tree-bindings/tpm2/sandbox.txt
@@ -0,0 +1,11 @@
+Sandbox TPMv2.0 bindings
+------------------------
+
+Required properties:
+- compatible : Should be "sandbox,tpm2"
+
+Example:
+
+ tpm {
+ compatible = "sandbox,tpm2";
+ };
diff --git a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
new file mode 100644
index 0000000000..b48a15112d
--- /dev/null
+++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
@@ -0,0 +1,18 @@
+ST33TPHF20 SPI TPMv2.0 bindings
+-------------------------------
+
+Required properties:
+- compatible : Should be "tis,tpm2-spi"
+- reg : SPI Chip select
+
+Optional properties:
+- gpio-reset : Reset GPIO (if not connected to the SoC reset line)
+- spi-max-frequency : See spi-bus.txt
+
+Example:
+
+ tpm@1 {
+ compatible = "tis,tpm2-spi";
+ reg = <1>;
+ spi-max-frequency = <10000000>;
+ };
diff --git a/doc/driver-model/i2c-howto.txt b/doc/driver-model/i2c-howto.txt
index 605d3ef7ad..8ba2f6e267 100644
--- a/doc/driver-model/i2c-howto.txt
+++ b/doc/driver-model/i2c-howto.txt
@@ -14,9 +14,7 @@ ones remain:
ppc4xx_i2c
rcar_i2c
sh_i2c
- sh_sh7734_i2c
soft_i2c
- tsi108_i2c
zynq_i2c
The deadline for this work is the end of June 2017. If no one steps