Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83533
b: refs/heads/master
c: 6406116
h: refs/heads/master
i:
  83531: a23ad15
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Feb 6, 2008
1 parent c7fb5c6 commit cbb4279
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 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: d7827d889ab9c7275668f2ce7978b317ca1e11a6
refs/heads/master: 640611608f80fbc26fd221d9066d1daf50249f22
26 changes: 12 additions & 14 deletions trunk/drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#include <asm/blackfin.h>

#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __FUNCTION__, __LINE__, ## args)
#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
#define stampit() stamp("here i am")

struct bfin_rtc {
Expand Down Expand Up @@ -343,22 +343,20 @@ static int bfin_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)

static int bfin_rtc_proc(struct device *dev, struct seq_file *seq)
{
#define yesno(x) (x ? "yes" : "no")
#define yesno(x) ((x) ? "yes" : "no")
u16 ictl = bfin_read_RTC_ICTL();
stampit();
seq_printf(seq, "alarm_IRQ\t: %s\n", yesno(ictl & RTC_ISTAT_ALARM));
seq_printf(seq, "wkalarm_IRQ\t: %s\n", yesno(ictl & RTC_ISTAT_ALARM_DAY));
seq_printf(seq, "seconds_IRQ\t: %s\n", yesno(ictl & RTC_ISTAT_SEC));
seq_printf(seq, "periodic_IRQ\t: %s\n", yesno(ictl & RTC_ISTAT_STOPWATCH));
#ifdef DEBUG
seq_printf(seq, "RTC_STAT\t: 0x%08X\n", bfin_read_RTC_STAT());
seq_printf(seq, "RTC_ICTL\t: 0x%04X\n", bfin_read_RTC_ICTL());
seq_printf(seq, "RTC_ISTAT\t: 0x%04X\n", bfin_read_RTC_ISTAT());
seq_printf(seq, "RTC_SWCNT\t: 0x%04X\n", bfin_read_RTC_SWCNT());
seq_printf(seq, "RTC_ALARM\t: 0x%08X\n", bfin_read_RTC_ALARM());
seq_printf(seq, "RTC_PREN\t: 0x%04X\n", bfin_read_RTC_PREN());
#endif
seq_printf(seq,
"alarm_IRQ\t: %s\n"
"wkalarm_IRQ\t: %s\n"
"seconds_IRQ\t: %s\n"
"periodic_IRQ\t: %s\n",
yesno(ictl & RTC_ISTAT_ALARM),
yesno(ictl & RTC_ISTAT_ALARM_DAY),
yesno(ictl & RTC_ISTAT_SEC),
yesno(ictl & RTC_ISTAT_STOPWATCH));
return 0;
#undef yesno
}

/**
Expand Down

0 comments on commit cbb4279

Please sign in to comment.