]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/boot/ops.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / boot / ops.h
index 5872ef1779ae5d93c94e7a2b367931f2ec48ed3b..b3218ce451bb9be8081dd77cc75f0a3114468be1 100644 (file)
@@ -40,12 +40,15 @@ struct dt_ops {
                        const int buflen);
        int     (*setprop)(const void *phandle, const char *name,
                        const void *buf, const int buflen);
+       int (*del_node)(const void *phandle);
        void *(*get_parent)(const void *phandle);
        /* The node must not already exist. */
        void *(*create_node)(const void *parent, const char *name);
        void *(*find_node_by_prop_value)(const void *prev,
                                         const char *propname,
                                         const char *propval, int proplen);
+       void *(*find_node_by_compatible)(const void *prev,
+                                        const char *compat);
        unsigned long (*finalize)(void);
        char *(*get_path)(const void *phandle, char *buf, int len);
 };
@@ -93,6 +96,7 @@ int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size);
 int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr);
 int dt_is_compatible(void *node, const char *compat);
 void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize);
+int dt_get_virtual_reg(void *node, void **addr, int nres);
 
 static inline void *finddevice(const char *name)
 {
@@ -123,6 +127,11 @@ static inline int setprop_str(void *devp, const char *name, const char *buf)
        return -1;
 }
 
+static inline int del_node(const void *devp)
+{
+       return dt_ops.del_node ? dt_ops.del_node(devp) : -1;
+}
+
 static inline void *get_parent(const char *devp)
 {
        return dt_ops.get_parent ? dt_ops.get_parent(devp) : NULL;
@@ -172,6 +181,15 @@ static inline void *find_node_by_alias(const char *alias)
        return NULL;
 }
 
+static inline void *find_node_by_compatible(const void *prev,
+                                            const char *compat)
+{
+       if (dt_ops.find_node_by_compatible)
+               return dt_ops.find_node_by_compatible(prev, compat);
+
+       return NULL;
+}
+
 void dt_fixup_memory(u64 start, u64 size);
 void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
 void dt_fixup_clock(const char *path, u32 freq);