Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208789
b: refs/heads/master
c: 2f3478f
h: refs/heads/master
i:
  208787: 7339936
v: v3
  • Loading branch information
Atul Dahiya authored and Kukjin Kim committed Aug 5, 2010
1 parent 1744d13 commit 6d88185
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 002d31e6b623d08d707c7ba490f4ae0099285e9e
refs/heads/master: 2f3478f6579b3f8d4579b6d49d7a8e9376c48fc2
12 changes: 10 additions & 2 deletions trunk/drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ static irqreturn_t s3c_rtc_alarmirq(int irq, void *id)
struct rtc_device *rdev = id;

rtc_update_irq(rdev, 1, RTC_AF | RTC_IRQF);

if (s3c_rtc_cpu_type == TYPE_S3C64XX)
writeb(S3C2410_INTP_ALM, s3c_rtc_base + S3C2410_INTP);

return IRQ_HANDLED;
}

Expand All @@ -65,6 +69,10 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id)
struct rtc_device *rdev = id;

rtc_update_irq(rdev, 1, RTC_PF | RTC_IRQF);

if (s3c_rtc_cpu_type == TYPE_S3C64XX)
writeb(S3C2410_INTP_TIC, s3c_rtc_base + S3C2410_INTP);

return IRQ_HANDLED;
}

Expand Down Expand Up @@ -98,7 +106,7 @@ static int s3c_rtc_setpie(struct device *dev, int enabled)
if (enabled)
tmp |= S3C64XX_RTCCON_TICEN;

writeb(tmp, s3c_rtc_base + S3C2410_RTCCON);
writew(tmp, s3c_rtc_base + S3C2410_RTCCON);
} else {
tmp = readb(s3c_rtc_base + S3C2410_TICNT);
tmp &= ~S3C2410_TICNT_ENABLE;
Expand Down Expand Up @@ -132,7 +140,7 @@ static int s3c_rtc_setfreq(struct device *dev, int freq)

tmp |= (rtc_dev->max_user_freq / freq)-1;

writeb(tmp, s3c_rtc_base + S3C2410_TICNT);
writel(tmp, s3c_rtc_base + S3C2410_TICNT);
spin_unlock_irq(&s3c_rtc_pie_lock);

return 0;
Expand Down

0 comments on commit 6d88185

Please sign in to comment.