CVSROOT: /cvs Module name: src Changes by: kette...@cvs.openbsd.org 2022/10/12 07:39:50
Modified files: sys/arch/arm64/dev: aplpmu.c aplsmc.c efi_machdep.c sys/arch/loongson/dev: mcclock.c sys/arch/octeon/dev: octrtc.c sys/arch/powerpc64/dev: opal.c sys/arch/sparc64/dev: prtc.c rtc.c sbbc.c vrtc.c sys/dev : clock_subr.h sys/dev/fdt : dapmic.c plrtc.c rkpmic.c sxirtc.c sys/dev/i2c : m41t8x.c pcf85063.c pcf8523.c pcf8563.c rs5c372.c sys/dev/ic : mk48txx.c sys/kern : kern_time.c Log message: Extend struct todr_chip_handle with a todr_quality member. This allows us to assign a quality to RTC implementation and pick the "best" RTC if a system has multiple RTCs (or multiple interfaces to an RTC). This allows us to prefer a battery-backed I2C RTC over an RTC that is part of the SoC which is only running of the SoC is powered. It also allows us to work around issues with firmware RTC interfaces that may lie to us or even crash the system. This change makes sure the todr_quality member of the struct is always initialized. In most cases the quality will be set to zero; further adjustments of the quality for specific subsystems/architectures will follow. ok cheloha@, patrick@