core: node: remove unused API

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I797cb2f594865ab9310651183bf98b8112fe429e
This commit is contained in:
Joseph Chen 2020-08-06 20:06:37 +08:00
parent 8c22eae691
commit 6a1649e26d
6 changed files with 0 additions and 130 deletions

View File

@ -29,8 +29,6 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#define PROP_HIDE_MAGIC 1
/* list of struct alias_prop aliases */ /* list of struct alias_prop aliases */
LIST_HEAD(aliases_lookup); LIST_HEAD(aliases_lookup);
@ -173,40 +171,6 @@ const void *of_get_property(const struct device_node *np, const char *name,
return pp ? pp->value : NULL; return pp ? pp->value : NULL;
} }
const char *of_hide_property(struct device_node *np, const char *name)
{
struct property *pp;
if (!np)
return NULL;
for (pp = np->properties; pp; pp = pp->next) {
if (strcmp(pp->name, name) == 0) {
pp->name[0] += PROP_HIDE_MAGIC;
return (const char *)pp->name;
}
}
return NULL;
}
int of_present_property(struct device_node *np, const char *name)
{
struct property *pp;
if (!np)
return -FDT_ERR_NOTFOUND;
for (pp = np->properties; pp; pp = pp->next) {
if (strcmp(pp->name, name) == 0) {
pp->name[0] -= PROP_HIDE_MAGIC;
break;
}
}
return 0;
}
static const char *of_prop_next_string(struct property *prop, const char *cur) static const char *of_prop_next_string(struct property *prop, const char *cur)
{ {
const void *curv = cur; const void *curv = cur;
@ -900,17 +864,5 @@ struct device_node *of_alias_dump(void)
struct device_node *of_get_stdout(void) struct device_node *of_get_stdout(void)
{ {
struct device_node *np;
if (gd && gd->serial.using_pre_serial) {
np = of_alias_get_dev("serial", gd->serial.id);
if (!np)
printf("Can't find alias serial%d\n", gd->serial.id);
else
debug("Find alias serial: %s\n", np->full_name);
of_stdout = np;
}
return of_stdout; return of_stdout;
} }

View File

@ -512,24 +512,6 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp)
propname, lenp); propname, lenp);
} }
const char *ofnode_hide_property(ofnode node, const char *propname)
{
if (ofnode_is_np(node))
return of_hide_property((struct device_node *)ofnode_to_np(node),
propname);
else
return NULL;
}
int ofnode_present_property(ofnode node, const char *propname)
{
if (ofnode_is_np(node))
return of_present_property((struct device_node *)ofnode_to_np(node),
propname);
else
return -ENOSYS;
}
bool ofnode_is_available(ofnode node) bool ofnode_is_available(ofnode node)
{ {
if (ofnode_is_np(node)) if (ofnode_is_np(node))

View File

@ -154,16 +154,6 @@ const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp)
return ofnode_get_property(dev_ofnode(dev), propname, lenp); return ofnode_get_property(dev_ofnode(dev), propname, lenp);
} }
const char *dev_hide_prop(struct udevice *dev, const char *propname)
{
return ofnode_hide_property(dev_ofnode(dev), propname);
}
int dev_present_prop(struct udevice *dev, const char *propname)
{
return ofnode_present_property(dev_ofnode(dev), propname);
}
int dev_read_alias_seq(struct udevice *dev, int *devnump) int dev_read_alias_seq(struct udevice *dev, int *devnump)
{ {
ofnode node = dev_ofnode(dev); ofnode node = dev_ofnode(dev);

View File

@ -104,24 +104,6 @@ struct property *of_find_property(const struct device_node *np,
const void *of_get_property(const struct device_node *np, const char *name, const void *of_get_property(const struct device_node *np, const char *name,
int *lenp); int *lenp);
/**
* of_hide_property() - hide a property
*
* @np: Pointer to device node holding property
* @name: Name of property to hide
* @return hidden name if ok, otherwise NULL
*/
const char *of_hide_property(struct device_node *np, const char *name);
/**
* of_present_property() - present a property hidden before
*
* @np: Pointer to device node holding property
* @name: Hidden name of property
* @return 0 if ok, otherwise failed
*/
int of_present_property(struct device_node *np, const char *name);
/** /**
* of_device_is_compatible() - Check if the node matches given constraints * of_device_is_compatible() - Check if the node matches given constraints
* @device: pointer to node * @device: pointer to node

View File

@ -540,24 +540,6 @@ int ofnode_decode_display_timing(ofnode node, int index,
*/ */
const void *ofnode_get_property(ofnode node, const char *propname, int *lenp); const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
/**
* ofnode_hide_property() - hide a property
*
* @np: Pointer to device node holding property
* @name: Name of property to hide
* @return hidden name if ok, otherwise NULL
*/
const char *ofnode_hide_property(ofnode node, const char *propname);
/**
* ofnode_present_property() - present a property hidden before
*
* @np: Pointer to device node holding property
* @name: Hidden name of property
* @return 0 if ok, otherwise failed
*/
int ofnode_present_property(ofnode node, const char *propname);
/** /**
* ofnode_is_available() - check if a node is marked available * ofnode_is_available() - check if a node is marked available
* *

View File

@ -319,24 +319,6 @@ int dev_read_phandle(struct udevice *dev);
*/ */
const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp); const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp);
/**
* dev_hide_prop() - hide a property
*
* @np: Pointer to device node holding property
* @name: Name of property to hide
* @return hidden name if ok, otherwise NULL
*/
const char *dev_hide_prop(struct udevice *dev, const char *propname);
/**
* dev_present_prop() - present a property hidden before
*
* @np: Pointer to device node holding property
* @name: Hidden name of property
* @return 0 if ok, otherwise failed
*/
int dev_present_prop(struct udevice *dev, const char *propname);
/** /**
* dev_read_alias_seq() - Get the alias sequence number of a node * dev_read_alias_seq() - Get the alias sequence number of a node
* *