* [2/3] rtc: rtc-s3c: Add spin_lock_irq in s3c_rtc_setaie
@ 2010-11-16 0:02 Kukjin Kim
2015-05-02 14:00 ` [rtc-linux] " Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Kukjin Kim @ 2010-11-16 0:02 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, rtc-linux
Cc: ben-linux, p_gortmaker, a.zummo, Kukjin Kim, Wan ZongShun
This patch adds spin_lock_irq() and spin_unlock_irq() during
alarm interrupt configuration to avoid interrupt missing.
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
drivers/rtc/rtc-s3c.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index e2636ff..bb88027 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -82,12 +82,14 @@ static int s3c_rtc_setaie(struct device *dev, unsigned int enabled)
pr_debug("%s: aie=%d\n", __func__, enabled);
+ spin_lock_irq(&s3c_rtc_pie_lock);
tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
if (enabled)
tmp |= S3C2410_RTCALM_ALMEN;
writeb(tmp, s3c_rtc_base + S3C2410_RTCALM);
+ spin_unlock_irq(&s3c_rtc_pie_lock);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [rtc-linux] Re: [2/3] rtc: rtc-s3c: Add spin_lock_irq in s3c_rtc_setaie
2010-11-16 0:02 [2/3] rtc: rtc-s3c: Add spin_lock_irq in s3c_rtc_setaie Kukjin Kim
@ 2015-05-02 14:00 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2015-05-02 14:00 UTC (permalink / raw)
To: Kukjin Kim
Cc: linux-arm-kernel, linux-samsung-soc, rtc-linux, ben-linux,
p_gortmaker, a.zummo, Wan ZongShun
Hi Kukjin,
On 16/11/2010 at 09:02:53 +0900, Kukjin Kim wrote :
> This patch adds spin_lock_irq() and spin_unlock_irq() during
> alarm interrupt configuration to avoid interrupt missing.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This patch never made it in the mainline, is it still necessary?
> ---
> drivers/rtc/rtc-s3c.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index e2636ff..bb88027 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -82,12 +82,14 @@ static int s3c_rtc_setaie(struct device *dev, unsigned int enabled)
>
> pr_debug("%s: aie=%d\n", __func__, enabled);
>
> + spin_lock_irq(&s3c_rtc_pie_lock);
> tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
>
> if (enabled)
> tmp |= S3C2410_RTCALM_ALMEN;
>
> writeb(tmp, s3c_rtc_base + S3C2410_RTCALM);
> + spin_unlock_irq(&s3c_rtc_pie_lock);
>
> return 0;
> }
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-02 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 0:02 [2/3] rtc: rtc-s3c: Add spin_lock_irq in s3c_rtc_setaie Kukjin Kim
2015-05-02 14:00 ` [rtc-linux] " Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox