summaryrefslogtreecommitdiff
path: root/drivers/rtc/i2c_rtc_emul.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-09rtc: i2c_rtc_emul: catch any write to the "reset" registerRasmus Villemoes1-1/+2
It's more natural that any write that happens to touch the reset register should cause a reset, rather than just a write that starts at that offset. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2020-05-19common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-20drivers: rtc: resolve year 2038 problem in rtc_to_tmHeinrich Schuchardt1-1/+3
Our implementation of rtc_to_tm() cannot handle dates of more than 0x7fffffff seconds after 1970-01-01. Adopt the Linux kernel implementation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini1-2/+0
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-01dm: sandbox: i2c_rtc: Drop fdtdec.h headerSimon Glass1-1/+0
This is not needed in this driver. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-06dm: rtc: sandbox: Add an emulated I2C RTC deviceSimon Glass1-0/+236
Add a sandbox I2C emulation device which emulates a real-time clock. The clock works off an offset from the current system time, and supports setting and getting the clock, as well as access to byte-width regisers in the RTC. It does not support changing the system time. This device can be used for testing the 'date' command on sandbox, as well as the RTC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>