summaryrefslogtreecommitdiff
path: root/drivers/rtc/m41t60.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc: Remove unused driversTom Rini2022-11-101-239/+0
| | | | | | | These drivers are not enabled anywhere, remove them. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* global: Convert simple_strtoul() with hex to hextoul()Simon Glass2021-08-021-1/+1
| | | | | | | | | It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop log.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Move env_get() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* rtc: remove CONFIG_CMD_DATE dependencyHeinrich Schuchardt2018-07-251-3/+0
| | | | | | | | | The EFI subsystem accesses the real time clock and is enabled by default. So we should drop any CONFIG_CMD_DATE dependency from the real time clock drivers. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-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>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-1/+1
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-14/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Switch from per-driver to common definition of bin2bcd and bcd2binAlbin Tonnerre2009-08-251-10/+0
| | | | | Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Acked-by: Stefan Roese <sr@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-8/+8
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rtc: allow rtc_set to return an error and use it in cmd_dateJean-Christophe PLAGNIOL-VILLARD2008-09-071-3/+5
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rtc: Clean drivers/rtc/MakefileMichal Simek2008-08-181-2/+1
| | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* rtc: Fix printf format warning in m41t60.cStefan Roese2008-07-101-1/+1
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* LWMON5: POST RTC fixYuri Tikhonov2008-03-201-2/+4
| | | | | | | | | | | | | | | | | Modify the RTC API to provide one a status for the time reported by the rtc_get() function: 0 - a reliable time is guaranteed, < 0 - a reliable time isn't guaranteed (power fault, clock issues, and so on). The RTC chip drivers are responsible for providing this info if the corresponding chip supports such functionality. If not - always report that the time is reliable. The POST RTC test was modified to detect the RTC faults utilizing this new rtc_get() feature. Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
* Add driver for STMicroelectronics M41T60 RTCLarry Johnson2007-12-271-0/+261
This driver is based on the driver for the M41T11. In the intended application, the RTC will be powered by a large capacitor, rather than a battery. The driver therefore checks to see whether the RTC has lost power. The chip's OUT bit is normally reset from its power-up state. If the OUT bit is read as set, or if the date and time are not valid, then the RTC is assumed to have lost power, and its date and time are reset to 1900-01-01 00:00:00. Support for adjusting the speed of the clock to improve accuracy is provided through an environment variable. Signed-off-by: Larry Johnson <lrj@acm.org>