summaryrefslogtreecommitdiffstats
path: root/libpdbg/device.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2018-10-25 16:16:16 +1100
committerAlistair Popple <alistair@popple.id.au>2018-11-09 11:27:16 +1100
commit541331dc5e346e45217caf3fcdf3f00479ef05a9 (patch)
treea532cda0846ca28bafafa1580f0e9e7f7c0f0699 /libpdbg/device.c
parent936dbdcedb27375c792006481f92b48685a08039 (diff)
downloadpdbg-541331dc5e346e45217caf3fcdf3f00479ef05a9.tar.gz
pdbg-541331dc5e346e45217caf3fcdf3f00479ef05a9.zip
libpdbg: Remove old dt_prop functions
The dt_prop functions were copied over from Skiboot. Rework and rename these to make use of the existing libpdbg property functions. These should not have been used by external projects so maintaining backwards compatibility is not a concern. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
Diffstat (limited to 'libpdbg/device.c')
-rw-r--r--libpdbg/device.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/libpdbg/device.c b/libpdbg/device.c
index 5cd8302..a26be30 100644
--- a/libpdbg/device.c
+++ b/libpdbg/device.c
@@ -501,14 +501,8 @@ struct pdbg_target *dt_find_compatible_node(struct pdbg_target *root,
return NULL;
}
-u32 dt_prop_get_u32(const struct pdbg_target *node, const char *prop)
-{
- const struct dt_property *p = dt_require_property(node, prop, 4);
-
- return dt_property_get_cell(p, 0);
-}
-
-static u32 dt_prop_get_u32_def(const struct pdbg_target *node, const char *prop, u32 def)
+static uint32_t dt_prop_get_u32_def(const struct pdbg_target *node,
+ const char *prop, uint32_t def)
{
const struct dt_property *p = dt_find_property(node, prop);
@@ -518,35 +512,6 @@ static u32 dt_prop_get_u32_def(const struct pdbg_target *node, const char *prop,
return dt_property_get_cell(p, 0);
}
-u32 dt_prop_get_u32_index(const struct pdbg_target *node, const char *prop, u32 index)
-{
- const struct dt_property *p = dt_require_property(node, prop, -1);
-
- return dt_property_get_cell(p, index);
-}
-
-const void *dt_prop_get(const struct pdbg_target *node, const char *prop)
-{
- const struct dt_property *p = dt_require_property(node, prop, -1);
-
- return p->prop;
-}
-
-const void *dt_prop_get_def(const struct pdbg_target *node, const char *prop,
- void *def)
-{
- const struct dt_property *p = dt_find_property(node, prop);
-
- return p ? p->prop : def;
-}
-
-u32 dt_prop_get_cell(const struct pdbg_target *node, const char *prop, u32 cell)
-{
- const struct dt_property *p = dt_require_property(node, prop, -1);
-
- return dt_property_get_cell(p, cell);
-}
-
static enum pdbg_target_status str_to_status(const char *status)
{
if (!strcmp(status, "enabled")) {
OpenPOWER on IntegriCloud