From a1ae55ee7f8df911649a0cfa5eba3ea88bae92ab Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 29 Jul 2021 12:59:12 +0200 Subject: cmd: date: rtc: Update command to read the first RTC with seq 0 RTCs are using sequence number defined in aliases node. Date command with DM_RTC enabled is looking for the first RTC with index 0. But when RTC_EMULATION is enabled it gets likely most of the time index 0 even when system has rtc0 device via aliases node and gets sequence number 0. That's why extend the code to look for sequence 0 number first. If this fails continue to use existing device with index 0. Signed-off-by: Michal Simek --- cmd/date.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/date.c b/cmd/date.c index e377cfe165e..149ca426e8c 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -41,10 +41,13 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, #ifdef CONFIG_DM_RTC struct udevice *dev; - rcode = uclass_get_device(UCLASS_RTC, 0, &dev); + rcode = uclass_get_device_by_seq(UCLASS_RTC, 0, &dev); if (rcode) { - printf("Cannot find RTC: err=%d\n", rcode); - return CMD_RET_FAILURE; + rcode = uclass_get_device(UCLASS_RTC, 0, &dev); + if (rcode) { + printf("Cannot find RTC: err=%d\n", rcode); + return CMD_RET_FAILURE; + } } #elif defined(CONFIG_SYS_I2C_LEGACY) old_bus = i2c_get_bus_num(); -- cgit v1.3.1 From a84d3b6c563445e9626d77f1504b707f054f77cf Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 1 Jul 2021 11:44:51 +0200 Subject: cmd: pwm: Remove additional pwm description The first name is taken from command name that's why shouldn't be listed in help. And commands shouldn't be listed with <> which means value but value itself is command name. Also add description for commands to make it clear what it does. Before pwm pwm pwm ... After: pwm invert - invert polarity pwm config - config PWM pwm enable - enable PWM output pwm disable - disable PWM output Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- cmd/pwm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/pwm.c b/cmd/pwm.c index 87d840a2b9b..7947e61aeed 100644 --- a/cmd/pwm.c +++ b/cmd/pwm.c @@ -108,7 +108,8 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc, U_BOOT_CMD(pwm, 6, 0, do_pwm, "control pwm channels", - "pwm \n" - "pwm \n" - "pwm \n" + "invert - invert polarity\n" + "pwm config - config PWM\n" + "pwm enable - enable PWM output\n" + "pwm disable - eisable PWM output\n" "Note: All input values are in decimal"); -- cgit v1.3.1 From aa5fb3de23dd05e6da3e3cf7fc20eea983a9dab9 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 11 Aug 2021 12:01:25 +0200 Subject: cmd: boot: Update reset usage message The commit 573a3811edc8 ("sysreset: psci: support system reset in a generic way with PSCI") has added support for warm reset via PSCI but this hasn't been reflected in usage message and user has to look at the code how to run it. That's why update usage text to make this clear. Here is full help with updated usage: ZynqMP> help reset reset - Perform RESET of the CPU Usage: reset - cold boot without level specifier reset -w - warm reset if implemented Signed-off-by: Michal Simek Reviewed-by: Igor Opaniuk --- cmd/boot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/boot.c b/cmd/boot.c index fab294e622b..be67a5980de 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -58,7 +58,8 @@ U_BOOT_CMD( U_BOOT_CMD( reset, 2, 0, do_reset, "Perform RESET of the CPU", - "" + "- cold boot without level specifier\n" + "reset -w - warm reset if implemented" ); #ifdef CONFIG_CMD_POWEROFF -- cgit v1.3.1