aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAdrian Huang <adrianhuang0701@gmail.com>2015-07-06 00:19:13 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 07:19:08 -0400
commit8109d44f7604cd5ab833ea09da98703f6eb16460 (patch)
tree81ec98ca855e213bffc8022e3b4ad1058fc83d04 /drivers/rtc
parent88b8d33b1c6aadba553c998db91c4b36be0fac52 (diff)
rtc: cmos: Revert "rtc-cmos: Add an alarm disable quirk"
Commit d5a1c7e3fc38 ("rtc-cmos: Add an alarm disable quirk") that added a special quirk is not needed because [PATCH 1/2] of this patchset makes the kernel more robust: rtc-cmos: Cancel alarm timer if alarm time is equal to now+1 seconds Signed-off-by: Adrian Huang <ahuang12@lenovo.com> Tested-by: Egbert Eich <eich@suse.de> Tested-by: Diego Ercolani <diego.ercolani@gmail.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-cmos.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 5ac9a5da8522..c2e90c62a59c 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -41,7 +41,6 @@
41#include <linux/pm.h> 41#include <linux/pm.h>
42#include <linux/of.h> 42#include <linux/of.h>
43#include <linux/of_platform.h> 43#include <linux/of_platform.h>
44#include <linux/dmi.h>
45 44
46/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ 45/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
47#include <asm-generic/rtc.h> 46#include <asm-generic/rtc.h>
@@ -383,50 +382,6 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
383 return 0; 382 return 0;
384} 383}
385 384
386/*
387 * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes.
388 */
389static bool alarm_disable_quirk;
390
391static int __init set_alarm_disable_quirk(const struct dmi_system_id *id)
392{
393 alarm_disable_quirk = true;
394 pr_info("BIOS has alarm-disable quirk - RTC alarms disabled\n");
395 return 0;
396}
397
398static const struct dmi_system_id rtc_quirks[] __initconst = {
399 /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */
400 {
401 .callback = set_alarm_disable_quirk,
402 .ident = "IBM Truman",
403 .matches = {
404 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
405 DMI_MATCH(DMI_PRODUCT_NAME, "4852570"),
406 },
407 },
408 /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */
409 {
410 .callback = set_alarm_disable_quirk,
411 .ident = "Gigabyte GA-990XA-UD3",
412 .matches = {
413 DMI_MATCH(DMI_SYS_VENDOR,
414 "Gigabyte Technology Co., Ltd."),
415 DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"),
416 },
417 },
418 /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */
419 {
420 .callback = set_alarm_disable_quirk,
421 .ident = "Toshiba Satellite L300",
422 .matches = {
423 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
424 DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
425 },
426 },
427 {}
428};
429
430static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) 385static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
431{ 386{
432 struct cmos_rtc *cmos = dev_get_drvdata(dev); 387 struct cmos_rtc *cmos = dev_get_drvdata(dev);
@@ -435,9 +390,6 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
435 if (!is_valid_irq(cmos->irq)) 390 if (!is_valid_irq(cmos->irq))
436 return -EINVAL; 391 return -EINVAL;
437 392
438 if (alarm_disable_quirk)
439 return 0;
440
441 spin_lock_irqsave(&rtc_lock, flags); 393 spin_lock_irqsave(&rtc_lock, flags);
442 394
443 if (enabled) 395 if (enabled)
@@ -1299,8 +1251,6 @@ static int __init cmos_init(void)
1299 platform_driver_registered = true; 1251 platform_driver_registered = true;
1300 } 1252 }
1301 1253
1302 dmi_check_system(rtc_quirks);
1303
1304 if (retval == 0) 1254 if (retval == 0)
1305 return 0; 1255 return 0;
1306 1256