From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from mail.free-electrons.com (mail.free-electrons.com. [62.4.15.54]) by gmr-mx.google.com with ESMTP id v70si1169865wmf.0.2017.02.21.09.21.12 for ; Tue, 21 Feb 2017 09:21:12 -0800 (PST) Date: Tue, 21 Feb 2017 18:21:01 +0100 From: Alexandre Belloni To: Hartley Sweeten Cc: "rtc-linux@googlegroups.com" , "alex@digriz.org.uk" , Alessandro Zummo Subject: [rtc-linux] Re: [PATCH 1/5] rtc: m48t86: verify that the RTC is actually present Message-ID: <20170221172101.2zde3z7hkpblennl@piout.net> References: <20170215163527.5697-1-hsweeten@visionengravers.com> <20170215163527.5697-2-hsweeten@visionengravers.com> <20170221163720.m6hp27t4z7q4pgwl@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 21/02/2017 at 17:04:07 +0000, Hartley Sweeten wrote: > On Tuesday, February 21, 2017 9:37 AM, Alexandre Belloni wrote: > > On 15/02/2017 at 09:35:23 -0700, H Hartley Sweeten wrote: > >> The RTC is an optional feature at purchase time on some Technologic > >> Systems boards. Verify that it actually exists by checking if the > >> last two bytes of the NVRAM can be changed. > >> > >> Signed-off-by: H Hartley Sweeten > >> Cc: Alessandro Zummo > >> Cc: Alexandre Belloni > >> Cc: Alexander Clouter > >> --- > >> drivers/rtc/rtc-m48t86.c | 36 ++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 36 insertions(+) > >> > > > > I've applied that one. Alex, if you are fine with the mach-orion5x > > changes, I can take them for 4.11. Else, this will wait for 4.12. > > Hello, > > Thanks. The change to mach-ep93xx is ok if you want to take that one. > Ok, I took it. > In order to address the last two bytes, these two offsets should actually be: > > + unsigned int offset0 = M48T86_NVRAM(M48T86_NVRAM_LEN - 2); > + unsigned int offset1 = M48T86_NVRAM(M48T86_NVRAM_LEN - 1); > > As they are right now, they are both off by 14 bytes (0x0e). > > I can send a patch to fix it or you can do it if you prefer. > I fixed it up directly in rtc-next -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.