[PATCH 6/6] rtc: add rtc command

Simon Glass sjg at chromium.org
Wed May 6 05:42:39 CEST 2020


On Mon, 4 May 2020 at 15:20, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> Mostly as an aid for debugging RTC drivers, provide a command that can
> be used to read/write arbitrary registers (assuming the driver
> provides the read8/write8 methods or their _array variants).
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>  cmd/Kconfig  |   6 ++
>  cmd/Makefile |   1 +
>  cmd/rtc.c    | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 160 insertions(+)
>  create mode 100644 cmd/rtc.c

Can you also add a sandbox test for this command?

C code:

console_record_reset();
run_command("acpi list", 0);
addr = (ulong)map_to_sysmem(buf);
ut_assert_nextline("ACPI tables start at %lx", addr);
ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr,
   sizeof(struct acpi_rsdp));
...
ut_assert_console_end();

Regards,
Simon


More information about the U-Boot mailing list