Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57076
b: refs/heads/master
c: 7189859
h: refs/heads/master
v: v3
  • Loading branch information
Horst H. von Brand authored and David S. Miller committed May 29, 2007
1 parent 8a08463 commit 3c8686f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22adb358e816ce6aa0afb231ae9d826b0bddc8b0
refs/heads/master: 7189859f28b7064a83b6ab4036bb334279f922c2
6 changes: 6 additions & 0 deletions trunk/arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,7 @@ static int hypervisor_set_rtc_time(struct rtc_time *time)
return hypervisor_set_time(seconds);
}

#ifdef CONFIG_PCI
static void bq4802_get_rtc_time(struct rtc_time *time)
{
unsigned char val = readb(bq4802_regs + 0x0e);
Expand Down Expand Up @@ -1433,6 +1434,7 @@ static int bq4802_set_rtc_time(struct rtc_time *time)

return 0;
}
#endif /* CONFIG_PCI */

struct mini_rtc_ops {
void (*get_rtc_time)(struct rtc_time *);
Expand All @@ -1449,10 +1451,12 @@ static struct mini_rtc_ops hypervisor_rtc_ops = {
.set_rtc_time = hypervisor_set_rtc_time,
};

#ifdef CONFIG_PCI
static struct mini_rtc_ops bq4802_rtc_ops = {
.get_rtc_time = bq4802_get_rtc_time,
.set_rtc_time = bq4802_set_rtc_time,
};
#endif /* CONFIG_PCI */

static struct mini_rtc_ops *mini_rtc_ops;

Expand Down Expand Up @@ -1576,8 +1580,10 @@ static int __init rtc_mini_init(void)
mini_rtc_ops = &hypervisor_rtc_ops;
else if (this_is_starfire)
mini_rtc_ops = &starfire_rtc_ops;
#ifdef CONFIG_PCI
else if (bq4802_regs)
mini_rtc_ops = &bq4802_rtc_ops;
#endif /* CONFIG_PCI */
else
return -ENODEV;

Expand Down

0 comments on commit 3c8686f

Please sign in to comment.