aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r--arch/sparc64/kernel/time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 0f62ea82953c..f2e73e613748 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -1362,6 +1362,7 @@ static int hypervisor_set_rtc_time(struct rtc_time *time)
1362 return hypervisor_set_time(seconds); 1362 return hypervisor_set_time(seconds);
1363} 1363}
1364 1364
1365#ifdef CONFIG_PCI
1365static void bq4802_get_rtc_time(struct rtc_time *time) 1366static void bq4802_get_rtc_time(struct rtc_time *time)
1366{ 1367{
1367 unsigned char val = readb(bq4802_regs + 0x0e); 1368 unsigned char val = readb(bq4802_regs + 0x0e);
@@ -1433,6 +1434,7 @@ static int bq4802_set_rtc_time(struct rtc_time *time)
1433 1434
1434 return 0; 1435 return 0;
1435} 1436}
1437#endif /* CONFIG_PCI */
1436 1438
1437struct mini_rtc_ops { 1439struct mini_rtc_ops {
1438 void (*get_rtc_time)(struct rtc_time *); 1440 void (*get_rtc_time)(struct rtc_time *);
@@ -1449,10 +1451,12 @@ static struct mini_rtc_ops hypervisor_rtc_ops = {
1449 .set_rtc_time = hypervisor_set_rtc_time, 1451 .set_rtc_time = hypervisor_set_rtc_time,
1450}; 1452};
1451 1453
1454#ifdef CONFIG_PCI
1452static struct mini_rtc_ops bq4802_rtc_ops = { 1455static struct mini_rtc_ops bq4802_rtc_ops = {
1453 .get_rtc_time = bq4802_get_rtc_time, 1456 .get_rtc_time = bq4802_get_rtc_time,
1454 .set_rtc_time = bq4802_set_rtc_time, 1457 .set_rtc_time = bq4802_set_rtc_time,
1455}; 1458};
1459#endif /* CONFIG_PCI */
1456 1460
1457static struct mini_rtc_ops *mini_rtc_ops; 1461static struct mini_rtc_ops *mini_rtc_ops;
1458 1462
@@ -1576,8 +1580,10 @@ static int __init rtc_mini_init(void)
1576 mini_rtc_ops = &hypervisor_rtc_ops; 1580 mini_rtc_ops = &hypervisor_rtc_ops;
1577 else if (this_is_starfire) 1581 else if (this_is_starfire)
1578 mini_rtc_ops = &starfire_rtc_ops; 1582 mini_rtc_ops = &starfire_rtc_ops;
1583#ifdef CONFIG_PCI
1579 else if (bq4802_regs) 1584 else if (bq4802_regs)
1580 mini_rtc_ops = &bq4802_rtc_ops; 1585 mini_rtc_ops = &bq4802_rtc_ops;
1586#endif /* CONFIG_PCI */
1581 else 1587 else
1582 return -ENODEV; 1588 return -ENODEV;
1583 1589