Skip to content

Commit

Permalink
[SPARC]: Kill prom_getname, unused and not implemented properly.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jul 21, 2006
1 parent 46ba6d7 commit 06ffd79
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 120 deletions.
1 change: 0 additions & 1 deletion arch/sparc/kernel/sparc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 0 additions & 18 deletions arch/sparc/prom/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion arch/sparc64/kernel/sparc64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
85 changes: 0 additions & 85 deletions arch/sparc64/prom/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 0 additions & 5 deletions include/asm-m68k/oplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
5 changes: 0 additions & 5 deletions include/asm-sparc/oplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
5 changes: 0 additions & 5 deletions include/asm-sparc64/oplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 06ffd79

Please sign in to comment.