diff options
Diffstat (limited to 'arch/microblaze/kernel/prom.c')
-rw-r--r-- | arch/microblaze/kernel/prom.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 7eb6f8bdb81a..d75c6253c0de 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -50,48 +50,6 @@ typedef u32 cell_t; | |||
50 | /* export that to outside world */ | 50 | /* export that to outside world */ |
51 | struct device_node *of_chosen; | 51 | struct device_node *of_chosen; |
52 | 52 | ||
53 | /** | ||
54 | * This function can be used within scan_flattened_dt callback to get | ||
55 | * access to properties | ||
56 | */ | ||
57 | void *__init of_get_flat_dt_prop(unsigned long node, const char *name, | ||
58 | unsigned long *size) | ||
59 | { | ||
60 | unsigned long p = node; | ||
61 | |||
62 | do { | ||
63 | u32 tag = *((u32 *)p); | ||
64 | u32 sz, noff; | ||
65 | const char *nstr; | ||
66 | |||
67 | p += 4; | ||
68 | if (tag == OF_DT_NOP) | ||
69 | continue; | ||
70 | if (tag != OF_DT_PROP) | ||
71 | return NULL; | ||
72 | |||
73 | sz = *((u32 *)p); | ||
74 | noff = *((u32 *)(p + 4)); | ||
75 | p += 8; | ||
76 | if (initial_boot_params->version < 0x10) | ||
77 | p = _ALIGN(p, sz >= 8 ? 8 : 4); | ||
78 | |||
79 | nstr = find_flat_dt_string(noff); | ||
80 | if (nstr == NULL) { | ||
81 | printk(KERN_WARNING "Can't find property index" | ||
82 | " name !\n"); | ||
83 | return NULL; | ||
84 | } | ||
85 | if (strcmp(name, nstr) == 0) { | ||
86 | if (size) | ||
87 | *size = sz; | ||
88 | return (void *)p; | ||
89 | } | ||
90 | p += sz; | ||
91 | p = _ALIGN(p, 4); | ||
92 | } while (1); | ||
93 | } | ||
94 | |||
95 | int __init of_flat_dt_is_compatible(unsigned long node, const char *compat) | 53 | int __init of_flat_dt_is_compatible(unsigned long node, const char *compat) |
96 | { | 54 | { |
97 | const char *cp; | 55 | const char *cp; |