diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/pcf2127.c | 4 | ||||
-rw-r--r-- | drivers/timer/mtk_timer.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/mtk_wdt.c | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index f6953505a5..b34ed63bf0 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -56,7 +56,7 @@ static int pcf2127_rtc_set(struct udevice *dev, const struct rtc_time *tm) buf[i++] = tm->tm_wday & 0x07; /* month, 1 - 12 */ - buf[i++] = bin2bcd(tm->tm_mon + 1); + buf[i++] = bin2bcd(tm->tm_mon); /* year */ buf[i++] = bin2bcd(tm->tm_year % 100); @@ -83,7 +83,7 @@ static int pcf2127_rtc_get(struct udevice *dev, struct rtc_time *tm) tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); - tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F) - 1; + tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F); tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]) + 1900; if (tm->tm_year < 1970) tm->tm_year += 100; /* assume we are in 1970...2069 */ diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c index b5e76bd358..e99135e5be 100644 --- a/drivers/timer/mtk_timer.c +++ b/drivers/timer/mtk_timer.c @@ -71,6 +71,7 @@ static const struct timer_ops mtk_timer_ops = { static const struct udevice_id mtk_timer_ids[] = { { .compatible = "mediatek,timer" }, + { .compatible = "mediatek,mt6577-timer" }, { } }; diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 669a32320d..b3c597e1d0 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -143,6 +143,7 @@ static const struct wdt_ops mtk_wdt_ops = { static const struct udevice_id mtk_wdt_ids[] = { { .compatible = "mediatek,wdt"}, + { .compatible = "mediatek,mt6589-wdt"}, {} }; |