From 43a30bfbe5ca123ef0bf21adb75c67bf4aacc1b8 Mon Sep 17 00:00:00 2001 From: QiaoChong Date: Tue, 22 Jan 2019 18:49:57 +0800 Subject: [PATCH] Loongson3a92h: fix ls2h rtc month verify code. Change-Id: I9a45a70aaedecbfe0ae8ccb777e1e8e97eb12d7f Signed-off-by: QiaoChong --- Targets/Bonito3a92h/Bonito/tgt_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Targets/Bonito3a92h/Bonito/tgt_machdep.c b/Targets/Bonito3a92h/Bonito/tgt_machdep.c index 527cca76..00b2bcaf 100644 --- a/Targets/Bonito3a92h/Bonito/tgt_machdep.c +++ b/Targets/Bonito3a92h/Bonito/tgt_machdep.c @@ -728,7 +728,7 @@ static void init_legacy_rtc(void) year = inl(LS2H_TOY_READ1_REG); val = inl(LS2H_TOY_READ0_REG); - month = ((val >> 26) & 0x3f) - 1; + month = ((val >> 26) & 0x3f); date = (val >> 21) & 0x1f; hour = (val >> 16) & 0x1f; min = (val >> 10) & 0x3f;