diff options
Diffstat (limited to 'arch/sparc/kernel/devices.c')
-rw-r--r-- | arch/sparc/kernel/devices.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c index 62dc7a021413..113c052c3043 100644 --- a/arch/sparc/kernel/devices.c +++ b/arch/sparc/kernel/devices.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | #include <asm/cpudata.h> | 21 | #include <asm/cpudata.h> |
22 | 22 | ||
23 | extern void cpu_probe(void); | ||
24 | extern void clock_stop_probe(void); /* tadpole.c */ | 23 | extern void clock_stop_probe(void); /* tadpole.c */ |
25 | extern void sun4c_probe_memerr_reg(void); | 24 | extern void sun4c_probe_memerr_reg(void); |
26 | 25 | ||
@@ -31,9 +30,9 @@ static char *cpu_mid_prop(void) | |||
31 | return "mid"; | 30 | return "mid"; |
32 | } | 31 | } |
33 | 32 | ||
34 | static int check_cpu_node(int nd, int *cur_inst, | 33 | static int check_cpu_node(phandle nd, int *cur_inst, |
35 | int (*compare)(int, int, void *), void *compare_arg, | 34 | int (*compare)(phandle, int, void *), void *compare_arg, |
36 | int *prom_node, int *mid) | 35 | phandle *prom_node, int *mid) |
37 | { | 36 | { |
38 | if (!compare(nd, *cur_inst, compare_arg)) { | 37 | if (!compare(nd, *cur_inst, compare_arg)) { |
39 | if (prom_node) | 38 | if (prom_node) |
@@ -51,8 +50,8 @@ static int check_cpu_node(int nd, int *cur_inst, | |||
51 | return -ENODEV; | 50 | return -ENODEV; |
52 | } | 51 | } |
53 | 52 | ||
54 | static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, | 53 | static int __cpu_find_by(int (*compare)(phandle, int, void *), |
55 | int *prom_node, int *mid) | 54 | void *compare_arg, phandle *prom_node, int *mid) |
56 | { | 55 | { |
57 | struct device_node *dp; | 56 | struct device_node *dp; |
58 | int cur_inst; | 57 | int cur_inst; |
@@ -71,7 +70,7 @@ static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, | |||
71 | return -ENODEV; | 70 | return -ENODEV; |
72 | } | 71 | } |
73 | 72 | ||
74 | static int cpu_instance_compare(int nd, int instance, void *_arg) | 73 | static int cpu_instance_compare(phandle nd, int instance, void *_arg) |
75 | { | 74 | { |
76 | int desired_instance = (int) _arg; | 75 | int desired_instance = (int) _arg; |
77 | 76 | ||
@@ -80,13 +79,13 @@ static int cpu_instance_compare(int nd, int instance, void *_arg) | |||
80 | return -ENODEV; | 79 | return -ENODEV; |
81 | } | 80 | } |
82 | 81 | ||
83 | int cpu_find_by_instance(int instance, int *prom_node, int *mid) | 82 | int cpu_find_by_instance(int instance, phandle *prom_node, int *mid) |
84 | { | 83 | { |
85 | return __cpu_find_by(cpu_instance_compare, (void *)instance, | 84 | return __cpu_find_by(cpu_instance_compare, (void *)instance, |
86 | prom_node, mid); | 85 | prom_node, mid); |
87 | } | 86 | } |
88 | 87 | ||
89 | static int cpu_mid_compare(int nd, int instance, void *_arg) | 88 | static int cpu_mid_compare(phandle nd, int instance, void *_arg) |
90 | { | 89 | { |
91 | int desired_mid = (int) _arg; | 90 | int desired_mid = (int) _arg; |
92 | int this_mid; | 91 | int this_mid; |
@@ -98,7 +97,7 @@ static int cpu_mid_compare(int nd, int instance, void *_arg) | |||
98 | return -ENODEV; | 97 | return -ENODEV; |
99 | } | 98 | } |
100 | 99 | ||
101 | int cpu_find_by_mid(int mid, int *prom_node) | 100 | int cpu_find_by_mid(int mid, phandle *prom_node) |
102 | { | 101 | { |
103 | return __cpu_find_by(cpu_mid_compare, (void *)mid, | 102 | return __cpu_find_by(cpu_mid_compare, (void *)mid, |
104 | prom_node, NULL); | 103 | prom_node, NULL); |
@@ -108,18 +107,19 @@ int cpu_find_by_mid(int mid, int *prom_node) | |||
108 | * address (0-3). This gives us the true hardware mid, which might have | 107 | * address (0-3). This gives us the true hardware mid, which might have |
109 | * some other bits set. On 4d hardware and software mids are the same. | 108 | * some other bits set. On 4d hardware and software mids are the same. |
110 | */ | 109 | */ |
111 | int cpu_get_hwmid(int prom_node) | 110 | int cpu_get_hwmid(phandle prom_node) |
112 | { | 111 | { |
113 | return prom_getintdefault(prom_node, cpu_mid_prop(), -ENODEV); | 112 | return prom_getintdefault(prom_node, cpu_mid_prop(), -ENODEV); |
114 | } | 113 | } |
115 | 114 | ||
116 | void __init device_scan(void) | 115 | void __init device_scan(void) |
117 | { | 116 | { |
118 | prom_printf("Booting Linux...\n"); | 117 | printk(KERN_NOTICE "Booting Linux...\n"); |
119 | 118 | ||
120 | #ifndef CONFIG_SMP | 119 | #ifndef CONFIG_SMP |
121 | { | 120 | { |
122 | int err, cpu_node; | 121 | phandle cpu_node; |
122 | int err; | ||
123 | err = cpu_find_by_instance(0, &cpu_node, NULL); | 123 | err = cpu_find_by_instance(0, &cpu_node, NULL); |
124 | if (err) { | 124 | if (err) { |
125 | /* Probably a sun4e, Sun is trying to trick us ;-) */ | 125 | /* Probably a sun4e, Sun is trying to trick us ;-) */ |
@@ -132,7 +132,6 @@ void __init device_scan(void) | |||
132 | } | 132 | } |
133 | #endif /* !CONFIG_SMP */ | 133 | #endif /* !CONFIG_SMP */ |
134 | 134 | ||
135 | cpu_probe(); | ||
136 | { | 135 | { |
137 | extern void auxio_probe(void); | 136 | extern void auxio_probe(void); |
138 | extern void auxio_power_probe(void); | 137 | extern void auxio_power_probe(void); |