[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>
This commit is contained in:
David S. Miller 2006-07-16 22:19:40 -07:00
parent 46ba6d7d8b
commit 06ffd7956e
7 changed files with 0 additions and 120 deletions

View File

@ -237,7 +237,6 @@ EXPORT_SYMBOL(prom_node_has_property);
EXPORT_SYMBOL(prom_setprop);
EXPORT_SYMBOL(saved_command_line);
EXPORT_SYMBOL(prom_apply_obio_ranges);
EXPORT_SYMBOL(prom_getname);
EXPORT_SYMBOL(prom_feval);
EXPORT_SYMBOL(prom_getbool);
EXPORT_SYMBOL(prom_getstring);

View File

@ -205,24 +205,6 @@ int prom_searchsiblings(int node_start, char *nodename)
return 0;
}
/* Gets name in the form prom v2+ uses it (name@x,yyyyy or name (if no reg)) */
int prom_getname (int node, char *buffer, int len)
{
int i;
struct linux_prom_registers reg[PROMREG_MAX];
i = prom_getproperty (node, "name", buffer, len);
if (i <= 0) return -1;
buffer [i] = 0;
len -= i;
i = prom_getproperty (node, "reg", (char *)reg, sizeof (reg));
if (i <= 0) return 0;
if (len < 11) return -1;
buffer = strchr (buffer, 0);
sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr);
return 0;
}
/* Interal version of nextprop that does not alter return values. */
char * __prom_nextprop(int node, char * oprop)
{

View File

@ -254,7 +254,6 @@ EXPORT_SYMBOL(prom_getproperty);
EXPORT_SYMBOL(prom_node_has_property);
EXPORT_SYMBOL(prom_setprop);
EXPORT_SYMBOL(saved_command_line);
EXPORT_SYMBOL(prom_getname);
EXPORT_SYMBOL(prom_finddevice);
EXPORT_SYMBOL(prom_feval);
EXPORT_SYMBOL(prom_getbool);

View File

@ -193,91 +193,6 @@ prom_searchsiblings(int node_start, const char *nodename)
return 0;
}
/* Gets name in the {name@x,yyyyy|name (if no reg)} form */
int
prom_getname (int node, char *buffer, int len)
{
int i, sbus = 0;
int pci = 0, ebus = 0, ide = 0;
struct linux_prom_registers *reg;
struct linux_prom64_registers reg64[PROMREG_MAX];
for (sbus = prom_getparent (node); sbus; sbus = prom_getparent (sbus)) {
i = prom_getproperty (sbus, "name", buffer, len);
if (i > 0) {
buffer [i] = 0;
if (!strcmp (buffer, "sbus"))
goto getit;
}
}
if ((pci = prom_getparent (node))) {
i = prom_getproperty (pci, "name", buffer, len);
if (i > 0) {
buffer [i] = 0;
if (!strcmp (buffer, "pci"))
goto getit;
}
pci = 0;
}
if ((ebus = prom_getparent (node))) {
i = prom_getproperty (ebus, "name", buffer, len);
if (i > 0) {
buffer[i] = 0;
if (!strcmp (buffer, "ebus"))
goto getit;
}
ebus = 0;
}
if ((ide = prom_getparent (node))) {
i = prom_getproperty (ide, "name", buffer, len);
if (i > 0) {
buffer [i] = 0;
if (!strcmp (buffer, "ide"))
goto getit;
}
ide = 0;
}
getit:
i = prom_getproperty (node, "name", buffer, len);
if (i <= 0) {
buffer [0] = 0;
return -1;
}
buffer [i] = 0;
len -= i;
i = prom_getproperty (node, "reg", (char *)reg64, sizeof (reg64));
if (i <= 0) return 0;
if (len < 16) return -1;
buffer = strchr (buffer, 0);
if (sbus) {
reg = (struct linux_prom_registers *)reg64;
sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr);
} else if (pci) {
int dev, fn;
reg = (struct linux_prom_registers *)reg64;
fn = (reg[0].which_io >> 8) & 0x07;
dev = (reg[0].which_io >> 11) & 0x1f;
if (fn)
sprintf (buffer, "@%x,%x", dev, fn);
else
sprintf (buffer, "@%x", dev);
} else if (ebus) {
reg = (struct linux_prom_registers *)reg64;
sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr);
} else if (ide) {
reg = (struct linux_prom_registers *)reg64;
sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr);
} else if (i == 4) { /* Happens on 8042's children on Ultra/PCI. */
reg = (struct linux_prom_registers *)reg64;
sprintf (buffer, "@%x", reg[0].which_io);
} else {
sprintf (buffer, "@%x,%x",
(unsigned int)(reg64[0].phys_addr >> 36),
(unsigned int)(reg64[0].phys_addr));
}
return 0;
}
/* Return the first property type for node 'node'.
* buffer should be at least 32B in length
*/

View File

@ -244,11 +244,6 @@ extern void prom_getstring(int node, char *prop, char *buf, int bufsize);
/* Does the passed node have the given "name"? YES=1 NO=0 */
extern int prom_nodematch(int thisnode, char *name);
/* Puts in buffer a prom name in the form name@x,y or name (x for which_io
* and y for first regs phys address
*/
extern int prom_getname(int node, char *buf, int buflen);
/* Search all siblings starting at the passed node for "name" matching
* the given string. Returns the node on success, zero on failure.
*/

View File

@ -267,11 +267,6 @@ extern void prom_getstring(int node, char *prop, char *buf, int bufsize);
/* Does the passed node have the given "name"? YES=1 NO=0 */
extern int prom_nodematch(int thisnode, char *name);
/* Puts in buffer a prom name in the form name@x,y or name (x for which_io
* and y for first regs phys address
*/
extern int prom_getname(int node, char *buf, int buflen);
/* Search all siblings starting at the passed node for "name" matching
* the given string. Returns the node on success, zero on failure.
*/

View File

@ -287,11 +287,6 @@ extern void prom_getstring(int node, const char *prop, char *buf, int bufsize);
/* Does the passed node have the given "name"? YES=1 NO=0 */
extern int prom_nodematch(int thisnode, const char *name);
/* Puts in buffer a prom name in the form name@x,y or name (x for which_io
* and y for first regs phys address
*/
extern int prom_getname(int node, char *buf, int buflen);
/* Search all siblings starting at the passed node for "name" matching
* the given string. Returns the node on success, zero on failure.
*/