aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/chrp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r--arch/powerpc/platforms/chrp/time.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c
index 7d7889026936..96d1e4b3c493 100644
--- a/arch/powerpc/platforms/chrp/time.c
+++ b/arch/powerpc/platforms/chrp/time.c
@@ -39,12 +39,17 @@ long __init chrp_time_init(void)
39 struct resource r; 39 struct resource r;
40 int base; 40 int base;
41 41
42 rtcs = find_compatible_devices("rtc", "pnpPNP,b00"); 42 rtcs = of_find_compatible_node(NULL, "rtc", "pnpPNP,b00");
43 if (rtcs == NULL) 43 if (rtcs == NULL)
44 rtcs = find_compatible_devices("rtc", "ds1385-rtc"); 44 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc");
45 if (rtcs == NULL || of_address_to_resource(rtcs, 0, &r)) 45 if (rtcs == NULL)
46 return 0;
47 if (of_address_to_resource(rtcs, 0, &r)) {
48 of_node_put(rtcs);
46 return 0; 49 return 0;
47 50 }
51 of_node_put(rtcs);
52
48 base = r.start; 53 base = r.start;
49 nvram_as1 = 0; 54 nvram_as1 = 0;
50 nvram_as0 = base; 55 nvram_as0 = base;