[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9y2T+mrzDk5IVq9@hovoldconsulting.com>
Date: Fri, 3 Feb 2023 08:22:55 +0100
From: Johan Hovold <johan@...nel.org>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: Johan Hovold <johan+linaro@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Bjorn Andersson <andersson@...nel.org>,
Andy Gross <agross@...nel.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Maximilian Luz <luzmaximilian@...il.com>,
linux-arm-msm@...r.kernel.org, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 17/22] rtc: pm8xxx: add support for nvmem offset
On Fri, Feb 03, 2023 at 04:31:54AM +0100, Konrad Dybcio wrote:
>
>
> On 2.02.2023 16:54, Johan Hovold wrote:
> > On many Qualcomm platforms the PMIC RTC control and time registers are
> > read-only so that the RTC time can not be updated. Instead an offset
> > needs be stored in some machine-specific non-volatile memory, which the
> > driver can take into account.
> >
> > Add support for storing a 32-bit offset from the Epoch in an nvmem cell
> > so that the RTC time can be set on such platforms.
> >
> > Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> > ---
> That's gonna be a stupid question, but just to make sure..
>
> SDAM is rewritable, right? So that when somebody sets the time to
> year 2077 by mistake, they won't have to put up with it for the next
> 50 years? :D
Heh, yes, it is re-writeable. Otherwise, using SDAM wouldn't really have
been an alternative to using the UEFI offset. :)
These registers are reset if you lose battery power so you'd be back at
1970 as expected if that ever happens too.
Johan
Powered by blists - more mailing lists