linux-hardened/drivers/rtc
Alim Akhtar 70c96dfac0 rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
As per code flow s3c_rtc_setfreq() will get called with rtc clock disabled
and in set_freq we perform h/w registers read/write, which results in a
kernel crash on exynos7 platform while probing rtc driver.
Below is code flow:
s3c_rtc_probe()
    clk_prepare_enable(info->rtc_clk) // rtc clock enabled
    s3c_rtc_gettime() // will enable clk if not done, and disable it upon exit
    s3c_rtc_setfreq() //then this will be called with clk disabled

This patch take cares of such issue by adding s3c_rtc_{enable/disable}_clk in
s3c_rtc_setfreq().

Fixes: 24e1455493 ("drivers/rtc/rtc-s3c.c: delete duplicate clock control")

Cc: <stable@vger.kernel.org>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Tested-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19 17:48:06 +02:00
..
class.c
hctosys.c
interface.c rtc: fix a typo and reduce three empty lines to one 2016-07-11 23:22:35 +02:00
Kconfig rtc: move mc146818 helper functions out-of-line 2016-06-26 01:20:08 +02:00
Makefile rtc: move mc146818 helper functions out-of-line 2016-06-26 01:20:08 +02:00
rtc-88pm80x.c
rtc-88pm860x.c
rtc-ab-b5ze-s3.c
rtc-ab3100.c
rtc-ab8500.c
rtc-abx80x.c rtc: abx80x: use devm_add_action_or_reset() 2016-07-19 17:27:42 +02:00
rtc-armada38x.c
rtc-as3722.c
rtc-asm9260.c
rtc-at32ap700x.c
rtc-at91rm9200.c
rtc-at91rm9200.h
rtc-at91sam9.c
rtc-au1xxx.c
rtc-bfin.c
rtc-bq32k.c
rtc-bq4802.c
rtc-cmos.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-coh901331.c
rtc-core.h
rtc-da9052.c
rtc-da9055.c
rtc-da9063.c
rtc-davinci.c
rtc-dev.c
rtc-digicolor.c
rtc-dm355evm.c
rtc-ds1216.c
rtc-ds1286.c rtc: ds1286: move header to linux/rtc 2016-07-08 16:23:11 +02:00
rtc-ds1302.c
rtc-ds1305.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-ds1307.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-ds1343.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-ds1347.c
rtc-ds1374.c
rtc-ds1390.c
rtc-ds1511.c
rtc-ds1553.c
rtc-ds1672.c
rtc-ds1685.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-ds1742.c
rtc-ds2404.c rtc: ds2404: move rtc-ds2404.h to platform_data 2016-06-27 10:48:28 +02:00
rtc-ds3232.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-efi-platform.c
rtc-efi.c rtc: efi: Fail probing if RTC reads don't work 2016-06-06 17:07:33 +02:00
rtc-em3027.c
rtc-ep93xx.c
rtc-fm3130.c
rtc-gemini.c
rtc-generic.c rtc: generic: remove get_rtc_time/set_rtc_time wrappers 2016-06-04 00:23:35 +02:00
rtc-hid-sensor-time.c
rtc-hym8563.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-imxdi.c
rtc-isl1208.c
rtc-isl12022.c
rtc-isl12057.c rtc: isl12057: let the rtc core interpret the partial alarm 2016-07-11 23:22:32 +02:00
rtc-jz4740.c
rtc-lib.c
rtc-lp8788.c
rtc-lpc24xx.c
rtc-lpc32xx.c
rtc-ls1x.c
rtc-m41t80.c rtc: m41t80: use devm_add_action_or_reset() 2016-07-19 17:27:40 +02:00
rtc-m41t93.c
rtc-m41t94.c
rtc-m48t35.c
rtc-m48t59.c
rtc-m48t86.c rtc: m48t86: move m48t86.h to platform_data 2016-06-27 18:15:25 +02:00
rtc-max6900.c
rtc-max6902.c
rtc-max6916.c rtc: add support for Maxim max6916 2016-06-04 16:05:59 +02:00
rtc-max8907.c
rtc-max8925.c
rtc-max8997.c
rtc-max8998.c
rtc-max77686.c
rtc-mc13xxx.c
rtc-mc146818-lib.c rtc: move mc146818 helper functions out-of-line 2016-06-26 01:20:08 +02:00
rtc-mcp795.c
rtc-moxart.c
rtc-mpc5121.c
rtc-mrst.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-msm6242.c
rtc-mt6397.c
rtc-mv.c
rtc-mxc.c
rtc-nuc900.c
rtc-omap.c
rtc-opal.c
rtc-palmas.c
rtc-pcap.c
rtc-pcf2123.c rtc: pcf2123: use sign_extend32() for sign extension 2016-06-04 15:50:44 +02:00
rtc-pcf2127.c
rtc-pcf8523.c
rtc-pcf8563.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-pcf8583.c
rtc-pcf50633.c
rtc-pcf85063.c
rtc-pic32.c
rtc-pl030.c
rtc-pl031.c
rtc-pm8xxx.c
rtc-proc.c
rtc-ps3.c
rtc-puv3.c
rtc-pxa.c
rtc-r9701.c
rtc-rc5t583.c
rtc-rk808.c
rtc-rp5c01.c
rtc-rs5c313.c
rtc-rs5c348.c
rtc-rs5c372.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-rv3029c2.c
rtc-rv8803.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-rx4581.c
rtc-rx6110.c
rtc-rx8010.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-rx8025.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-rx8581.c
rtc-s3c.c rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq() 2016-07-19 17:48:06 +02:00
rtc-s3c.h
rtc-s5m.c
rtc-s35390a.c rtc: s35390a: improve two comments in .set_alarm 2016-07-11 23:22:35 +02:00
rtc-sa1100.c
rtc-sa1100.h
rtc-sh.c rtc: sh: don't validate alarm time provided to .set_alarm 2016-07-11 23:22:33 +02:00
rtc-sirfsoc.c
rtc-snvs.c
rtc-spear.c
rtc-st-lpc.c
rtc-starfire.c
rtc-stk17ta8.c
rtc-stmp3xxx.c
rtc-sun4v.c
rtc-sun6i.c
rtc-sunxi.c
rtc-sysfs.c
rtc-tegra.c rtc: simplify implementations of read_alarm 2016-07-09 10:24:45 +02:00
rtc-test.c
rtc-tile.c
rtc-tps6586x.c
rtc-tps65910.c
rtc-tps80031.c
rtc-twl.c
rtc-tx4939.c
rtc-v3020.c rtc: v3020: move rtc-v3020.h to platform_data 2016-07-09 10:24:21 +02:00
rtc-vr41xx.c
rtc-vt8500.c
rtc-wm831x.c
rtc-wm8350.c
rtc-x1205.c
rtc-xgene.c
rtc-zynqmp.c
systohc.c