From: Tom Rini Date: Fri, 20 Jul 2018 18:34:50 -0400 Subject: [U-Boot] [U-Boot, v2, 1/1] drivers: rtc: correct week day for mc146818 In-Reply-To: <20180707220726.10584-1-xypron.glpk@gmx.de> References: <20180707220726.10584-1-xypron.glpk@gmx.de> Message-ID: <20180720223450.GC11755@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Jul 08, 2018 at 12:07:26AM +0200, Heinrich Schuchardt wrote: > For qemu-x86 the date command produces wrong days of the week: > Date: 2018-07-06 (Saturday) Time: 18:02:03 > Date: 2018-07-07 (unknown day) Time: 21:02:06 > > According to a comment in the Linux driver the mc146818 only updates the > day of the week if the register value is non-zero. > > Sunday is 1, saturday is 7 unlike in U-Boot (see data sheet > https://www.nxp.com/docs/en/data-sheet/MC146818.pdf). > > So let's use our library function to determine the day of the week. > > Signed-off-by: Heinrich Schuchardt Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: