* [PATCH 0/4] Merge OF dynamic patches
@ 2009-11-17 21:04 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-17 21:04 UTC (permalink / raw)
To: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Cc: Grant Likely
This set of patches merges the common dynamic device tree
updating routines of_attach_node() and of_detach_node() to
drivers/of/of_dynamic.c.
Built and tested on powerpc, I have no access to build/test
this on microblaze.
-Nathan Fontenot
1/4 - Merge of_attach_node
2/4 - Merge of_detach_node
3/4 - Makefile/Kconfig updates
4/4 - Move declarations to linux/of.h
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 0/4] Merge OF dynamic patches
@ 2009-11-17 21:04 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-17 21:04 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss, microblaze-uclinux
This set of patches merges the common dynamic device tree
updating routines of_attach_node() and of_detach_node() to
drivers/of/of_dynamic.c.
Built and tested on powerpc, I have no access to build/test
this on microblaze.
-Nathan Fontenot
1/4 - Merge of_attach_node
2/4 - Merge of_detach_node
3/4 - Makefile/Kconfig updates
4/4 - Move declarations to linux/of.h
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/4] Merge of_attach_node
2009-11-17 21:04 ` Nathan Fontenot
@ 2009-11-18 2:53 ` Nathan Fontenot
-1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 2:53 UTC (permalink / raw)
To: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Merge the common of_attach_node() routine from powerpc and microblaze to
drivers/of/of_dynamic.c
Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
---
Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
@@ -957,21 +957,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/arch/powerpc/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/powerpc/kernel/prom.c 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
@@ -1413,21 +1413,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/drivers/of/of_dynamic.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ test-devicetree/drivers/of/of_dynamic.c 2009-11-17 14:18:11.000000000 -0600
@@ -0,0 +1,36 @@
+/*
+ * Procedures for creating, accessing and interpreting the device tree.
+ *
+ * Paul Mackerras August 1996.
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
+ * {engebret|bergner}@us.ibm.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/of.h>
+
+/* temporary while merging */
+extern struct device_node *allnodes;
+extern rwlock_t devtree_lock;
+
+/*
+ * Plug a device node into the tree and global list.
+ */
+void of_attach_node(struct device_node *np)
+{
+ unsigned long flags;
+
+ write_lock_irqsave(&devtree_lock, flags);
+ np->sibling = np->parent->child;
+ np->allnext = allnodes;
+ np->parent->child = np;
+ allnodes = np;
+ write_unlock_irqrestore(&devtree_lock, flags);
+}
+
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/4] Merge of_attach_node
@ 2009-11-18 2:53 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 2:53 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss, microblaze-uclinux
Merge the common of_attach_node() routine from powerpc and microblaze to
drivers/of/of_dynamic.c
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
@@ -957,21 +957,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/arch/powerpc/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/powerpc/kernel/prom.c 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
@@ -1413,21 +1413,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/drivers/of/of_dynamic.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ test-devicetree/drivers/of/of_dynamic.c 2009-11-17 14:18:11.000000000 -0600
@@ -0,0 +1,36 @@
+/*
+ * Procedures for creating, accessing and interpreting the device tree.
+ *
+ * Paul Mackerras August 1996.
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
+ * {engebret|bergner}@us.ibm.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/of.h>
+
+/* temporary while merging */
+extern struct device_node *allnodes;
+extern rwlock_t devtree_lock;
+
+/*
+ * Plug a device node into the tree and global list.
+ */
+void of_attach_node(struct device_node *np)
+{
+ unsigned long flags;
+
+ write_lock_irqsave(&devtree_lock, flags);
+ np->sibling = np->parent->child;
+ np->allnext = allnodes;
+ np->parent->child = np;
+ allnodes = np;
+ write_unlock_irqrestore(&devtree_lock, flags);
+}
+
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/4] Merge of_detach_node
2009-11-17 21:04 ` Nathan Fontenot
(?)
(?)
@ 2009-11-18 2:55 ` Nathan Fontenot
[not found] ` <4B03620C.2060105-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
-1 siblings, 1 reply; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 2:55 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss, microblaze-uclinux
Merge the common of_detach_node() from powerpc and microblaze into the common
drivers/of/of_dynamic.c
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c 2009-11-17 14:18:18.000000000 -0600
@@ -957,50 +957,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * "Unplug" a node from the device tree. The caller must hold
- * a reference to the node. The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
- struct device_node *parent;
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
-
- parent = np->parent;
- if (!parent)
- goto out_unlock;
-
- if (allnodes == np)
- allnodes = np->allnext;
- else {
- struct device_node *prev;
- for (prev = allnodes;
- prev->allnext != np;
- prev = prev->allnext)
- ;
- prev->allnext = np->allnext;
- }
-
- if (parent->child == np)
- parent->child = np->sibling;
- else {
- struct device_node *prevsib;
- for (prevsib = np->parent->child;
- prevsib->sibling != np;
- prevsib = prevsib->sibling)
- ;
- prevsib->sibling = np->sibling;
- }
-
- of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* Add a property to a node
*/
int prom_add_property(struct device_node *np, struct property *prop)
Index: test-devicetree/arch/powerpc/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/powerpc/kernel/prom.c 2009-11-17 14:17:05.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c 2009-11-17 14:18:18.000000000 -0600
@@ -1412,50 +1412,6 @@
}
EXPORT_SYMBOL(of_node_put);
-/*
- * "Unplug" a node from the device tree. The caller must hold
- * a reference to the node. The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
- struct device_node *parent;
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
-
- parent = np->parent;
- if (!parent)
- goto out_unlock;
-
- if (allnodes == np)
- allnodes = np->allnext;
- else {
- struct device_node *prev;
- for (prev = allnodes;
- prev->allnext != np;
- prev = prev->allnext)
- ;
- prev->allnext = np->allnext;
- }
-
- if (parent->child == np)
- parent->child = np->sibling;
- else {
- struct device_node *prevsib;
- for (prevsib = np->parent->child;
- prevsib->sibling != np;
- prevsib = prevsib->sibling)
- ;
- prevsib->sibling = np->sibling;
- }
-
- of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
#ifdef CONFIG_PPC_PSERIES
/*
* Fix up the uninitialized fields in a new device node:
Index: test-devicetree/drivers/of/of_dynamic.c
===================================================================
--- test-devicetree.orig/drivers/of/of_dynamic.c 2009-11-17 14:18:11.000000000 -0600
+++ test-devicetree/drivers/of/of_dynamic.c 2009-11-17 14:18:18.000000000 -0600
@@ -34,3 +34,46 @@
write_unlock_irqrestore(&devtree_lock, flags);
}
+/*
+ * "Unplug" a node from the device tree. The caller must hold
+ * a reference to the node. The memory associated with the node
+ * is not freed until its refcount goes to zero.
+ */
+void of_detach_node(struct device_node *np)
+{
+ struct device_node *parent;
+ unsigned long flags;
+
+ write_lock_irqsave(&devtree_lock, flags);
+
+ parent = np->parent;
+ if (!parent)
+ goto out_unlock;
+
+ if (allnodes == np)
+ allnodes = np->allnext;
+ else {
+ struct device_node *prev;
+ for (prev = allnodes;
+ prev->allnext != np;
+ prev = prev->allnext)
+ ;
+ prev->allnext = np->allnext;
+ }
+
+ if (parent->child == np)
+ parent->child = np->sibling;
+ else {
+ struct device_node *prevsib;
+ for (prevsib = np->parent->child;
+ prevsib->sibling != np;
+ prevsib = prevsib->sibling)
+ ;
+ prevsib->sibling = np->sibling;
+ }
+
+ of_node_set_flag(np, OF_DETACHED);
+
+out_unlock:
+ write_unlock_irqrestore(&devtree_lock, flags);
+}
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/4] Makefile and Kconfig updates for of_dynamci
2009-11-17 21:04 ` Nathan Fontenot
` (2 preceding siblings ...)
(?)
@ 2009-11-18 2:56 ` Nathan Fontenot
[not found] ` <4B036256.9060809-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
-1 siblings, 1 reply; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 2:56 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss, microblaze-uclinux
Update the Kconfig and Makefile files for drivers/of, powerpc and microblaze
to properly configure for CONFIG_OF_DYNAMIC to build the of_dynamic code.
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
Index: test-devicetree/arch/microblaze/Kconfig
===================================================================
--- test-devicetree.orig/arch/microblaze/Kconfig 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/microblaze/Kconfig 2009-11-17 14:01:06.000000000 -0600
@@ -111,6 +111,7 @@
config OF
def_bool y
+ select OF_DYNAMIC
config PROC_DEVICETREE
bool "Support for device tree in /proc"
Index: test-devicetree/arch/powerpc/Kconfig
===================================================================
--- test-devicetree.orig/arch/powerpc/Kconfig 2009-11-17 13:52:45.000000000 -0600
+++ test-devicetree/arch/powerpc/Kconfig 2009-11-17 14:01:06.000000000 -0600
@@ -163,6 +163,7 @@
config OF
def_bool y
+ select OF_DYNAMIC
config PPC_UDBG_16550
bool
Index: test-devicetree/drivers/of/Kconfig
===================================================================
--- test-devicetree.orig/drivers/of/Kconfig 2009-11-17 13:52:48.000000000 -0600
+++ test-devicetree/drivers/of/Kconfig 2009-11-17 14:01:06.000000000 -0600
@@ -1,3 +1,7 @@
+config OF_DYNAMIC
+ bool
+ depends on OF
+
config OF_DEVICE
def_bool y
depends on OF && (SPARC || PPC_OF || MICROBLAZE)
Index: test-devicetree/drivers/of/Makefile
===================================================================
--- test-devicetree.orig/drivers/of/Makefile 2009-11-17 13:52:48.000000000 -0600
+++ test-devicetree/drivers/of/Makefile 2009-11-17 14:01:06.000000000 -0600
@@ -1,4 +1,5 @@
obj-y = base.o
+obj-$(CONFIG_OF_DYNAMIC) += of_dynamic.o
obj-$(CONFIG_OF_DEVICE) += device.o platform.o
obj-$(CONFIG_OF_GPIO) += gpio.o
obj-$(CONFIG_OF_I2C) += of_i2c.o
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 4/4] Move of_node[attach,detach] declarations to linux/of.h
2009-11-17 21:04 ` Nathan Fontenot
` (3 preceding siblings ...)
(?)
@ 2009-11-18 2:57 ` Nathan Fontenot
[not found] ` <4B03629A.9050503-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
-1 siblings, 1 reply; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 2:57 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss, microblaze-uclinux
Merge the declarations of of_attach_node and of_detach_node from the asm/prom.h
headers of powerpc and microblaze into linux/of.h.
This update also requires adding linux/of.h to the include list for
powerpc/platforms/pseries/reconfig.h.
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h 2009-11-17 14:17:03.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h 2009-11-17 14:18:25.000000000 -0600
@@ -139,10 +139,6 @@
of_flat_dt_is_compatible(unsigned long node, const char *name);
extern unsigned long __init of_get_flat_dt_root(void);
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
/* Other Prototypes */
extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
Index: test-devicetree/arch/powerpc/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/powerpc/include/asm/prom.h 2009-11-17 14:17:03.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h 2009-11-17 14:18:25.000000000 -0600
@@ -137,10 +137,6 @@
extern int __init of_flat_dt_is_compatible(unsigned long node, const char *name);
extern unsigned long __init of_get_flat_dt_root(void);
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
/* Other Prototypes */
extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
Index: test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- test-devicetree.orig/arch/powerpc/platforms/pseries/reconfig.c 2009-11-17 14:17:03.000000000 -0600
+++ test-devicetree/arch/powerpc/platforms/pseries/reconfig.c 2009-11-17 14:18:25.000000000 -0600
@@ -15,6 +15,7 @@
#include <linux/kref.h>
#include <linux/notifier.h>
#include <linux/proc_fs.h>
+#include <linux/of.h>
#include <asm/prom.h>
#include <asm/machdep.h>
Index: test-devicetree/include/linux/of.h
===================================================================
--- test-devicetree.orig/include/linux/of.h 2009-11-17 14:17:03.000000000 -0600
+++ test-devicetree/include/linux/of.h 2009-11-17 14:18:25.000000000 -0600
@@ -84,4 +84,10 @@
const char *list_name, const char *cells_name, int index,
struct device_node **out_node, const void **out_args);
+#ifdef CONFIG_OF_DYNAMIC
+/* For updating the device tree at runtime */
+extern void of_attach_node(struct device_node *);
+extern void of_detach_node(struct device_node *);
+#endif
+
#endif /* _LINUX_OF_H */
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] Merge OF dynamic patches
2009-11-17 21:04 ` Nathan Fontenot
@ 2009-11-18 10:41 ` Wolfram Sang
-1 siblings, 0 replies; 17+ messages in thread
From: Wolfram Sang @ 2009-11-18 10:41 UTC (permalink / raw)
To: Nathan Fontenot; +Cc: linuxppc-dev, devicetree-discuss, microblaze-uclinux
[-- Attachment #1.1: Type: text/plain, Size: 732 bytes --]
On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
> This set of patches merges the common dynamic device tree
> updating routines of_attach_node() and of_detach_node() to
> drivers/of/of_dynamic.c.
>
> Built and tested on powerpc, I have no access to build/test
> this on microblaze.
They look good, but I can't test them as they don't apply to test-devicetree.
On which commit are they based?
It would be nice if you could also add a diffstat to every patch, this makes
reviewing 'move-around'-patches a bit easier.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] Merge OF dynamic patches
@ 2009-11-18 10:41 ` Wolfram Sang
0 siblings, 0 replies; 17+ messages in thread
From: Wolfram Sang @ 2009-11-18 10:41 UTC (permalink / raw)
To: Nathan Fontenot; +Cc: linuxppc-dev, devicetree-discuss, microblaze-uclinux
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
> This set of patches merges the common dynamic device tree
> updating routines of_attach_node() and of_detach_node() to
> drivers/of/of_dynamic.c.
>
> Built and tested on powerpc, I have no access to build/test
> this on microblaze.
They look good, but I can't test them as they don't apply to test-devicetree.
On which commit are they based?
It would be nice if you could also add a diffstat to every patch, this makes
reviewing 'move-around'-patches a bit easier.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] Merge OF dynamic patches
2009-11-18 10:41 ` Wolfram Sang
@ 2009-11-18 20:16 ` Nathan Fontenot
-1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 20:16 UTC (permalink / raw)
To: Wolfram Sang
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Wolfram Sang wrote:
> On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
>> This set of patches merges the common dynamic device tree
>> updating routines of_attach_node() and of_detach_node() to
>> drivers/of/of_dynamic.c.
>>
>> Built and tested on powerpc, I have no access to build/test
>> this on microblaze.
>
> They look good, but I can't test them as they don't apply to test-devicetree.
> On which commit are they based?
I meant to base these on the test-devicetree branch but it appears that I did
not checkout the test-devicetree branch after cloning. I will rebase the patches
against the test-devicetree branch and re-send.
>
> It would be nice if you could also add a diffstat to every patch, this makes
> reviewing 'move-around'-patches a bit easier.
will do.
-Nathan Fontenot
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] Merge OF dynamic patches
@ 2009-11-18 20:16 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 20:16 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev, devicetree-discuss, microblaze-uclinux
Wolfram Sang wrote:
> On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
>> This set of patches merges the common dynamic device tree
>> updating routines of_attach_node() and of_detach_node() to
>> drivers/of/of_dynamic.c.
>>
>> Built and tested on powerpc, I have no access to build/test
>> this on microblaze.
>
> They look good, but I can't test them as they don't apply to test-devicetree.
> On which commit are they based?
I meant to base these on the test-devicetree branch but it appears that I did
not checkout the test-devicetree branch after cloning. I will rebase the patches
against the test-devicetree branch and re-send.
>
> It would be nice if you could also add a diffstat to every patch, this makes
> reviewing 'move-around'-patches a bit easier.
will do.
-Nathan Fontenot
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/4] Merge of_attach_node
[not found] ` <4B0361A9.20209-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
@ 2009-11-18 21:44 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 21:44 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Merge the common of_attach_node() routine from powerpc and microblaze to
drivers/of/of_dynamic.c
Updated patch that should apply cleanly to test-devicetree, now with
diffstat output.
Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
---
arch/microblaze/kernel/prom.c | 15 ---------------
arch/powerpc/kernel/prom.c | 15 ---------------
drivers/of/of_dynamic.c | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 36 insertions(+), 30 deletions(-)
Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c 2009-11-18 19:21:31.000000000 -0600
@@ -483,21 +483,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/arch/powerpc/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/powerpc/kernel/prom.c 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c 2009-11-18 19:21:31.000000000 -0600
@@ -936,21 +936,6 @@
EXPORT_SYMBOL(of_node_put);
/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
- np->sibling = np->parent->child;
- np->allnext = allnodes;
- np->parent->child = np;
- allnodes = np;
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
* "Unplug" a node from the device tree. The caller must hold
* a reference to the node. The memory associated with the node
* is not freed until its refcount goes to zero.
Index: test-devicetree/drivers/of/of_dynamic.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ test-devicetree/drivers/of/of_dynamic.c 2009-11-18 19:21:31.000000000 -0600
@@ -0,0 +1,36 @@
+/*
+ * Procedures for creating, accessing and interpreting the device tree.
+ *
+ * Paul Mackerras August 1996.
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
+ * {engebret|bergner}@us.ibm.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/of.h>
+
+/* temporary while merging */
+extern struct device_node *allnodes;
+extern rwlock_t devtree_lock;
+
+/*
+ * Plug a device node into the tree and global list.
+ */
+void of_attach_node(struct device_node *np)
+{
+ unsigned long flags;
+
+ write_lock_irqsave(&devtree_lock, flags);
+ np->sibling = np->parent->child;
+ np->allnext = allnodes;
+ np->parent->child = np;
+ allnodes = np;
+ write_unlock_irqrestore(&devtree_lock, flags);
+}
+
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/4] Merge of_detach_node
[not found] ` <4B03620C.2060105-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
@ 2009-11-18 21:45 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 21:45 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Merge the common of_detach_node() from powerpc and microblaze into the common
drivers/of/of_dynamic.c
Updated patch that should apply cleanly to test-devicetree, now with diffstat
output.
Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
---
arch/microblaze/kernel/prom.c | 44 ------------------------------------------
arch/powerpc/kernel/prom.c | 44 ------------------------------------------
drivers/of/of_dynamic.c | 43 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+), 88 deletions(-)
Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c 2009-11-18 19:21:31.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c 2009-11-18 19:23:04.000000000 -0600
@@ -482,50 +482,6 @@
}
EXPORT_SYMBOL(of_node_put);
-/*
- * "Unplug" a node from the device tree. The caller must hold
- * a reference to the node. The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
- struct device_node *parent;
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
-
- parent = np->parent;
- if (!parent)
- goto out_unlock;
-
- if (allnodes == np)
- allnodes = np->allnext;
- else {
- struct device_node *prev;
- for (prev = allnodes;
- prev->allnext != np;
- prev = prev->allnext)
- ;
- prev->allnext = np->allnext;
- }
-
- if (parent->child == np)
- parent->child = np->sibling;
- else {
- struct device_node *prevsib;
- for (prevsib = np->parent->child;
- prevsib->sibling != np;
- prevsib = prevsib->sibling)
- ;
- prevsib->sibling = np->sibling;
- }
-
- of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
#if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
static struct debugfs_blob_wrapper flat_dt_blob;
Index: test-devicetree/arch/powerpc/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/powerpc/kernel/prom.c 2009-11-18 19:21:31.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c 2009-11-18 19:22:22.000000000 -0600
@@ -935,50 +935,6 @@
}
EXPORT_SYMBOL(of_node_put);
-/*
- * "Unplug" a node from the device tree. The caller must hold
- * a reference to the node. The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
- struct device_node *parent;
- unsigned long flags;
-
- write_lock_irqsave(&devtree_lock, flags);
-
- parent = np->parent;
- if (!parent)
- goto out_unlock;
-
- if (allnodes == np)
- allnodes = np->allnext;
- else {
- struct device_node *prev;
- for (prev = allnodes;
- prev->allnext != np;
- prev = prev->allnext)
- ;
- prev->allnext = np->allnext;
- }
-
- if (parent->child == np)
- parent->child = np->sibling;
- else {
- struct device_node *prevsib;
- for (prevsib = np->parent->child;
- prevsib->sibling != np;
- prevsib = prevsib->sibling)
- ;
- prevsib->sibling = np->sibling;
- }
-
- of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
- write_unlock_irqrestore(&devtree_lock, flags);
-}
-
#ifdef CONFIG_PPC_PSERIES
/*
* Fix up the uninitialized fields in a new device node:
Index: test-devicetree/drivers/of/of_dynamic.c
===================================================================
--- test-devicetree.orig/drivers/of/of_dynamic.c 2009-11-18 19:21:31.000000000 -0600
+++ test-devicetree/drivers/of/of_dynamic.c 2009-11-18 19:22:22.000000000 -0600
@@ -34,3 +34,46 @@
write_unlock_irqrestore(&devtree_lock, flags);
}
+/*
+ * "Unplug" a node from the device tree. The caller must hold
+ * a reference to the node. The memory associated with the node
+ * is not freed until its refcount goes to zero.
+ */
+void of_detach_node(struct device_node *np)
+{
+ struct device_node *parent;
+ unsigned long flags;
+
+ write_lock_irqsave(&devtree_lock, flags);
+
+ parent = np->parent;
+ if (!parent)
+ goto out_unlock;
+
+ if (allnodes == np)
+ allnodes = np->allnext;
+ else {
+ struct device_node *prev;
+ for (prev = allnodes;
+ prev->allnext != np;
+ prev = prev->allnext)
+ ;
+ prev->allnext = np->allnext;
+ }
+
+ if (parent->child == np)
+ parent->child = np->sibling;
+ else {
+ struct device_node *prevsib;
+ for (prevsib = np->parent->child;
+ prevsib->sibling != np;
+ prevsib = prevsib->sibling)
+ ;
+ prevsib->sibling = np->sibling;
+ }
+
+ of_node_set_flag(np, OF_DETACHED);
+
+out_unlock:
+ write_unlock_irqrestore(&devtree_lock, flags);
+}
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/4] Makefile and Kconfig updates for of_dynamci
[not found] ` <4B036256.9060809-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
@ 2009-11-18 21:46 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 21:46 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Update the Kconfig and Makefile files for drivers/of, powerpc and microblaze
to properly configure for CONFIG_OF_DYNAMIC to build the of_dynamic code.
Updated patch that should apply cleanly to test-devicetree, now with diffstat
output.
Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
---
arch/microblaze/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
drivers/of/Kconfig | 4 ++++
drivers/of/Makefile | 1 +
4 files changed, 7 insertions(+)
Index: test-devicetree/arch/microblaze/Kconfig
===================================================================
--- test-devicetree.orig/arch/microblaze/Kconfig 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/microblaze/Kconfig 2009-11-18 19:26:22.000000000 -0600
@@ -112,6 +112,7 @@
config OF
def_bool y
select OF_FLATTREE
+ select OF_DYNAMIC
config PROC_DEVICETREE
bool "Support for device tree in /proc"
Index: test-devicetree/arch/powerpc/Kconfig
===================================================================
--- test-devicetree.orig/arch/powerpc/Kconfig 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/powerpc/Kconfig 2009-11-18 19:25:25.000000000 -0600
@@ -164,6 +164,7 @@
config OF
def_bool y
select OF_FLATTREE
+ select OF_DYNAMIC
config PPC_UDBG_16550
bool
Index: test-devicetree/drivers/of/Kconfig
===================================================================
--- test-devicetree.orig/drivers/of/Kconfig 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/drivers/of/Kconfig 2009-11-18 19:24:00.000000000 -0600
@@ -2,6 +2,10 @@
bool
depends on OF
+config OF_DYNAMIC
+ bool
+ depends on OF
+
config OF_DEVICE
def_bool y
depends on OF && (SPARC || PPC_OF || MICROBLAZE)
Index: test-devicetree/drivers/of/Makefile
===================================================================
--- test-devicetree.orig/drivers/of/Makefile 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/drivers/of/Makefile 2009-11-18 19:24:00.000000000 -0600
@@ -1,5 +1,6 @@
obj-y = base.o
obj-$(CONFIG_OF_FLATTREE) += fdt.o
+obj-$(CONFIG_OF_DYNAMIC) += of_dynamic.o
obj-$(CONFIG_OF_DEVICE) += device.o platform.o
obj-$(CONFIG_OF_GPIO) += gpio.o
obj-$(CONFIG_OF_I2C) += of_i2c.o
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] Move of_node[attach, detach] declarations to linux/of.h
[not found] ` <4B03629A.9050503-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
@ 2009-11-18 21:48 ` Nathan Fontenot
[not found] ` <4B046B92.3060108-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-18 21:48 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
Merge the declarations of of_attach_node and of_detach_node from the asm/prom.h
headers of powerpc and microblaze into linux/of.h.
This update also requires adding linux/of.h to the include list for
powerpc/platforms/pseries/reconfig.h.
Updated patch that should apply cleanly to test-devicetree, now with
diffstat output.
Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
---
arch/microblaze/include/asm/prom.h | 4 ----
arch/powerpc/include/asm/prom.h | 4 ----
arch/powerpc/platforms/pseries/reconfig.c | 1 +
include/linux/of.h | 6 ++++++
4 files changed, 7 insertions(+), 8 deletions(-)
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h 2009-11-18 19:26:53.000000000 -0600
@@ -39,10 +39,6 @@
extern rwlock_t devtree_lock; /* temporary while merging */
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
/* Other Prototypes */
extern int early_uartlite_console(void);
Index: test-devicetree/arch/powerpc/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/powerpc/include/asm/prom.h 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h 2009-11-18 19:27:32.000000000 -0600
@@ -34,10 +34,6 @@
#define HAVE_ARCH_DEVTREE_FIXUPS
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
#ifdef CONFIG_PPC32
/*
* PCI <-> OF matching functions
Index: test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- test-devicetree.orig/arch/powerpc/platforms/pseries/reconfig.c 2009-11-18 17:23:40.000000000 -0600
+++ test-devicetree/arch/powerpc/platforms/pseries/reconfig.c 2009-11-18 19:26:53.000000000 -0600
@@ -15,6 +15,7 @@
#include <linux/kref.h>
#include <linux/notifier.h>
#include <linux/proc_fs.h>
+#include <linux/of.h>
#include <asm/prom.h>
#include <asm/machdep.h>
Index: test-devicetree/include/linux/of.h
===================================================================
--- test-devicetree.orig/include/linux/of.h 2009-11-18 17:34:36.000000000 -0600
+++ test-devicetree/include/linux/of.h 2009-11-18 19:26:53.000000000 -0600
@@ -187,4 +187,10 @@
const char *list_name, const char *cells_name, int index,
struct device_node **out_node, const void **out_args);
+#ifdef CONFIG_OF_DYNAMIC
+/* For updating the device tree at runtime */
+extern void of_attach_node(struct device_node *);
+extern void of_detach_node(struct device_node *);
+#endif
+
#endif /* _LINUX_OF_H */
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] Move of_node[attach, detach] declarations to linux/of.h
[not found] ` <4B046B92.3060108-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
@ 2009-11-19 5:35 ` Andres Salomon
[not found] ` <20091119003517.677a5b02-d8A+jLeiQi/1Xlz9cAVuGNHuzzzSOjJt@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Andres Salomon @ 2009-11-19 5:35 UTC (permalink / raw)
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A
On Wed, 18 Nov 2009 15:48:02 -0600
Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> wrote:
> Merge the declarations of of_attach_node and of_detach_node from the
> asm/prom.h headers of powerpc and microblaze into linux/of.h.
>
> This update also requires adding linux/of.h to the include list for
> powerpc/platforms/pseries/reconfig.h.
>
> Updated patch that should apply cleanly to test-devicetree, now with
> diffstat output.
>
> Signed-off-by: Nathan Fontenot
> <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> ---
> arch/microblaze/include/asm/prom.h | 4 ----
> arch/powerpc/include/asm/prom.h | 4 ----
> arch/powerpc/platforms/pseries/reconfig.c | 1 +
> include/linux/of.h | 6 ++++++
> 4 files changed, 7 insertions(+), 8 deletions(-)
>
> Index: test-devicetree/arch/microblaze/include/asm/prom.h
> ===================================================================
> --- test-devicetree.orig/arch/microblaze/include/asm/prom.h
> 2009-11-18 17:34:36.000000000 -0600 +++
> test-devicetree/arch/microblaze/include/asm/prom.h 2009-11-18
> 19:26:53.000000000 -0600 @@ -39,10 +39,6 @@
> extern rwlock_t devtree_lock; /* temporary while merging */
>
> -/* For updating the device tree at runtime */
> -extern void of_attach_node(struct device_node *);
> -extern void of_detach_node(struct device_node *);
> -
Minor points, but I'd recommend moving the declarations at the same
time as the definitions. That is, move the of_attach_node declaration
in patch1 and of_detach_node declaration in patch2.
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> Index: test-devicetree/arch/powerpc/include/asm/prom.h
> ===================================================================
> --- test-devicetree.orig/arch/powerpc/include/asm/prom.h
> 2009-11-18 17:34:36.000000000 -0600 +++
> test-devicetree/arch/powerpc/include/asm/prom.h 2009-11-18
> 19:27:32.000000000 -0600 @@ -34,10 +34,6 @@
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> -/* For updating the device tree at runtime */
> -extern void of_attach_node(struct device_node *);
> -extern void of_detach_node(struct device_node *);
> -
> #ifdef CONFIG_PPC32
> /*
> * PCI <-> OF matching functions
> Index: test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
> ===================================================================
> ---
> test-devicetree.orig/arch/powerpc/platforms/pseries/reconfig.c
> 2009-11-18 17:23:40.000000000 -0600 +++
> test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
> 2009-11-18 19:26:53.000000000 -0600 @@ -15,6 +15,7 @@ #include
> <linux/kref.h> #include <linux/notifier.h> #include <linux/proc_fs.h>
> +#include <linux/of.h>
>
> #include <asm/prom.h>
> #include <asm/machdep.h>
> Index: test-devicetree/include/linux/of.h
> ===================================================================
> --- test-devicetree.orig/include/linux/of.h 2009-11-18
> 17:34:36.000000000 -0600 +++
> test-devicetree/include/linux/of.h 2009-11-18
> 19:26:53.000000000 -0600 @@ -187,4 +187,10 @@ const char *list_name,
> const char *cells_name, int index, struct device_node **out_node,
> const void **out_args);
> +#ifdef CONFIG_OF_DYNAMIC
> +/* For updating the device tree at runtime */
> +extern void of_attach_node(struct device_node *);
> +extern void of_detach_node(struct device_node *);
> +#endif
> +
> #endif /* _LINUX_OF_H */
The trend seems to be a different header file per config option.
"of_dynamic.h" would be the logic extension of that..
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] Move of_node[attach, detach] declarations to linux/of.h
[not found] ` <20091119003517.677a5b02-d8A+jLeiQi/1Xlz9cAVuGNHuzzzSOjJt@public.gmane.org>
@ 2009-11-19 20:32 ` Nathan Fontenot
0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-19 20:32 UTC (permalink / raw)
To: Andres Salomon; +Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A
Andres Salomon wrote:
>> -/* For updating the device tree at runtime */
>> -extern void of_attach_node(struct device_node *);
>> -extern void of_detach_node(struct device_node *);
>> -
>
> Minor points, but I'd recommend moving the declarations at the same
> time as the definitions. That is, move the of_attach_node declaration
> in patch1 and of_detach_node declaration in patch2.
>
No problem, I'll update the patches to do this.
---
>> ===================================================================
>> --- test-devicetree.orig/include/linux/of.h 2009-11-18
>> 17:34:36.000000000 -0600 +++
>> test-devicetree/include/linux/of.h 2009-11-18
>> 19:26:53.000000000 -0600 @@ -187,4 +187,10 @@ const char *list_name,
>> const char *cells_name, int index, struct device_node **out_node,
>> const void **out_args);
>> +#ifdef CONFIG_OF_DYNAMIC
>> +/* For updating the device tree at runtime */
>> +extern void of_attach_node(struct device_node *);
>> +extern void of_detach_node(struct device_node *);
>> +#endif
>> +
>> #endif /* _LINUX_OF_H */
>
> The trend seems to be a different header file per config option.
> "of_dynamic.h" would be the logic extension of that..
>
Works for me, updated patches coming soon.
-Nathan Fontenot
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-11-19 20:32 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 21:04 [PATCH 0/4] Merge OF dynamic patches Nathan Fontenot
2009-11-17 21:04 ` Nathan Fontenot
[not found] ` <4B030FC2.9070401-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-18 2:53 ` [PATCH 1/4] Merge of_attach_node Nathan Fontenot
2009-11-18 2:53 ` Nathan Fontenot
[not found] ` <4B0361A9.20209-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-18 21:44 ` Nathan Fontenot
2009-11-18 2:55 ` [PATCH 2/4] Merge of_detach_node Nathan Fontenot
[not found] ` <4B03620C.2060105-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-18 21:45 ` Nathan Fontenot
2009-11-18 2:56 ` [PATCH 3/4] Makefile and Kconfig updates for of_dynamci Nathan Fontenot
[not found] ` <4B036256.9060809-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-18 21:46 ` Nathan Fontenot
2009-11-18 2:57 ` [PATCH 4/4] Move of_node[attach,detach] declarations to linux/of.h Nathan Fontenot
[not found] ` <4B03629A.9050503-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-18 21:48 ` [PATCH 4/4] Move of_node[attach, detach] " Nathan Fontenot
[not found] ` <4B046B92.3060108-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-19 5:35 ` Andres Salomon
[not found] ` <20091119003517.677a5b02-d8A+jLeiQi/1Xlz9cAVuGNHuzzzSOjJt@public.gmane.org>
2009-11-19 20:32 ` Nathan Fontenot
2009-11-18 10:41 ` [PATCH 0/4] Merge OF dynamic patches Wolfram Sang
2009-11-18 10:41 ` Wolfram Sang
[not found] ` <20091118104147.GD5166-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-11-18 20:16 ` Nathan Fontenot
2009-11-18 20:16 ` Nathan Fontenot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.