WSL2-Linux-Kernel/drivers/rtc
Nicolas Ferre 0ef1594c01 drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR
On some revisions of AT91 SoCs, the RTC IMR register is not working.
Instead of elaborating a workaround for that specific SoC or IP version,
we simply use a software variable to store the Interrupt Mask Register
and modify it for each enabling/disabling of an interrupt.  The overhead
of this is negligible anyway.

The interrupt mask register (IMR) for the RTC is broken on the AT91SAM9x5
sub-family of SoCs (good overview of the members here:
http://www.eewiki.net/display/linuxonarm/AT91SAM9x5 ).  The "user visible
effect" is the RTC doesn't work.

That sub-family is less than two years old and only has devicetree (DT)
support and came online circa lk 3.7 .  The dust is yet to settle on the
DT stuff at least for AT91 SoCs (translation: lots of stuff is still
broken, so much that it is hard to know where to start).

The fix in the patch is pretty simple: just shadow the silicon IMR
register with a variable in the driver.  Some older SoCs (pre-DT) use the
the rtc-at91rm9200 driver (e.g.  obviously the AT91RM9200) and they should
not be impacted by the change.  There shouldn't be a large volume of
interrupts associated with a RTC.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-03-22 16:41:20 -07:00
..
Kconfig This is the MFD pull request for the 3.9 merge window. 2013-02-24 20:00:58 -08:00
Makefile This is the MFD pull request for the 3.9 merge window. 2013-02-24 20:00:58 -08:00
class.c rtc: use dev_warn()/dev_dbg()/pr_err() instead of printk() 2013-02-21 17:22:29 -08:00
hctosys.c rtc_sysfs_show_hctosys(): display 0 if resume failed 2012-10-06 03:05:04 +09:00
interface.c driver-core: constify data for class_find_device() 2013-02-06 12:18:56 -08:00
rtc-88pm80x.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-88pm860x.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ab3100.c
rtc-ab8500.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-at32ap700x.c
rtc-at91rm9200.c drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR 2013-03-22 16:41:20 -07:00
rtc-at91rm9200.h drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR 2013-03-22 16:41:20 -07:00
rtc-at91sam9.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-au1xxx.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-bfin.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-bq32k.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-bq4802.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-cmos.c rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug() 2013-02-21 17:22:29 -08:00
rtc-coh901331.c rtc: rtc-coh901331: use devm_clk_get() 2013-02-21 17:22:30 -08:00
rtc-core.h
rtc-da9052.c drivers/rtc/rtc-da9052.c: fix for rtc device registration 2013-03-22 16:41:20 -07:00
rtc-da9055.c drivers/rtc/rtc-da9055.c: fix cross-section reference 2013-01-11 14:54:54 -08:00
rtc-davinci.c rtc: rtc-davinci: use devm_*() functions 2013-02-21 17:22:31 -08:00
rtc-dev.c rtc: use dev_warn()/dev_dbg()/pr_err() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-dm355evm.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1216.c
rtc-ds1286.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1302.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1305.c drivers/rtc: dump small buffers via %*ph 2013-02-21 17:22:27 -08:00
rtc-ds1307.c drivers/rtc: dump small buffers via %*ph 2013-02-21 17:22:27 -08:00
rtc-ds1374.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1390.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1511.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1553.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds1672.c drivers/rtc/rtc-ds1672.c: convert struct i2c_msg initialization to C99 format 2012-10-06 03:05:05 +09:00
rtc-ds1742.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds2404.c rtc: rtc-ds2404: use dev_err() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-ds3232.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ds3234.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-efi.c rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-em3027.c drivers/rtc/rtc-em3027.c: convert struct i2c_msg initialization to C99 format 2012-10-06 03:05:07 +09:00
rtc-ep93xx.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-fm3130.c drivers/rtc: dump small buffers via %*ph 2013-02-21 17:22:27 -08:00
rtc-generic.c
rtc-hid-sensor-time.c rtc: hid-sensor-time: Add missing spin_lock_init 2013-01-26 10:07:52 +00:00
rtc-imxdi.c rtc: rtc-imxdi: use devm_clk_get() 2013-02-21 17:22:30 -08:00
rtc-isl1208.c drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler 2013-02-05 20:38:49 +11:00
rtc-isl12022.c drivers/rtc: remove unnecessary semicolons 2013-02-21 17:22:27 -08:00
rtc-jz4740.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-lib.c
rtc-lp8788.c rtc: rtc-lp8788: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-lpc32xx.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-ls1x.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-m41t80.c drivers/rtc/rtc-m41t80.c: remove disabled alarm functionality 2012-10-06 03:05:07 +09:00
rtc-m41t93.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-m41t94.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-m48t35.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-m48t59.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-m48t86.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-max6900.c
rtc-max6902.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-max8907.c rtc: rtc-max8907: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-max8925.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-max8997.c rtc: rtc-max8997: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-max8998.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-max77686.c rtc: max77686: use dev_info() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-mc13xxx.c rtc/mc13xxx: add support for the rtc in the mc34708 pmic 2012-07-30 17:25:18 -07:00
rtc-mpc5121.c drivers/rtc: use of_match_ptr() macro 2013-02-21 17:22:27 -08:00
rtc-mrst.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-msm6242.c
rtc-mv.c rtc: rtc-mv: Add support for clk to avoid lockups 2013-03-08 21:34:41 +00:00
rtc-mxc.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-nuc900.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-omap.c rtc: omap: add runtime pm support 2012-12-17 17:15:20 -08:00
rtc-palmas.c rtc: palmas: Add RTC driver Palmas series PMIC 2013-02-14 00:22:45 +01:00
rtc-pcap.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-pcf2123.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-pcf8523.c rtc-pcf8523: add low battery voltage support 2013-02-21 17:22:27 -08:00
rtc-pcf8563.c drivers/rtc: remove unnecessary semicolons 2013-02-21 17:22:27 -08:00
rtc-pcf8583.c rtc: rtc-pcf8583: use dev_warn() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-pcf50633.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-pl030.c
rtc-pl031.c drivers/rtc/rtc-pl031.c: add wakeup support 2013-02-21 17:22:28 -08:00
rtc-pm8xxx.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-proc.c rtc-proc: permit the /proc/driver/rtc device to use other devices 2012-10-06 03:05:01 +09:00
rtc-ps3.c
rtc-puv3.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-pxa.c drivers/rtc/rtc-pxa.c: avoid cpuid checking 2013-02-21 17:22:27 -08:00
rtc-r9701.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-rc5t583.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-rp5c01.c
rtc-rs5c313.c rtc: rtc-rs5c313: use pr_err() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-rs5c348.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-rs5c372.c rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug() 2013-02-21 17:22:29 -08:00
rtc-rv3029c2.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-rx4581.c rtc: add support for spi rtc rx4581 2013-02-21 17:22:28 -08:00
rtc-rx8025.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-rx8581.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-s3c.c Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
rtc-s35390a.c drivers/rtc/rtc-s35390a.c: add wakealarm support for rtc-s35390A rtc chip 2012-10-06 03:05:08 +09:00
rtc-sa1100.c drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/remove 2013-02-21 17:22:28 -08:00
rtc-sh.c
rtc-snvs.c Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
rtc-spear.c rtc: Convert to devm_ioremap_resource() 2013-01-22 11:41:57 -08:00
rtc-starfire.c
rtc-stk17ta8.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-stmp3xxx.c rtc: stmp3xxx: add wdt-accessor function 2013-03-01 12:40:36 +01:00
rtc-sun4v.c rtc: rtc-sun4v: use pr_warn() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-sysfs.c rtc_sysfs_show_hctosys(): display 0 if resume failed 2012-10-06 03:05:04 +09:00
rtc-tegra.c rtc: Convert to devm_ioremap_resource() 2013-01-22 11:41:57 -08:00
rtc-test.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-tile.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-tps6586x.c rtc: rtc-tps6586x: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-tps65910.c drivers/rtc/rtc-tps65910.c: set irq flag to IRQF_EARLY_RESUME during irq request 2013-02-21 17:22:28 -08:00
rtc-tps80031.c rtc: rtc-tps80031: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-twl.c drivers/rtc: use of_match_ptr() macro 2013-02-21 17:22:27 -08:00
rtc-tx4939.c
rtc-v3020.c
rtc-vr41xx.c rtc: rtc-vr41xx: use dev_info() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-vt8500.c rtc: rtc-vt8500: use devm_*() functions 2013-02-21 17:22:30 -08:00
rtc-wm831x.c rtc: rtc-wm831x: use devm_request_threaded_irq() 2013-02-21 17:22:30 -08:00
rtc-wm8350.c Drivers: rtc: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
rtc-x1205.c drivers/rtc/rtc-x1205.c: convert struct i2c_msg initialization to C99 format 2012-10-06 03:05:05 +09:00
systohc.c NTP: Add a CONFIG_RTC_SYSTOHC configuration 2013-01-15 18:16:06 -08:00