summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-mv.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-08 23:32:51 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-27 10:45:02 +0200
commit844cba65bf92863ebdb05047eeb843d895d6b7c2 (patch)
tree700a3225ab22cd641b024259e909e998e3caac1b /drivers/rtc/rtc-mv.c
parentb3a5ac42ab18b7d1a8f2f072ca0ee76a3b754a43 (diff)
downloadtalos-op-linux-844cba65bf92863ebdb05047eeb843d895d6b7c2.tar.gz
talos-op-linux-844cba65bf92863ebdb05047eeb843d895d6b7c2.zip
rtc: mv: remove artificial limitation
Dates after 2038 actually fit on 32 bits. The counter will overflow in 2106. Also, it is bad practice to reset the RTC to a default value. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-mv.c')
-rw-r--r--drivers/rtc/rtc-mv.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index 944c5c0fadd0..bc52dbb0c0e2 100644
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -223,7 +223,6 @@ static int __init mv_rtc_probe(struct platform_device *pdev)
struct resource *res;
struct rtc_plat_data *pdata;
u32 rtc_time;
- u32 rtc_date;
int ret = 0;
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
@@ -259,17 +258,6 @@ static int __init mv_rtc_probe(struct platform_device *pdev)
}
}
- /*
- * A date after January 19th, 2038 does not fit on 32 bits and
- * will confuse the kernel and userspace. Reset to a sane date
- * (January 1st, 2013) if we're after 2038.
- */
- rtc_date = readl(pdata->ioaddr + RTC_DATE_REG_OFFS);
- if (bcd2bin((rtc_date >> RTC_YEAR_OFFS) & 0xff) >= 38) {
- dev_info(&pdev->dev, "invalid RTC date, resetting to January 1st, 2013\n");
- writel(0x130101, pdata->ioaddr + RTC_DATE_REG_OFFS);
- }
-
pdata->irq = platform_get_irq(pdev, 0);
platform_set_drvdata(pdev, pdata);
OpenPOWER on IntegriCloud