From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Tomsich Date: Mon, 10 Dec 2018 01:01:56 +0100 Subject: [U-Boot] [U-Boot,v2,1/2] bootcount: add uclass for bootcount In-Reply-To: <1543356019-47135-2-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1543356019-47135-2-git-send-email-philipp.tomsich@theobroma-systems.com> 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 > 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 > Tested-by: Klaus Goger > --- > > Changes in v2: > - changed to provide a UCLASS-based implementation, as requested by > SJG in his earlier review > - split off the RV3029 driver into a separate series > > doc/device-tree-bindings/chosen.txt | 30 ++++++++++++ > drivers/bootcount/Kconfig | 8 ++++ > drivers/bootcount/Makefile | 2 + > drivers/bootcount/bootcount-uclass.c | 93 ++++++++++++++++++++++++++++++++++++ > include/bootcount.h | 48 +++++++++++++++++++ > include/dm/uclass-id.h | 1 + > 6 files changed, 182 insertions(+) > create mode 100644 drivers/bootcount/bootcount-uclass.c > Applied to u-boot-rockchip, thanks!