Commit Graph

187 Commits

Author SHA1 Message Date
Biwen Li
d64e01f367 rtc: ds3231/ds3232: fix coding style
The patch fixes coding style

Signed-off-by: Biwen Li <biwen.li@nxp.com>
2019-09-19 12:18:53 -04:00
Patrick Delaunay
fed51572c8 rtc: stm32: manage 2 digit limitation on year
STM32 RTC manages only 2 digits for YEAR
(Year tens and units in BCD format in RTC_DR register).

With this patch, RTC driver assumes that tm->tm_years is between
2000 and 2099; tm->tm_year - 2000 have only 2 digit
(0 > and <= 99).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27 09:36:56 +02:00
Chuanhua Han
db07c447ca rtc: ds3232/ds3231: Add support to generate 32KHz output for driver module
Add an implementation of the rtc_enable_32khz_output() that uses the
driver model i2c APIs.

Also put code related to rtc_enable_32khz_output
under CONFIG_RTC_ENABLE_32KHZ_OUTPUT.

Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-08-22 09:07:36 +05:30
Simon Glass
7b51b576d6 env: Move env_get() to env.h
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>
2019-08-11 16:43:41 -04:00
Heiko Schocher
0c4e81e0eb rtc, rx8025: add DM support
add DM support for this RTC driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:12 -04:00
Heiko Schocher
f91fb7242a rtc, rx8025: fix Coding Style
fix Coding Style for this driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:12 -04:00
Heiko Schocher
a7e6d0c45a rtc: move RTC_RX8025 to Kconfig
move RTC_RX8025 to Kconfig and fixup board configs.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:11 -04:00
Patrick Delaunay
1f99eaff08 rtc: Add rtc driver for stm32mp1
Add support of STM32MP1 rtc driver.
Enable it for basic and trusted configurations.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
2019-07-22 11:04:52 +02:00
Chuanhua Han
55f2bc7dd6 rtc: Add DM support to ds3231
Add an implementation of the ds3231 driver that uses the driver
model i2c APIs.

Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-07-18 11:31:23 -04:00
Michael Walle
fb9a1ffef3 rtc: add Microcrystal RV-8803 driver
Signed-off-by: Michael Walle <michael@walle.cc>
2019-07-13 11:11:28 -04:00
Heiko Schocher
8dd6803ded rtc: ds1307: add support for m41t11
add m41t11 support in ds1307 driver. changes:

- add compatible string for m41t11
- check if RTC clock is running, if not
  enable the clock

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-13 11:11:26 -04:00
Chuanhua Han
ef6c26d338 rtc: pcf2127: Fixed bug with rtc settings and getting error time
The previous pcf2127 RTC chip could not read and set the correct time.
When reading the data of internal registers, the read address was the
value of register plus 1. This is because this chip requires the host
to send a stop signal after setting the register address and before
reading the register data.

This patch sets the register address using dm_i2c_write and reads
the register data using the original dm_i2c_xfer in order to generate
a stop signal after the register address is set, and fixes the bug of
the original read and write time.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
2019-07-09 10:51:12 +02:00
Heinrich Schuchardt
3c1889e639 rtc: export rtc_month_days()
Export function rtc_month_days() for reuse in the UEFI subsystem.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-31 23:27:12 +02:00
Simon Goldschmidt
4e829e9841 rtc: m41t62: add compatible for m41t82
This adds a compatible string for m41t82. This ensures that this driver
can be used for m41t82 in DM mode, too (asit was usable for this model in
non-DM mode before).

In addition, the HT bit has to be reset during probe, since the m41t82
chip sets it when entering battery standby mode.

This patch ensures this driver works on socfpga_socrates.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2019-04-25 00:00:49 +02:00
Lukasz Majewski
c8c0242f1c rtc: m41t62: Convert the RTC driver to support the driver model (DM)
After this change the m41t62.c can be used with RTC subsystem (i.e. date
command) which uses device model (DM).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2018-12-03 10:44:10 -05:00
Lukasz Majewski
7afc4155a7 rtc: m41t62: Extract common RTC handling code to facilitate DM conversion
This change facilitates the conversion of m41t62 RTC driver to device
model (DM).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2018-12-03 10:44:10 -05:00
Lukasz Majewski
4d3df956fb rtc: m41t62: Break i2c_write() arguments to fix checkpatch warning
No functional change for this commit.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2018-12-03 10:44:10 -05:00
Lukasz Majewski
d27db67e6b Kconfig: Migrate CONFIG_RTC_M41T62 define to Kconfig
This patch moves the RTC M41T62 config define to Kconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-12-03 10:44:10 -05:00
Heinrich Schuchardt
952061352a drivers: rtc: correctly convert seconds to time structure
Variable 'days' must be defined as signed int. Otherwise the conversion
fails for some dates, e.g. 2004-08-25. Cf function rtc_time64_to_tm() in
the Linux kernel source.

Fixes: 992c1db455 "drivers: rtc: resolve year 2038 problem in rtc_to_tm"
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-12-01 18:03:14 -05:00
Tom Rini
c1d6e0bbfd Improvements:
- RK3188 USB-UART functionality
 - errors triggering a hard-stop in SPL on the RK3399 are reported
 - Rockchip RV1108 (SoC) support
 - MicroCrystal RV3029 (RTC) DM driver
 
 Fixes:
 - RK3188 early UART setup
 - limit SD-card frequency to 40MHz on the RK3399-Q7
 - MIPI fixes
 - RK3399 CPUB clock initialisation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJcAab4AAoJECaAFcEOcohNx8gH/0OuW443gsA8Ty0rXpCvbzSi
 UejfBfqljX4tYcUrgABVdMd2WdUyQ6rSoVgnX6mvfToCxd51L2CQiimrTJRQp/ZQ
 yCrwC8iFYwgmyM/0UnnjRa03WJvYBi3McWWIxQy7ZywQcZkdIuyn6t5AbcRppGMF
 67G0ft9KRwB+dMcgdRuikDThZRhAWZ30MdY4LFZvyGWupuv/mdpyYhjHYyv05CVf
 BvaUqRFkt86GBAW7Hq+OahH1t/xuZBcPJdt8GC40Blgfmle2uvZOIpoSEezVwFXm
 qKSj5FSSVQ9XtMeWwWvHLUxKSua0pIX5d7HmK9WqcsUIePDbzth8i+/BdA+5AD4=
 =EYJx
 -----END PGP SIGNATURE-----

Merge tag 'for-master-20181130' of git://git.denx.de/u-boot-rockchip

Improvements:
- RK3188 USB-UART functionality
- errors triggering a hard-stop in SPL on the RK3399 are reported
- Rockchip RV1108 (SoC) support
- MicroCrystal RV3029 (RTC) DM driver

Fixes:
- RK3188 early UART setup
- limit SD-card frequency to 40MHz on the RK3399-Q7
- MIPI fixes
- RK3399 CPUB clock initialisation
2018-12-01 14:17:27 -05:00
Philipp Tomsich
a73610d2c6 rtc: rv3029: update to support DM and sync with Linux 4.17
The "Flamingo" carrier-board for the RK3399-Q7 has a RV3029 populated
and the application will use the off-module RV3029 RTC including the
battery backed SRAM.

To support this use case, this commit includes the following changes:
 * updates the rv3029 driver to use DM
 * implements the read8/write8 operations

This syncs the implementation with the Linux code (based on 4.17),
porting the trickle-charger support from there (with improvements to
avoid unnecessary EEPROM updates) and adheres to the Linux DTS
binding.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
2018-11-30 21:56:45 +01:00
Philipp Tomsich
a3716b5f3f rtc: rv3029: add to Kconfig
The MicroCrystal RV3029 driver didn't have a Kconfig entry and was not used
anywhere. Add it to Kconfig to make it selectable.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
2018-11-30 21:56:45 +01:00
Simon Glass
68c81fb665 rtc: Allow child drivers
Some RTC chips have child drivers, e.g. to provide access to their
non-volatile RAM. Scan for these when binding.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29 09:30:05 -07:00
Tom Rini
3d5ced9e22 Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
 Various dm-related improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAlu9RL4RHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYd8gf+NYAGhpiEZZ5vc3DB4Xdn2okgakbbg0QQ
 /b0Lr9xQsKgZthK0rvPlH2dXxf+ViAm1iHTy8KBCFi0SHNder48Zui9uTrX0NRq8
 pLZGyJPXPYbiyc4pQTEJpTth4iShcphRVio0no4sLpNQqO4aQrialSLa9fnwd9Ra
 1l9mF91aaYw6cG+/ejg3UR1LfsDdQ5bjubt0Fw0wGX9UvQOAz5gz5+a17wrz6+Gx
 L0gzvyfbuLUhbWB36DXikrL14DAFys2uV9aHJ5zEd53l+F7ZHWsupCO0OtN66cV7
 KpPKoYG7vhLqBXKpyrW20T+BPeSyDKmDQE6wbpECmEDOvKzvW67O/w==
 =Bfjm
 -----END PGP SIGNATURE-----

Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dm

Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
Various dm-related improvements
2018-10-10 13:35:17 -04:00
Simon Glass
380d4f787a rtc: Allow use of RTC in SPL and TPL
Add Kconfig options so that the RTC can be used in SPL and TPL. This is
helpful for accessing the contents of CMOS RAM, for example.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Simon Glass
107610775b Kconfig: Convert CONFIG_RTC_MC146818 to Kconfig
Move this option to Kconfig and tidy up the two boards which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Trent Piepho
4a094725b4 rtc: Add read8 and write8 support to isl1208 driver
This can be used for device register access from board code.

This allows access to capabilities in the RTC chip not abstracted in
U-Boot's RTC class.  E.g., device NVRAM or a tamper detection circuit.

Cc: Klaus Goger <klaus.goger@theobroma-systems.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-10-08 14:45:02 -04:00
AKASHI Takahiro
a370e429a7 rtc: pl031: convert the driver to driver model
With this patch, PL031 driver is converted to driver-model-compliant
driver. In addition, CONFIG_SYS_RTC_PL031_BASE is no longer valid.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23 21:55:31 +02:00
Tom Rini
406fd7e207 Patch queue for efi - 2018-07-25
Highlights this time:
 
   - Many small fixes to improve spec compatibility (found by SCT)
   - Almost enough to run with sandbox target
   - GetTime() improvements
   - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJbWHUwAAoJECszeR4D/txgKlUP/3Lu6pxScwzL7TsSD6OFZQ6M
 qQq2FH89XOA6/3r04RXrJZoHwOKIH5uj7ea6FlitpS1sQ4UOCQhp/lJJuJennHHj
 +veeuzI1sKTCX8Kd9ptrZDEF3G8lbF/zSyCFa1MOd1ONDVsTgSO9fOGmiqcC9FBF
 UrUH7dzXlE2CWs/mv/UikCBI7rYF+NOFJNuwHVXfsW4PyQ/7uaNsa7Rl3mXYb/Lr
 gjdcJkeHZAmFv/r84tGS9AFv+m0So9AGEYD7MeQDt02hSOuH9/nu4HgPmiwln3Fn
 3sFA3+daMrlFNi6kFw10S0sjKz94nN+Arm6cIXlvGaoc/wnPM2wEcKOSiXhzVM8d
 CoP/26N/ETRoI9P01C2WyTrKjo0O0aFwp3ubfmmbdcaKr/pyjAJgb3BnqXBfAr7T
 OjsE086jtHzdyKYKXDIz8+ZxSo4VsiDjBzDK7LVA0L5KtqAFFa+OYjlgEMJnQCk3
 YJfj+rhxfpjzFI7x5BAgq0q3XQRvAJS8QcUq+V2todQ3JkUlCIaVUNQLWAfNJN0q
 ze/WR8l4nwj5YFo8XiEbFHpQi/1bkR6cSzyjlBKUqrtHUUEu32vWlzZpNi6HzPMq
 cP7gehboFlcCSr8T2UMjBTE1LWI35eWNQQoiNRrS2UVcTH9h1vXMFV9PT+I82BBl
 ivJ+YwF9nU1JdS8CG3n7
 =ePTT
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2018-07-25

Highlights this time:

  - Many small fixes to improve spec compatibility (found by SCT)
  - Almost enough to run with sandbox target
  - GetTime() improvements
  - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
2018-07-30 16:02:29 -04:00
Heinrich Schuchardt
c5b53baeaa drivers: rtc: correctly set week day for mc146818
The driver sets the weekday incorrectly when called by the
'date set' command.

Sunday is 1, Saturday is 7 unlike in U-Boot (see data sheet
https://www.nxp.com/docs/en/data-sheet/MC146818.pdf, table 3).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-28 11:58:09 -04:00
Heinrich Schuchardt
5d88902401 rtc: remove CONFIG_CMD_DATE dependency
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>
2018-07-25 15:00:24 +02:00
AKASHI Takahiro
8cffb50ab3 rtc: compile date.c if DM_RTC
rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least
PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if
we don't want or need this command.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-24 09:25:23 -04:00
Heinrich Schuchardt
af95a3e7c0 drivers: rtc: correct week day for mc146818
For qemu-x86 the date command produces wrong days of the week:
Date: 2018-07-06 (Saturday)    Time: 18:02:03
Date: 2018-07-07 (unknown day)    Time: 21:02:06

According to a comment in the Linux driver the mc146818 only updates the
day of the week if the register value is non-zero.

Sunday is 1, saturday is 7 unlike in U-Boot (see data sheet
https://www.nxp.com/docs/en/data-sheet/MC146818.pdf).

So let's use our library function to determine the day of the week.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-20 15:55:04 -04:00
Heinrich Schuchardt
992c1db455 drivers: rtc: resolve year 2038 problem in rtc_to_tm
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-07-19 17:03:36 -04:00
Heinrich Schuchardt
b19886b946 ARM: qemu-arm: enable RTC
QEMU provides an emulated ARM AMBA PrimeCell PL031 RTC.

The patch sets the base address in the board include file according to the
definition in hw/arm/virt.c of the QEMU source. It defines the Kconfig
option for the existing driver, and enables the RTC driver in
qemu_arm64_defconfig and qemu_arm_defconfig as well as the date command.

We need an RTC to provide the GetTime() runtime service in the UEFI
subsystem.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tested-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2018-07-19 16:31:37 -04:00
Chris Packham
d3671dfcdb drivers/rtc: convert mvrtc to DM
Add DM support for the Marvell RTC driver.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2018-06-05 20:19:09 -04:00
Chris Packham
942bb6e2ad drivers/rtc: prepare mvrtc for DM conversion
Split the rtc_{get,set,reset} functions so that the bodies can be used
in a DM driver.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2018-06-05 20:19:08 -04:00
Tom Rini
83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
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-05-07 09:34:12 -04:00
Tom Rini
d024236e5a Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
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>
2018-04-27 14:54:48 -04:00
Chris Packham
402c8fd514 rtc: rx8025: remove redundant code in rtc_reset
As of commit 1a1fa24066 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the rx8025 implementation of
rtc_reset() does not need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06 20:45:44 -04:00
Chris Packham
05d63d8bce rtc: rs5c372: remove redundant code in rtc_reset
As of commit 1a1fa24066 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the rs5c372 implementation of
rtc_reset() does not need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06 20:45:44 -04:00
Chris Packham
fbd8179cba rtc: mx27rtc: remove redundant code in rtc_reset
As of commit 1a1fa24066 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the mx27rtc implementation of
rtc_reset() can be an empty stub function.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06 20:45:44 -04:00
Chris Packham
a6bf689a70 rtc: ds1374: remove redundant code in rtc_reset
As of commit 1a1fa24066 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the ds1374 implementation of
rtc_reset() doesn't need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06 20:45:44 -04:00
Chris Packham
c1a2afa408 rtc: ds1307: remove redundant code in rtc_reset
As of commit 1a1fa24066 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the ds1307 implementation of
rtc_reset() doesn't need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06 20:45:44 -04:00
Klaus Goger
52280315a4 rtc: rewrite isl1208 to support DM
Adds devicemodel support to the ISL1208 driver.
This patch drops the non-dm API as no board was using it anyway.
Also add it to Kconfig.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06 20:45:28 -04:00
Nandor Han
958a2106f5 rtc: adding RX8010SJ rtc driver
Add a new driver for RX8010SJ rtc chip. The driver implements both
formats of U-Boot driver model.

Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04 12:00:58 +01:00
Nandor Han
da5337a61c rtc: add support for s35392a
Add support for S35392A RTC. The driver supports both U-Boot driver
models.

Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Cc: Heiko Schocher <hs@denx.de>
2017-11-20 09:58:31 +01:00
Bin Meng
6087be2ba6 rtc: mc146818: Correct alarm message for day alarm
RTC_CONFIG_D register contains the day within the month to generate
an alarm, not the month. This corrects the printf to indicate it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-23 17:25:40 -04:00
Simon Glass
00caae6d47 env: Rename getenv/_f() to env_get()
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>
2017-08-16 08:30:24 -04:00
Heiko Schocher
064b55cfcb powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512x
There was for long time no activity in the mpx5xxx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in mpc5xxx,
so remove it.

Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-16 10:14:55 -04:00