From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 5 May 2020 21:42:39 -0600 Subject: [PATCH 6/6] rtc: add rtc command In-Reply-To: <20200504212032.3759-7-rasmus.villemoes@prevas.dk> References: <20200504212032.3759-1-rasmus.villemoes@prevas.dk> <20200504212032.3759-7-rasmus.villemoes@prevas.dk> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 4 May 2020 at 15:20, Rasmus Villemoes 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 > --- > 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