- Oct 31, 2023
-
-
This adds a generic I2C bootcounter adhering to driver model to replace the previously removed legacy implementation. There is no change in functionality, it can be used on any I2C device. The device tree configuration may look like this for example: bootcount { compatible = "u-boot,bootcount-i2c"; i2cbcdev = <&i2c_rtc>; offset = <0x11>; }; Signed-off-by:
Philip Richard Oberfichtner <pro@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
The legacy I2C bootcounter will hereby be removed and eventually be replaced by a driver model implementation in the follow-up commit. The legacy driver has the following drawbacks: - It's not adhering to the driver model - Settings are grabbed from Kconfig rather than device tree - i2c_{read,write} are being used instead of dm_i2c_{read,write} Signed-off-by:
Philip Richard Oberfichtner <pro@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Sep 24, 2023
-
-
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 05, 2022
-
-
Tom Rini authored
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Oct 11, 2022
-
-
Fix a copy-paste error I did when inserting the comment. Signed-off-by:
Philip Oberfichtner <pro@denx.de> Reviewed-by:
Jaehoon Chung <jh80.chung@samsung.com>
-
- Jul 07, 2022
-
-
Tom Rini authored
This converts the following to Kconfig: CONFIG_SYS_BOOTCOUNT_LE CONFIG_SYS_BOOTCOUNT_BE Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Mar 25, 2022
-
-
Use the MEMA - MEMD registers on the PFUZE100 as bootcount registers. Based on work from Heiko Schocher <hs@denx.de>. Signed-off-by:
Philip Oberfichtner <pro@denx.de>
-
- Mar 23, 2022
-
-
- Grammar fixes - Clarify explanations Signed-off-by:
Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Jan 28, 2022
-
-
For printing phys_addr_t we should use %pa to avoid warning like: drivers/bootcount/bootcount_syscon.c:110:17: note: in expansion of macro ‘dev_err’ 110 | dev_err(dev, "%s: Unsupported register size: %d\n", __func__, | ^~~~~~~ seen for sandbox_defconfig with CONFIG_PHYS_64BIT=y. Cf. commit 1eebd14b ("vsprintf: Add modifier for phys_addr_t") Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Aug 22, 2021
-
-
The driver will use a syscon regmap as backend and supports both 16 and 32 size value. The value will be stored in the CPU's endianness. Signed-off-by:
Nandor Han <nandor.han@vaisala.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jul 15, 2021
-
-
RTC second scratch register[32-bit]: -zero byte hold boot count value -first byte hold update available state -second byte hold version -third byte hold magic number Signed-off-by:
Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com> Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210611161350.2141-17-Gireesh.Hiremath@in.bosch.com Gbp-Pq: Topic apertis/guardian Gbp-Pq: Name am335x-guardian-software-update-available-status-is-store.patch
-
- Jul 06, 2021
-
-
Define LOG_CATEGORY for all uclass to allow filtering with log command. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Feb 02, 2021
-
-
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Dec 13, 2020
-
-
Simon Glass authored
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 01, 2020
-
-
This driver allows to use SPI flash as backing store for boot counter values with DM enabled. Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Jun 02, 2020
-
-
This config option depends on EXT4 support. If Ext4 write capability is not selected, it generate write error messages and is unable to maintain boot counter. Signed-off-by:
Frédéric Danis <frederic.danis@collabora.com>
-
- May 19, 2020
-
-
Move this header out of the common header. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 18, 2020
-
-
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Apr 24, 2020
-
-
After a successful upgrade, multiple problem during boot sequence may trigger the altbootcmd process. This patch adds a version and an upgrade_available entries to the bootcount file to enable/disable the bootcount check. When failing to read the bootcount file it will consider that bootcount is enabled, acting as previously, and update the file accordingly. The bootcount file is only saved when `upgrade_available` is true, this allows to save writes to the filesystem. Signed-off-by:
Frédéric Danis <frederic.danis@collabora.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Mar 16, 2020
-
-
Heiko Schocher authored
add DM/DTS support for the memory based bootcounter in drivers/bootcount/bootcount.c. Let the old implementation in, so boards which have not yet convert to DM/DTS do not break. Signed-off-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jan 10, 2020
-
-
This driver allows the use of i2c eeprom device or partition as backing store for boot counter values with DM enabled. Signed-off-by:
Robert Beckett <bob.beckett@collabora.com>
-
- Dec 02, 2019
-
-
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Aug 11, 2019
-
-
This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Move env_set_ulong() over to the new header file. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Dec 10, 2018
-
-
Philipp Tomsich authored
This implements a driver using a RTC-based backing store for the DM bootcount implementation. The node configuring this feature will be compatible with 'u-boot,bootcount-rtc' and the underlying RTC device shall be reference through the property 'rtc'. An offset into the RTC device's register space can be provided through the 'offset' property. Tested on a RK3399-Q7 on a Flamingo carrier board using the SRAM area of the carrier board's RV3029 RTC. Signed-off-by:
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
-
Philipp Tomsich authored
The original bootcount methods do not provide an interface to DM and rely on a static configuration for I2C devices (e.g. bus, chip-addr, etc. are configured through defines statically). On a modern system that exposes multiple devices in a DTS-configurable way, this is less than optimal and a interface to DM-based devices will be desirable. This adds a simple driver that is DM-aware and configurable via DTS. If ambiguous (i.e. multiple bootcount-devices are present) the /chosen/u-boot,bootcount-device property can be used to select one bootcount device. Initially, this provides support for the following DM devices: * RTC devices Signed-off-by:
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by:
Klaus Goger <klaus.goger@theobroma-systems.com>
-
- Oct 19, 2018
-
-
Add new Kconfig option, SYS_BOOTCOUNT_MAGIC, to select the boot counter magic word. This can be useful ie. in case the entire boot counter register is not usable. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
-
- Aug 17, 2018
-
-
Add ability to set environment bootlimit from Kconfig Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
- Aug 03, 2018
-
-
1947c2d2 introduces cache line flushes for the bootcounter, but if the start address is not aligned then the flush causes warnings of the form: CACHE: Misaligned operation at range [4030b7fc, 4030b83c] Align both the start and end of the buffer (possibly crossing multiple lines). Fixes: 1947c2d2 ("bootcount: flush after storing the bootcounter") Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Acked-by:
Stefano Babic <sbabic@denx.de>
-
- Jul 23, 2018
-
-
Stefano Babic authored
If the bootcounter address is in a cached memory, a flush of dcache must occur after updateing the bootcounter. Issue found on i.MX6 where bootcounter is put into the internal (cached) IRAM. Signed-off-by:
Stefano Babic <sbabic@denx.de>
-
- May 07, 2018
-
-
Tom Rini authored
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>
-
- Apr 06, 2018
-
-
This converts CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC to Kconfig Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
- Feb 25, 2018
-
-
Tom Rini authored
Migrate the users of CONFIG_SYS_BOOTCOUNT_ADDR to Kconfig. We can provide a default for BOOTCOUNT_AM33XX as that's a specific part of the RTC in use. We can also provide a default for ARCH_LS1043A and ARCH_LS1021A as they had been previously calculated and their symbols are in Kconfig. In the case of other QE-enabled platforms, they are not so we must update the relevant defconfig files. The previous default only applied in some cases, even on a specific SoC family. Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Feb 24, 2018
-
-
Convert CONFIG_BOOTCOUNT_ALEN to Kconfig Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
Make generate boot counter selected in the same way as other boot count drivers Reviewed-by:
Lukasz Majewski <lukma@denx.de> Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
Integrate Boot counter for Atmel AT91SAM9XE into Kconfig Reviewed-by:
Lukasz Majewski <lukma@denx.de> Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-
This converts the following to Kconfig: CONFIG_BOOTCOUNT_I2C Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
This converts the following to Kconfig: CONFIG_BOOTCOUNT_RAM Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
This converts the following to Kconfig: CONFIG_BOOTCOUNT_ENV Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
This converts the following to Kconfig: CONFIG_BOOTCOUNT_AM33XX Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Hannes Schmelzer <hannes.schmelzer@br-automation.com> Acked-by:
Hannes Schmelzer <hannes.schmelzer@br-automation.com> Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com>
-