diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-07-17 01:19:40 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-07-21 17:17:55 -0400 |
commit | 06ffd7956e4790d824b4b5575b56def8448ec6d4 (patch) | |
tree | 14a1f29fdfa257e79b2bb79aab69509104b5a19a /arch/sparc64/prom | |
parent | 46ba6d7d8b0486e9d565729880ddfb2b84d3af31 (diff) |
[SPARC]: Kill prom_getname, unused and not implemented properly.
The m68k port's sun3 asm/oplib.h had a stray reference too, so I
killed that off as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/prom')
-rw-r--r-- | arch/sparc64/prom/tree.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c index 49075abd7cbc..500f05e2cfcb 100644 --- a/arch/sparc64/prom/tree.c +++ b/arch/sparc64/prom/tree.c | |||
@@ -193,91 +193,6 @@ prom_searchsiblings(int node_start, const char *nodename) | |||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* Gets name in the {name@x,yyyyy|name (if no reg)} form */ | ||
197 | int | ||
198 | prom_getname (int node, char *buffer, int len) | ||
199 | { | ||
200 | int i, sbus = 0; | ||
201 | int pci = 0, ebus = 0, ide = 0; | ||
202 | struct linux_prom_registers *reg; | ||
203 | struct linux_prom64_registers reg64[PROMREG_MAX]; | ||
204 | |||
205 | for (sbus = prom_getparent (node); sbus; sbus = prom_getparent (sbus)) { | ||
206 | i = prom_getproperty (sbus, "name", buffer, len); | ||
207 | if (i > 0) { | ||
208 | buffer [i] = 0; | ||
209 | if (!strcmp (buffer, "sbus")) | ||
210 | goto getit; | ||
211 | } | ||
212 | } | ||
213 | if ((pci = prom_getparent (node))) { | ||
214 | i = prom_getproperty (pci, "name", buffer, len); | ||
215 | if (i > 0) { | ||
216 | buffer [i] = 0; | ||
217 | if (!strcmp (buffer, "pci")) | ||
218 | goto getit; | ||
219 | } | ||
220 | pci = 0; | ||
221 | } | ||
222 | if ((ebus = prom_getparent (node))) { | ||
223 | i = prom_getproperty (ebus, "name", buffer, len); | ||
224 | if (i > 0) { | ||
225 | buffer[i] = 0; | ||
226 | if (!strcmp (buffer, "ebus")) | ||
227 | goto getit; | ||
228 | } | ||
229 | ebus = 0; | ||
230 | } | ||
231 | if ((ide = prom_getparent (node))) { | ||
232 | i = prom_getproperty (ide, "name", buffer, len); | ||
233 | if (i > 0) { | ||
234 | buffer [i] = 0; | ||
235 | if (!strcmp (buffer, "ide")) | ||
236 | goto getit; | ||
237 | } | ||
238 | ide = 0; | ||
239 | } | ||
240 | getit: | ||
241 | i = prom_getproperty (node, "name", buffer, len); | ||
242 | if (i <= 0) { | ||
243 | buffer [0] = 0; | ||
244 | return -1; | ||
245 | } | ||
246 | buffer [i] = 0; | ||
247 | len -= i; | ||
248 | i = prom_getproperty (node, "reg", (char *)reg64, sizeof (reg64)); | ||
249 | if (i <= 0) return 0; | ||
250 | if (len < 16) return -1; | ||
251 | buffer = strchr (buffer, 0); | ||
252 | if (sbus) { | ||
253 | reg = (struct linux_prom_registers *)reg64; | ||
254 | sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr); | ||
255 | } else if (pci) { | ||
256 | int dev, fn; | ||
257 | reg = (struct linux_prom_registers *)reg64; | ||
258 | fn = (reg[0].which_io >> 8) & 0x07; | ||
259 | dev = (reg[0].which_io >> 11) & 0x1f; | ||
260 | if (fn) | ||
261 | sprintf (buffer, "@%x,%x", dev, fn); | ||
262 | else | ||
263 | sprintf (buffer, "@%x", dev); | ||
264 | } else if (ebus) { | ||
265 | reg = (struct linux_prom_registers *)reg64; | ||
266 | sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr); | ||
267 | } else if (ide) { | ||
268 | reg = (struct linux_prom_registers *)reg64; | ||
269 | sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr); | ||
270 | } else if (i == 4) { /* Happens on 8042's children on Ultra/PCI. */ | ||
271 | reg = (struct linux_prom_registers *)reg64; | ||
272 | sprintf (buffer, "@%x", reg[0].which_io); | ||
273 | } else { | ||
274 | sprintf (buffer, "@%x,%x", | ||
275 | (unsigned int)(reg64[0].phys_addr >> 36), | ||
276 | (unsigned int)(reg64[0].phys_addr)); | ||
277 | } | ||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | /* Return the first property type for node 'node'. | 196 | /* Return the first property type for node 'node'. |
282 | * buffer should be at least 32B in length | 197 | * buffer should be at least 32B in length |
283 | */ | 198 | */ |