All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 v2] Merge OF dynamic patches
@ 2009-11-20 15:01 ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:01 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ

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 - Update powerpc/pseries to include of_dynamic.h

 arch/microblaze/Kconfig                   |    1 
 arch/microblaze/include/asm/prom.h        |    4 -
 arch/microblaze/kernel/prom.c             |   59 -----------------------
 arch/powerpc/Kconfig                      |    1 
 arch/powerpc/include/asm/prom.h           |    4 -
 arch/powerpc/kernel/prom.c                |   59 -----------------------
 arch/powerpc/platforms/pseries/reconfig.c |    1 
 drivers/of/Kconfig                        |    4 +
 drivers/of/Makefile                       |    1 
 drivers/of/of_dynamic.c                   |   75 ++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h                |   27 ++++++++++
 11 files changed, 110 insertions(+), 126 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 0/4 v2] Merge OF dynamic patches
@ 2009-11-20 15:01 ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:01 UTC (permalink / raw)
  To: devicetree-discuss, linuxppc-dev, 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 - Update powerpc/pseries to include of_dynamic.h

 arch/microblaze/Kconfig                   |    1 
 arch/microblaze/include/asm/prom.h        |    4 -
 arch/microblaze/kernel/prom.c             |   59 -----------------------
 arch/powerpc/Kconfig                      |    1 
 arch/powerpc/include/asm/prom.h           |    4 -
 arch/powerpc/kernel/prom.c                |   59 -----------------------
 arch/powerpc/platforms/pseries/reconfig.c |    1 
 drivers/of/Kconfig                        |    4 +
 drivers/of/Makefile                       |    1 
 drivers/of/of_dynamic.c                   |   75 ++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h                |   27 ++++++++++
 11 files changed, 110 insertions(+), 126 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/4 v2] Merge of_attach_node
  2009-11-20 15:01 ` Nathan Fontenot
@ 2009-11-20 15:05     ` Nathan Fontenot
  -1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:05 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-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>

---
 arch/microblaze/include/asm/prom.h |    1 -
 arch/microblaze/kernel/prom.c      |   15 ---------------
 arch/powerpc/include/asm/prom.h    |    1 -
 arch/powerpc/kernel/prom.c         |   15 ---------------
 drivers/of/of_dynamic.c            |   32 ++++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h         |   26 ++++++++++++++++++++++++++
 6 files changed, 58 insertions(+), 32 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-20 11:59:03.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-20 11:59:03.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-20 12:27:24.000000000 -0600
@@ -0,0 +1,32 @@
+/*
+ * Procedures for dynamically updating 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_dynamic.h>
+
+/*
+ * 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);
+}
+
Index: test-devicetree/include/linux/of_dynamic.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ test-devicetree/include/linux/of_dynamic.h	2009-11-20 12:27:09.000000000 -0600
@@ -0,0 +1,26 @@
+/*
+ * Definitions for dynamically updating 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.
+ */
+
+#ifndef _LINUX_OF_DYNAMIC_H
+#define _LINUX_OF_DYNAMIC_H
+
+#include <linux/of.h>
+
+/* temporary while merging */
+extern struct device_node *allnodes;
+extern rwlock_t devtree_lock;
+
+extern void of_attach_node(struct device_node *);
+#endif
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h	2009-11-20 12:24:47.000000000 -0600
@@ -40,7 +40,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 */
Index: test-devicetree/arch/powerpc/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/powerpc/include/asm/prom.h	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h	2009-11-20 12:24:07.000000000 -0600
@@ -35,7 +35,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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/4 v2] Merge of_attach_node
@ 2009-11-20 15:05     ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:05 UTC (permalink / raw)
  To: devicetree-discuss, linuxppc-dev, 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>

---
 arch/microblaze/include/asm/prom.h |    1 -
 arch/microblaze/kernel/prom.c      |   15 ---------------
 arch/powerpc/include/asm/prom.h    |    1 -
 arch/powerpc/kernel/prom.c         |   15 ---------------
 drivers/of/of_dynamic.c            |   32 ++++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h         |   26 ++++++++++++++++++++++++++
 6 files changed, 58 insertions(+), 32 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-20 11:59:03.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-20 11:59:03.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-20 12:27:24.000000000 -0600
@@ -0,0 +1,32 @@
+/*
+ * Procedures for dynamically updating 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_dynamic.h>
+
+/*
+ * 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);
+}
+
Index: test-devicetree/include/linux/of_dynamic.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ test-devicetree/include/linux/of_dynamic.h	2009-11-20 12:27:09.000000000 -0600
@@ -0,0 +1,26 @@
+/*
+ * Definitions for dynamically updating 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.
+ */
+
+#ifndef _LINUX_OF_DYNAMIC_H
+#define _LINUX_OF_DYNAMIC_H
+
+#include <linux/of.h>
+
+/* temporary while merging */
+extern struct device_node *allnodes;
+extern rwlock_t devtree_lock;
+
+extern void of_attach_node(struct device_node *);
+#endif
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h	2009-11-20 12:24:47.000000000 -0600
@@ -40,7 +40,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 */
Index: test-devicetree/arch/powerpc/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/powerpc/include/asm/prom.h	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h	2009-11-20 12:24:07.000000000 -0600
@@ -35,7 +35,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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/4 v2] Merge of_detach_node
  2009-11-20 15:01 ` Nathan Fontenot
@ 2009-11-20 15:06     ` Nathan Fontenot
  -1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:06 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ

Merge the common of_detach_node() from powerpc and microblaze into the common
drivers/of/of_dynamic.c

Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>

---
 arch/microblaze/include/asm/prom.h |    3 --
 arch/microblaze/kernel/prom.c      |   44 -------------------------------------
 arch/powerpc/include/asm/prom.h    |    3 --
 arch/powerpc/kernel/prom.c         |   44 -------------------------------------
 drivers/of/of_dynamic.c            |   43 ++++++++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h         |    1 
 6 files changed, 44 insertions(+), 94 deletions(-)

Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c	2009-11-20 11:59:03.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c	2009-11-20 12:28:33.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-20 11:59:03.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c	2009-11-20 12:28:33.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-20 12:27:24.000000000 -0600
+++ test-devicetree/drivers/of/of_dynamic.c	2009-11-20 12:28:33.000000000 -0600
@@ -30,3 +30,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);
+}
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h	2009-11-20 12:24:47.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h	2009-11-20 12:30:33.000000000 -0600
@@ -39,9 +39,6 @@
 
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-/* For updating the device tree at runtime */
-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-20 12:24:07.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h	2009-11-20 12:30:41.000000000 -0600
@@ -34,9 +34,6 @@
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For updating the device tree at runtime */
-extern void of_detach_node(struct device_node *);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
Index: test-devicetree/include/linux/of_dynamic.h
===================================================================
--- test-devicetree.orig/include/linux/of_dynamic.h	2009-11-20 12:27:09.000000000 -0600
+++ test-devicetree/include/linux/of_dynamic.h	2009-11-20 12:30:22.000000000 -0600
@@ -23,4 +23,5 @@
 extern rwlock_t devtree_lock;
 
 extern void of_attach_node(struct device_node *);
+extern void of_detach_node(struct device_node *);
 #endif

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/4 v2] Merge of_detach_node
@ 2009-11-20 15:06     ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:06 UTC (permalink / raw)
  To: devicetree-discuss, linuxppc-dev, 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>

---
 arch/microblaze/include/asm/prom.h |    3 --
 arch/microblaze/kernel/prom.c      |   44 -------------------------------------
 arch/powerpc/include/asm/prom.h    |    3 --
 arch/powerpc/kernel/prom.c         |   44 -------------------------------------
 drivers/of/of_dynamic.c            |   43 ++++++++++++++++++++++++++++++++++++
 include/linux/of_dynamic.h         |    1 
 6 files changed, 44 insertions(+), 94 deletions(-)

Index: test-devicetree/arch/microblaze/kernel/prom.c
===================================================================
--- test-devicetree.orig/arch/microblaze/kernel/prom.c	2009-11-20 11:59:03.000000000 -0600
+++ test-devicetree/arch/microblaze/kernel/prom.c	2009-11-20 12:28:33.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-20 11:59:03.000000000 -0600
+++ test-devicetree/arch/powerpc/kernel/prom.c	2009-11-20 12:28:33.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-20 12:27:24.000000000 -0600
+++ test-devicetree/drivers/of/of_dynamic.c	2009-11-20 12:28:33.000000000 -0600
@@ -30,3 +30,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);
+}
Index: test-devicetree/arch/microblaze/include/asm/prom.h
===================================================================
--- test-devicetree.orig/arch/microblaze/include/asm/prom.h	2009-11-20 12:24:47.000000000 -0600
+++ test-devicetree/arch/microblaze/include/asm/prom.h	2009-11-20 12:30:33.000000000 -0600
@@ -39,9 +39,6 @@
 
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-/* For updating the device tree at runtime */
-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-20 12:24:07.000000000 -0600
+++ test-devicetree/arch/powerpc/include/asm/prom.h	2009-11-20 12:30:41.000000000 -0600
@@ -34,9 +34,6 @@
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For updating the device tree at runtime */
-extern void of_detach_node(struct device_node *);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
Index: test-devicetree/include/linux/of_dynamic.h
===================================================================
--- test-devicetree.orig/include/linux/of_dynamic.h	2009-11-20 12:27:09.000000000 -0600
+++ test-devicetree/include/linux/of_dynamic.h	2009-11-20 12:30:22.000000000 -0600
@@ -23,4 +23,5 @@
 extern rwlock_t devtree_lock;
 
 extern void of_attach_node(struct device_node *);
+extern void of_detach_node(struct device_node *);
 #endif

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 3/4 v2] Makefile and Kconfig updates
  2009-11-20 15:01 ` Nathan Fontenot
@ 2009-11-20 15:08     ` Nathan Fontenot
  -1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:08 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-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.

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-20 11:59:01.000000000 -0600
+++ test-devicetree/arch/microblaze/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/arch/powerpc/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/drivers/of/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/drivers/of/Makefile	2009-11-20 12:35:41.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

* [PATCH 3/4 v2] Makefile and Kconfig updates
@ 2009-11-20 15:08     ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:08 UTC (permalink / raw)
  To: devicetree-discuss, linuxppc-dev, 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>
---

 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-20 11:59:01.000000000 -0600
+++ test-devicetree/arch/microblaze/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/arch/powerpc/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/drivers/of/Kconfig	2009-11-20 12:35:41.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-20 11:59:01.000000000 -0600
+++ test-devicetree/drivers/of/Makefile	2009-11-20 12:35:41.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

* [PATCH 4/4 v2] Include of_dynamic.h in pseries/reconfig.c
  2009-11-20 15:01 ` Nathan Fontenot
@ 2009-11-20 15:09     ` Nathan Fontenot
  -1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:09 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ

Include the newly created linux/of_dynamic.h to pick up the 
of_[attach,detach]_node declarations.

Signed-off-by: Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>

---
 arch/powerpc/platforms/pseries/reconfig.c |    1 +
 1 file changed, 1 insertion(+)

Index: test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- test-devicetree.orig/arch/powerpc/platforms/pseries/reconfig.c	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/powerpc/platforms/pseries/reconfig.c	2009-11-20 12:37:32.000000000 -0600
@@ -15,6 +15,7 @@
 #include <linux/kref.h>
 #include <linux/notifier.h>
 #include <linux/proc_fs.h>
+#include <linux/of_dynamic.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 4/4 v2] Include of_dynamic.h in pseries/reconfig.c
@ 2009-11-20 15:09     ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-20 15:09 UTC (permalink / raw)
  To: devicetree-discuss, linuxppc-dev, microblaze-uclinux

Include the newly created linux/of_dynamic.h to pick up the 
of_[attach,detach]_node declarations.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>

---
 arch/powerpc/platforms/pseries/reconfig.c |    1 +
 1 file changed, 1 insertion(+)

Index: test-devicetree/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- test-devicetree.orig/arch/powerpc/platforms/pseries/reconfig.c	2009-11-20 11:59:00.000000000 -0600
+++ test-devicetree/arch/powerpc/platforms/pseries/reconfig.c	2009-11-20 12:37:32.000000000 -0600
@@ -15,6 +15,7 @@
 #include <linux/kref.h>
 #include <linux/notifier.h>
 #include <linux/proc_fs.h>
+#include <linux/of_dynamic.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4 v2] Merge OF dynamic patches
  2009-11-20 15:01 ` Nathan Fontenot
@ 2009-11-20 21:40     ` Grant Likely
  -1 siblings, 0 replies; 17+ messages in thread
From: Grant Likely @ 2009-11-20 21:40 UTC (permalink / raw)
  To: Nathan Fontenot
  Cc: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

On Fri, Nov 20, 2009 at 8:01 AM, Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> 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.

Heh.  Actually, I've got a patch in my tree that does the same thing
(except to a different location).  I could pick up your version and
drop mine, but you need to rework it to be bi-sectable.  As the series
exists right now, the build will fail if only part of the series is
applied.  This change is simple enough that you can do the whole thing
in a single patch.  Or, fix the Kconfig and include stuff in the first
patch with the merge of of_attach_node, and then move of_detach_node
in the second.

But I'm really close to posting my 3rd series, so it may be better to
wait until that is published and build a patch on top of that to move
them into of_dynamic.c

Cheers,
g.

> ---
>
> 1/4 - Merge of_attach_node
> 2/4 - Merge of_detach_node
> 3/4 - Makefile/Kconfig updates
> 4/4 - Update powerpc/pseries to include of_dynamic.h
>
> arch/microblaze/Kconfig                   |    1
> arch/microblaze/include/asm/prom.h        |    4 -
> arch/microblaze/kernel/prom.c             |   59 -----------------------
> arch/powerpc/Kconfig                      |    1
> arch/powerpc/include/asm/prom.h           |    4 -
> arch/powerpc/kernel/prom.c                |   59 -----------------------
> arch/powerpc/platforms/pseries/reconfig.c |    1 drivers/of/Kconfig
>                |    4 +
> drivers/of/Makefile                       |    1 drivers/of/of_dynamic.c
>               |   75 ++++++++++++++++++++++++++++++
> include/linux/of_dynamic.h                |   27 ++++++++++
> 11 files changed, 110 insertions(+), 126 deletions(-)
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4 v2] Merge OF dynamic patches
@ 2009-11-20 21:40     ` Grant Likely
  0 siblings, 0 replies; 17+ messages in thread
From: Grant Likely @ 2009-11-20 21:40 UTC (permalink / raw)
  To: Nathan Fontenot; +Cc: microblaze-uclinux, devicetree-discuss, linuxppc-dev

On Fri, Nov 20, 2009 at 8:01 AM, Nathan Fontenot <nfont@austin.ibm.com> wro=
te:
> 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.

Heh.  Actually, I've got a patch in my tree that does the same thing
(except to a different location).  I could pick up your version and
drop mine, but you need to rework it to be bi-sectable.  As the series
exists right now, the build will fail if only part of the series is
applied.  This change is simple enough that you can do the whole thing
in a single patch.  Or, fix the Kconfig and include stuff in the first
patch with the merge of of_attach_node, and then move of_detach_node
in the second.

But I'm really close to posting my 3rd series, so it may be better to
wait until that is published and build a patch on top of that to move
them into of_dynamic.c

Cheers,
g.

> ---
>
> 1/4 - Merge of_attach_node
> 2/4 - Merge of_detach_node
> 3/4 - Makefile/Kconfig updates
> 4/4 - Update powerpc/pseries to include of_dynamic.h
>
> arch/microblaze/Kconfig =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01
> arch/microblaze/include/asm/prom.h =A0 =A0 =A0 =A0| =A0 =A04 -
> arch/microblaze/kernel/prom.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0 59 ----------=
-------------
> arch/powerpc/Kconfig =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0=
1
> arch/powerpc/include/asm/prom.h =A0 =A0 =A0 =A0 =A0 | =A0 =A04 -
> arch/powerpc/kernel/prom.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 59 ------=
-----------------
> arch/powerpc/platforms/pseries/reconfig.c | =A0 =A01 drivers/of/Kconfig
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A04 +
> drivers/of/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0=
1 drivers/of/of_dynamic.c
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 75 ++++++++++++++++++++++++++++++
> include/linux/of_dynamic.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 27 ++++++=
++++
> 11 files changed, 110 insertions(+), 126 deletions(-)
>



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4 v2] Merge OF dynamic patches
       [not found]     ` <fa686aa40911201340i77bc4098ud866d103acaefd30-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-11-20 22:17       ` Andres Salomon
  2009-11-23 13:27         ` Michal Simek
  2009-11-23 15:38         ` Nathan Fontenot
  2 siblings, 0 replies; 17+ messages in thread
From: Andres Salomon @ 2009-11-20 22:17 UTC (permalink / raw)
  To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

On Fri, 20 Nov 2009 14:40:22 -0700
Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
wrote:

[...]
> 
> But I'm really close to posting my 3rd series, so it may be better to
> wait until that is published and build a patch on top of that to move
> them into of_dynamic.c
> 

Do you have any plans to deal w/ creation of the fdt (specifically for
sparc)?  I'd like to get OLPC's devtree code upstream, which will
require the same type of thing as the firmware doesn't hand a binary
blob off to the kernel (afaik).

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 0/4 v2] Merge OF dynamic patches
  2009-11-20 21:40     ` Grant Likely
@ 2009-11-23 13:27         ` Michal Simek
  -1 siblings, 0 replies; 17+ messages in thread
From: Michal Simek @ 2009-11-23 13:27 UTC (permalink / raw)
  To: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

Grant Likely wrote:
> On Fri, Nov 20, 2009 at 8:01 AM, Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> 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.
> 
> Heh.  Actually, I've got a patch in my tree that does the same thing
> (except to a different location).  I could pick up your version and
> drop mine, but you need to rework it to be bi-sectable.  As the series
> exists right now, the build will fail if only part of the series is
> applied.  This change is simple enough that you can do the whole thing
> in a single patch.  Or, fix the Kconfig and include stuff in the first
> patch with the merge of of_attach_node, and then move of_detach_node
> in the second.
> 
> But I'm really close to posting my 3rd series, so it may be better to
> wait until that is published and build a patch on top of that to move
> them into of_dynamic.c

ACK.
Michal

> 
> Cheers,
> g.
> 
>> ---
>>
>> 1/4 - Merge of_attach_node
>> 2/4 - Merge of_detach_node
>> 3/4 - Makefile/Kconfig updates
>> 4/4 - Update powerpc/pseries to include of_dynamic.h
>>
>> arch/microblaze/Kconfig                   |    1
>> arch/microblaze/include/asm/prom.h        |    4 -
>> arch/microblaze/kernel/prom.c             |   59 -----------------------
>> arch/powerpc/Kconfig                      |    1
>> arch/powerpc/include/asm/prom.h           |    4 -
>> arch/powerpc/kernel/prom.c                |   59 -----------------------
>> arch/powerpc/platforms/pseries/reconfig.c |    1 drivers/of/Kconfig
>>                |    4 +
>> drivers/of/Makefile                       |    1 drivers/of/of_dynamic.c
>>               |   75 ++++++++++++++++++++++++++++++
>> include/linux/of_dynamic.h                |   27 ++++++++++
>> 11 files changed, 110 insertions(+), 126 deletions(-)
>>
> 
> 
> 


-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 0/4 v2] Merge OF dynamic patches
@ 2009-11-23 13:27         ` Michal Simek
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Simek @ 2009-11-23 13:27 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: devicetree-discuss, linuxppc-dev

Grant Likely wrote:
> On Fri, Nov 20, 2009 at 8:01 AM, Nathan Fontenot <nfont@austin.ibm.com> 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.
> 
> Heh.  Actually, I've got a patch in my tree that does the same thing
> (except to a different location).  I could pick up your version and
> drop mine, but you need to rework it to be bi-sectable.  As the series
> exists right now, the build will fail if only part of the series is
> applied.  This change is simple enough that you can do the whole thing
> in a single patch.  Or, fix the Kconfig and include stuff in the first
> patch with the merge of of_attach_node, and then move of_detach_node
> in the second.
> 
> But I'm really close to posting my 3rd series, so it may be better to
> wait until that is published and build a patch on top of that to move
> them into of_dynamic.c

ACK.
Michal

> 
> Cheers,
> g.
> 
>> ---
>>
>> 1/4 - Merge of_attach_node
>> 2/4 - Merge of_detach_node
>> 3/4 - Makefile/Kconfig updates
>> 4/4 - Update powerpc/pseries to include of_dynamic.h
>>
>> arch/microblaze/Kconfig                   |    1
>> arch/microblaze/include/asm/prom.h        |    4 -
>> arch/microblaze/kernel/prom.c             |   59 -----------------------
>> arch/powerpc/Kconfig                      |    1
>> arch/powerpc/include/asm/prom.h           |    4 -
>> arch/powerpc/kernel/prom.c                |   59 -----------------------
>> arch/powerpc/platforms/pseries/reconfig.c |    1 drivers/of/Kconfig
>>                |    4 +
>> drivers/of/Makefile                       |    1 drivers/of/of_dynamic.c
>>               |   75 ++++++++++++++++++++++++++++++
>> include/linux/of_dynamic.h                |   27 ++++++++++
>> 11 files changed, 110 insertions(+), 126 deletions(-)
>>
> 
> 
> 


-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4 v2] Merge OF dynamic patches
  2009-11-20 21:40     ` Grant Likely
@ 2009-11-23 15:38         ` Nathan Fontenot
  -1 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-23 15:38 UTC (permalink / raw)
  To: Grant Likely
  Cc: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

Grant Likely wrote:
> 
> But I'm really close to posting my 3rd series, so it may be better to
> wait until that is published and build a patch on top of that to move
> them into of_dynamic.c
> 

Works for me.

-Nathan Fontenot

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4 v2] Merge OF dynamic patches
@ 2009-11-23 15:38         ` Nathan Fontenot
  0 siblings, 0 replies; 17+ messages in thread
From: Nathan Fontenot @ 2009-11-23 15:38 UTC (permalink / raw)
  To: Grant Likely; +Cc: microblaze-uclinux, devicetree-discuss, linuxppc-dev

Grant Likely wrote:
> 
> But I'm really close to posting my 3rd series, so it may be better to
> wait until that is published and build a patch on top of that to move
> them into of_dynamic.c
> 

Works for me.

-Nathan Fontenot

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-11-23 15:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 15:01 [PATCH 0/4 v2] Merge OF dynamic patches Nathan Fontenot
2009-11-20 15:01 ` Nathan Fontenot
     [not found] ` <4B06AF33.1000400-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2009-11-20 15:05   ` [PATCH 1/4 v2] Merge of_attach_node Nathan Fontenot
2009-11-20 15:05     ` Nathan Fontenot
2009-11-20 15:06   ` [PATCH 2/4 v2] Merge of_detach_node Nathan Fontenot
2009-11-20 15:06     ` Nathan Fontenot
2009-11-20 15:08   ` [PATCH 3/4 v2] Makefile and Kconfig updates Nathan Fontenot
2009-11-20 15:08     ` Nathan Fontenot
2009-11-20 15:09   ` [PATCH 4/4 v2] Include of_dynamic.h in pseries/reconfig.c Nathan Fontenot
2009-11-20 15:09     ` Nathan Fontenot
2009-11-20 21:40   ` [PATCH 0/4 v2] Merge OF dynamic patches Grant Likely
2009-11-20 21:40     ` Grant Likely
     [not found]     ` <fa686aa40911201340i77bc4098ud866d103acaefd30-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-20 22:17       ` Andres Salomon
2009-11-23 13:27       ` [microblaze-uclinux] " Michal Simek
2009-11-23 13:27         ` Michal Simek
2009-11-23 15:38       ` Nathan Fontenot
2009-11-23 15:38         ` 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.