Commit 064407f1 authored by Bengt Jonsson's avatar Bengt Jonsson Committed by Linus Torvalds

drivers/rtc/rtc-ab8500.c: remove fix for AB8500 ED version

AB8500 ED (Early Drop) is no longer supported by the kernel.
Signed-off-by: default avatarBengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dc43d4a2
...@@ -89,22 +89,17 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -89,22 +89,17 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm)
if (retval < 0) if (retval < 0)
return retval; return retval;
/* Early AB8500 chips will not clear the rtc read request bit */ /* Wait for some cycles after enabling the rtc read in ab8500 */
if (abx500_get_chip_id(dev) == 0) { while (time_before(jiffies, timeout)) {
usleep_range(1000, 1000); retval = abx500_get_register_interruptible(dev,
} else { AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value);
/* Wait for some cycles after enabling the rtc read in ab8500 */ if (retval < 0)
while (time_before(jiffies, timeout)) { return retval;
retval = abx500_get_register_interruptible(dev,
AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value); if (!(value & RTC_READ_REQUEST))
if (retval < 0) break;
return retval;
usleep_range(1000, 5000);
if (!(value & RTC_READ_REQUEST))
break;
usleep_range(1000, 5000);
}
} }
/* Read the Watchtime registers */ /* Read the Watchtime registers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment