All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  4:29 ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:29 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Well, I've got to start somewhere...

So here goes.  I've begun the work to merge and clean up the OF device
tree handling code and this is my first set of patches.  Not fully
tested yet, but I'm getting them out to the lists so that I can start
responding to comments and collecting acks.  This first batch isn't
anything exciting, just a merge of common code

---

Grant Likely (12):
      of: merge of_find_all_nodes() implementations
      of: merge other miscellaneous prototypes
      of: merge of_*_flat_dt*() functions
      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
      of: merge of_read_number() an of_read_ulong()
      of: merge of_node_*_flag() and set_node_proc_entry()
      of: merge struct boot_param_header from Microblaze and PowerPC
      of: add common header for flattened device tree representation
      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
      of: merge struct device_node
      of: merge phandle, ihandle and struct property
      of: Rework linux/of.h and asm/prom.h include ordering


 arch/microblaze/include/asm/prom.h |  135 +--------------------------------
 arch/microblaze/kernel/prom.c      |   23 ------
 arch/powerpc/include/asm/prom.h    |  147 ------------------------------------
 arch/powerpc/kernel/prom.c         |   23 ------
 arch/sparc/include/asm/prom.h      |   55 -------------
 drivers/of/base.c                  |   26 ++++++
 include/linux/of.h                 |  103 +++++++++++++++++++++++++
 include/linux/of_fdt.h             |   87 +++++++++++++++++++++
 8 files changed, 221 insertions(+), 378 deletions(-)
 create mode 100644 include/linux/of_fdt.h

-- 
Signature

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

* [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  4:29 ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:29 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Well, I've got to start somewhere...

So here goes.  I've begun the work to merge and clean up the OF device
tree handling code and this is my first set of patches.  Not fully
tested yet, but I'm getting them out to the lists so that I can start
responding to comments and collecting acks.  This first batch isn't
anything exciting, just a merge of common code

---

Grant Likely (12):
      of: merge of_find_all_nodes() implementations
      of: merge other miscellaneous prototypes
      of: merge of_*_flat_dt*() functions
      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
      of: merge of_read_number() an of_read_ulong()
      of: merge of_node_*_flag() and set_node_proc_entry()
      of: merge struct boot_param_header from Microblaze and PowerPC
      of: add common header for flattened device tree representation
      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
      of: merge struct device_node
      of: merge phandle, ihandle and struct property
      of: Rework linux/of.h and asm/prom.h include ordering


 arch/microblaze/include/asm/prom.h |  135 +--------------------------------
 arch/microblaze/kernel/prom.c      |   23 ------
 arch/powerpc/include/asm/prom.h    |  147 ------------------------------------
 arch/powerpc/kernel/prom.c         |   23 ------
 arch/sparc/include/asm/prom.h      |   55 -------------
 drivers/of/base.c                  |   26 ++++++
 include/linux/of.h                 |  103 +++++++++++++++++++++++++
 include/linux/of_fdt.h             |   87 +++++++++++++++++++++
 8 files changed, 221 insertions(+), 378 deletions(-)
 create mode 100644 include/linux/of_fdt.h

-- 
Signature

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

* [RFC PATCH 01/12] of: Rework linux/of.h and asm/prom.h include ordering
  2009-10-07  4:29 ` Grant Likely
  (?)
@ 2009-10-07  4:30   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

In preparation to prune things out of the Sparc, PowerPC and Microblaze
asm/prom.h files, change the #include statements to ensure that
even if asm/prom.h is included first, linux/of.h gets to determine the
order in which files are processed.

This patch adds a #include <linux/of.h> to each of the prom.h files
*above* the multi-include protection macros to ensure that linux/of.h
can define things before prom.h gets processed.

At the end of the merge the cross dependencies between the files should
be gone and a sane #include scheme can be restored.

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |    8 ++------
 arch/powerpc/include/asm/prom.h    |    7 +------
 arch/sparc/include/asm/prom.h      |    7 +------
 3 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 37e6f30..6636889 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -12,6 +12,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
+
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
@@ -305,12 +307,6 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB: This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* _ASM_MICROBLAZE_PROM_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..b0a84ea 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _POWERPC_PROM_H
 #define _POWERPC_PROM_H
 #ifdef __KERNEL__
@@ -349,11 +350,5 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PROM_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..0733170 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _SPARC_PROM_H
 #define _SPARC_PROM_H
 #ifdef __KERNEL__
@@ -108,12 +109,6 @@ static inline void irq_dispose_mapping(unsigned int virq)
 {
 }
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 extern struct device_node *of_console_device;
 extern char *of_console_path;
 extern char *of_console_options;

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

* [RFC PATCH 01/12] of: Rework linux/of.h and asm/prom.h include
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

In preparation to prune things out of the Sparc, PowerPC and Microblaze
asm/prom.h files, change the #include statements to ensure that
even if asm/prom.h is included first, linux/of.h gets to determine the
order in which files are processed.

This patch adds a #include <linux/of.h> to each of the prom.h files
*above* the multi-include protection macros to ensure that linux/of.h
can define things before prom.h gets processed.

At the end of the merge the cross dependencies between the files should
be gone and a sane #include scheme can be restored.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |    8 ++------
 arch/powerpc/include/asm/prom.h    |    7 +------
 arch/sparc/include/asm/prom.h      |    7 +------
 3 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 37e6f30..6636889 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -12,6 +12,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
+
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
@@ -305,12 +307,6 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB: This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* _ASM_MICROBLAZE_PROM_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..b0a84ea 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _POWERPC_PROM_H
 #define _POWERPC_PROM_H
 #ifdef __KERNEL__
@@ -349,11 +350,5 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PROM_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..0733170 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _SPARC_PROM_H
 #define _SPARC_PROM_H
 #ifdef __KERNEL__
@@ -108,12 +109,6 @@ static inline void irq_dispose_mapping(unsigned int virq)
 {
 }
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 extern struct device_node *of_console_device;
 extern char *of_console_path;
 extern char *of_console_options;


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

* [RFC PATCH 01/12] of: Rework linux/of.h and asm/prom.h include ordering
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

In preparation to prune things out of the Sparc, PowerPC and Microblaze
asm/prom.h files, change the #include statements to ensure that
even if asm/prom.h is included first, linux/of.h gets to determine the
order in which files are processed.

This patch adds a #include <linux/of.h> to each of the prom.h files
*above* the multi-include protection macros to ensure that linux/of.h
can define things before prom.h gets processed.

At the end of the merge the cross dependencies between the files should
be gone and a sane #include scheme can be restored.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |    8 ++------
 arch/powerpc/include/asm/prom.h    |    7 +------
 arch/sparc/include/asm/prom.h      |    7 +------
 3 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 37e6f30..6636889 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -12,6 +12,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
+
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
@@ -305,12 +307,6 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB: This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* _ASM_MICROBLAZE_PROM_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..b0a84ea 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _POWERPC_PROM_H
 #define _POWERPC_PROM_H
 #ifdef __KERNEL__
@@ -349,11 +350,5 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
  */
 extern void __iomem *of_iomap(struct device_node *device, int index);
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PROM_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..0733170 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -1,3 +1,4 @@
+#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
 #ifndef _SPARC_PROM_H
 #define _SPARC_PROM_H
 #ifdef __KERNEL__
@@ -108,12 +109,6 @@ static inline void irq_dispose_mapping(unsigned int virq)
 {
 }
 
-/*
- * NB:  This is here while we transition from using asm/prom.h
- * to linux/of.h
- */
-#include <linux/of.h>
-
 extern struct device_node *of_console_device;
 extern char *of_console_path;
 extern char *of_console_options;

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

* [RFC PATCH 02/12] of: merge phandle, ihandle and struct property
  2009-10-07  4:29 ` Grant Likely
                   ` (2 preceding siblings ...)
  (?)
@ 2009-10-07  4:30 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   10 ----------
 arch/powerpc/include/asm/prom.h    |   12 ------------
 arch/sparc/include/asm/prom.h      |   12 ------------
 include/linux/of.h                 |   12 ++++++++++++
 4 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6636889..11cb484 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,16 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index b0a84ea..c236326 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,18 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-
-
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 0733170..b34f988 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,18 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-	unsigned long _flags;
-	unsigned int unique_id;
-};
-
 struct of_irq_controller;
 struct device_node {
 	const char	*name;
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..4668b29 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,18 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+typedef u32 phandle;
+typedef u32 ihandle;
+
+struct property {
+	char	*name;
+	int	length;
+	void	*value;
+	struct property *next;
+	unsigned long _flags;
+	unsigned int unique_id;
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 02/12] of: merge phandle, ihandle and struct property
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:30   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   10 ----------
 arch/powerpc/include/asm/prom.h    |   12 ------------
 arch/sparc/include/asm/prom.h      |   12 ------------
 include/linux/of.h                 |   12 ++++++++++++
 4 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6636889..11cb484 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,16 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index b0a84ea..c236326 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,18 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-
-
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 0733170..b34f988 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,18 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-	unsigned long _flags;
-	unsigned int unique_id;
-};
-
 struct of_irq_controller;
 struct device_node {
 	const char	*name;
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..4668b29 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,18 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+typedef u32 phandle;
+typedef u32 ihandle;
+
+struct property {
+	char	*name;
+	int	length;
+	void	*value;
+	struct property *next;
+	unsigned long _flags;
+	unsigned int unique_id;
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */


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

* [RFC PATCH 02/12] of: merge phandle, ihandle and struct property
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   10 ----------
 arch/powerpc/include/asm/prom.h    |   12 ------------
 arch/sparc/include/asm/prom.h      |   12 ------------
 include/linux/of.h                 |   12 ++++++++++++
 4 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6636889..11cb484 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,16 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index b0a84ea..c236326 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,18 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-
-
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
-
 struct device_node {
 	const char *name;
 	const char *type;
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 0733170..b34f988 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,18 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-	unsigned long _flags;
-	unsigned int unique_id;
-};
-
 struct of_irq_controller;
 struct device_node {
 	const char	*name;
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..4668b29 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,18 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+typedef u32 phandle;
+typedef u32 ihandle;
+
+struct property {
+	char	*name;
+	int	length;
+	void	*value;
+	struct property *next;
+	unsigned long _flags;
+	unsigned int unique_id;
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 03/12] of: merge struct device_node
  2009-10-07  4:29 ` Grant Likely
  (?)
@ 2009-10-07  4:30   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   20 --------------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 arch/sparc/include/asm/prom.h      |   24 ------------------------
 include/linux/of.h                 |   32 ++++++++++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 11cb484..64e8b3a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,26 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct	property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next; /* next device of same type */
-	struct	device_node *allnext; /* next in list of all nodes */
-	struct	proc_dir_entry *pde; /* this node's proc directory */
-	struct	kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c236326..c918db5 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,26 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index b34f988..e5f4a1d 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,30 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-struct of_irq_controller;
-struct device_node {
-	const char	*name;
-	const char	*type;
-	phandle	node;
-	char	*path_component_name;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-	unsigned int unique_id;
-
-	struct of_irq_controller *irq_trans;
-};
-
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/include/linux/of.h b/include/linux/of.h
index 4668b29..65a158d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -17,6 +17,7 @@
  */
 #include <linux/types.h>
 #include <linux/bitops.h>
+#include <linux/kref.h>
 #include <linux/mod_devicetable.h>
 
 typedef u32 phandle;
@@ -31,6 +32,37 @@ struct property {
 	unsigned int unique_id;
 };
 
+#if defined(CONFIG_SPARC)
+struct of_irq_controller;
+#endif
+
+struct device_node {
+	const char *name;
+	const char *type;
+	phandle	node;
+#if !defined(CONFIG_SPARC)
+	phandle linux_phandle;
+#endif
+	char	*full_name;
+
+	struct	property *properties;
+	struct	property *deadprops;	/* removed properties */
+	struct	device_node *parent;
+	struct	device_node *child;
+	struct	device_node *sibling;
+	struct	device_node *next;	/* next device of same type */
+	struct	device_node *allnext;	/* next in list of all nodes */
+	struct	proc_dir_entry *pde;	/* this node's proc directory */
+	struct	kref kref;
+	unsigned long _flags;
+	void	*data;
+#if defined(CONFIG_SPARC)
+	char	*path_component_name;
+	unsigned int unique_id;
+	struct of_irq_controller *irq_trans;
+#endif
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 03/12] of: merge struct device_node
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   20 --------------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 arch/sparc/include/asm/prom.h      |   24 ------------------------
 include/linux/of.h                 |   32 ++++++++++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 11cb484..64e8b3a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,26 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct	property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next; /* next device of same type */
-	struct	device_node *allnext; /* next in list of all nodes */
-	struct	proc_dir_entry *pde; /* this node's proc directory */
-	struct	kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c236326..c918db5 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,26 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index b34f988..e5f4a1d 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,30 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-struct of_irq_controller;
-struct device_node {
-	const char	*name;
-	const char	*type;
-	phandle	node;
-	char	*path_component_name;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-	unsigned int unique_id;
-
-	struct of_irq_controller *irq_trans;
-};
-
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/include/linux/of.h b/include/linux/of.h
index 4668b29..65a158d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -17,6 +17,7 @@
  */
 #include <linux/types.h>
 #include <linux/bitops.h>
+#include <linux/kref.h>
 #include <linux/mod_devicetable.h>
 
 typedef u32 phandle;
@@ -31,6 +32,37 @@ struct property {
 	unsigned int unique_id;
 };
 
+#if defined(CONFIG_SPARC)
+struct of_irq_controller;
+#endif
+
+struct device_node {
+	const char *name;
+	const char *type;
+	phandle	node;
+#if !defined(CONFIG_SPARC)
+	phandle linux_phandle;
+#endif
+	char	*full_name;
+
+	struct	property *properties;
+	struct	property *deadprops;	/* removed properties */
+	struct	device_node *parent;
+	struct	device_node *child;
+	struct	device_node *sibling;
+	struct	device_node *next;	/* next device of same type */
+	struct	device_node *allnext;	/* next in list of all nodes */
+	struct	proc_dir_entry *pde;	/* this node's proc directory */
+	struct	kref kref;
+	unsigned long _flags;
+	void	*data;
+#if defined(CONFIG_SPARC)
+	char	*path_component_name;
+	unsigned int unique_id;
+	struct of_irq_controller *irq_trans;
+#endif
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */


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

* [RFC PATCH 03/12] of: merge struct device_node
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   20 --------------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 arch/sparc/include/asm/prom.h      |   24 ------------------------
 include/linux/of.h                 |   32 ++++++++++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 11cb484..64e8b3a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -73,26 +73,6 @@ struct boot_param_header {
 	u32	dt_struct_size; /* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct	property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next; /* next device of same type */
-	struct	device_node *allnext; /* next in list of all nodes */
-	struct	proc_dir_entry *pde; /* this node's proc directory */
-	struct	kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c236326..c918db5 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -71,26 +71,6 @@ struct boot_param_header
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
-struct device_node {
-	const char *name;
-	const char *type;
-	phandle	node;
-	phandle linux_phandle;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index b34f988..e5f4a1d 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -29,30 +29,6 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
-struct of_irq_controller;
-struct device_node {
-	const char	*name;
-	const char	*type;
-	phandle	node;
-	char	*path_component_name;
-	char	*full_name;
-
-	struct	property *properties;
-	struct  property *deadprops; /* removed properties */
-	struct	device_node *parent;
-	struct	device_node *child;
-	struct	device_node *sibling;
-	struct	device_node *next;	/* next device of same type */
-	struct	device_node *allnext;	/* next in list of all nodes */
-	struct  proc_dir_entry *pde;	/* this node's proc directory */
-	struct  kref kref;
-	unsigned long _flags;
-	void	*data;
-	unsigned int unique_id;
-
-	struct of_irq_controller *irq_trans;
-};
-
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/include/linux/of.h b/include/linux/of.h
index 4668b29..65a158d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -17,6 +17,7 @@
  */
 #include <linux/types.h>
 #include <linux/bitops.h>
+#include <linux/kref.h>
 #include <linux/mod_devicetable.h>
 
 typedef u32 phandle;
@@ -31,6 +32,37 @@ struct property {
 	unsigned int unique_id;
 };
 
+#if defined(CONFIG_SPARC)
+struct of_irq_controller;
+#endif
+
+struct device_node {
+	const char *name;
+	const char *type;
+	phandle	node;
+#if !defined(CONFIG_SPARC)
+	phandle linux_phandle;
+#endif
+	char	*full_name;
+
+	struct	property *properties;
+	struct	property *deadprops;	/* removed properties */
+	struct	device_node *parent;
+	struct	device_node *child;
+	struct	device_node *sibling;
+	struct	device_node *next;	/* next device of same type */
+	struct	device_node *allnext;	/* next in list of all nodes */
+	struct	proc_dir_entry *pde;	/* this node's proc directory */
+	struct	kref kref;
+	unsigned long _flags;
+	void	*data;
+#if defined(CONFIG_SPARC)
+	char	*path_component_name;
+	unsigned int unique_id;
+	struct of_irq_controller *irq_trans;
+#endif
+};
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
  2009-10-07  4:29 ` Grant Likely
                   ` (4 preceding siblings ...)
  (?)
@ 2009-10-07  4:30 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/sparc/include/asm/prom.h |    3 ---
 include/linux/of.h            |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index e5f4a1d..ddbd870 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -34,9 +34,6 @@ struct of_irq_controller {
 	void		*data;
 };
 
-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
-
 extern struct device_node *of_find_node_by_cpuid(int cpuid);
 extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
 extern struct mutex of_set_property_mutex;
diff --git a/include/linux/of.h b/include/linux/of.h
index 65a158d..a66c1eb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -69,6 +69,9 @@ struct device_node {
 #define OF_DYNAMIC	1 /* node and properties were allocated via kmalloc */
 #define OF_DETACHED	2 /* node has been detached from the device tree */
 
+#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
+#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
+
 #define OF_BAD_ADDR	((u64)-1)
 
 extern struct device_node *of_find_node_by_name(struct device_node *from,

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

* [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:30   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/sparc/include/asm/prom.h |    3 ---
 include/linux/of.h            |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index e5f4a1d..ddbd870 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -34,9 +34,6 @@ struct of_irq_controller {
 	void		*data;
 };
 
-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
-
 extern struct device_node *of_find_node_by_cpuid(int cpuid);
 extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
 extern struct mutex of_set_property_mutex;
diff --git a/include/linux/of.h b/include/linux/of.h
index 65a158d..a66c1eb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -69,6 +69,9 @@ struct device_node {
 #define OF_DYNAMIC	1 /* node and properties were allocated via kmalloc */
 #define OF_DETACHED	2 /* node has been detached from the device tree */
 
+#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
+#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
+
 #define OF_BAD_ADDR	((u64)-1)
 
 extern struct device_node *of_find_node_by_name(struct device_node *from,


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

* [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge of common code duplicated between Sparc, PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/sparc/include/asm/prom.h |    3 ---
 include/linux/of.h            |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index e5f4a1d..ddbd870 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -34,9 +34,6 @@ struct of_irq_controller {
 	void		*data;
 };
 
-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
-
 extern struct device_node *of_find_node_by_cpuid(int cpuid);
 extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
 extern struct mutex of_set_property_mutex;
diff --git a/include/linux/of.h b/include/linux/of.h
index 65a158d..a66c1eb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -69,6 +69,9 @@ struct device_node {
 #define OF_DYNAMIC	1 /* node and properties were allocated via kmalloc */
 #define OF_DETACHED	2 /* node has been detached from the device tree */
 
+#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
+#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
+
 #define OF_BAD_ADDR	((u64)-1)
 
 extern struct device_node *of_find_node_by_name(struct device_node *from,

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

* [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  4:29 ` Grant Likely
                   ` (7 preceding siblings ...)
  (?)
@ 2009-10-07  4:30 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Add a common header file for working with the flattened device tree
data structure and merge the shared data tags used by Microblaze and
PowerPC

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   12 +-----------
 arch/powerpc/include/asm/prom.h    |   12 +-----------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 22 deletions(-)
 create mode 100644 include/linux/of_fdt.h

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 64e8b3a..5f461f0 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -17,20 +17,10 @@
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
-
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed /* marker */
-#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
-#define OF_DT_END_NODE		0x2 /* End node */
-#define OF_DT_PROP		0x3 /* Property: name off, size, content */
-#define OF_DT_NOP		0x4 /* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c918db5..7181f8a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -17,6 +17,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
@@ -29,17 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed	/* marker */
-#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
-#define OF_DT_END_NODE		0x2		/* End node */
-#define OF_DT_PROP		0x3		/* Property: name off, size,
-						 * content */
-#define OF_DT_NOP		0x4		/* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
new file mode 100644
index 0000000..f81d3f8
--- /dev/null
+++ b/include/linux/of_fdt.h
@@ -0,0 +1,30 @@
+/*
+ * Definitions for working with the Flattened Device Tree data format
+ *
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ * Updates for SPARC by David S. Miller
+ * Merged to common code by Grant Likely
+ *
+ * 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_FDT_H
+#define _LINUX_OF_FDT_H
+
+/* Definitions used by the flattened device tree */
+#define OF_DT_HEADER		0xd00dfeed	/* marker */
+#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
+#define OF_DT_END_NODE		0x2		/* End node */
+#define OF_DT_PROP		0x3		/* Property: name off, size,
+						 * content */
+#define OF_DT_NOP		0x4		/* nop */
+#define OF_DT_END		0x9
+
+#define OF_DT_VERSION		0x10
+
+#endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 05/12] of: add common header for flattened device tree
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:30   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Add a common header file for working with the flattened device tree
data structure and merge the shared data tags used by Microblaze and
PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 +-----------
 arch/powerpc/include/asm/prom.h    |   12 +-----------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 22 deletions(-)
 create mode 100644 include/linux/of_fdt.h

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 64e8b3a..5f461f0 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -17,20 +17,10 @@
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
-
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed /* marker */
-#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
-#define OF_DT_END_NODE		0x2 /* End node */
-#define OF_DT_PROP		0x3 /* Property: name off, size, content */
-#define OF_DT_NOP		0x4 /* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c918db5..7181f8a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -17,6 +17,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
@@ -29,17 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed	/* marker */
-#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
-#define OF_DT_END_NODE		0x2		/* End node */
-#define OF_DT_PROP		0x3		/* Property: name off, size,
-						 * content */
-#define OF_DT_NOP		0x4		/* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
new file mode 100644
index 0000000..f81d3f8
--- /dev/null
+++ b/include/linux/of_fdt.h
@@ -0,0 +1,30 @@
+/*
+ * Definitions for working with the Flattened Device Tree data format
+ *
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ * Updates for SPARC by David S. Miller
+ * Merged to common code by Grant Likely
+ *
+ * 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_FDT_H
+#define _LINUX_OF_FDT_H
+
+/* Definitions used by the flattened device tree */
+#define OF_DT_HEADER		0xd00dfeed	/* marker */
+#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
+#define OF_DT_END_NODE		0x2		/* End node */
+#define OF_DT_PROP		0x3		/* Property: name off, size,
+						 * content */
+#define OF_DT_NOP		0x4		/* nop */
+#define OF_DT_END		0x9
+
+#define OF_DT_VERSION		0x10
+
+#endif /* _LINUX_OF_FDT_H */


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

* [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07  4:30   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:30 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Add a common header file for working with the flattened device tree
data structure and merge the shared data tags used by Microblaze and
PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 +-----------
 arch/powerpc/include/asm/prom.h    |   12 +-----------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 22 deletions(-)
 create mode 100644 include/linux/of_fdt.h

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 64e8b3a..5f461f0 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -17,20 +17,10 @@
 #ifndef _ASM_MICROBLAZE_PROM_H
 #define _ASM_MICROBLAZE_PROM_H
 #ifdef __KERNEL__
-
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed /* marker */
-#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
-#define OF_DT_END_NODE		0x2 /* End node */
-#define OF_DT_PROP		0x3 /* Property: name off, size, content */
-#define OF_DT_NOP		0x4 /* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c918db5..7181f8a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -17,6 +17,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/types.h>
+#include <linux/of_fdt.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/irq.h>
@@ -29,17 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/* Definitions used by the flattened device tree */
-#define OF_DT_HEADER		0xd00dfeed	/* marker */
-#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
-#define OF_DT_END_NODE		0x2		/* End node */
-#define OF_DT_PROP		0x3		/* Property: name off, size,
-						 * content */
-#define OF_DT_NOP		0x4		/* nop */
-#define OF_DT_END		0x9
-
-#define OF_DT_VERSION		0x10
-
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
new file mode 100644
index 0000000..f81d3f8
--- /dev/null
+++ b/include/linux/of_fdt.h
@@ -0,0 +1,30 @@
+/*
+ * Definitions for working with the Flattened Device Tree data format
+ *
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ * Updates for SPARC by David S. Miller
+ * Merged to common code by Grant Likely
+ *
+ * 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_FDT_H
+#define _LINUX_OF_FDT_H
+
+/* Definitions used by the flattened device tree */
+#define OF_DT_HEADER		0xd00dfeed	/* marker */
+#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
+#define OF_DT_END_NODE		0x2		/* End node */
+#define OF_DT_PROP		0x3		/* Property: name off, size,
+						 * content */
+#define OF_DT_NOP		0x4		/* nop */
+#define OF_DT_END		0x9
+
+#define OF_DT_VERSION		0x10
+
+#endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze and PowerPC
  2009-10-07  4:29 ` Grant Likely
                   ` (8 preceding siblings ...)
  (?)
@ 2009-10-07  4:31 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common code for working with Flattened Device Tree data structure

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   30 ------------------------------
 arch/powerpc/include/asm/prom.h    |   31 -------------------------------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 61 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 5f461f0..dfc4afc 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -33,36 +33,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header {
-	u32	magic; /* magic word OF_DT_HEADER */
-	u32	totalsize; /* total size of DT block */
-	u32	off_dt_struct; /* offset to structure */
-	u32	off_dt_strings; /* offset to strings */
-	u32	off_mem_rsvmap; /* offset to memory reserve map */
-	u32	version; /* format version */
-	u32	last_comp_version; /* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys; /* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size; /* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size; /* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7181f8a..ef20e6c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -30,37 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header
-{
-	u32	magic;			/* magic word OF_DT_HEADER */
-	u32	totalsize;		/* total size of DT block */
-	u32	off_dt_struct;		/* offset to structure */
-	u32	off_dt_strings;		/* offset to strings */
-	u32	off_mem_rsvmap;		/* offset to memory reserve map */
-	u32	version;		/* format version */
-	u32	last_comp_version;	/* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size;	/* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size;		/* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index f81d3f8..8b87bcb 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -27,4 +27,34 @@
 
 #define OF_DT_VERSION		0x10
 
+/*
+ * This is what gets passed to the kernel by prom_init or kexec
+ *
+ * The dt struct contains the device tree structure, full pathes and
+ * property contents. The dt strings contain a separate block with just
+ * the strings for the property names, and is fully page aligned and
+ * self contained in a page, so that it can be kept around by the kernel,
+ * each property name appears only once in this page (cheap compression)
+ *
+ * the mem_rsvmap contains a map of reserved ranges of physical memory,
+ * passing it here instead of in the device-tree itself greatly simplifies
+ * the job of everybody. It's just a list of u64 pairs (base/size) that
+ * ends when size is 0
+ */
+struct boot_param_header {
+	u32	magic;			/* magic word OF_DT_HEADER */
+	u32	totalsize;		/* total size of DT block */
+	u32	off_dt_struct;		/* offset to structure */
+	u32	off_dt_strings;		/* offset to strings */
+	u32	off_mem_rsvmap;		/* offset to memory reserve map */
+	u32	version;		/* format version */
+	u32	last_comp_version;	/* last compatible version */
+	/* version 2 fields below */
+	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
+	/* version 3 fields below */
+	u32	dt_strings_size;	/* size of the DT strings block */
+	/* version 17 fields below */
+	u32	dt_struct_size;		/* size of the DT structure block */
+};
+
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:31   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code for working with Flattened Device Tree data structure

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   30 ------------------------------
 arch/powerpc/include/asm/prom.h    |   31 -------------------------------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 61 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 5f461f0..dfc4afc 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -33,36 +33,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header {
-	u32	magic; /* magic word OF_DT_HEADER */
-	u32	totalsize; /* total size of DT block */
-	u32	off_dt_struct; /* offset to structure */
-	u32	off_dt_strings; /* offset to strings */
-	u32	off_mem_rsvmap; /* offset to memory reserve map */
-	u32	version; /* format version */
-	u32	last_comp_version; /* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys; /* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size; /* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size; /* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7181f8a..ef20e6c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -30,37 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header
-{
-	u32	magic;			/* magic word OF_DT_HEADER */
-	u32	totalsize;		/* total size of DT block */
-	u32	off_dt_struct;		/* offset to structure */
-	u32	off_dt_strings;		/* offset to strings */
-	u32	off_mem_rsvmap;		/* offset to memory reserve map */
-	u32	version;		/* format version */
-	u32	last_comp_version;	/* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size;	/* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size;		/* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index f81d3f8..8b87bcb 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -27,4 +27,34 @@
 
 #define OF_DT_VERSION		0x10
 
+/*
+ * This is what gets passed to the kernel by prom_init or kexec
+ *
+ * The dt struct contains the device tree structure, full pathes and
+ * property contents. The dt strings contain a separate block with just
+ * the strings for the property names, and is fully page aligned and
+ * self contained in a page, so that it can be kept around by the kernel,
+ * each property name appears only once in this page (cheap compression)
+ *
+ * the mem_rsvmap contains a map of reserved ranges of physical memory,
+ * passing it here instead of in the device-tree itself greatly simplifies
+ * the job of everybody. It's just a list of u64 pairs (base/size) that
+ * ends when size is 0
+ */
+struct boot_param_header {
+	u32	magic;			/* magic word OF_DT_HEADER */
+	u32	totalsize;		/* total size of DT block */
+	u32	off_dt_struct;		/* offset to structure */
+	u32	off_dt_strings;		/* offset to strings */
+	u32	off_mem_rsvmap;		/* offset to memory reserve map */
+	u32	version;		/* format version */
+	u32	last_comp_version;	/* last compatible version */
+	/* version 2 fields below */
+	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
+	/* version 3 fields below */
+	u32	dt_strings_size;	/* size of the DT strings block */
+	/* version 17 fields below */
+	u32	dt_struct_size;		/* size of the DT structure block */
+};
+
 #endif /* _LINUX_OF_FDT_H */


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

* [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze and PowerPC
@ 2009-10-07  4:31   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code for working with Flattened Device Tree data structure

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   30 ------------------------------
 arch/powerpc/include/asm/prom.h    |   31 -------------------------------
 include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 61 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 5f461f0..dfc4afc 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -33,36 +33,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header {
-	u32	magic; /* magic word OF_DT_HEADER */
-	u32	totalsize; /* total size of DT block */
-	u32	off_dt_struct; /* offset to structure */
-	u32	off_dt_strings; /* offset to strings */
-	u32	off_mem_rsvmap; /* offset to memory reserve map */
-	u32	version; /* format version */
-	u32	last_comp_version; /* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys; /* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size; /* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size; /* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7181f8a..ef20e6c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -30,37 +30,6 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
-/*
- * This is what gets passed to the kernel by prom_init or kexec
- *
- * The dt struct contains the device tree structure, full pathes and
- * property contents. The dt strings contain a separate block with just
- * the strings for the property names, and is fully page aligned and
- * self contained in a page, so that it can be kept around by the kernel,
- * each property name appears only once in this page (cheap compression)
- *
- * the mem_rsvmap contains a map of reserved ranges of physical memory,
- * passing it here instead of in the device-tree itself greatly simplifies
- * the job of everybody. It's just a list of u64 pairs (base/size) that
- * ends when size is 0
- */
-struct boot_param_header
-{
-	u32	magic;			/* magic word OF_DT_HEADER */
-	u32	totalsize;		/* total size of DT block */
-	u32	off_dt_struct;		/* offset to structure */
-	u32	off_dt_strings;		/* offset to strings */
-	u32	off_mem_rsvmap;		/* offset to memory reserve map */
-	u32	version;		/* format version */
-	u32	last_comp_version;	/* last compatible version */
-	/* version 2 fields below */
-	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
-	/* version 3 fields below */
-	u32	dt_strings_size;	/* size of the DT strings block */
-	/* version 17 fields below */
-	u32	dt_struct_size;		/* size of the DT structure block */
-};
-
 extern struct device_node *of_chosen;
 
 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index f81d3f8..8b87bcb 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -27,4 +27,34 @@
 
 #define OF_DT_VERSION		0x10
 
+/*
+ * This is what gets passed to the kernel by prom_init or kexec
+ *
+ * The dt struct contains the device tree structure, full pathes and
+ * property contents. The dt strings contain a separate block with just
+ * the strings for the property names, and is fully page aligned and
+ * self contained in a page, so that it can be kept around by the kernel,
+ * each property name appears only once in this page (cheap compression)
+ *
+ * the mem_rsvmap contains a map of reserved ranges of physical memory,
+ * passing it here instead of in the device-tree itself greatly simplifies
+ * the job of everybody. It's just a list of u64 pairs (base/size) that
+ * ends when size is 0
+ */
+struct boot_param_header {
+	u32	magic;			/* magic word OF_DT_HEADER */
+	u32	totalsize;		/* total size of DT block */
+	u32	off_dt_struct;		/* offset to structure */
+	u32	off_dt_strings;		/* offset to strings */
+	u32	off_mem_rsvmap;		/* offset to memory reserve map */
+	u32	version;		/* format version */
+	u32	last_comp_version;	/* last compatible version */
+	/* version 2 fields below */
+	u32	boot_cpuid_phys;	/* Physical CPU id we're booting on */
+	/* version 3 fields below */
+	u32	dt_strings_size;	/* size of the DT strings block */
+	/* version 17 fields below */
+	u32	dt_struct_size;		/* size of the DT structure block */
+};
+
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 07/12] of: merge of_node_*_flag() and set_node_proc_entry()
  2009-10-07  4:29 ` Grant Likely
                   ` (10 preceding siblings ...)
  (?)
@ 2009-10-07  4:31 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common code between PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   16 ----------------
 arch/powerpc/include/asm/prom.h    |   17 -----------------
 include/linux/of.h                 |   16 ++++++++++++++++
 3 files changed, 16 insertions(+), 33 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index dfc4afc..180d844 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -35,24 +35,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn,
-					struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index ef20e6c..2cfd432 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -32,25 +32,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
-
 extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
diff --git a/include/linux/of.h b/include/linux/of.h
index a66c1eb..d5f6662 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -63,6 +63,22 @@ struct device_node {
 #endif
 };
 
+static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
+{
+	return test_bit(flag, &n->_flags);
+}
+
+static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
+{
+	set_bit(flag, &n->_flags);
+}
+
+static inline void
+set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
+{
+	dn->pde = de;
+}
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 07/12] of: merge of_node_*_flag() and set_node_proc_entry()
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:31   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   16 ----------------
 arch/powerpc/include/asm/prom.h    |   17 -----------------
 include/linux/of.h                 |   16 ++++++++++++++++
 3 files changed, 16 insertions(+), 33 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index dfc4afc..180d844 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -35,24 +35,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn,
-					struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index ef20e6c..2cfd432 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -32,25 +32,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
-
 extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
diff --git a/include/linux/of.h b/include/linux/of.h
index a66c1eb..d5f6662 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -63,6 +63,22 @@ struct device_node {
 #endif
 };
 
+static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
+{
+	return test_bit(flag, &n->_flags);
+}
+
+static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
+{
+	set_bit(flag, &n->_flags);
+}
+
+static inline void
+set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
+{
+	dn->pde = de;
+}
+
 #include <asm/prom.h>
 
 /* flag descriptions */


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

* [RFC PATCH 07/12] of: merge of_node_*_flag() and set_node_proc_entry()
@ 2009-10-07  4:31   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   16 ----------------
 arch/powerpc/include/asm/prom.h    |   17 -----------------
 include/linux/of.h                 |   16 ++++++++++++++++
 3 files changed, 16 insertions(+), 33 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index dfc4afc..180d844 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -35,24 +35,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn,
-					struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index ef20e6c..2cfd432 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -32,25 +32,8 @@
 
 extern struct device_node *of_chosen;
 
-static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
-{
-	return test_bit(flag, &n->_flags);
-}
-
-static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
-{
-	set_bit(flag, &n->_flags);
-}
-
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
-{
-	dn->pde = de;
-}
-
-
 extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
diff --git a/include/linux/of.h b/include/linux/of.h
index a66c1eb..d5f6662 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -63,6 +63,22 @@ struct device_node {
 #endif
 };
 
+static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
+{
+	return test_bit(flag, &n->_flags);
+}
+
+static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
+{
+	set_bit(flag, &n->_flags);
+}
+
+static inline void
+set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
+{
+	dn->pde = de;
+}
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 08/12] of: merge of_read_number() an of_read_ulong()
  2009-10-07  4:29 ` Grant Likely
                   ` (13 preceding siblings ...)
  (?)
@ 2009-10-07  4:31 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 include/linux/of.h                 |   23 +++++++++++++++++++++++
 3 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 180d844..d4f57ff 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -82,18 +82,6 @@ extern int release_OF_resource(struct device_node *node, int index);
  * OF address retreival & translation
  */
 
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 2cfd432..d8c0525 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -89,26 +89,6 @@ extern int release_OF_resource(struct device_node* node, int index);
  * OF address retreival & translation
  */
 
-
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#ifdef CONFIG_PPC32
-static inline unsigned long of_read_ulong(const u32 *cell, int size)
-{
-	return cell[size-1];
-}
-#else
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-#endif
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/include/linux/of.h b/include/linux/of.h
index d5f6662..18e4379 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,29 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+/*
+ * OF address retreival & translation
+ */
+
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const u32 *cell, int size)
+{
+	u64 r = 0;
+	while (size--)
+		r = (r << 32) | *(cell++);
+	return r;
+}
+
+/* Like of_read_number, but we want an unsigned long result */
+#ifdef CONFIG_PPC32
+static inline unsigned long of_read_ulong(const u32 *cell, int size)
+{
+	return cell[size-1];
+}
+#else
+#define of_read_ulong(cell, size)	of_read_number(cell, size)
+#endif
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 08/12] of: merge of_read_number() an of_read_ulong()
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:31   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 include/linux/of.h                 |   23 +++++++++++++++++++++++
 3 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 180d844..d4f57ff 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -82,18 +82,6 @@ extern int release_OF_resource(struct device_node *node, int index);
  * OF address retreival & translation
  */
 
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 2cfd432..d8c0525 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -89,26 +89,6 @@ extern int release_OF_resource(struct device_node* node, int index);
  * OF address retreival & translation
  */
 
-
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#ifdef CONFIG_PPC32
-static inline unsigned long of_read_ulong(const u32 *cell, int size)
-{
-	return cell[size-1];
-}
-#else
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-#endif
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/include/linux/of.h b/include/linux/of.h
index d5f6662..18e4379 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,29 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+/*
+ * OF address retreival & translation
+ */
+
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const u32 *cell, int size)
+{
+	u64 r = 0;
+	while (size--)
+		r = (r << 32) | *(cell++);
+	return r;
+}
+
+/* Like of_read_number, but we want an unsigned long result */
+#ifdef CONFIG_PPC32
+static inline unsigned long of_read_ulong(const u32 *cell, int size)
+{
+	return cell[size-1];
+}
+#else
+#define of_read_ulong(cell, size)	of_read_number(cell, size)
+#endif
+
 #include <asm/prom.h>
 
 /* flag descriptions */


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

* [RFC PATCH 08/12] of: merge of_read_number() an of_read_ulong()
@ 2009-10-07  4:31   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   20 --------------------
 include/linux/of.h                 |   23 +++++++++++++++++++++++
 3 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 180d844..d4f57ff 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -82,18 +82,6 @@ extern int release_OF_resource(struct device_node *node, int index);
  * OF address retreival & translation
  */
 
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 2cfd432..d8c0525 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -89,26 +89,6 @@ extern int release_OF_resource(struct device_node* node, int index);
  * OF address retreival & translation
  */
 
-
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const u32 *cell, int size)
-{
-	u64 r = 0;
-	while (size--)
-		r = (r << 32) | *(cell++);
-	return r;
-}
-
-/* Like of_read_number, but we want an unsigned long result */
-#ifdef CONFIG_PPC32
-static inline unsigned long of_read_ulong(const u32 *cell, int size)
-{
-	return cell[size-1];
-}
-#else
-#define of_read_ulong(cell, size)	of_read_number(cell, size)
-#endif
-
 /* Translate an OF address block into a CPU physical address
  */
 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
diff --git a/include/linux/of.h b/include/linux/of.h
index d5f6662..18e4379 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,29 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+/*
+ * OF address retreival & translation
+ */
+
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const u32 *cell, int size)
+{
+	u64 r = 0;
+	while (size--)
+		r = (r << 32) | *(cell++);
+	return r;
+}
+
+/* Like of_read_number, but we want an unsigned long result */
+#ifdef CONFIG_PPC32
+static inline unsigned long of_read_ulong(const u32 *cell, int size)
+{
+	return cell[size-1];
+}
+#else
+#define of_read_ulong(cell, size)	of_read_number(cell, size)
+#endif
+
 #include <asm/prom.h>
 
 /* flag descriptions */

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

* [RFC PATCH 09/12] of: merge of_node_get(), of_node_put() and of_find_all_nodes()
  2009-10-07  4:29 ` Grant Likely
                   ` (15 preceding siblings ...)
  (?)
@ 2009-10-07  4:31 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common code between Sparc, PowerPC and Microblaze.

Sparc differs in the implementation at this point, so this patch uses
a #ifdef to handle sparc differently for now.  The merging of
implementations will occur in a later patch

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |    4 ----
 arch/powerpc/include/asm/prom.h    |    4 ----
 arch/sparc/include/asm/prom.h      |    9 ---------
 include/linux/of.h                 |   16 ++++++++++++++++
 4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index d4f57ff..c92b4a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,10 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					const char *uname, int depth,
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index d8c0525..622769c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,10 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					    const char *uname, int depth,
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index ddbd870..f845828 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -51,15 +51,6 @@ extern void prom_build_devicetree(void);
 extern void of_populate_present_mask(void);
 extern void of_fill_in_cpu_data(void);
 
-/* Dummy ref counting routines - to be implemented later */
-static inline struct device_node *of_node_get(struct device_node *node)
-{
-	return node;
-}
-static inline void of_node_put(struct device_node *node)
-{
-}
-
 /* These routines are here to provide compatibility with how powerpc
  * handles IRQ mapping for OF device nodes.  We precompute and permanently
  * register them in the of_device objects, whereas powerpc computes them
diff --git a/include/linux/of.h b/include/linux/of.h
index 18e4379..4636bba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,22 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+#if defined(CONFIG_SPARC)
+/* Dummy ref counting routines - to be implemented later */
+static inline struct device_node *of_node_get(struct device_node *node)
+{
+	return node;
+}
+static inline void of_node_put(struct device_node *node)
+{
+}
+
+#else
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+extern struct device_node *of_node_get(struct device_node *node);
+extern void of_node_put(struct device_node *node);
+#endif
+
 /*
  * OF address retreival & translation
  */

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

* [RFC PATCH 09/12] of: merge of_node_get(),
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:31   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Sparc, PowerPC and Microblaze.

Sparc differs in the implementation at this point, so this patch uses
a #ifdef to handle sparc differently for now.  The merging of
implementations will occur in a later patch

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |    4 ----
 arch/powerpc/include/asm/prom.h    |    4 ----
 arch/sparc/include/asm/prom.h      |    9 ---------
 include/linux/of.h                 |   16 ++++++++++++++++
 4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index d4f57ff..c92b4a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,10 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					const char *uname, int depth,
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index d8c0525..622769c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,10 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					    const char *uname, int depth,
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index ddbd870..f845828 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -51,15 +51,6 @@ extern void prom_build_devicetree(void);
 extern void of_populate_present_mask(void);
 extern void of_fill_in_cpu_data(void);
 
-/* Dummy ref counting routines - to be implemented later */
-static inline struct device_node *of_node_get(struct device_node *node)
-{
-	return node;
-}
-static inline void of_node_put(struct device_node *node)
-{
-}
-
 /* These routines are here to provide compatibility with how powerpc
  * handles IRQ mapping for OF device nodes.  We precompute and permanently
  * register them in the of_device objects, whereas powerpc computes them
diff --git a/include/linux/of.h b/include/linux/of.h
index 18e4379..4636bba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,22 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+#if defined(CONFIG_SPARC)
+/* Dummy ref counting routines - to be implemented later */
+static inline struct device_node *of_node_get(struct device_node *node)
+{
+	return node;
+}
+static inline void of_node_put(struct device_node *node)
+{
+}
+
+#else
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+extern struct device_node *of_node_get(struct device_node *node);
+extern void of_node_put(struct device_node *node);
+#endif
+
 /*
  * OF address retreival & translation
  */


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

* [RFC PATCH 09/12] of: merge of_node_get(), of_node_put() and of_find_all_nodes()
@ 2009-10-07  4:31   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:31 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Sparc, PowerPC and Microblaze.

Sparc differs in the implementation at this point, so this patch uses
a #ifdef to handle sparc differently for now.  The merging of
implementations will occur in a later patch

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |    4 ----
 arch/powerpc/include/asm/prom.h    |    4 ----
 arch/sparc/include/asm/prom.h      |    9 ---------
 include/linux/of.h                 |   16 ++++++++++++++++
 4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index d4f57ff..c92b4a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,10 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					const char *uname, int depth,
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index d8c0525..622769c 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,10 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
 /* For scanning the flat device-tree at boot time */
 extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
 					    const char *uname, int depth,
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index ddbd870..f845828 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -51,15 +51,6 @@ extern void prom_build_devicetree(void);
 extern void of_populate_present_mask(void);
 extern void of_fill_in_cpu_data(void);
 
-/* Dummy ref counting routines - to be implemented later */
-static inline struct device_node *of_node_get(struct device_node *node)
-{
-	return node;
-}
-static inline void of_node_put(struct device_node *node)
-{
-}
-
 /* These routines are here to provide compatibility with how powerpc
  * handles IRQ mapping for OF device nodes.  We precompute and permanently
  * register them in the of_device objects, whereas powerpc computes them
diff --git a/include/linux/of.h b/include/linux/of.h
index 18e4379..4636bba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,22 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+#if defined(CONFIG_SPARC)
+/* Dummy ref counting routines - to be implemented later */
+static inline struct device_node *of_node_get(struct device_node *node)
+{
+	return node;
+}
+static inline void of_node_put(struct device_node *node)
+{
+}
+
+#else
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+extern struct device_node *of_node_get(struct device_node *node);
+extern void of_node_put(struct device_node *node);
+#endif
+
 /*
  * OF address retreival & translation
  */

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

* [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
  2009-10-07  4:29 ` Grant Likely
                   ` (17 preceding siblings ...)
  (?)
@ 2009-10-07  4:32 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common flattened device tree code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   11 -----------
 arch/powerpc/include/asm/prom.h    |   10 ----------
 include/linux/of_fdt.h             |   14 ++++++++++++++
 3 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index c92b4a9..be4db2a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,17 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					const char *uname, int depth,
-					void *data),
-				void *data);
-extern void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 622769c..c8b5933 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,16 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					    const char *uname, int depth,
-					    void *data),
-				  void *data);
-extern void* __init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 8b87bcb..ac31d4f 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -16,6 +16,9 @@
 #ifndef _LINUX_OF_FDT_H
 #define _LINUX_OF_FDT_H
 
+#include <linux/types.h>
+#include <linux/init.h>
+
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
@@ -57,4 +60,15 @@ struct boot_param_header {
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
+/* For scanning the flat device-tree at boot time */
+extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
+					    const char *uname, int depth,
+					    void *data),
+				  void *data);
+extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name,
+					unsigned long *size);
+extern int __init of_flat_dt_is_compatible(unsigned long node,
+					   const char *name);
+extern unsigned long __init of_get_flat_dt_root(void);
+
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:32   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common flattened device tree code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   11 -----------
 arch/powerpc/include/asm/prom.h    |   10 ----------
 include/linux/of_fdt.h             |   14 ++++++++++++++
 3 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index c92b4a9..be4db2a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,17 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					const char *uname, int depth,
-					void *data),
-				void *data);
-extern void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 622769c..c8b5933 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,16 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					    const char *uname, int depth,
-					    void *data),
-				  void *data);
-extern void* __init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 8b87bcb..ac31d4f 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -16,6 +16,9 @@
 #ifndef _LINUX_OF_FDT_H
 #define _LINUX_OF_FDT_H
 
+#include <linux/types.h>
+#include <linux/init.h>
+
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
@@ -57,4 +60,15 @@ struct boot_param_header {
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
+/* For scanning the flat device-tree at boot time */
+extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
+					    const char *uname, int depth,
+					    void *data),
+				  void *data);
+extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name,
+					unsigned long *size);
+extern int __init of_flat_dt_is_compatible(unsigned long node,
+					   const char *name);
+extern unsigned long __init of_get_flat_dt_root(void);
+
 #endif /* _LINUX_OF_FDT_H */


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

* [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
@ 2009-10-07  4:32   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common flattened device tree code between Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   11 -----------
 arch/powerpc/include/asm/prom.h    |   10 ----------
 include/linux/of_fdt.h             |   14 ++++++++++++++
 3 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index c92b4a9..be4db2a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -40,17 +40,6 @@ extern struct device_node *of_chosen;
 extern struct device_node *allnodes;	/* temporary while merging */
 extern rwlock_t devtree_lock;	/* temporary while merging */
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					const char *uname, int depth,
-					void *data),
-				void *data);
-extern void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 622769c..c8b5933 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -34,16 +34,6 @@ extern struct device_node *of_chosen;
 
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For scanning the flat device-tree at boot time */
-extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
-					    const char *uname, int depth,
-					    void *data),
-				  void *data);
-extern void* __init of_get_flat_dt_prop(unsigned long node, const char *name,
-					unsigned long *size);
-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 *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 8b87bcb..ac31d4f 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -16,6 +16,9 @@
 #ifndef _LINUX_OF_FDT_H
 #define _LINUX_OF_FDT_H
 
+#include <linux/types.h>
+#include <linux/init.h>
+
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
@@ -57,4 +60,15 @@ struct boot_param_header {
 	u32	dt_struct_size;		/* size of the DT structure block */
 };
 
+/* For scanning the flat device-tree at boot time */
+extern int __init of_scan_flat_dt(int (*it)(unsigned long node,
+					    const char *uname, int depth,
+					    void *data),
+				  void *data);
+extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name,
+					unsigned long *size);
+extern int __init of_flat_dt_is_compatible(unsigned long node,
+					   const char *name);
+extern unsigned long __init of_get_flat_dt_root(void);
+
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 11/12] of: merge other miscellaneous prototypes
  2009-10-07  4:29 ` Grant Likely
                   ` (18 preceding siblings ...)
  (?)
@ 2009-10-07  4:32 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common prototypes used by Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   14 --------------
 include/linux/of_fdt.h             |   13 +++++++++++++
 3 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index be4db2a..ef3ec1d 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -45,19 +45,7 @@ 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);
 extern int early_uartlite_console(void);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node *np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node *np, struct property *prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
 
 extern struct resource *request_OF_resource(struct device_node *node,
 				int index, const char *name_postfix);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c8b5933..2ab9cbd 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -38,20 +38,6 @@ extern struct device_node *of_chosen;
 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);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index ac31d4f..b41bd18 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -71,4 +71,17 @@ extern int __init of_flat_dt_is_compatible(unsigned long node,
 					   const char *name);
 extern unsigned long __init of_get_flat_dt_root(void);
 
+/* Other Prototypes */
+extern void finish_device_tree(void);
+extern void unflatten_device_tree(void);
+extern void early_init_devtree(void *);
+extern int machine_is_compatible(const char *compat);
+extern void print_properties(struct device_node *node);
+extern int prom_n_intr_cells(struct device_node* np);
+extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+				struct property *newprop,
+				struct property *oldprop);
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 11/12] of: merge other miscellaneous prototypes
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:32   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common prototypes used by Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   14 --------------
 include/linux/of_fdt.h             |   13 +++++++++++++
 3 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index be4db2a..ef3ec1d 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -45,19 +45,7 @@ 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);
 extern int early_uartlite_console(void);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node *np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node *np, struct property *prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
 
 extern struct resource *request_OF_resource(struct device_node *node,
 				int index, const char *name_postfix);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c8b5933..2ab9cbd 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -38,20 +38,6 @@ extern struct device_node *of_chosen;
 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);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index ac31d4f..b41bd18 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -71,4 +71,17 @@ extern int __init of_flat_dt_is_compatible(unsigned long node,
 					   const char *name);
 extern unsigned long __init of_get_flat_dt_root(void);
 
+/* Other Prototypes */
+extern void finish_device_tree(void);
+extern void unflatten_device_tree(void);
+extern void early_init_devtree(void *);
+extern int machine_is_compatible(const char *compat);
+extern void print_properties(struct device_node *node);
+extern int prom_n_intr_cells(struct device_node* np);
+extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+				struct property *newprop,
+				struct property *oldprop);
 #endif /* _LINUX_OF_FDT_H */


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

* [RFC PATCH 11/12] of: merge other miscellaneous prototypes
@ 2009-10-07  4:32   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common prototypes used by Microblaze and PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/include/asm/prom.h |   12 ------------
 arch/powerpc/include/asm/prom.h    |   14 --------------
 include/linux/of_fdt.h             |   13 +++++++++++++
 3 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index be4db2a..ef3ec1d 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -45,19 +45,7 @@ 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);
 extern int early_uartlite_console(void);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node *np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node *np, struct property *prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
 
 extern struct resource *request_OF_resource(struct device_node *node,
 				int index, const char *name_postfix);
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index c8b5933..2ab9cbd 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -38,20 +38,6 @@ extern struct device_node *of_chosen;
 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);
-extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
-				struct property *newprop,
-				struct property *oldprop);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index ac31d4f..b41bd18 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -71,4 +71,17 @@ extern int __init of_flat_dt_is_compatible(unsigned long node,
 					   const char *name);
 extern unsigned long __init of_get_flat_dt_root(void);
 
+/* Other Prototypes */
+extern void finish_device_tree(void);
+extern void unflatten_device_tree(void);
+extern void early_init_devtree(void *);
+extern int machine_is_compatible(const char *compat);
+extern void print_properties(struct device_node *node);
+extern int prom_n_intr_cells(struct device_node* np);
+extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+				struct property *newprop,
+				struct property *oldprop);
 #endif /* _LINUX_OF_FDT_H */

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

* [RFC PATCH 12/12] of: merge of_find_all_nodes() implementations
  2009-10-07  4:29 ` Grant Likely
                   ` (20 preceding siblings ...)
  (?)
@ 2009-10-07  4:32 ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclinux

Merge common code between Microblaze and PowerPC, and make it available
to Sparc

Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---

 arch/microblaze/kernel/prom.c |   23 -----------------------
 arch/powerpc/kernel/prom.c    |   23 -----------------------
 drivers/of/base.c             |   26 +++++++++++++++++++++++++-
 include/linux/of.h            |    3 ++-
 4 files changed, 27 insertions(+), 48 deletions(-)

diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index c005cc6..b817df1 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -860,29 +860,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
 EXPORT_SYMBOL(of_find_node_by_phandle);
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != NULL; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b9..4ec3008 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1317,29 +1317,6 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
 }
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != 0; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ddf224d..e6627b2 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -9,7 +9,8 @@
  *
  *  Adapted for sparc and sparc64 by David S. Miller davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
  *
- *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell.
+ *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell and
+ *  Grant Likely.
  *
  *      This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -82,6 +83,29 @@ struct property *of_find_property(const struct device_node *np,
 }
 EXPORT_SYMBOL(of_find_property);
 
+/**
+ * of_find_all_nodes - Get next node in global list
+ * @prev:	Previous node or NULL to start iteration
+ *		of_node_put() will be called on it
+ *
+ * Returns a node pointer with refcount incremented, use
+ * of_node_put() on it when done.
+ */
+struct device_node *of_find_all_nodes(struct device_node *prev)
+{
+	struct device_node *np;
+
+	read_lock(&devtree_lock);
+	np = prev ? prev->allnext : allnodes;
+	for (; np != NULL; np = np->allnext)
+		if (of_node_get(np))
+			break;
+	of_node_put(prev);
+	read_unlock(&devtree_lock);
+	return np;
+}
+EXPORT_SYMBOL(of_find_all_nodes);
+
 /*
  * Find a property with a given name for a given node
  * and return the value.
diff --git a/include/linux/of.h b/include/linux/of.h
index 4636bba..e7facd8 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,8 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+
 #if defined(CONFIG_SPARC)
 /* Dummy ref counting routines - to be implemented later */
 static inline struct device_node *of_node_get(struct device_node *node)
@@ -90,7 +92,6 @@ static inline void of_node_put(struct device_node *node)
 }
 
 #else
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
 #endif

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

* [RFC PATCH 12/12] of: merge of_find_all_nodes() implementations
  2009-10-07  4:29 ` Grant Likely
@ 2009-10-07  4:32   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Microblaze and PowerPC, and make it available
to Sparc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/kernel/prom.c |   23 -----------------------
 arch/powerpc/kernel/prom.c    |   23 -----------------------
 drivers/of/base.c             |   26 +++++++++++++++++++++++++-
 include/linux/of.h            |    3 ++-
 4 files changed, 27 insertions(+), 48 deletions(-)

diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index c005cc6..b817df1 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -860,29 +860,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
 EXPORT_SYMBOL(of_find_node_by_phandle);
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != NULL; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b9..4ec3008 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1317,29 +1317,6 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
 }
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != 0; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ddf224d..e6627b2 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -9,7 +9,8 @@
  *
  *  Adapted for sparc and sparc64 by David S. Miller davem@davemloft.net
  *
- *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell.
+ *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell and
+ *  Grant Likely.
  *
  *      This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -82,6 +83,29 @@ struct property *of_find_property(const struct device_node *np,
 }
 EXPORT_SYMBOL(of_find_property);
 
+/**
+ * of_find_all_nodes - Get next node in global list
+ * @prev:	Previous node or NULL to start iteration
+ *		of_node_put() will be called on it
+ *
+ * Returns a node pointer with refcount incremented, use
+ * of_node_put() on it when done.
+ */
+struct device_node *of_find_all_nodes(struct device_node *prev)
+{
+	struct device_node *np;
+
+	read_lock(&devtree_lock);
+	np = prev ? prev->allnext : allnodes;
+	for (; np != NULL; np = np->allnext)
+		if (of_node_get(np))
+			break;
+	of_node_put(prev);
+	read_unlock(&devtree_lock);
+	return np;
+}
+EXPORT_SYMBOL(of_find_all_nodes);
+
 /*
  * Find a property with a given name for a given node
  * and return the value.
diff --git a/include/linux/of.h b/include/linux/of.h
index 4636bba..e7facd8 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,8 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+
 #if defined(CONFIG_SPARC)
 /* Dummy ref counting routines - to be implemented later */
 static inline struct device_node *of_node_get(struct device_node *node)
@@ -90,7 +92,6 @@ static inline void of_node_put(struct device_node *node)
 }
 
 #else
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
 #endif


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

* [RFC PATCH 12/12] of: merge of_find_all_nodes() implementations
@ 2009-10-07  4:32   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:32 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

Merge common code between Microblaze and PowerPC, and make it available
to Sparc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/microblaze/kernel/prom.c |   23 -----------------------
 arch/powerpc/kernel/prom.c    |   23 -----------------------
 drivers/of/base.c             |   26 +++++++++++++++++++++++++-
 include/linux/of.h            |    3 ++-
 4 files changed, 27 insertions(+), 48 deletions(-)

diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index c005cc6..b817df1 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -860,29 +860,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
 EXPORT_SYMBOL(of_find_node_by_phandle);
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != NULL; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b9..4ec3008 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1317,29 +1317,6 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
 }
 
 /**
- *	of_find_all_nodes - Get next node in global list
- *	@prev:	Previous node or NULL to start iteration
- *		of_node_put() will be called on it
- *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-	struct device_node *np;
-
-	read_lock(&devtree_lock);
-	np = prev ? prev->allnext : allnodes;
-	for (; np != 0; np = np->allnext)
-		if (of_node_get(np))
-			break;
-	of_node_put(prev);
-	read_unlock(&devtree_lock);
-	return np;
-}
-EXPORT_SYMBOL(of_find_all_nodes);
-
-/**
  *	of_node_get - Increment refcount of a node
  *	@node:	Node to inc refcount, NULL is supported to
  *		simplify writing of callers
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ddf224d..e6627b2 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -9,7 +9,8 @@
  *
  *  Adapted for sparc and sparc64 by David S. Miller davem@davemloft.net
  *
- *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell.
+ *  Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell and
+ *  Grant Likely.
  *
  *      This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -82,6 +83,29 @@ struct property *of_find_property(const struct device_node *np,
 }
 EXPORT_SYMBOL(of_find_property);
 
+/**
+ * of_find_all_nodes - Get next node in global list
+ * @prev:	Previous node or NULL to start iteration
+ *		of_node_put() will be called on it
+ *
+ * Returns a node pointer with refcount incremented, use
+ * of_node_put() on it when done.
+ */
+struct device_node *of_find_all_nodes(struct device_node *prev)
+{
+	struct device_node *np;
+
+	read_lock(&devtree_lock);
+	np = prev ? prev->allnext : allnodes;
+	for (; np != NULL; np = np->allnext)
+		if (of_node_get(np))
+			break;
+	of_node_put(prev);
+	read_unlock(&devtree_lock);
+	return np;
+}
+EXPORT_SYMBOL(of_find_all_nodes);
+
 /*
  * Find a property with a given name for a given node
  * and return the value.
diff --git a/include/linux/of.h b/include/linux/of.h
index 4636bba..e7facd8 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,8 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
 	dn->pde = de;
 }
 
+extern struct device_node *of_find_all_nodes(struct device_node *prev);
+
 #if defined(CONFIG_SPARC)
 /* Dummy ref counting routines - to be implemented later */
 static inline struct device_node *of_node_get(struct device_node *node)
@@ -90,7 +92,6 @@ static inline void of_node_put(struct device_node *node)
 }
 
 #else
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_node_get(struct device_node *node);
 extern void of_node_put(struct device_node *node);
 #endif

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:29 ` Grant Likely
  (?)
@ 2009-10-07  4:49   ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:49 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclin

On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
> Well, I've got to start somewhere...
>
> So here goes.  I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches.  Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks.  This first batch isn't
> anything exciting, just a merge of common code

Shoot.... most of what I wrote got trimmed accidentally.  Here's the
rest of the text:

However, I've completely devoted to this work for at least the next
two months, so there are plenty more patches to follow.  Once I've
got all the common code merged between Microblaze, PowerPC and Sparc
I'll be fix the endian problems and making it easily usable by other
architectures like ARM and MIPS.  Lots of work to be done.

As for merging this stuff, because the patches cross architecture
boundaries, I've been thinking of publishing a new git tree for
collecting device tree related changes and getting it added to the
linux-next tree list.  I'll commit changes to that tree once I get
acks from each of the affected arch maintainers.  Then, either Linus
can pull my tree directly, or I could ask a more senior maintainer
to pull into their tree before sending a pull request to Linus.  Ben,
David and Michal, how does that sound to you?  Stephen, would you be
willing to add my tree to the linux-next list?

Also, I'd like to take on responsibility for maintaining the cross-
architecture device tree code.  If there are no objections, I'll
write a patch to add a device tree section to MAINTAINERS.

Cheers,
g.

> ---
>
> Grant Likely (12):
>      of: merge of_find_all_nodes() implementations
>      of: merge other miscellaneous prototypes
>      of: merge of_*_flat_dt*() functions
>      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
>      of: merge of_read_number() an of_read_ulong()
>      of: merge of_node_*_flag() and set_node_proc_entry()
>      of: merge struct boot_param_header from Microblaze and PowerPC
>      of: add common header for flattened device tree representation
>      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
>      of: merge struct device_node
>      of: merge phandle, ihandle and struct property
>      of: Rework linux/of.h and asm/prom.h include ordering
>
>
>  arch/microblaze/include/asm/prom.h |  135 +--------------------------------
>  arch/microblaze/kernel/prom.c      |   23 ------
>  arch/powerpc/include/asm/prom.h    |  147 ------------------------------------
>  arch/powerpc/kernel/prom.c         |   23 ------
>  arch/sparc/include/asm/prom.h      |   55 -------------
>  drivers/of/base.c                  |   26 ++++++
>  include/linux/of.h                 |  103 +++++++++++++++++++++++++
>  include/linux/of_fdt.h             |   87 +++++++++++++++++++++
>  8 files changed, 221 insertions(+), 378 deletions(-)
>  create mode 100644 include/linux/of_fdt.h

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  4:49   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:49 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg, microblaze-uclin

On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> Well, I've got to start somewhere...
>
> So here goes.  I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches.  Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks.  This first batch isn't
> anything exciting, just a merge of common code

Shoot.... most of what I wrote got trimmed accidentally.  Here's the
rest of the text:

However, I've completely devoted to this work for at least the next
two months, so there are plenty more patches to follow.  Once I've
got all the common code merged between Microblaze, PowerPC and Sparc
I'll be fix the endian problems and making it easily usable by other
architectures like ARM and MIPS.  Lots of work to be done.

As for merging this stuff, because the patches cross architecture
boundaries, I've been thinking of publishing a new git tree for
collecting device tree related changes and getting it added to the
linux-next tree list.  I'll commit changes to that tree once I get
acks from each of the affected arch maintainers.  Then, either Linus
can pull my tree directly, or I could ask a more senior maintainer
to pull into their tree before sending a pull request to Linus.  Ben,
David and Michal, how does that sound to you?  Stephen, would you be
willing to add my tree to the linux-next list?

Also, I'd like to take on responsibility for maintaining the cross-
architecture device tree code.  If there are no objections, I'll
write a patch to add a device tree section to MAINTAINERS.

Cheers,
g.

> ---
>
> Grant Likely (12):
>      of: merge of_find_all_nodes() implementations
>      of: merge other miscellaneous prototypes
>      of: merge of_*_flat_dt*() functions
>      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
>      of: merge of_read_number() an of_read_ulong()
>      of: merge of_node_*_flag() and set_node_proc_entry()
>      of: merge struct boot_param_header from Microblaze and PowerPC
>      of: add common header for flattened device tree representation
>      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
>      of: merge struct device_node
>      of: merge phandle, ihandle and struct property
>      of: Rework linux/of.h and asm/prom.h include ordering
>
>
>  arch/microblaze/include/asm/prom.h |  135 +--------------------------------
>  arch/microblaze/kernel/prom.c      |   23 ------
>  arch/powerpc/include/asm/prom.h    |  147 ------------------------------------
>  arch/powerpc/kernel/prom.c         |   23 ------
>  arch/sparc/include/asm/prom.h      |   55 -------------
>  drivers/of/base.c                  |   26 ++++++
>  include/linux/of.h                 |  103 +++++++++++++++++++++++++
>  include/linux/of_fdt.h             |   87 +++++++++++++++++++++
>  8 files changed, 221 insertions(+), 378 deletions(-)
>  create mode 100644 include/linux/of_fdt.h

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  4:49   ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07  4:49 UTC (permalink / raw)
  To: linuxppc-dev, benh, Stephen Rothwell, davem, sparclinux, monstr,
	microblaze-uclinux, devicetree-discuss

On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> w=
rote:
> Well, I've got to start somewhere...
>
> So here goes. =A0I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches. =A0Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks. =A0This first batch isn't
> anything exciting, just a merge of common code

Shoot.... most of what I wrote got trimmed accidentally.  Here's the
rest of the text:

However, I've completely devoted to this work for at least the next
two months, so there are plenty more patches to follow.  Once I've
got all the common code merged between Microblaze, PowerPC and Sparc
I'll be fix the endian problems and making it easily usable by other
architectures like ARM and MIPS.  Lots of work to be done.

As for merging this stuff, because the patches cross architecture
boundaries, I've been thinking of publishing a new git tree for
collecting device tree related changes and getting it added to the
linux-next tree list.  I'll commit changes to that tree once I get
acks from each of the affected arch maintainers.  Then, either Linus
can pull my tree directly, or I could ask a more senior maintainer
to pull into their tree before sending a pull request to Linus.  Ben,
David and Michal, how does that sound to you?  Stephen, would you be
willing to add my tree to the linux-next list?

Also, I'd like to take on responsibility for maintaining the cross-
architecture device tree code.  If there are no objections, I'll
write a patch to add a device tree section to MAINTAINERS.

Cheers,
g.

> ---
>
> Grant Likely (12):
> =A0 =A0 =A0of: merge of_find_all_nodes() implementations
> =A0 =A0 =A0of: merge other miscellaneous prototypes
> =A0 =A0 =A0of: merge of_*_flat_dt*() functions
> =A0 =A0 =A0of: merge of_node_get(), of_node_put() and of_find_all_nodes()
> =A0 =A0 =A0of: merge of_read_number() an of_read_ulong()
> =A0 =A0 =A0of: merge of_node_*_flag() and set_node_proc_entry()
> =A0 =A0 =A0of: merge struct boot_param_header from Microblaze and PowerPC
> =A0 =A0 =A0of: add common header for flattened device tree representation
> =A0 =A0 =A0of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
> =A0 =A0 =A0of: merge struct device_node
> =A0 =A0 =A0of: merge phandle, ihandle and struct property
> =A0 =A0 =A0of: Rework linux/of.h and asm/prom.h include ordering
>
>
> =A0arch/microblaze/include/asm/prom.h | =A0135 +-------------------------=
-------
> =A0arch/microblaze/kernel/prom.c =A0 =A0 =A0| =A0 23 ------
> =A0arch/powerpc/include/asm/prom.h =A0 =A0| =A0147 ----------------------=
--------------
> =A0arch/powerpc/kernel/prom.c =A0 =A0 =A0 =A0 | =A0 23 ------
> =A0arch/sparc/include/asm/prom.h =A0 =A0 =A0| =A0 55 -------------
> =A0drivers/of/base.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 26 ++++++
> =A0include/linux/of.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0103 ++++++++++=
+++++++++++++++
> =A0include/linux/of_fdt.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0 87 ++++++++++++++=
+++++++
> =A08 files changed, 221 insertions(+), 378 deletions(-)
> =A0create mode 100644 include/linux/of_fdt.h

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  4:30   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
  (?)
@ 2009-10-07  4:57     ` Stephen Rothwell
  -1 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-07  4:57 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q


[-- Attachment #1.1: Type: text/plain, Size: 1469 bytes --]

Hi Grant,

Just first obvious thing:

On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */

This is used in arch/microblaze/kernel/head.S, but you move its
definition inside "#ifndef __ASSEMBLY__" below.  You should probably
replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
linux/of_fdt.h (assuming that the comment in there is correct).

> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10
> -
>  #ifndef __ASSEMBLY__
>  
>  #include <linux/types.h>
> +#include <linux/of_fdt.h>
>  #include <linux/proc_fs.h>
>  #include <linux/platform_device.h>
>  #include <asm/irq.h>

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device
@ 2009-10-07  4:57     ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-07  4:57 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

Hi Grant,

Just first obvious thing:

On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */

This is used in arch/microblaze/kernel/head.S, but you move its
definition inside "#ifndef __ASSEMBLY__" below.  You should probably
replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
linux/of_fdt.h (assuming that the comment in there is correct).

> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10
> -
>  #ifndef __ASSEMBLY__
>  
>  #include <linux/types.h>
> +#include <linux/of_fdt.h>
>  #include <linux/proc_fs.h>
>  #include <linux/platform_device.h>
>  #include <asm/irq.h>

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07  4:57     ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-07  4:57 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

Hi Grant,

Just first obvious thing:

On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */

This is used in arch/microblaze/kernel/head.S, but you move its
definition inside "#ifndef __ASSEMBLY__" below.  You should probably
replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
linux/of_fdt.h (assuming that the comment in there is correct).

> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10
> -
>  #ifndef __ASSEMBLY__
>  
>  #include <linux/types.h>
> +#include <linux/of_fdt.h>
>  #include <linux/proc_fs.h>
>  #include <linux/platform_device.h>
>  #include <asm/irq.h>

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  4:30   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
  (?)
@ 2009-10-07  5:14     ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 136+ messages in thread
From: Benjamin Herrenschmidt @ 2009-10-07  5:14 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:

> --- /dev/null
> +++ b/include/linux/of_fdt.h
> @@ -0,0 +1,30 @@
> +/*
> + * Definitions for working with the Flattened Device Tree data format
> + *
> + * Copyright (C) 1996-2005 Paul Mackerras.
> + *
> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
> + * Updates for SPARC by David S. Miller
> + * Merged to common code by Grant Likely

I think you should prune the above. Make it (c) myself since I wrote the
FDT code initially. You can add back (c) of other people as you add more
stuff here I suppose.

No big deal tho.

Ben.

> + * 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_FDT_H
> +#define _LINUX_OF_FDT_H
> +
> +/* Definitions used by the flattened device tree */
> +#define OF_DT_HEADER		0xd00dfeed	/* marker */
> +#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
> +#define OF_DT_END_NODE		0x2		/* End node */
> +#define OF_DT_PROP		0x3		/* Property: name off, size,
> +						 * content */
> +#define OF_DT_NOP		0x4		/* nop */
> +#define OF_DT_END		0x9
> +
> +#define OF_DT_VERSION		0x10
> +
> +#endif /* _LINUX_OF_FDT_H */

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device
@ 2009-10-07  5:14     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 136+ messages in thread
From: Benjamin Herrenschmidt @ 2009-10-07  5:14 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:

> --- /dev/null
> +++ b/include/linux/of_fdt.h
> @@ -0,0 +1,30 @@
> +/*
> + * Definitions for working with the Flattened Device Tree data format
> + *
> + * Copyright (C) 1996-2005 Paul Mackerras.
> + *
> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
> + * Updates for SPARC by David S. Miller
> + * Merged to common code by Grant Likely

I think you should prune the above. Make it (c) myself since I wrote the
FDT code initially. You can add back (c) of other people as you add more
stuff here I suppose.

No big deal tho.

Ben.

> + * 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_FDT_H
> +#define _LINUX_OF_FDT_H
> +
> +/* Definitions used by the flattened device tree */
> +#define OF_DT_HEADER		0xd00dfeed	/* marker */
> +#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
> +#define OF_DT_END_NODE		0x2		/* End node */
> +#define OF_DT_PROP		0x3		/* Property: name off, size,
> +						 * content */
> +#define OF_DT_NOP		0x4		/* nop */
> +#define OF_DT_END		0x9
> +
> +#define OF_DT_VERSION		0x10
> +
> +#endif /* _LINUX_OF_FDT_H */



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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07  5:14     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 136+ messages in thread
From: Benjamin Herrenschmidt @ 2009-10-07  5:14 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, monstr, microblaze-uclinux, devicetree-discuss,
	sparclinux, linuxppc-dev, davem

On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:

> --- /dev/null
> +++ b/include/linux/of_fdt.h
> @@ -0,0 +1,30 @@
> +/*
> + * Definitions for working with the Flattened Device Tree data format
> + *
> + * Copyright (C) 1996-2005 Paul Mackerras.
> + *
> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
> + * Updates for SPARC by David S. Miller
> + * Merged to common code by Grant Likely

I think you should prune the above. Make it (c) myself since I wrote the
FDT code initially. You can add back (c) of other people as you add more
stuff here I suppose.

No big deal tho.

Ben.

> + * 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_FDT_H
> +#define _LINUX_OF_FDT_H
> +
> +/* Definitions used by the flattened device tree */
> +#define OF_DT_HEADER		0xd00dfeed	/* marker */
> +#define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
> +#define OF_DT_END_NODE		0x2		/* End node */
> +#define OF_DT_PROP		0x3		/* Property: name off, size,
> +						 * content */
> +#define OF_DT_NOP		0x4		/* nop */
> +#define OF_DT_END		0x9
> +
> +#define OF_DT_VERSION		0x10
> +
> +#endif /* _LINUX_OF_FDT_H */

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:49   ` Grant Likely
  (?)
@ 2009-10-07  5:18     ` Julian Calaby
  -1 siblings, 0 replies; 136+ messages in thread
From: Julian Calaby @ 2009-10-07  5:18 UTC (permalink / raw)
  To: Grant Likely
  Cc: Sam Creasey, Stephen Rothwell, monstr, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> So here goes.  I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches.  Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks.  This first batch isn't
>> anything exciting, just a merge of common code

Good work, for what it's worth, this all looks good to me.

> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS.  Lots of work to be done.

On the subject of merging code, I know that the SUN3 code in m68k uses
a similar prom interface to the sparc32 code. (and I've also
considered unifying that and ... well ... see above) Does anyone know
if it has an OpenFirmware interface for it's devices? Is OF on SUN3
even remotely useful? Does Linux on SUN3 even work with modern
kernels?

Another issue is that there is at least one driver in the kernel that
depends on both PPC and OF to work around the differences in the
implementations of OpenFirmware on Sparc and PowerPC. (I submitted a
patch for it, but can't remember the driver's name) Whilst the
driver's author assures me that the hardware will never go anywhere
near Sparc, it can't hurt to drop the dependency on PPC for additional
compile testing coverage - and because it's the Right Thing. (and the
reduction of cheap hacks like this can't be bad either.)

Other than that, good work, and keep going.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  5:18     ` Julian Calaby
  0 siblings, 0 replies; 136+ messages in thread
From: Julian Calaby @ 2009-10-07  5:18 UTC (permalink / raw)
  To: Grant Likely
  Cc: Sam Creasey, Stephen Rothwell, monstr, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> So here goes.  I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches.  Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks.  This first batch isn't
>> anything exciting, just a merge of common code

Good work, for what it's worth, this all looks good to me.

> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS.  Lots of work to be done.

On the subject of merging code, I know that the SUN3 code in m68k uses
a similar prom interface to the sparc32 code. (and I've also
considered unifying that and ... well ... see above) Does anyone know
if it has an OpenFirmware interface for it's devices? Is OF on SUN3
even remotely useful? Does Linux on SUN3 even work with modern
kernels?

Another issue is that there is at least one driver in the kernel that
depends on both PPC and OF to work around the differences in the
implementations of OpenFirmware on Sparc and PowerPC. (I submitted a
patch for it, but can't remember the driver's name) Whilst the
driver's author assures me that the hardware will never go anywhere
near Sparc, it can't hurt to drop the dependency on PPC for additional
compile testing coverage - and because it's the Right Thing. (and the
reduction of cheap hacks like this can't be bad either.)

Other than that, good work, and keep going.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  5:18     ` Julian Calaby
  0 siblings, 0 replies; 136+ messages in thread
From: Julian Calaby @ 2009-10-07  5:18 UTC (permalink / raw)
  To: Grant Likely
  Cc: Sam Creasey, Stephen Rothwell, monstr, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely@secretlab.ca> wrot=
e:
> On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca>=
 wrote:
>>
>> So here goes. =A0I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches. =A0Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks. =A0This first batch isn't
>> anything exciting, just a merge of common code

Good work, for what it's worth, this all looks good to me.

> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow. =A0Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS. =A0Lots of work to be done.

On the subject of merging code, I know that the SUN3 code in m68k uses
a similar prom interface to the sparc32 code. (and I've also
considered unifying that and ... well ... see above) Does anyone know
if it has an OpenFirmware interface for it's devices? Is OF on SUN3
even remotely useful? Does Linux on SUN3 even work with modern
kernels?

Another issue is that there is at least one driver in the kernel that
depends on both PPC and OF to work around the differences in the
implementations of OpenFirmware on Sparc and PowerPC. (I submitted a
patch for it, but can't remember the driver's name) Whilst the
driver's author assures me that the hardware will never go anywhere
near Sparc, it can't hurt to drop the dependency on PPC for additional
compile testing coverage - and because it's the Right Thing. (and the
reduction of cheap hacks like this can't be bad either.)

Other than that, good work, and keep going.

Thanks,

--=20

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]   ` <fa686aa40910062149p5d7141e4x3ff849fd4d191f38-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-07  7:09       ` Rob Landley
@ 2009-10-07  7:09       ` Rob Landley
  2009-10-07  9:02       ` Wolfram Sang
  2 siblings, 0 replies; 136+ messages in thread
From: Rob Landley @ 2009-10-07  7:09 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: Grant Likely, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ

On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>
> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS.  Lots of work to be done.

Is there any news on getting QEMU to parse a device tree to figure out what 
hardware to emulate?  (I.E. using the device tree code to let qemu provide 
configurable board emulations instead of hardwiring them in C code?)

Also, what would be involved in getting x86 to (at least have the option to) 
use the device tree stuff?

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  7:09       ` Rob Landley
  0 siblings, 0 replies; 136+ messages in thread
From: Rob Landley @ 2009-10-07  7:09 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: Grant Likely, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ

On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>
> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS.  Lots of work to be done.

Is there any news on getting QEMU to parse a device tree to figure out what 
hardware to emulate?  (I.E. using the device tree code to let qemu provide 
configurable board emulations instead of hardwiring them in C code?)

Also, what would be involved in getting x86 to (at least have the option to) 
use the device tree stuff?

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  7:09       ` Rob Landley
  0 siblings, 0 replies; 136+ messages in thread
From: Rob Landley @ 2009-10-07  7:09 UTC (permalink / raw)
  To: devicetree-discuss
  Cc: Stephen Rothwell, monstr, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>
> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've
> got all the common code merged between Microblaze, PowerPC and Sparc
> I'll be fix the endian problems and making it easily usable by other
> architectures like ARM and MIPS.  Lots of work to be done.

Is there any news on getting QEMU to parse a device tree to figure out what 
hardware to emulate?  (I.E. using the device tree code to let qemu provide 
configurable board emulations instead of hardwiring them in C code?)

Also, what would be involved in getting x86 to (at least have the option to) 
use the device tree stuff?

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]   ` <fa686aa40910062149p5d7141e4x3ff849fd4d191f38-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-07  7:09       ` Rob Landley
@ 2009-10-07  7:27       ` David Miller
  2009-10-07  9:02       ` Wolfram Sang
  2 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07  7:27 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Date: Tue, 6 Oct 2009 22:49:04 -0600

> Also, I'd like to take on responsibility for maintaining the cross-
> architecture device tree code.  If there are no objections, I'll
> write a patch to add a device tree section to MAINTAINERS.

Feel free.  And also feel free to add my:

Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

to your patches.

Thanks!

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  7:27       ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07  7:27 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Grant Likely <grant.likely@secretlab.ca>
Date: Tue, 6 Oct 2009 22:49:04 -0600

> Also, I'd like to take on responsibility for maintaining the cross-
> architecture device tree code.  If there are no objections, I'll
> write a patch to add a device tree section to MAINTAINERS.

Feel free.  And also feel free to add my:

Acked-by: David S. Miller <davem@davemloft.net>

to your patches.

Thanks!

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  7:27       ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07  7:27 UTC (permalink / raw)
  To: grant.likely
  Cc: sfr, monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>
Date: Tue, 6 Oct 2009 22:49:04 -0600

> Also, I'd like to take on responsibility for maintaining the cross-
> architecture device tree code.  If there are no objections, I'll
> write a patch to add a device tree section to MAINTAINERS.

Feel free.  And also feel free to add my:

Acked-by: David S. Miller <davem@davemloft.net>

to your patches.

Thanks!

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]   ` <fa686aa40910062149p5d7141e4x3ff849fd4d191f38-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-07  7:09       ` Rob Landley
@ 2009-10-07  9:02       ` Wolfram Sang
  2009-10-07  9:02       ` Wolfram Sang
  2 siblings, 0 replies; 136+ messages in thread
From: Wolfram Sang @ 2009-10-07  9:02 UTC (permalink / raw)
  To: Grant Likely
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]


> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've

\o/ Thanks, Grant! A seperate tree would be great. Patches look good to me:

Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

-- 
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] 136+ messages in thread

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  9:02       ` Wolfram Sang
  0 siblings, 0 replies; 136+ messages in thread
From: Wolfram Sang @ 2009-10-07  9:02 UTC (permalink / raw)
  To: Grant Likely
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]


> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've

\o/ Thanks, Grant! A seperate tree would be great. Patches look good to me:

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

-- 
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] 136+ messages in thread

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07  9:02       ` Wolfram Sang
  0 siblings, 0 replies; 136+ messages in thread
From: Wolfram Sang @ 2009-10-07  9:02 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]


> However, I've completely devoted to this work for at least the next
> two months, so there are plenty more patches to follow.  Once I've

\o/ Thanks, Grant! A seperate tree would be great. Patches look good to me:

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

-- 
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] 136+ messages in thread

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  4:57     ` [RFC PATCH 05/12] of: add common header for flattened device Stephen Rothwell
  (?)
@ 2009-10-07 12:14       ` Michal Simek
  -1 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 12:14 UTC (permalink / raw)
  To: microblaze-uclinux
  Cc: Grant Likely, linuxppc-dev, benh, davem, sparclinux, monstr,
	devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]



Stephen Rothwell wrote:
> Hi Grant,
> 
> Just first obvious thing:
> 
> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>  #define _ASM_MICROBLAZE_PROM_H
>>  #ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> 
> This is used in arch/microblaze/kernel/head.S, but you move its
> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
> linux/of_fdt.h (assuming that the comment in there is correct).

yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
works for both versions too.

With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>

Thanks,
Michal

P.S.: I have my provider - it block my emails - that's why the patch is in attachment.

> 
>> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE		0x2 /* End node */
>> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
>> -#define OF_DT_NOP		0x4 /* nop */
>> -#define OF_DT_END		0x9
>> -
>> -#define OF_DT_VERSION		0x10
>> -
>>  #ifndef __ASSEMBLY__
>>  
>>  #include <linux/types.h>
>> +#include <linux/of_fdt.h>
>>  #include <linux/proc_fs.h>
>>  #include <linux/platform_device.h>
>>  #include <asm/irq.h>
> 


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

[-- Attachment #2: 0001-of-microblaze-of_fdt.h-is-used-in-asm-code.patch --]
[-- Type: text/x-patch, Size: 1531 bytes --]

>From 73b16cccc544fe8410ec8e8e893aa3357093e985 Mon Sep 17 00:00:00 2001
From: Michal Simek <monstr@monstr.eu>
Date: Wed, 7 Oct 2009 14:04:01 +0200
Subject: [PATCH] of: microblaze: of_fdt.h is used in asm code.

Microblaze uses OF_DT_HEADER macro to identify DTB.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/kernel/head.S |    2 +-
 include/linux/of_fdt.h        |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
index 697ce30..3091619 100644
--- a/arch/microblaze/kernel/head.S
+++ b/arch/microblaze/kernel/head.S
@@ -31,7 +31,7 @@
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/page.h>
-#include <asm/prom.h>		/* for OF_DT_HEADER */
+#include <linux/of_fdt.h>		/* for OF_DT_HEADER */
 
 #ifdef CONFIG_MMU
 #include <asm/setup.h> /* COMMAND_LINE_SIZE */
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b41bd18..44fecfa 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -30,6 +30,7 @@
 
 #define OF_DT_VERSION		0x10
 
+#ifndef __ASSEMBLY__
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
@@ -84,4 +85,6 @@ extern int prom_remove_property(struct device_node *np, struct property *prop);
 extern int prom_update_property(struct device_node *np,
 				struct property *newprop,
 				struct property *oldprop);
+#endif /* __ASSEMBLY__ */
+
 #endif /* _LINUX_OF_FDT_H */
-- 
1.5.5.1



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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header
@ 2009-10-07 12:14       ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 12:14 UTC (permalink / raw)
  To: microblaze-uclinux
  Cc: Grant Likely, linuxppc-dev, benh, davem, sparclinux, monstr,
	devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]



Stephen Rothwell wrote:
> Hi Grant,
> 
> Just first obvious thing:
> 
> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>  #define _ASM_MICROBLAZE_PROM_H
>>  #ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> 
> This is used in arch/microblaze/kernel/head.S, but you move its
> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
> linux/of_fdt.h (assuming that the comment in there is correct).

yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
works for both versions too.

With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>

Thanks,
Michal

P.S.: I have my provider - it block my emails - that's why the patch is in attachment.

> 
>> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE		0x2 /* End node */
>> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
>> -#define OF_DT_NOP		0x4 /* nop */
>> -#define OF_DT_END		0x9
>> -
>> -#define OF_DT_VERSION		0x10
>> -
>>  #ifndef __ASSEMBLY__
>>  
>>  #include <linux/types.h>
>> +#include <linux/of_fdt.h>
>>  #include <linux/proc_fs.h>
>>  #include <linux/platform_device.h>
>>  #include <asm/irq.h>
> 


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

[-- Attachment #2: 0001-of-microblaze-of_fdt.h-is-used-in-asm-code.patch --]
[-- Type: text/x-patch, Size: 1530 bytes --]

From 73b16cccc544fe8410ec8e8e893aa3357093e985 Mon Sep 17 00:00:00 2001
From: Michal Simek <monstr@monstr.eu>
Date: Wed, 7 Oct 2009 14:04:01 +0200
Subject: [PATCH] of: microblaze: of_fdt.h is used in asm code.

Microblaze uses OF_DT_HEADER macro to identify DTB.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/kernel/head.S |    2 +-
 include/linux/of_fdt.h        |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
index 697ce30..3091619 100644
--- a/arch/microblaze/kernel/head.S
+++ b/arch/microblaze/kernel/head.S
@@ -31,7 +31,7 @@
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/page.h>
-#include <asm/prom.h>		/* for OF_DT_HEADER */
+#include <linux/of_fdt.h>		/* for OF_DT_HEADER */
 
 #ifdef CONFIG_MMU
 #include <asm/setup.h> /* COMMAND_LINE_SIZE */
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b41bd18..44fecfa 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -30,6 +30,7 @@
 
 #define OF_DT_VERSION		0x10
 
+#ifndef __ASSEMBLY__
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
@@ -84,4 +85,6 @@ extern int prom_remove_property(struct device_node *np, struct property *prop);
 extern int prom_update_property(struct device_node *np,
 				struct property *newprop,
 				struct property *oldprop);
+#endif /* __ASSEMBLY__ */
+
 #endif /* _LINUX_OF_FDT_H */
-- 
1.5.5.1



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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07 12:14       ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 12:14 UTC (permalink / raw)
  To: microblaze-uclinux
  Cc: monstr, devicetree-discuss, sparclinux, linuxppc-dev, davem

[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]



Stephen Rothwell wrote:
> Hi Grant,
> 
> Just first obvious thing:
> 
> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>  #define _ASM_MICROBLAZE_PROM_H
>>  #ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> 
> This is used in arch/microblaze/kernel/head.S, but you move its
> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
> linux/of_fdt.h (assuming that the comment in there is correct).

yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
works for both versions too.

With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>

Thanks,
Michal

P.S.: I have my provider - it block my emails - that's why the patch is in attachment.

> 
>> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE		0x2 /* End node */
>> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
>> -#define OF_DT_NOP		0x4 /* nop */
>> -#define OF_DT_END		0x9
>> -
>> -#define OF_DT_VERSION		0x10
>> -
>>  #ifndef __ASSEMBLY__
>>  
>>  #include <linux/types.h>
>> +#include <linux/of_fdt.h>
>>  #include <linux/proc_fs.h>
>>  #include <linux/platform_device.h>
>>  #include <asm/irq.h>
> 


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

[-- Attachment #2: 0001-of-microblaze-of_fdt.h-is-used-in-asm-code.patch --]
[-- Type: text/x-patch, Size: 1531 bytes --]

>From 73b16cccc544fe8410ec8e8e893aa3357093e985 Mon Sep 17 00:00:00 2001
From: Michal Simek <monstr@monstr.eu>
Date: Wed, 7 Oct 2009 14:04:01 +0200
Subject: [PATCH] of: microblaze: of_fdt.h is used in asm code.

Microblaze uses OF_DT_HEADER macro to identify DTB.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/kernel/head.S |    2 +-
 include/linux/of_fdt.h        |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
index 697ce30..3091619 100644
--- a/arch/microblaze/kernel/head.S
+++ b/arch/microblaze/kernel/head.S
@@ -31,7 +31,7 @@
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/page.h>
-#include <asm/prom.h>		/* for OF_DT_HEADER */
+#include <linux/of_fdt.h>		/* for OF_DT_HEADER */
 
 #ifdef CONFIG_MMU
 #include <asm/setup.h> /* COMMAND_LINE_SIZE */
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b41bd18..44fecfa 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -30,6 +30,7 @@
 
 #define OF_DT_VERSION		0x10
 
+#ifndef __ASSEMBLY__
 /*
  * This is what gets passed to the kernel by prom_init or kexec
  *
@@ -84,4 +85,6 @@ extern int prom_remove_property(struct device_node *np, struct property *prop);
 extern int prom_update_property(struct device_node *np,
 				struct property *newprop,
 				struct property *oldprop);
+#endif /* __ASSEMBLY__ */
+
 #endif /* _LINUX_OF_FDT_H */
-- 
1.5.5.1



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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
       [not found]       ` <4ACC861A.7020506-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
  2009-10-07 13:38           ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header Grant Likely
@ 2009-10-07 13:38           ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:38 UTC (permalink / raw)
  To: monstr-pSz03upnqPeHXe+LvDLADg
  Cc: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Wed, Oct 7, 2009 at 6:14 AM, Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> wrote:
>
>
> Stephen Rothwell wrote:
>> Hi Grant,
>>
>> Just first obvious thing:
>>
>> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>>> index 64e8b3a..5f461f0 100644
>>> --- a/arch/microblaze/include/asm/prom.h
>>> +++ b/arch/microblaze/include/asm/prom.h
>>> @@ -17,20 +17,10 @@
>>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>>  #define _ASM_MICROBLAZE_PROM_H
>>>  #ifdef __KERNEL__
>>> -
>>> -/* Definitions used by the flattened device tree */
>>> -#define OF_DT_HEADER                0xd00dfeed /* marker */
>>
>> This is used in arch/microblaze/kernel/head.S, but you move its
>> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
>> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
>> linux/of_fdt.h (assuming that the comment in there is correct).
>
> yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
> patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
> works for both versions too.
>
> With that my patch: Acked-by: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

Thanks.  I'll merge your change with my patch so that bisect isn't broken.

g.

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

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header
@ 2009-10-07 13:38           ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:38 UTC (permalink / raw)
  To: monstr-pSz03upnqPeHXe+LvDLADg
  Cc: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Wed, Oct 7, 2009 at 6:14 AM, Michal Simek <monstr@monstr.eu> wrote:
>
>
> Stephen Rothwell wrote:
>> Hi Grant,
>>
>> Just first obvious thing:
>>
>> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>>> index 64e8b3a..5f461f0 100644
>>> --- a/arch/microblaze/include/asm/prom.h
>>> +++ b/arch/microblaze/include/asm/prom.h
>>> @@ -17,20 +17,10 @@
>>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>>  #define _ASM_MICROBLAZE_PROM_H
>>>  #ifdef __KERNEL__
>>> -
>>> -/* Definitions used by the flattened device tree */
>>> -#define OF_DT_HEADER                0xd00dfeed /* marker */
>>
>> This is used in arch/microblaze/kernel/head.S, but you move its
>> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
>> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
>> linux/of_fdt.h (assuming that the comment in there is correct).
>
> yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
> patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
> works for both versions too.
>
> With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>

Thanks.  I'll merge your change with my patch so that bisect isn't broken.

g.

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

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07 13:38           ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:38 UTC (permalink / raw)
  To: monstr
  Cc: microblaze-uclinux, devicetree-discuss, sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 6:14 AM, Michal Simek <monstr@monstr.eu> wrote:
>
>
> Stephen Rothwell wrote:
>> Hi Grant,
>>
>> Just first obvious thing:
>>
>> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.=
ca> wrote:
>>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/inclu=
de/asm/prom.h
>>> index 64e8b3a..5f461f0 100644
>>> --- a/arch/microblaze/include/asm/prom.h
>>> +++ b/arch/microblaze/include/asm/prom.h
>>> @@ -17,20 +17,10 @@
>>> =A0#ifndef _ASM_MICROBLAZE_PROM_H
>>> =A0#define _ASM_MICROBLAZE_PROM_H
>>> =A0#ifdef __KERNEL__
>>> -
>>> -/* Definitions used by the flattened device tree */
>>> -#define OF_DT_HEADER =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00xd00dfeed /* mark=
er */
>>
>> This is used in arch/microblaze/kernel/head.S, but you move its
>> definition inside "#ifndef __ASSEMBLY__" below. =A0You should probably
>> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
>> linux/of_fdt.h (assuming that the comment in there is correct).
>
> yes, Stephen is right here. I created one patch (in attachment) which fix=
ed it. I tested your
> patches on Microblaze (noMMU and MMU) and I have no problem with compilat=
ion and simple boot-up
> works for both versions too.
>
> With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>

Thanks.  I'll merge your change with my patch so that bisect isn't broken.

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  5:14     ` [RFC PATCH 05/12] of: add common header for flattened device Benjamin Herrenschmidt
  (?)
@ 2009-10-07 13:41       ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 6, 2009 at 11:14 PM, Benjamin Herrenschmidt
<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> wrote:
> On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:
>
>> --- /dev/null
>> +++ b/include/linux/of_fdt.h
>> @@ -0,0 +1,30 @@
>> +/*
>> + * Definitions for working with the Flattened Device Tree data format
>> + *
>> + * Copyright (C) 1996-2005 Paul Mackerras.
>> + *
>> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
>> + * Updates for SPARC by David S. Miller
>> + * Merged to common code by Grant Likely
>
> I think you should prune the above. Make it (c) myself since I wrote the
> FDT code initially. You can add back (c) of other people as you add more
> stuff here I suppose.
>
> No big deal tho.

No problem.  What is the exact copyright text that you'd like to see
here?  I'm not going to guess on other people's copyright notice.  :-)

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree
@ 2009-10-07 13:41       ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 6, 2009 at 11:14 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:
>
>> --- /dev/null
>> +++ b/include/linux/of_fdt.h
>> @@ -0,0 +1,30 @@
>> +/*
>> + * Definitions for working with the Flattened Device Tree data format
>> + *
>> + * Copyright (C) 1996-2005 Paul Mackerras.
>> + *
>> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
>> + * Updates for SPARC by David S. Miller
>> + * Merged to common code by Grant Likely
>
> I think you should prune the above. Make it (c) myself since I wrote the
> FDT code initially. You can add back (c) of other people as you add more
> stuff here I suppose.
>
> No big deal tho.

No problem.  What is the exact copyright text that you'd like to see
here?  I'm not going to guess on other people's copyright notice.  :-)

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-07 13:41       ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 13:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Stephen Rothwell, monstr, microblaze-uclinux, devicetree-discuss,
	sparclinux, linuxppc-dev, davem

On Tue, Oct 6, 2009 at 11:14 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Tue, 2009-10-06 at 22:30 -0600, Grant Likely wrote:
>
>> --- /dev/null
>> +++ b/include/linux/of_fdt.h
>> @@ -0,0 +1,30 @@
>> +/*
>> + * Definitions for working with the Flattened Device Tree data format
>> + *
>> + * Copyright (C) 1996-2005 Paul Mackerras.
>> + *
>> + * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
>> + * Updates for SPARC by David S. Miller
>> + * Merged to common code by Grant Likely
>
> I think you should prune the above. Make it (c) myself since I wrote the
> FDT code initially. You can add back (c) of other people as you add more
> stuff here I suppose.
>
> No big deal tho.

No problem.  What is the exact copyright text that you'd like to see
here?  I'm not going to guess on other people's copyright notice.  :-)

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]     ` <646765f40910062218s19d540f9q14c9086bedd1d9da-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-07 13:52         ` Sam Creasey
@ 2009-10-07 13:52         ` Sam Creasey
  0 siblings, 0 replies; 136+ messages in thread
From: Sam Creasey @ 2009-10-07 13:52 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Grant Likely, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Sam Creasey

On Wed, Oct 07, 2009 at 03:18:04PM +1000, Julian Calaby wrote:
> On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
> > On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> >>
> >> So here goes.  I've begun the work to merge and clean up the OF device
> >> tree handling code and this is my first set of patches.  Not fully
> >> tested yet, but I'm getting them out to the lists so that I can start
> >> responding to comments and collecting acks.  This first batch isn't
> >> anything exciting, just a merge of common code
> 
> Good work, for what it's worth, this all looks good to me.
> 
> > However, I've completely devoted to this work for at least the next
> > two months, so there are plenty more patches to follow.  Once I've
> > got all the common code merged between Microblaze, PowerPC and Sparc
> > I'll be fix the endian problems and making it easily usable by other
> > architectures like ARM and MIPS.  Lots of work to be done.
> 
> On the subject of merging code, I know that the SUN3 code in m68k uses
> a similar prom interface to the sparc32 code. (and I've also
> considered unifying that and ... well ... see above) Does anyone know
> if it has an OpenFirmware interface for it's devices? Is OF on SUN3
> even remotely useful? Does Linux on SUN3 even work with modern
> kernels?

Sun3 doesn't have OF, though I've got some dormant patches to add an
OF emulation layer to make it easier to reuse Sparc drivers on
Sun3...   Never finished enough to submit, so it probably shouldn't
affect anything you're doing here.

As for recent kernels, I think 2.6.19 was the last sun3 I distributed
patches for, so modern might be pushing it...

-- Sam

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 13:52         ` Sam Creasey
  0 siblings, 0 replies; 136+ messages in thread
From: Sam Creasey @ 2009-10-07 13:52 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Grant Likely, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r, Stephen Rothwell,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, sparclinux-u79uwXL29TY76Z2rM5mHXA,
	monstr-pSz03upnqPeHXe+LvDLADg,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Sam Creasey

On Wed, Oct 07, 2009 at 03:18:04PM +1000, Julian Calaby wrote:
> On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely@secretlab.ca> wrote:
> > On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> >>
> >> So here goes.  I've begun the work to merge and clean up the OF device
> >> tree handling code and this is my first set of patches.  Not fully
> >> tested yet, but I'm getting them out to the lists so that I can start
> >> responding to comments and collecting acks.  This first batch isn't
> >> anything exciting, just a merge of common code
> 
> Good work, for what it's worth, this all looks good to me.
> 
> > However, I've completely devoted to this work for at least the next
> > two months, so there are plenty more patches to follow.  Once I've
> > got all the common code merged between Microblaze, PowerPC and Sparc
> > I'll be fix the endian problems and making it easily usable by other
> > architectures like ARM and MIPS.  Lots of work to be done.
> 
> On the subject of merging code, I know that the SUN3 code in m68k uses
> a similar prom interface to the sparc32 code. (and I've also
> considered unifying that and ... well ... see above) Does anyone know
> if it has an OpenFirmware interface for it's devices? Is OF on SUN3
> even remotely useful? Does Linux on SUN3 even work with modern
> kernels?

Sun3 doesn't have OF, though I've got some dormant patches to add an
OF emulation layer to make it easier to reuse Sparc drivers on
Sun3...   Never finished enough to submit, so it probably shouldn't
affect anything you're doing here.

As for recent kernels, I think 2.6.19 was the last sun3 I distributed
patches for, so modern might be pushing it...

-- Sam


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 13:52         ` Sam Creasey
  0 siblings, 0 replies; 136+ messages in thread
From: Sam Creasey @ 2009-10-07 13:52 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Sam Creasey, Stephen Rothwell, monstr, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 07, 2009 at 03:18:04PM +1000, Julian Calaby wrote:
> On Wed, Oct 7, 2009 at 14:49, Grant Likely <grant.likely@secretlab.ca> wrote:
> > On Tue, Oct 6, 2009 at 10:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> >>
> >> So here goes.  I've begun the work to merge and clean up the OF device
> >> tree handling code and this is my first set of patches.  Not fully
> >> tested yet, but I'm getting them out to the lists so that I can start
> >> responding to comments and collecting acks.  This first batch isn't
> >> anything exciting, just a merge of common code
> 
> Good work, for what it's worth, this all looks good to me.
> 
> > However, I've completely devoted to this work for at least the next
> > two months, so there are plenty more patches to follow.  Once I've
> > got all the common code merged between Microblaze, PowerPC and Sparc
> > I'll be fix the endian problems and making it easily usable by other
> > architectures like ARM and MIPS.  Lots of work to be done.
> 
> On the subject of merging code, I know that the SUN3 code in m68k uses
> a similar prom interface to the sparc32 code. (and I've also
> considered unifying that and ... well ... see above) Does anyone know
> if it has an OpenFirmware interface for it's devices? Is OF on SUN3
> even remotely useful? Does Linux on SUN3 even work with modern
> kernels?

Sun3 doesn't have OF, though I've got some dormant patches to add an
OF emulation layer to make it easier to reuse Sparc drivers on
Sun3...   Never finished enough to submit, so it probably shouldn't
affect anything you're doing here.

As for recent kernels, I think 2.6.19 was the last sun3 I distributed
patches for, so modern might be pushing it...

-- Sam

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  7:09       ` Rob Landley
  (?)
@ 2009-10-07 14:02         ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 14:02 UTC (permalink / raw)
  To: Rob Landley
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob@landley.net> wrote:
> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>
>> However, I've completely devoted to this work for at least the next
>> two months, so there are plenty more patches to follow.  Once I've
>> got all the common code merged between Microblaze, PowerPC and Sparc
>> I'll be fix the endian problems and making it easily usable by other
>> architectures like ARM and MIPS.  Lots of work to be done.
>
> Is there any news on getting QEMU to parse a device tree to figure out what
> hardware to emulate?  (I.E. using the device tree code to let qemu provide
> configurable board emulations instead of hardwiring them in C code?)

Not that I have, but I expect that I will be hacking on QEMU as part
of this work.

> Also, what would be involved in getting x86 to (at least have the option to)
> use the device tree stuff?

It would be very easy once the endian issues are worked out since the
device tree is just a data format to be parsed.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 14:02         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 14:02 UTC (permalink / raw)
  To: Rob Landley
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob@landley.net> wrote:
> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>
>> However, I've completely devoted to this work for at least the next
>> two months, so there are plenty more patches to follow.  Once I've
>> got all the common code merged between Microblaze, PowerPC and Sparc
>> I'll be fix the endian problems and making it easily usable by other
>> architectures like ARM and MIPS.  Lots of work to be done.
>
> Is there any news on getting QEMU to parse a device tree to figure out what
> hardware to emulate?  (I.E. using the device tree code to let qemu provide
> configurable board emulations instead of hardwiring them in C code?)

Not that I have, but I expect that I will be hacking on QEMU as part
of this work.

> Also, what would be involved in getting x86 to (at least have the option to)
> use the device tree stuff?

It would be very easy once the endian issues are worked out since the
device tree is just a data format to be parsed.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 14:02         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-07 14:02 UTC (permalink / raw)
  To: Rob Landley
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob@landley.net> wrote:
> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>
>> However, I've completely devoted to this work for at least the next
>> two months, so there are plenty more patches to follow. =A0Once I've
>> got all the common code merged between Microblaze, PowerPC and Sparc
>> I'll be fix the endian problems and making it easily usable by other
>> architectures like ARM and MIPS. =A0Lots of work to be done.
>
> Is there any news on getting QEMU to parse a device tree to figure out wh=
at
> hardware to emulate? =A0(I.E. using the device tree code to let qemu prov=
ide
> configurable board emulations instead of hardwiring them in C code?)

Not that I have, but I expect that I will be hacking on QEMU as part
of this work.

> Also, what would be involved in getting x86 to (at least have the option =
to)
> use the device tree stuff?

It would be very easy once the endian issues are worked out since the
device tree is just a data format to be parsed.

g.

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

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07 13:38           ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header Grant Likely
@ 2009-10-07 14:07             ` Michal Simek
  -1 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 14:07 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: sparclinux, devicetree-discuss, linuxppc-dev, davem



Grant Likely wrote:
> On Wed, Oct 7, 2009 at 6:14 AM, Michal Simek <monstr@monstr.eu> wrote:
>>
>> Stephen Rothwell wrote:
>>> Hi Grant,
>>>
>>> Just first obvious thing:
>>>
>>> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>>>> index 64e8b3a..5f461f0 100644
>>>> --- a/arch/microblaze/include/asm/prom.h
>>>> +++ b/arch/microblaze/include/asm/prom.h
>>>> @@ -17,20 +17,10 @@
>>>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>>>  #define _ASM_MICROBLAZE_PROM_H
>>>>  #ifdef __KERNEL__
>>>> -
>>>> -/* Definitions used by the flattened device tree */
>>>> -#define OF_DT_HEADER                0xd00dfeed /* marker */
>>> This is used in arch/microblaze/kernel/head.S, but you move its
>>> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
>>> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
>>> linux/of_fdt.h (assuming that the comment in there is correct).
>> yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
>> patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
>> works for both versions too.
>>
>> With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>
> 
> Thanks.  I'll merge your change with my patch so that bisect isn't broken.

if is possible to do it, please do it.

Thanks,
Michal

> 
> g.
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header
@ 2009-10-07 14:07             ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 14:07 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: sparclinux, devicetree-discuss, linuxppc-dev, davem



Grant Likely wrote:
> On Wed, Oct 7, 2009 at 6:14 AM, Michal Simek <monstr@monstr.eu> wrote:
>>
>> Stephen Rothwell wrote:
>>> Hi Grant,
>>>
>>> Just first obvious thing:
>>>
>>> On Tue, 06 Oct 2009 22:30:59 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>>>> index 64e8b3a..5f461f0 100644
>>>> --- a/arch/microblaze/include/asm/prom.h
>>>> +++ b/arch/microblaze/include/asm/prom.h
>>>> @@ -17,20 +17,10 @@
>>>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>>>  #define _ASM_MICROBLAZE_PROM_H
>>>>  #ifdef __KERNEL__
>>>> -
>>>> -/* Definitions used by the flattened device tree */
>>>> -#define OF_DT_HEADER                0xd00dfeed /* marker */
>>> This is used in arch/microblaze/kernel/head.S, but you move its
>>> definition inside "#ifndef __ASSEMBLY__" below.  You should probably
>>> replace the include of asm/prom.h in arch/microblaze/kernel/head.S with
>>> linux/of_fdt.h (assuming that the comment in there is correct).
>> yes, Stephen is right here. I created one patch (in attachment) which fixed it. I tested your
>> patches on Microblaze (noMMU and MMU) and I have no problem with compilation and simple boot-up
>> works for both versions too.
>>
>> With that my patch: Acked-by: Michal Simek <monstr@monstr.eu>
> 
> Thanks.  I'll merge your change with my patch so that bisect isn't broken.

if is possible to do it, please do it.

Thanks,
Michal

> 
> g.
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]         ` <fa686aa40910070702j470785d2ka2621122a8e2f1fd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-07 14:21             ` [microblaze-uclinux] Re: [RFC PATCH 00/12] Merge common OpenFirmware Michal Simek
@ 2009-10-07 14:21             ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 14:21 UTC (permalink / raw)
  To: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q



Grant Likely wrote:
> On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org> wrote:
>> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>> However, I've completely devoted to this work for at least the next
>>> two months, so there are plenty more patches to follow.  Once I've
>>> got all the common code merged between Microblaze, PowerPC and Sparc
>>> I'll be fix the endian problems and making it easily usable by other
>>> architectures like ARM and MIPS.  Lots of work to be done.
>> Is there any news on getting QEMU to parse a device tree to figure out what
>> hardware to emulate?  (I.E. using the device tree code to let qemu provide
>> configurable board emulations instead of hardwiring them in C code?)
> 
> Not that I have, but I expect that I will be hacking on QEMU as part
> of this work.

ok great. Just let us know - we will test it.

Thanks,
Michal

> 
>> Also, what would be involved in getting x86 to (at least have the option to)
>> use the device tree stuff?
> 
> It would be very easy once the endian issues are worked out since the
> device tree is just a data format to be parsed.
> 
> g.
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 00/12] Merge common OpenFirmware
@ 2009-10-07 14:21             ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 14:21 UTC (permalink / raw)
  To: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q



Grant Likely wrote:
> On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob@landley.net> wrote:
>> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>> However, I've completely devoted to this work for at least the next
>>> two months, so there are plenty more patches to follow.  Once I've
>>> got all the common code merged between Microblaze, PowerPC and Sparc
>>> I'll be fix the endian problems and making it easily usable by other
>>> architectures like ARM and MIPS.  Lots of work to be done.
>> Is there any news on getting QEMU to parse a device tree to figure out what
>> hardware to emulate?  (I.E. using the device tree code to let qemu provide
>> configurable board emulations instead of hardwiring them in C code?)
> 
> Not that I have, but I expect that I will be hacking on QEMU as part
> of this work.

ok great. Just let us know - we will test it.

Thanks,
Michal

> 
>> Also, what would be involved in getting x86 to (at least have the option to)
>> use the device tree stuff?
> 
> It would be very easy once the endian issues are worked out since the
> device tree is just a data format to be parsed.
> 
> g.
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [microblaze-uclinux] Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 14:21             ` Michal Simek
  0 siblings, 0 replies; 136+ messages in thread
From: Michal Simek @ 2009-10-07 14:21 UTC (permalink / raw)
  To: microblaze-uclinux
  Cc: Stephen Rothwell, devicetree-discuss, Rob Landley, sparclinux,
	linuxppc-dev, davem



Grant Likely wrote:
> On Wed, Oct 7, 2009 at 1:09 AM, Rob Landley <rob@landley.net> wrote:
>> On Tuesday 06 October 2009 23:49:04 Grant Likely wrote:
>>> However, I've completely devoted to this work for at least the next
>>> two months, so there are plenty more patches to follow.  Once I've
>>> got all the common code merged between Microblaze, PowerPC and Sparc
>>> I'll be fix the endian problems and making it easily usable by other
>>> architectures like ARM and MIPS.  Lots of work to be done.
>> Is there any news on getting QEMU to parse a device tree to figure out what
>> hardware to emulate?  (I.E. using the device tree code to let qemu provide
>> configurable board emulations instead of hardwiring them in C code?)
> 
> Not that I have, but I expect that I will be hacking on QEMU as part
> of this work.

ok great. Just let us know - we will test it.

Thanks,
Michal

> 
>> Also, what would be involved in getting x86 to (at least have the option to)
>> use the device tree stuff?
> 
> It would be very easy once the endian issues are worked out since the
> device tree is just a data format to be parsed.
> 
> g.
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* RE: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]       ` <20091007.002722.168292120.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
  2009-10-07 16:39           ` Stephen Neuendorffer
@ 2009-10-07 16:39           ` Stephen Neuendorffer
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Neuendorffer @ 2009-10-07 16:39 UTC (permalink / raw)
  To: David Miller, grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: sparclinux-u79uwXL29TY76Z2rM5mHXA, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ


> -----Original Message-----
> From:
devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlaKREJ1Ck/qmQ@public.gmane.org
org [mailto:devicetree-
> discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On
Behalf Of David Miller
> Sent: Wednesday, October 07, 2009 12:27 AM
> To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org
> Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org; devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org;
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org;
> sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> Subject: Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree
code
> 
> From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Date: Tue, 6 Oct 2009 22:49:04 -0600
> 
> > Also, I'd like to take on responsibility for maintaining the cross-
> > architecture device tree code.  If there are no objections, I'll
> > write a patch to add a device tree section to MAINTAINERS.
> 
> Feel free.  And also feel free to add my:
> 
> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
> 
> to your patches.
> 

Thanks for doing this, Grant....  It's definitely needed.

Acked-by: Stephen Neuendorffer <stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>

Steve

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

* RE: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 16:39           ` Stephen Neuendorffer
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Neuendorffer @ 2009-10-07 16:39 UTC (permalink / raw)
  To: David Miller, grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: sparclinux-u79uwXL29TY76Z2rM5mHXA, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ


> -----Original Message-----
> From:
devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com@lists.ozlabs.
org [mailto:devicetree-
> discuss-bounces+stephen.neuendorffer=xilinx.com@lists.ozlabs.org] On
Behalf Of David Miller
> Sent: Wednesday, October 07, 2009 12:27 AM
> To: grant.likely@secretlab.ca
> Cc: sfr@canb.auug.org.au; devicetree-discuss@lists.ozlabs.org;
microblaze-uclinux@itee.uq.edu.au;
> sparclinux@vger.kernel.org; linuxppc-dev@lists.ozlabs.org
> Subject: Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree
code
> 
> From: Grant Likely <grant.likely@secretlab.ca>
> Date: Tue, 6 Oct 2009 22:49:04 -0600
> 
> > Also, I'd like to take on responsibility for maintaining the cross-
> > architecture device tree code.  If there are no objections, I'll
> > write a patch to add a device tree section to MAINTAINERS.
> 
> Feel free.  And also feel free to add my:
> 
> Acked-by: David S. Miller <davem@davemloft.net>
> 
> to your patches.
> 

Thanks for doing this, Grant....  It's definitely needed.

Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>

Steve

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



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

* RE: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 16:39           ` Stephen Neuendorffer
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Neuendorffer @ 2009-10-07 16:39 UTC (permalink / raw)
  To: David Miller, grant.likely
  Cc: sparclinux, sfr, devicetree-discuss, linuxppc-dev, microblaze-uclinux


> -----Original Message-----
> From:
devicetree-discuss-bounces+stephen.neuendorffer=3Dxilinx.com@lists.ozlabs.
org [mailto:devicetree-
> discuss-bounces+stephen.neuendorffer=3Dxilinx.com@lists.ozlabs.org] On
Behalf Of David Miller
> Sent: Wednesday, October 07, 2009 12:27 AM
> To: grant.likely@secretlab.ca
> Cc: sfr@canb.auug.org.au; devicetree-discuss@lists.ozlabs.org;
microblaze-uclinux@itee.uq.edu.au;
> sparclinux@vger.kernel.org; linuxppc-dev@lists.ozlabs.org
> Subject: Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree
code
> =

> From: Grant Likely <grant.likely@secretlab.ca>
> Date: Tue, 6 Oct 2009 22:49:04 -0600
> =

> > Also, I'd like to take on responsibility for maintaining the cross-
> > architecture device tree code.  If there are no objections, I'll
> > write a patch to add a device tree section to MAINTAINERS.
> =

> Feel free.  And also feel free to add my:
> =

> Acked-by: David S. Miller <davem@davemloft.net>
> =

> to your patches.
> =


Thanks for doing this, Grant....  It's definitely needed.

Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>

Steve

This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07 13:52         ` Sam Creasey
  (?)
@ 2009-10-07 19:30           ` Mitch Bradley
  -1 siblings, 0 replies; 136+ messages in thread
From: Mitch Bradley @ 2009-10-07 19:30 UTC (permalink / raw)
  To: Sam Creasey
  Cc: Julian Calaby, Stephen Rothwell,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

>
> Sun3 doesn't have OF

When I was first developing Open Boot for the SPARCstation-1, I was also 
simultaneously trying to do it for a Sun-3 system that was being built 
at the same time.

It proved to be too much to do both jobs at the same time, especially in 
light of all the hardware debugging that is part of a new system 
bringup.  So I gave up on Sun 3 and just focused on SS-1.

That particular Sun-3 machine never sold very well, while the SS-1 was 
very popular.  That was Sun's last 680x0 machine.

Personally, I think that continuing to support Sun-3 in Linux is not 
useful in a practical sense.  To the extent that supporting 
long-obsolete platforms and devices makes the job harder for current 
systems, it is actually harmful.  Portability and generality is good in 
some theoretical "rightness" sense, but there are practical limits.  
Code can become so heavily layered that approaching it requires a huge 
commitment of effort to learn all the artificial layers.  Sometimes you 
have to prune the dead branches so the living ones can get light and air.

Taking this one step further, I don't see any real good reason to 
continue supporting Sun4 going forward.  I got rid of my Sun4 systems 
long ago because it was just too hard to keep them working - after 
having used them long after most people had moved on.  Dropping Sun3 and 
Sun4 eliminates all vestiges of the sunmon interface and also allows 
dropping support for OBP version 1, which only shipped on SS1-class 
machines - the first machines in the Sun4c subclass. 

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 19:30           ` Mitch Bradley
  0 siblings, 0 replies; 136+ messages in thread
From: Mitch Bradley @ 2009-10-07 19:30 UTC (permalink / raw)
  To: Sam Creasey
  Cc: Julian Calaby, Stephen Rothwell,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

>
> Sun3 doesn't have OF

When I was first developing Open Boot for the SPARCstation-1, I was also 
simultaneously trying to do it for a Sun-3 system that was being built 
at the same time.

It proved to be too much to do both jobs at the same time, especially in 
light of all the hardware debugging that is part of a new system 
bringup.  So I gave up on Sun 3 and just focused on SS-1.

That particular Sun-3 machine never sold very well, while the SS-1 was 
very popular.  That was Sun's last 680x0 machine.

Personally, I think that continuing to support Sun-3 in Linux is not 
useful in a practical sense.  To the extent that supporting 
long-obsolete platforms and devices makes the job harder for current 
systems, it is actually harmful.  Portability and generality is good in 
some theoretical "rightness" sense, but there are practical limits.  
Code can become so heavily layered that approaching it requires a huge 
commitment of effort to learn all the artificial layers.  Sometimes you 
have to prune the dead branches so the living ones can get light and air.

Taking this one step further, I don't see any real good reason to 
continue supporting Sun4 going forward.  I got rid of my Sun4 systems 
long ago because it was just too hard to keep them working - after 
having used them long after most people had moved on.  Dropping Sun3 and 
Sun4 eliminates all vestiges of the sunmon interface and also allows 
dropping support for OBP version 1, which only shipped on SS1-class 
machines - the first machines in the Sun4c subclass. 


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 19:30           ` Mitch Bradley
  0 siblings, 0 replies; 136+ messages in thread
From: Mitch Bradley @ 2009-10-07 19:30 UTC (permalink / raw)
  To: Sam Creasey
  Cc: Stephen Rothwell, Julian Calaby, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

>
> Sun3 doesn't have OF

When I was first developing Open Boot for the SPARCstation-1, I was also 
simultaneously trying to do it for a Sun-3 system that was being built 
at the same time.

It proved to be too much to do both jobs at the same time, especially in 
light of all the hardware debugging that is part of a new system 
bringup.  So I gave up on Sun 3 and just focused on SS-1.

That particular Sun-3 machine never sold very well, while the SS-1 was 
very popular.  That was Sun's last 680x0 machine.

Personally, I think that continuing to support Sun-3 in Linux is not 
useful in a practical sense.  To the extent that supporting 
long-obsolete platforms and devices makes the job harder for current 
systems, it is actually harmful.  Portability and generality is good in 
some theoretical "rightness" sense, but there are practical limits.  
Code can become so heavily layered that approaching it requires a huge 
commitment of effort to learn all the artificial layers.  Sometimes you 
have to prune the dead branches so the living ones can get light and air.

Taking this one step further, I don't see any real good reason to 
continue supporting Sun4 going forward.  I got rid of my Sun4 systems 
long ago because it was just too hard to keep them working - after 
having used them long after most people had moved on.  Dropping Sun3 and 
Sun4 eliminates all vestiges of the sunmon interface and also allows 
dropping support for OBP version 1, which only shipped on SS1-class 
machines - the first machines in the Sun4c subclass. 

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]           ` <4ACCEC67.9070106-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
  2009-10-07 20:54               ` Chris Newport
@ 2009-10-07 20:54               ` Chris Newport
  0 siblings, 0 replies; 136+ messages in thread
From: Chris Newport @ 2009-10-07 20:54 UTC (permalink / raw)
  To: Mitch Bradley
  Cc: Sam Creasey, Julian Calaby, Stephen Rothwell,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Wed, 7 Oct 2009, Mitch Bradley wrote:

> Taking this one step further, I don't see any real good reason to continue 
> supporting Sun4 going forward.  I got rid of my Sun4 systems long ago because 
> it was just too hard to keep them working - after having used them long after 
> most people had moved on.  Dropping Sun3 and Sun4 eliminates all vestiges of 
> the sunmon interface and also allows dropping support for OBP version 1, 
> which only shipped on SS1-class machines - the first machines in the Sun4c 
> subclass.

Sun4c has also been broken for a long time and sun4d has never worked
properly. Is it time to also prune these ?.
That would leave only Sun4m in the 32bit kernel, which still works and
has plenty of ongoing user interest.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 20:54               ` Chris Newport
  0 siblings, 0 replies; 136+ messages in thread
From: Chris Newport @ 2009-10-07 20:54 UTC (permalink / raw)
  To: Mitch Bradley
  Cc: Sam Creasey, Julian Calaby, Stephen Rothwell,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Wed, 7 Oct 2009, Mitch Bradley wrote:

> Taking this one step further, I don't see any real good reason to continue 
> supporting Sun4 going forward.  I got rid of my Sun4 systems long ago because 
> it was just too hard to keep them working - after having used them long after 
> most people had moved on.  Dropping Sun3 and Sun4 eliminates all vestiges of 
> the sunmon interface and also allows dropping support for OBP version 1, 
> which only shipped on SS1-class machines - the first machines in the Sun4c 
> subclass.

Sun4c has also been broken for a long time and sun4d has never worked
properly. Is it time to also prune these ?.
That would leave only Sun4m in the 32bit kernel, which still works and
has plenty of ongoing user interest.


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 20:54               ` Chris Newport
  0 siblings, 0 replies; 136+ messages in thread
From: Chris Newport @ 2009-10-07 20:54 UTC (permalink / raw)
  To: Mitch Bradley
  Cc: Sam Creasey, Stephen Rothwell, Julian Calaby, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, 7 Oct 2009, Mitch Bradley wrote:

> Taking this one step further, I don't see any real good reason to continue 
> supporting Sun4 going forward.  I got rid of my Sun4 systems long ago because 
> it was just too hard to keep them working - after having used them long after 
> most people had moved on.  Dropping Sun3 and Sun4 eliminates all vestiges of 
> the sunmon interface and also allows dropping support for OBP version 1, 
> which only shipped on SS1-class machines - the first machines in the Sun4c 
> subclass.

Sun4c has also been broken for a long time and sun4d has never worked
properly. Is it time to also prune these ?.
That would leave only Sun4m in the 32bit kernel, which still works and
has plenty of ongoing user interest.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]               ` <Pine.LNX.4.60.0910072148040.11795-pb599fR3TxWvwYtD5Hs6llaTQe2KTcn/@public.gmane.org>
  2009-10-07 21:09                   ` David Miller
@ 2009-10-07 21:09                   ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07 21:09 UTC (permalink / raw)
  To: crn-Tjka5CH3XzFBDgjK7y7TUQ
  Cc: sammy-4OGMY2YDKIVeoWH0uzbU5w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Chris Newport <crn-Tjka5CH3XzFBDgjK7y7TUQ@public.gmane.org>
Date: Wed, 7 Oct 2009 21:54:34 +0100 (BST)

> Sun4c has also been broken for a long time and sun4d has never worked
> properly. Is it time to also prune these ?.
> That would leave only Sun4m in the 32bit kernel, which still works and
> has plenty of ongoing user interest.

Chris don't over-exaggerate the state.

The truth is that the whole sparc32 port is in a state of mild
disrepair, and many of the issues apply to all the port rather than
just one family of systems.  I think someone suitably motivated
could get most of the bugs sorted out.

There is no reason to drop support for SS1 machines, we already fully
build the software device tree and use all of the generic OF
infrastructure in the Linux kernel on those systems.  It is not a road
block at all for the OF genericization work, if that's what you read
into wmb's email.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 21:09                   ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07 21:09 UTC (permalink / raw)
  To: crn-Tjka5CH3XzFBDgjK7y7TUQ
  Cc: sammy-4OGMY2YDKIVeoWH0uzbU5w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Chris Newport <crn@netunix.com>
Date: Wed, 7 Oct 2009 21:54:34 +0100 (BST)

> Sun4c has also been broken for a long time and sun4d has never worked
> properly. Is it time to also prune these ?.
> That would leave only Sun4m in the 32bit kernel, which still works and
> has plenty of ongoing user interest.

Chris don't over-exaggerate the state.

The truth is that the whole sparc32 port is in a state of mild
disrepair, and many of the issues apply to all the port rather than
just one family of systems.  I think someone suitably motivated
could get most of the bugs sorted out.

There is no reason to drop support for SS1 machines, we already fully
build the software device tree and use all of the generic OF
infrastructure in the Linux kernel on those systems.  It is not a road
block at all for the OF genericization work, if that's what you read
into wmb's email.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 21:09                   ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07 21:09 UTC (permalink / raw)
  To: crn
  Cc: sammy, sfr, microblaze-uclinux, devicetree-discuss, sparclinux,
	julian.calaby, wmb, linuxppc-dev

From: Chris Newport <crn@netunix.com>
Date: Wed, 7 Oct 2009 21:54:34 +0100 (BST)

> Sun4c has also been broken for a long time and sun4d has never worked
> properly. Is it time to also prune these ?.
> That would leave only Sun4m in the 32bit kernel, which still works and
> has plenty of ongoing user interest.

Chris don't over-exaggerate the state.

The truth is that the whole sparc32 port is in a state of mild
disrepair, and many of the issues apply to all the port rather than
just one family of systems.  I think someone suitably motivated
could get most of the bugs sorted out.

There is no reason to drop support for SS1 machines, we already fully
build the software device tree and use all of the generic OF
infrastructure in the Linux kernel on those systems.  It is not a road
block at all for the OF genericization work, if that's what you read
into wmb's email.

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

* RE: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:29 ` Grant Likely
                   ` (23 preceding siblings ...)
  (?)
@ 2009-10-07 22:20 ` Leif Sawyer
  -1 siblings, 0 replies; 136+ messages in thread
From: Leif Sawyer @ 2009-10-07 22:20 UTC (permalink / raw)
  To: sparclinux

Mitch Bradley writes:
> Taking this one step further, I don't see any real good
> reason to continue supporting Sun4 going forward.  I got rid
> of my Sun4 systems long ago because it was just too hard to
> keep them working - after having used them long after most
> people had moved on.

I've got a few sun4u machines that are going strong.  I'd
hate to see support "go away" going forward.

I do wish I knew more about the archetecture and kernel development,
but alas, my life conspires against me when I try to learn more.

I do know that this release seems to be the latest version that I can cleanly
boot without much issue:

Linux wormhole 2.6.25-gentoo-r2 #2 SMP PREEMPT Tue May 6 20:59:30 AKDT 2008 sparc64 sun4u TI UltraSparc II (BlackBird) GNU/Linux

I do try to send bug reports/comments to the various lists, and watch the development.
Unfortunately, none of my systems are available for "lab" work, as they're all remotely deployed,
so testing of new kernels can really only happen when I have somebody available onsite
to remotely powercycle, as the crashes tend to be severe enough that I can't break-to-OBP

But thanks for all the hard work.

Leif

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:29 ` Grant Likely
                   ` (24 preceding siblings ...)
  (?)
@ 2009-10-07 22:39 ` David Miller
  -1 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-07 22:39 UTC (permalink / raw)
  To: sparclinux

From: Leif Sawyer <lsawyer@gci.com>
Date: Wed, 7 Oct 2009 14:20:10 -0800

> Mitch Bradley writes:
>> Taking this one step further, I don't see any real good
>> reason to continue supporting Sun4 going forward.  I got rid
>> of my Sun4 systems long ago because it was just too hard to
>> keep them working - after having used them long after most
>> people had moved on.
> 
> I've got a few sun4u machines that are going strong.  I'd
> hate to see support "go away" going forward.

He's talking about 32-bit sparc machines made 15 to 20 years ago, not
sun4u boxes like your's.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:29 ` Grant Likely
                   ` (25 preceding siblings ...)
  (?)
@ 2009-10-07 22:50 ` Mitch Bradley
  -1 siblings, 0 replies; 136+ messages in thread
From: Mitch Bradley @ 2009-10-07 22:50 UTC (permalink / raw)
  To: sparclinux

The Sun4 generations were (from memory):

sun4 - first generation SPARC, implemented as an FPGA.  IIRC, speeds 
topped out at about 20 MHz.  PCI bus.
sun4c - 2nd generation, implemented in CMOS.  SS1 and SS2 families.  
Desktop machines only.  Expansion via SBus. 40 to 80 MHz
sun4m - "SuperSPARC" - multiprocessor support.   TLB MMU
sun4d - "Sun Dragon".  Big iron, intended for high reliability.  Based 
on a bus architecture from Xerox PARC.
sun4u - UltraSPARC - 64-bit

There was also an ECL SPARC that never made it out of the lab.


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07 13:52         ` Sam Creasey
@ 2009-10-07 22:57           ` Brad Boyer
  -1 siblings, 0 replies; 136+ messages in thread
From: Brad Boyer @ 2009-10-07 22:57 UTC (permalink / raw)
  To: Sam Creasey
  Cc: Stephen Rothwell, Julian Calaby, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 07, 2009 at 09:52:43AM -0400, Sam Creasey wrote:
> On Wed, Oct 07, 2009 at 03:18:04PM +1000, Julian Calaby wrote:
> > On the subject of merging code, I know that the SUN3 code in m68k uses
> > a similar prom interface to the sparc32 code. (and I've also
> > considered unifying that and ... well ... see above) Does anyone know
> > if it has an OpenFirmware interface for it's devices? Is OF on SUN3
> > even remotely useful? Does Linux on SUN3 even work with modern
> > kernels?
> 
> Sun3 doesn't have OF, though I've got some dormant patches to add an
> OF emulation layer to make it easier to reuse Sparc drivers on
> Sun3...   Never finished enough to submit, so it probably shouldn't
> affect anything you're doing here.

I was also looking at using the OF code on m68k, but for a different
reason. My goal was to get macio_bus working so we can merge a few
of the m68k Mac drivers into the ppc Mac drivers. The simplest way
to do that seemed to be supporting OF since macio_dev is a wrapper
for of_device. It was also a nice way to build up a table of all the
onboard devices in memory. Hopefully it would enable better user-space
device detection as well.

I got the framework built against an older kernel, but it wasn't enough
to be useful at that point. This set of patches could help quite a bit.

	Brad Boyer
	flar@allandria.com

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-07 22:57           ` Brad Boyer
  0 siblings, 0 replies; 136+ messages in thread
From: Brad Boyer @ 2009-10-07 22:57 UTC (permalink / raw)
  To: Sam Creasey
  Cc: Stephen Rothwell, Julian Calaby, devicetree-discuss,
	microblaze-uclinux, sparclinux, linuxppc-dev, davem

On Wed, Oct 07, 2009 at 09:52:43AM -0400, Sam Creasey wrote:
> On Wed, Oct 07, 2009 at 03:18:04PM +1000, Julian Calaby wrote:
> > On the subject of merging code, I know that the SUN3 code in m68k uses
> > a similar prom interface to the sparc32 code. (and I've also
> > considered unifying that and ... well ... see above) Does anyone know
> > if it has an OpenFirmware interface for it's devices? Is OF on SUN3
> > even remotely useful? Does Linux on SUN3 even work with modern
> > kernels?
> 
> Sun3 doesn't have OF, though I've got some dormant patches to add an
> OF emulation layer to make it easier to reuse Sparc drivers on
> Sun3...   Never finished enough to submit, so it probably shouldn't
> affect anything you're doing here.

I was also looking at using the OF code on m68k, but for a different
reason. My goal was to get macio_bus working so we can merge a few
of the m68k Mac drivers into the ppc Mac drivers. The simplest way
to do that seemed to be supporting OF since macio_dev is a wrapper
for of_device. It was also a nice way to build up a table of all the
onboard devices in memory. Hopefully it would enable better user-space
device detection as well.

I got the framework built against an older kernel, but it wasn't enough
to be useful at that point. This set of patches could help quite a bit.

	Brad Boyer
	flar@allandria.com


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07 21:09                   ` David Miller
@ 2009-10-08  1:29                     ` Chris Newport
  -1 siblings, 0 replies; 136+ messages in thread
From: Chris Newport @ 2009-10-08  1:29 UTC (permalink / raw)
  To: David Miller
  Cc: sammy, sfr, microblaze-uclinux, devicetree-discuss, sparclinux,
	julian.calaby, wmb, linuxppc-dev

On Wed, 7 Oct 2009, David Miller wrote:

>> Sun4c has also been broken for a long time and sun4d has never worked
>> properly. Is it time to also prune these ?.
>> That would leave only Sun4m in the 32bit kernel, which still works and
>> has plenty of ongoing user interest.
>
> Chris don't over-exaggerate the state.
>
> The truth is that the whole sparc32 port is in a state of mild
> disrepair, and many of the issues apply to all the port rather than
> just one family of systems.  I think someone suitably motivated
> could get most of the bugs sorted out.
>
> There is no reason to drop support for SS1 machines, we already fully
> build the software device tree and use all of the generic OF
> infrastructure in the Linux kernel on those systems.  It is not a road
> block at all for the OF genericization work, if that's what you read
> into wmb's email.

Your call, as you say there is little to be gained other than tidyness.

FWIW my opinions (and ICBW) are based on :-
Sun4c machines have a max of 48 or 64Mb and very few are still working
Sun4d has never had SMP support and this is apparantly problematic
  due to Cray interlectual property causing a lack of bus documentation.
  Running these heavy and power hungry lumps UP is a bit silly.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-08  1:29                     ` Chris Newport
  0 siblings, 0 replies; 136+ messages in thread
From: Chris Newport @ 2009-10-08  1:29 UTC (permalink / raw)
  To: David Miller
  Cc: sammy, sfr, microblaze-uclinux, devicetree-discuss, sparclinux,
	julian.calaby, wmb, linuxppc-dev

On Wed, 7 Oct 2009, David Miller wrote:

>> Sun4c has also been broken for a long time and sun4d has never worked
>> properly. Is it time to also prune these ?.
>> That would leave only Sun4m in the 32bit kernel, which still works and
>> has plenty of ongoing user interest.
>
> Chris don't over-exaggerate the state.
>
> The truth is that the whole sparc32 port is in a state of mild
> disrepair, and many of the issues apply to all the port rather than
> just one family of systems.  I think someone suitably motivated
> could get most of the bugs sorted out.
>
> There is no reason to drop support for SS1 machines, we already fully
> build the software device tree and use all of the generic OF
> infrastructure in the Linux kernel on those systems.  It is not a road
> block at all for the OF genericization work, if that's what you read
> into wmb's email.

Your call, as you say there is little to be gained other than tidyness.

FWIW my opinions (and ICBW) are based on :-
Sun4c machines have a max of 48 or 64Mb and very few are still working
Sun4d has never had SMP support and this is apparantly problematic
  due to Cray interlectual property causing a lack of bus documentation.
  Running these heavy and power hungry lumps UP is a bit silly.


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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]                     ` <Pine.LNX.4.60.0910080155210.12519-pb599fR3TxWvwYtD5Hs6llaTQe2KTcn/@public.gmane.org>
  2009-10-08  4:39                         ` David Miller
@ 2009-10-08  4:39                         ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-08  4:39 UTC (permalink / raw)
  To: crn-Tjka5CH3XzFBDgjK7y7TUQ
  Cc: sammy-4OGMY2YDKIVeoWH0uzbU5w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Chris Newport <crn-Tjka5CH3XzFBDgjK7y7TUQ@public.gmane.org>
Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)

> Sun4d has never had SMP support and

Wrong.

> this is apparantly problematic due to Cray interlectual property
>  causing a lack of bus documentation.

XBUS documentation is not available, but we fully know how to
program the SBUS interrupt controller and whatnot.  It's all
there in the sun4d interrupt and SMP support and it did work
just fine at one point.

Amusingly the SBUS interrupt stuff on sun4d is a very close
sibling to the IMAP/ICLR scheme used on sun4u.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-08  4:39                         ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-08  4:39 UTC (permalink / raw)
  To: crn-Tjka5CH3XzFBDgjK7y7TUQ
  Cc: sammy-4OGMY2YDKIVeoWH0uzbU5w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

From: Chris Newport <crn@netunix.com>
Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)

> Sun4d has never had SMP support and

Wrong.

> this is apparantly problematic due to Cray interlectual property
>  causing a lack of bus documentation.

XBUS documentation is not available, but we fully know how to
program the SBUS interrupt controller and whatnot.  It's all
there in the sun4d interrupt and SMP support and it did work
just fine at one point.

Amusingly the SBUS interrupt stuff on sun4d is a very close
sibling to the IMAP/ICLR scheme used on sun4u.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-08  4:39                         ` David Miller
  0 siblings, 0 replies; 136+ messages in thread
From: David Miller @ 2009-10-08  4:39 UTC (permalink / raw)
  To: crn
  Cc: sammy, sfr, microblaze-uclinux, devicetree-discuss, sparclinux,
	julian.calaby, wmb, linuxppc-dev

From: Chris Newport <crn@netunix.com>
Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)

> Sun4d has never had SMP support and

Wrong.

> this is apparantly problematic due to Cray interlectual property
>  causing a lack of bus documentation.

XBUS documentation is not available, but we fully know how to
program the SBUS interrupt controller and whatnot.  It's all
there in the sun4d interrupt and SMP support and it did work
just fine at one point.

Amusingly the SBUS interrupt stuff on sun4d is a very close
sibling to the IMAP/ICLR scheme used on sun4u.

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]                         ` <20091007.213915.37481688.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
  2009-10-08 13:24                             ` Kjetil Oftedal
@ 2009-10-08 13:24                             ` Kjetil Oftedal
  0 siblings, 0 replies; 136+ messages in thread
From: Kjetil Oftedal @ 2009-10-08 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: crn-Tjka5CH3XzFBDgjK7y7TUQ, wmb-D5eQfiDGL7eakBO8gow8eQ,
	sammy-4OGMY2YDKIVeoWH0uzbU5w,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

On Wed, 7 Oct 2009, David Miller wrote:

> From: Chris Newport <crn-Tjka5CH3XzFBDgjK7y7TUQ@public.gmane.org>
> Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)
>
>> Sun4d has never had SMP support and
>
> Wrong.
>
>> this is apparantly problematic due to Cray interlectual property
>>  causing a lack of bus documentation.
>
> XBUS documentation is not available, but we fully know how to
> program the SBUS interrupt controller and whatnot.  It's all
> there in the sun4d interrupt and SMP support and it did work
> just fine at one point.
>
> Amusingly the SBUS interrupt stuff on sun4d is a very close
> sibling to the IMAP/ICLR scheme used on sun4u.
>

The Sun4d SMP support exists, but is broken in 2.6.
And the UP support is buggy. At least on my test-setup, the
kernel is unable to load userland from scsi-drives.

Dropping the sun4 32-bit SPARC is a bit counterproductive when
considering the resent effort to unify sparc64 and sparc
arch-branches ?

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-08 13:24                             ` Kjetil Oftedal
  0 siblings, 0 replies; 136+ messages in thread
From: Kjetil Oftedal @ 2009-10-08 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: crn-Tjka5CH3XzFBDgjK7y7TUQ, wmb-D5eQfiDGL7eakBO8gow8eQ,
	sammy-4OGMY2YDKIVeoWH0uzbU5w,
	julian.calaby-Re5JQEeQqe8AvxtiuMwx3w, sfr-3FnU+UHB4dNDw9hX6IcOSA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

On Wed, 7 Oct 2009, David Miller wrote:

> From: Chris Newport <crn@netunix.com>
> Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)
>
>> Sun4d has never had SMP support and
>
> Wrong.
>
>> this is apparantly problematic due to Cray interlectual property
>>  causing a lack of bus documentation.
>
> XBUS documentation is not available, but we fully know how to
> program the SBUS interrupt controller and whatnot.  It's all
> there in the sun4d interrupt and SMP support and it did work
> just fine at one point.
>
> Amusingly the SBUS interrupt stuff on sun4d is a very close
> sibling to the IMAP/ICLR scheme used on sun4u.
>

The Sun4d SMP support exists, but is broken in 2.6.
And the UP support is buggy. At least on my test-setup, the
kernel is unable to load userland from scsi-drives.

Dropping the sun4 32-bit SPARC is a bit counterproductive when
considering the resent effort to unify sparc64 and sparc
arch-branches ?



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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-08 13:24                             ` Kjetil Oftedal
  0 siblings, 0 replies; 136+ messages in thread
From: Kjetil Oftedal @ 2009-10-08 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: sammy, sfr, julian.calaby, devicetree-discuss, sparclinux, crn,
	microblaze-uclinux, wmb, linuxppc-dev

On Wed, 7 Oct 2009, David Miller wrote:

> From: Chris Newport <crn@netunix.com>
> Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST)
>
>> Sun4d has never had SMP support and
>
> Wrong.
>
>> this is apparantly problematic due to Cray interlectual property
>>  causing a lack of bus documentation.
>
> XBUS documentation is not available, but we fully know how to
> program the SBUS interrupt controller and whatnot.  It's all
> there in the sun4d interrupt and SMP support and it did work
> just fine at one point.
>
> Amusingly the SBUS interrupt stuff on sun4d is a very close
> sibling to the IMAP/ICLR scheme used on sun4u.
>

The Sun4d SMP support exists, but is broken in 2.6.
And the UP support is buggy. At least on my test-setup, the
kernel is unable to load userland from scsi-drives.

Dropping the sun4 32-bit SPARC is a bit counterproductive when
considering the resent effort to unify sparc64 and sparc
arch-branches ?

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
  2009-10-07  4:30   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
  (?)
@ 2009-10-09  6:35     ` David Gibson
  -1 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:35 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> Add a common header file for working with the flattened device tree
> data structure and merge the shared data tags used by Microblaze and
> PowerPC
> 
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> ---
> 
>  arch/microblaze/include/asm/prom.h |   12 +-----------
>  arch/powerpc/include/asm/prom.h    |   12 +-----------
>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
>  3 files changed, 32 insertions(+), 22 deletions(-)
>  create mode 100644 include/linux/of_fdt.h
> 
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10


So, if you're merging all these, I guess the question is do we also
want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
with the upstream libfdt header file which defines the same things.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device
@ 2009-10-09  6:35     ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:35 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> Add a common header file for working with the flattened device tree
> data structure and merge the shared data tags used by Microblaze and
> PowerPC
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
>  arch/microblaze/include/asm/prom.h |   12 +-----------
>  arch/powerpc/include/asm/prom.h    |   12 +-----------
>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
>  3 files changed, 32 insertions(+), 22 deletions(-)
>  create mode 100644 include/linux/of_fdt.h
> 
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10


So, if you're merging all these, I guess the question is do we also
want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
with the upstream libfdt header file which defines the same things.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-09  6:35     ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:35 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> Add a common header file for working with the flattened device tree
> data structure and merge the shared data tags used by Microblaze and
> PowerPC
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
>  arch/microblaze/include/asm/prom.h |   12 +-----------
>  arch/powerpc/include/asm/prom.h    |   12 +-----------
>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
>  3 files changed, 32 insertions(+), 22 deletions(-)
>  create mode 100644 include/linux/of_fdt.h
> 
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 64e8b3a..5f461f0 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -17,20 +17,10 @@
>  #ifndef _ASM_MICROBLAZE_PROM_H
>  #define _ASM_MICROBLAZE_PROM_H
>  #ifdef __KERNEL__
> -
> -/* Definitions used by the flattened device tree */
> -#define OF_DT_HEADER		0xd00dfeed /* marker */
> -#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE		0x2 /* End node */
> -#define OF_DT_PROP		0x3 /* Property: name off, size, content */
> -#define OF_DT_NOP		0x4 /* nop */
> -#define OF_DT_END		0x9
> -
> -#define OF_DT_VERSION		0x10


So, if you're merging all these, I guess the question is do we also
want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
with the upstream libfdt header file which defines the same things.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
  2009-10-07  4:32   ` Grant Likely
  (?)
@ 2009-10-09  6:36     ` David Gibson
  -1 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:36 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
> Merge common flattened device tree code between Microblaze and PowerPC

And I guess another question is do we want to replace these with a
libfdt based implementation.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
@ 2009-10-09  6:36     ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:36 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
> Merge common flattened device tree code between Microblaze and PowerPC

And I guess another question is do we want to replace these with a
libfdt based implementation.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
@ 2009-10-09  6:36     ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-09  6:36 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
> Merge common flattened device tree code between Microblaze and PowerPC

And I guess another question is do we want to replace these with a
libfdt based implementation.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
       [not found]     ` <20091009063635.GD12948-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
  2009-10-09  7:03         ` Grant Likely
@ 2009-10-09  7:03         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:03 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 9, 2009 at 12:36 AM, David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
>> Merge common flattened device tree code between Microblaze and PowerPC
>
> And I guess another question is do we want to replace these with a
> libfdt based implementation.

Perhaps.  Let me get things unified and sane first though.

g.

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

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
@ 2009-10-09  7:03         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:03 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 9, 2009 at 12:36 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
>> Merge common flattened device tree code between Microblaze and PowerPC
>
> And I guess another question is do we want to replace these with a
> libfdt based implementation.

Perhaps.  Let me get things unified and sane first though.

g.

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

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

* Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions
@ 2009-10-09  7:03         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:03 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Fri, Oct 9, 2009 at 12:36 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote:
>> Merge common flattened device tree code between Microblaze and PowerPC
>
> And I guess another question is do we want to replace these with a
> libfdt based implementation.

Perhaps.  Let me get things unified and sane first though.

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
       [not found]     ` <20091009063534.GC12948-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
  2009-10-09  7:07         ` [RFC PATCH 05/12] of: add common header for flattened device tree Grant Likely
@ 2009-10-09  7:07         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:07 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
>> Add a common header file for working with the flattened device tree
>> data structure and merge the shared data tags used by Microblaze and
>> PowerPC
>>
>> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
>> ---
>>
>>  arch/microblaze/include/asm/prom.h |   12 +-----------
>>  arch/powerpc/include/asm/prom.h    |   12 +-----------
>>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
>>  3 files changed, 32 insertions(+), 22 deletions(-)
>>  create mode 100644 include/linux/of_fdt.h
>>
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>  #define _ASM_MICROBLAZE_PROM_H
>>  #ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER         0xd00dfeed /* marker */
>> -#define OF_DT_BEGIN_NODE     0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE               0x2 /* End node */
>> -#define OF_DT_PROP           0x3 /* Property: name off, size, content */
>> -#define OF_DT_NOP            0x4 /* nop */
>> -#define OF_DT_END            0x9
>> -
>> -#define OF_DT_VERSION                0x10
>
>
> So, if you're merging all these, I guess the question is do we also
> want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> with the upstream libfdt header file which defines the same things.

I see your question and raise you another.  Where should the merge
file live for it to be included both by dtc and kernel code? Or should
it just be cloned in the kernel tree?

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree
@ 2009-10-09  7:07         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:07 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
>> Add a common header file for working with the flattened device tree
>> data structure and merge the shared data tags used by Microblaze and
>> PowerPC
>>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>>  arch/microblaze/include/asm/prom.h |   12 +-----------
>>  arch/powerpc/include/asm/prom.h    |   12 +-----------
>>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
>>  3 files changed, 32 insertions(+), 22 deletions(-)
>>  create mode 100644 include/linux/of_fdt.h
>>
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>>  #ifndef _ASM_MICROBLAZE_PROM_H
>>  #define _ASM_MICROBLAZE_PROM_H
>>  #ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER         0xd00dfeed /* marker */
>> -#define OF_DT_BEGIN_NODE     0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE               0x2 /* End node */
>> -#define OF_DT_PROP           0x3 /* Property: name off, size, content */
>> -#define OF_DT_NOP            0x4 /* nop */
>> -#define OF_DT_END            0x9
>> -
>> -#define OF_DT_VERSION                0x10
>
>
> So, if you're merging all these, I guess the question is do we also
> want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> with the upstream libfdt header file which defines the same things.

I see your question and raise you another.  Where should the merge
file live for it to be included both by dtc and kernel code? Or should
it just be cloned in the kernel tree?

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-09  7:07         ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-09  7:07 UTC (permalink / raw)
  To: David Gibson
  Cc: Stephen Rothwell, monstr, devicetree-discuss, microblaze-uclinux,
	sparclinux, linuxppc-dev, davem

On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
>> Add a common header file for working with the flattened device tree
>> data structure and merge the shared data tags used by Microblaze and
>> PowerPC
>>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> =A0arch/microblaze/include/asm/prom.h | =A0 12 +-----------
>> =A0arch/powerpc/include/asm/prom.h =A0 =A0| =A0 12 +-----------
>> =A0include/linux/of_fdt.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0 30 +++++++++++++=
+++++++++++++++++
>> =A03 files changed, 32 insertions(+), 22 deletions(-)
>> =A0create mode 100644 include/linux/of_fdt.h
>>
>> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/includ=
e/asm/prom.h
>> index 64e8b3a..5f461f0 100644
>> --- a/arch/microblaze/include/asm/prom.h
>> +++ b/arch/microblaze/include/asm/prom.h
>> @@ -17,20 +17,10 @@
>> =A0#ifndef _ASM_MICROBLAZE_PROM_H
>> =A0#define _ASM_MICROBLAZE_PROM_H
>> =A0#ifdef __KERNEL__
>> -
>> -/* Definitions used by the flattened device tree */
>> -#define OF_DT_HEADER =A0 =A0 =A0 =A0 0xd00dfeed /* marker */
>> -#define OF_DT_BEGIN_NODE =A0 =A0 0x1 /* Start of node, full name */
>> -#define OF_DT_END_NODE =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x2 /* End node */
>> -#define OF_DT_PROP =A0 =A0 =A0 =A0 =A0 0x3 /* Property: name off, size,=
 content */
>> -#define OF_DT_NOP =A0 =A0 =A0 =A0 =A0 =A00x4 /* nop */
>> -#define OF_DT_END =A0 =A0 =A0 =A0 =A0 =A00x9
>> -
>> -#define OF_DT_VERSION =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00x10
>
>
> So, if you're merging all these, I guess the question is do we also
> want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> with the upstream libfdt header file which defines the same things.

I see your question and raise you another.  Where should the merge
file live for it to be included both by dtc and kernel code? Or should
it just be cloned in the kernel tree?

g.

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

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
       [not found]         ` <fa686aa40910090007lef3fddbod0c5843abfe33be5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-14  4:47             ` [RFC PATCH 05/12] of: add common header for flattened device David Gibson
@ 2009-10-14  4:47             ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-14  4:47 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 09, 2009 at 01:07:57AM -0600, Grant Likely wrote:
> On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
> <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> > On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> >> Add a common header file for working with the flattened device tree
> >> data structure and merge the shared data tags used by Microblaze and
> >> PowerPC
> >>
> >> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> >> ---
> >>
> >>  arch/microblaze/include/asm/prom.h |   12 +-----------
> >>  arch/powerpc/include/asm/prom.h    |   12 +-----------
> >>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
> >>  3 files changed, 32 insertions(+), 22 deletions(-)
> >>  create mode 100644 include/linux/of_fdt.h
> >>
> >> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> >> index 64e8b3a..5f461f0 100644
> >> --- a/arch/microblaze/include/asm/prom.h
> >> +++ b/arch/microblaze/include/asm/prom.h
> >> @@ -17,20 +17,10 @@
> >>  #ifndef _ASM_MICROBLAZE_PROM_H
> >>  #define _ASM_MICROBLAZE_PROM_H
> >>  #ifdef __KERNEL__
> >> -
> >> -/* Definitions used by the flattened device tree */
> >> -#define OF_DT_HEADER         0xd00dfeed /* marker */
> >> -#define OF_DT_BEGIN_NODE     0x1 /* Start of node, full name */
> >> -#define OF_DT_END_NODE               0x2 /* End node */
> >> -#define OF_DT_PROP           0x3 /* Property: name off, size, content */
> >> -#define OF_DT_NOP            0x4 /* nop */
> >> -#define OF_DT_END            0x9
> >> -
> >> -#define OF_DT_VERSION                0x10
> >
> >
> > So, if you're merging all these, I guess the question is do we also
> > want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> > with the upstream libfdt header file which defines the same things.
> 
> I see your question and raise you another.  Where should the merge
> file live for it to be included both by dtc and kernel code? Or should
> it just be cloned in the kernel tree?

Yeah, a good question.  As I see it there are two options.  Number one
is just make sure everything relevant that the kernel needs is in the
libfdt version, then just have the kernel code reference it from its
location in scripts/dtc.  Other option is we clone the file in the
kernel tree.  Requires keeping in sync, in theory at least, but since
that file has been pretty static (since it's only supposed to contain
passive structures/constants related to the physical flat tree
structure - no code or prototypes).

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device
@ 2009-10-14  4:47             ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-14  4:47 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Fri, Oct 09, 2009 at 01:07:57AM -0600, Grant Likely wrote:
> On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
> <david@gibson.dropbear.id.au> wrote:
> > On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> >> Add a common header file for working with the flattened device tree
> >> data structure and merge the shared data tags used by Microblaze and
> >> PowerPC
> >>
> >> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> >> ---
> >>
> >>  arch/microblaze/include/asm/prom.h |   12 +-----------
> >>  arch/powerpc/include/asm/prom.h    |   12 +-----------
> >>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
> >>  3 files changed, 32 insertions(+), 22 deletions(-)
> >>  create mode 100644 include/linux/of_fdt.h
> >>
> >> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> >> index 64e8b3a..5f461f0 100644
> >> --- a/arch/microblaze/include/asm/prom.h
> >> +++ b/arch/microblaze/include/asm/prom.h
> >> @@ -17,20 +17,10 @@
> >>  #ifndef _ASM_MICROBLAZE_PROM_H
> >>  #define _ASM_MICROBLAZE_PROM_H
> >>  #ifdef __KERNEL__
> >> -
> >> -/* Definitions used by the flattened device tree */
> >> -#define OF_DT_HEADER         0xd00dfeed /* marker */
> >> -#define OF_DT_BEGIN_NODE     0x1 /* Start of node, full name */
> >> -#define OF_DT_END_NODE               0x2 /* End node */
> >> -#define OF_DT_PROP           0x3 /* Property: name off, size, content */
> >> -#define OF_DT_NOP            0x4 /* nop */
> >> -#define OF_DT_END            0x9
> >> -
> >> -#define OF_DT_VERSION                0x10
> >
> >
> > So, if you're merging all these, I guess the question is do we also
> > want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> > with the upstream libfdt header file which defines the same things.
> 
> I see your question and raise you another.  Where should the merge
> file live for it to be included both by dtc and kernel code? Or should
> it just be cloned in the kernel tree?

Yeah, a good question.  As I see it there are two options.  Number one
is just make sure everything relevant that the kernel needs is in the
libfdt version, then just have the kernel code reference it from its
location in scripts/dtc.  Other option is we clone the file in the
kernel tree.  Requires keeping in sync, in theory at least, but since
that file has been pretty static (since it's only supposed to contain
passive structures/constants related to the physical flat tree
structure - no code or prototypes).

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation
@ 2009-10-14  4:47             ` David Gibson
  0 siblings, 0 replies; 136+ messages in thread
From: David Gibson @ 2009-10-14  4:47 UTC (permalink / raw)
  To: Grant Likely
  Cc: Stephen Rothwell, monstr, microblaze-uclinux, devicetree-discuss,
	sparclinux, linuxppc-dev, davem

On Fri, Oct 09, 2009 at 01:07:57AM -0600, Grant Likely wrote:
> On Fri, Oct 9, 2009 at 12:35 AM, David Gibson
> <david@gibson.dropbear.id.au> wrote:
> > On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote:
> >> Add a common header file for working with the flattened device tree
> >> data structure and merge the shared data tags used by Microblaze and
> >> PowerPC
> >>
> >> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> >> ---
> >>
> >>  arch/microblaze/include/asm/prom.h |   12 +-----------
> >>  arch/powerpc/include/asm/prom.h    |   12 +-----------
> >>  include/linux/of_fdt.h             |   30 ++++++++++++++++++++++++++++++
> >>  3 files changed, 32 insertions(+), 22 deletions(-)
> >>  create mode 100644 include/linux/of_fdt.h
> >>
> >> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> >> index 64e8b3a..5f461f0 100644
> >> --- a/arch/microblaze/include/asm/prom.h
> >> +++ b/arch/microblaze/include/asm/prom.h
> >> @@ -17,20 +17,10 @@
> >>  #ifndef _ASM_MICROBLAZE_PROM_H
> >>  #define _ASM_MICROBLAZE_PROM_H
> >>  #ifdef __KERNEL__
> >> -
> >> -/* Definitions used by the flattened device tree */
> >> -#define OF_DT_HEADER         0xd00dfeed /* marker */
> >> -#define OF_DT_BEGIN_NODE     0x1 /* Start of node, full name */
> >> -#define OF_DT_END_NODE               0x2 /* End node */
> >> -#define OF_DT_PROP           0x3 /* Property: name off, size, content */
> >> -#define OF_DT_NOP            0x4 /* nop */
> >> -#define OF_DT_END            0x9
> >> -
> >> -#define OF_DT_VERSION                0x10
> >
> >
> > So, if you're merging all these, I guess the question is do we also
> > want to merge them with scripts/dtc/libfdt/fdt.h, and by extension
> > with the upstream libfdt header file which defines the same things.
> 
> I see your question and raise you another.  Where should the merge
> file live for it to be included both by dtc and kernel code? Or should
> it just be cloned in the kernel tree?

Yeah, a good question.  As I see it there are two options.  Number one
is just make sure everything relevant that the kernel needs is in the
libfdt version, then just have the kernel code reference it from its
location in scripts/dtc.  Other option is we clone the file in the
kernel tree.  Requires keeping in sync, in theory at least, but since
that file has been pretty static (since it's only supposed to contain
passive structures/constants related to the physical flat tree
structure - no code or prototypes).

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-07  4:29 ` Grant Likely
  (?)
@ 2009-10-15  1:00   ` Stephen Rothwell
  -1 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:00 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q


[-- Attachment #1.1: Type: text/plain, Size: 982 bytes --]

Hi Grant,

On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>
> Well, I've got to start somewhere...
> 
> So here goes.  I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches.  Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks.  This first batch isn't
> anything exciting, just a merge of common code

This all looks OK to me.  One thing:  I started in this as well some time
ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
by creating asm/of.h and moving the differing bits in there ...

I'll send out the two patches I did just to show what I mean (these are
from before microblaze was using the OF stuff).

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15  1:00   ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:00 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

Hi Grant,

On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> Well, I've got to start somewhere...
> 
> So here goes.  I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches.  Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks.  This first batch isn't
> anything exciting, just a merge of common code

This all looks OK to me.  One thing:  I started in this as well some time
ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
by creating asm/of.h and moving the differing bits in there ...

I'll send out the two patches I did just to show what I mean (these are
from before microblaze was using the OF stuff).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15  1:00   ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:00 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

Hi Grant,

On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> Well, I've got to start somewhere...
> 
> So here goes.  I've begun the work to merge and clean up the OF device
> tree handling code and this is my first set of patches.  Not fully
> tested yet, but I'm getting them out to the lists so that I can start
> responding to comments and collecting acks.  This first batch isn't
> anything exciting, just a merge of common code

This all looks OK to me.  One thing:  I started in this as well some time
ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
by creating asm/of.h and moving the differing bits in there ...

I'll send out the two patches I did just to show what I mean (these are
from before microblaze was using the OF stuff).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* [PATCH 1/2] of: create asm/of.h
       [not found]   ` <20091015120007.3780c59b.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  2009-10-15  1:01       ` Stephen Rothwell
@ 2009-10-15  1:01       ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:01 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

This creates asm/of.h for powerpc and sparc and includes it
from linux/of.h, it also moves the first trivial stuff there from
asm/prom.h

Signed-off-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
---
 arch/powerpc/include/asm/of.h   |   23 +++++++++++++++++++++++
 arch/powerpc/include/asm/prom.h |    7 -------
 arch/sparc/include/asm/of.h     |   24 ++++++++++++++++++++++++
 arch/sparc/include/asm/prom.h   |    7 -------
 include/linux/of.h              |    1 +
 5 files changed, 48 insertions(+), 14 deletions(-)
 create mode 100644 arch/powerpc/include/asm/of.h
 create mode 100644 arch/sparc/include/asm/of.h

diff --git a/arch/powerpc/include/asm/of.h b/arch/powerpc/include/asm/of.h
new file mode 100644
index 0000000..1c1089a
--- /dev/null
+++ b/arch/powerpc/include/asm/of.h
@@ -0,0 +1,23 @@
+#ifndef _POWERPC_OF_H
+#define _POWERPC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
+#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
+
+#endif /* _POWERPC_OF_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..07aef9f 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <asm/irq.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
-
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
diff --git a/arch/sparc/include/asm/of.h b/arch/sparc/include/asm/of.h
new file mode 100644
index 0000000..57ab8f9
--- /dev/null
+++ b/arch/sparc/include/asm/of.h
@@ -0,0 +1,24 @@
+#ifndef _SPARC_OF_H
+#define _SPARC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *	Updates for SPARC by David S. Miller
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
+
+#endif /* _SPARC_OF_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..4b6ec43 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <linux/mutex.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
-
 typedef u32 phandle;
 typedef u32 ihandle;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..3bfdaec 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+#include <asm/of.h>
 #include <asm/prom.h>
 
 /* flag descriptions */
-- 
1.6.4.3

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/

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

* [PATCH 1/2] of: create asm/of.h
@ 2009-10-15  1:01       ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:01 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

This creates asm/of.h for powerpc and sparc and includes it
from linux/of.h, it also moves the first trivial stuff there from
asm/prom.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/of.h   |   23 +++++++++++++++++++++++
 arch/powerpc/include/asm/prom.h |    7 -------
 arch/sparc/include/asm/of.h     |   24 ++++++++++++++++++++++++
 arch/sparc/include/asm/prom.h   |    7 -------
 include/linux/of.h              |    1 +
 5 files changed, 48 insertions(+), 14 deletions(-)
 create mode 100644 arch/powerpc/include/asm/of.h
 create mode 100644 arch/sparc/include/asm/of.h

diff --git a/arch/powerpc/include/asm/of.h b/arch/powerpc/include/asm/of.h
new file mode 100644
index 0000000..1c1089a
--- /dev/null
+++ b/arch/powerpc/include/asm/of.h
@@ -0,0 +1,23 @@
+#ifndef _POWERPC_OF_H
+#define _POWERPC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
+#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
+
+#endif /* _POWERPC_OF_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..07aef9f 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <asm/irq.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
-
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
diff --git a/arch/sparc/include/asm/of.h b/arch/sparc/include/asm/of.h
new file mode 100644
index 0000000..57ab8f9
--- /dev/null
+++ b/arch/sparc/include/asm/of.h
@@ -0,0 +1,24 @@
+#ifndef _SPARC_OF_H
+#define _SPARC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *	Updates for SPARC by David S. Miller
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
+
+#endif /* _SPARC_OF_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..4b6ec43 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <linux/mutex.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
-
 typedef u32 phandle;
 typedef u32 ihandle;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..3bfdaec 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+#include <asm/of.h>
 #include <asm/prom.h>
 
 /* flag descriptions */
-- 
1.6.4.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* [PATCH 1/2] of: create asm/of.h
@ 2009-10-15  1:01       ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:01 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

This creates asm/of.h for powerpc and sparc and includes it
from linux/of.h, it also moves the first trivial stuff there from
asm/prom.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/of.h   |   23 +++++++++++++++++++++++
 arch/powerpc/include/asm/prom.h |    7 -------
 arch/sparc/include/asm/of.h     |   24 ++++++++++++++++++++++++
 arch/sparc/include/asm/prom.h   |    7 -------
 include/linux/of.h              |    1 +
 5 files changed, 48 insertions(+), 14 deletions(-)
 create mode 100644 arch/powerpc/include/asm/of.h
 create mode 100644 arch/sparc/include/asm/of.h

diff --git a/arch/powerpc/include/asm/of.h b/arch/powerpc/include/asm/of.h
new file mode 100644
index 0000000..1c1089a
--- /dev/null
+++ b/arch/powerpc/include/asm/of.h
@@ -0,0 +1,23 @@
+#ifndef _POWERPC_OF_H
+#define _POWERPC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
+#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
+
+#endif /* _POWERPC_OF_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 6ff0418..07aef9f 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <asm/irq.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
-
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
diff --git a/arch/sparc/include/asm/of.h b/arch/sparc/include/asm/of.h
new file mode 100644
index 0000000..57ab8f9
--- /dev/null
+++ b/arch/sparc/include/asm/of.h
@@ -0,0 +1,24 @@
+#ifndef _SPARC_OF_H
+#define _SPARC_OF_H
+/*
+ * Definitions for accessing the in memory device tree.
+ *
+ * Extracted from prom.h
+ *	Copyright (C) 1996-2005 Paul Mackerras.
+ *	Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
+ *	Updates for SPARC by David S. Miller
+ *
+ * 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.
+ */
+
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
+
+#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
+#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
+
+#endif /* _SPARC_OF_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 82a190d..4b6ec43 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -21,13 +21,6 @@
 #include <linux/mutex.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1
-
-#define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
-#define of_node_cmp(s1, s2)		strcmp((s1), (s2))
-
 typedef u32 phandle;
 typedef u32 ihandle;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 7be2d10..3bfdaec 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/mod_devicetable.h>
 
+#include <asm/of.h>
 #include <asm/prom.h>
 
 /* flag descriptions */
-- 
1.6.4.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* [PATCH 2/2] of: move struct property to asm/of.h
  2009-10-15  1:01       ` Stephen Rothwell
@ 2009-10-15  1:02         ` Stephen Rothwell
  -1 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:02 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

Also find all users of struct property and make sure that they include
linux/of.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/of.h                |    7 +++++++
 arch/powerpc/include/asm/prom.h              |    7 +------
 arch/powerpc/kernel/machine_kexec_64.c       |    1 +
 arch/powerpc/kernel/prom.c                   |    1 +
 arch/powerpc/kernel/prom_parse.c             |    2 ++
 arch/powerpc/platforms/maple/pci.c           |    1 +
 arch/powerpc/platforms/powermac/pci.c        |    1 +
 arch/powerpc/platforms/powermac/pfunc_core.c |    1 +
 arch/powerpc/platforms/pseries/reconfig.c    |    1 +
 arch/powerpc/sysdev/qe_lib/qe.c              |    2 ++
 arch/sparc/include/asm/of.h                  |    9 +++++++++
 arch/sparc/include/asm/prom.h                |    9 +--------
 arch/sparc/kernel/pci_psycho.c               |    1 +
 arch/sparc/kernel/pci_schizo.c               |    1 +
 arch/sparc/kernel/pci_sun4v.c                |    1 +
 arch/sparc/kernel/prom_32.c                  |    1 +
 arch/sparc/kernel/prom_64.c                  |    1 +
 drivers/macintosh/smu.c                      |    1 +
 drivers/sbus/char/openprom.c                 |    2 ++
 fs/openpromfs/inode.c                        |    1 +
 fs/proc/proc_devtree.c                       |    2 ++
 21 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/include/asm/of.h b/arch/powerpc/include/asm/of.h
index 1c1089a..383f48d 100644
--- a/arch/powerpc/include/asm/of.h
+++ b/arch/powerpc/include/asm/of.h
@@ -20,4 +20,11 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
+struct property {
+	char		*name;
+	int		length;
+	void		*value;
+	struct property *next;
+};
+
 #endif /* _POWERPC_OF_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 07aef9f..97b24c9 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -68,12 +68,7 @@ struct boot_param_header
 typedef u32 phandle;
 typedef u32 ihandle;
 
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
+struct property;
 
 struct device_node {
 	const char *name;
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 040bd1d..8ff5e00 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -15,6 +15,7 @@
 #include <linux/thread_info.h>
 #include <linux/init_task.h>
 #include <linux/errno.h>
+#include <linux/of.h>
 
 #include <asm/page.h>
 #include <asm/current.h>
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b9..c7c2655 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -32,6 +32,7 @@
 #include <linux/debugfs.h>
 #include <linux/irq.h>
 #include <linux/lmb.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 8362620..07698d4 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -6,6 +6,8 @@
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <linux/etherdevice.h>
+#include <linux/of.h>
+
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
 
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 04296ff..599c192 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/irq.h>
+#include <linux/of.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index e81403b..ac0ab8d 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/irq.h>
+#include <linux/of.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 96d5ce5..2eb9cde 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -11,6 +11,7 @@
 #include <linux/spinlock.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/pmac_pfunc.h>
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 2e2bbe1..5d089d7 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -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>
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 464271b..8e690ca 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -27,6 +27,8 @@
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/crc32.h>
+#include <linux/of.h>
+
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
diff --git a/arch/sparc/include/asm/of.h b/arch/sparc/include/asm/of.h
index 57ab8f9..7aeb0c2 100644
--- a/arch/sparc/include/asm/of.h
+++ b/arch/sparc/include/asm/of.h
@@ -21,4 +21,13 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
+struct property {
+	char		*name;
+	int		length;
+	void		*value;
+	struct property *next;
+	unsigned long	 _flags;
+	unsigned int	 unique_id;
+};
+
 #endif /* _SPARC_OF_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 4b6ec43..03266c2 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -24,14 +24,7 @@
 typedef u32 phandle;
 typedef u32 ihandle;
 
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-	unsigned long _flags;
-	unsigned int unique_id;
-};
+struct property;
 
 struct of_irq_controller;
 struct device_node {
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index 142b9d6..d9c8cde 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 2b5cdde..c923817 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -9,6 +9,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 23c33ff..322dfe0 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -13,6 +13,7 @@
 #include <linux/irq.h>
 #include <linux/msi.h>
 #include <linux/log2.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/prom_32.c b/arch/sparc/kernel/prom_32.c
index 0a37e8c..61eafe0 100644
--- a/arch/sparc/kernel/prom_32.c
+++ b/arch/sparc/kernel/prom_32.c
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/bootmem.h>
 #include <linux/module.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/oplib.h>
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index fb06ac2..f05ebdc 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/lmb.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/prom.h>
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 96faa79..743e44a 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -36,6 +36,7 @@
 #include <linux/sysdev.h>
 #include <linux/poll.h>
 #include <linux/mutex.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 75ac19b..c67a9ab 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -38,6 +38,8 @@
 #include <linux/miscdevice.h>
 #include <linux/init.h>
 #include <linux/fs.h>
+#include <linux/of.h>
+
 #include <asm/oplib.h>
 #include <asm/prom.h>
 #include <asm/system.h>
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index ffcd04f..b308cdf 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/seq_file.h>
 #include <linux/magic.h>
+#include <linux/of.h>
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 7ba79a5..42121fc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -9,6 +9,8 @@
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <linux/string.h>
+#include <linux/of.h>
+
 #include <asm/prom.h>
 #include <asm/uaccess.h>
 #include "internal.h"
-- 
1.6.4.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* [PATCH 2/2] of: move struct property to asm/of.h
@ 2009-10-15  1:02         ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15  1:02 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

Also find all users of struct property and make sure that they include
linux/of.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/of.h                |    7 +++++++
 arch/powerpc/include/asm/prom.h              |    7 +------
 arch/powerpc/kernel/machine_kexec_64.c       |    1 +
 arch/powerpc/kernel/prom.c                   |    1 +
 arch/powerpc/kernel/prom_parse.c             |    2 ++
 arch/powerpc/platforms/maple/pci.c           |    1 +
 arch/powerpc/platforms/powermac/pci.c        |    1 +
 arch/powerpc/platforms/powermac/pfunc_core.c |    1 +
 arch/powerpc/platforms/pseries/reconfig.c    |    1 +
 arch/powerpc/sysdev/qe_lib/qe.c              |    2 ++
 arch/sparc/include/asm/of.h                  |    9 +++++++++
 arch/sparc/include/asm/prom.h                |    9 +--------
 arch/sparc/kernel/pci_psycho.c               |    1 +
 arch/sparc/kernel/pci_schizo.c               |    1 +
 arch/sparc/kernel/pci_sun4v.c                |    1 +
 arch/sparc/kernel/prom_32.c                  |    1 +
 arch/sparc/kernel/prom_64.c                  |    1 +
 drivers/macintosh/smu.c                      |    1 +
 drivers/sbus/char/openprom.c                 |    2 ++
 fs/openpromfs/inode.c                        |    1 +
 fs/proc/proc_devtree.c                       |    2 ++
 21 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/include/asm/of.h b/arch/powerpc/include/asm/of.h
index 1c1089a..383f48d 100644
--- a/arch/powerpc/include/asm/of.h
+++ b/arch/powerpc/include/asm/of.h
@@ -20,4 +20,11 @@
 #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))
 
+struct property {
+	char		*name;
+	int		length;
+	void		*value;
+	struct property *next;
+};
+
 #endif /* _POWERPC_OF_H */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 07aef9f..97b24c9 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -68,12 +68,7 @@ struct boot_param_header
 typedef u32 phandle;
 typedef u32 ihandle;
 
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-};
+struct property;
 
 struct device_node {
 	const char *name;
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 040bd1d..8ff5e00 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -15,6 +15,7 @@
 #include <linux/thread_info.h>
 #include <linux/init_task.h>
 #include <linux/errno.h>
+#include <linux/of.h>
 
 #include <asm/page.h>
 #include <asm/current.h>
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b9..c7c2655 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -32,6 +32,7 @@
 #include <linux/debugfs.h>
 #include <linux/irq.h>
 #include <linux/lmb.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 8362620..07698d4 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -6,6 +6,8 @@
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <linux/etherdevice.h>
+#include <linux/of.h>
+
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
 
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 04296ff..599c192 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/irq.h>
+#include <linux/of.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index e81403b..ac0ab8d 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/irq.h>
+#include <linux/of.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 96d5ce5..2eb9cde 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -11,6 +11,7 @@
 #include <linux/spinlock.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/pmac_pfunc.h>
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 2e2bbe1..5d089d7 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -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>
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 464271b..8e690ca 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -27,6 +27,8 @@
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/crc32.h>
+#include <linux/of.h>
+
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
diff --git a/arch/sparc/include/asm/of.h b/arch/sparc/include/asm/of.h
index 57ab8f9..7aeb0c2 100644
--- a/arch/sparc/include/asm/of.h
+++ b/arch/sparc/include/asm/of.h
@@ -21,4 +21,13 @@
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
+struct property {
+	char		*name;
+	int		length;
+	void		*value;
+	struct property *next;
+	unsigned long	 _flags;
+	unsigned int	 unique_id;
+};
+
 #endif /* _SPARC_OF_H */
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 4b6ec43..03266c2 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -24,14 +24,7 @@
 typedef u32 phandle;
 typedef u32 ihandle;
 
-struct property {
-	char	*name;
-	int	length;
-	void	*value;
-	struct property *next;
-	unsigned long _flags;
-	unsigned int unique_id;
-};
+struct property;
 
 struct of_irq_controller;
 struct device_node {
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index 142b9d6..d9c8cde 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 2b5cdde..c923817 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -9,6 +9,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 23c33ff..322dfe0 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -13,6 +13,7 @@
 #include <linux/irq.h>
 #include <linux/msi.h>
 #include <linux/log2.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/prom_32.c b/arch/sparc/kernel/prom_32.c
index 0a37e8c..61eafe0 100644
--- a/arch/sparc/kernel/prom_32.c
+++ b/arch/sparc/kernel/prom_32.c
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/bootmem.h>
 #include <linux/module.h>
+#include <linux/of.h>
 
 #include <asm/prom.h>
 #include <asm/oplib.h>
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index fb06ac2..f05ebdc 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/lmb.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/prom.h>
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 96faa79..743e44a 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -36,6 +36,7 @@
 #include <linux/sysdev.h>
 #include <linux/poll.h>
 #include <linux/mutex.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 75ac19b..c67a9ab 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -38,6 +38,8 @@
 #include <linux/miscdevice.h>
 #include <linux/init.h>
 #include <linux/fs.h>
+#include <linux/of.h>
+
 #include <asm/oplib.h>
 #include <asm/prom.h>
 #include <asm/system.h>
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index ffcd04f..b308cdf 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/seq_file.h>
 #include <linux/magic.h>
+#include <linux/of.h>
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 7ba79a5..42121fc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -9,6 +9,8 @@
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <linux/string.h>
+#include <linux/of.h>
+
 #include <asm/prom.h>
 #include <asm/uaccess.h>
 #include "internal.h"
-- 
1.6.4.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
  2009-10-15  1:00   ` Stephen Rothwell
  (?)
@ 2009-10-15 17:06     ` Grant Likely
  -1 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-15 17:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

On Wed, Oct 14, 2009 at 7:00 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> Well, I've got to start somewhere...
>>
>> So here goes.  I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches.  Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks.  This first batch isn't
>> anything exciting, just a merge of common code
>
> This all looks OK to me.  One thing:  I started in this as well some time
> ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
> by creating asm/of.h and moving the differing bits in there ...

Thanks Stephen.

At the moment I'm purposefully experimenting with doing arch #ifdefs
in the hope that it will lead to obvious places where the code can be
generalized even further.  I'll see how it looks before I commit down
that path though.

In the mean time, I've pushed out the current series with acked-bys
added to my git server.  I think I'm ready for things to start going
into linux-next.  Since this is the first time I've asked for a tree
to be added to linux-next, please let me know if you see anything
troublesome or problematic.  Here's the tree:

The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
  Grant Likely (1):
        powerpc/5200: Update defconfigs

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6 next-devicetree

Grant Likely (12):
      of: Rework linux/of.h and asm/prom.h include ordering
      of: merge phandle, ihandle and struct property
      of: merge struct device_node
      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
      of: add common header for flattened device tree representation
      of: merge struct boot_param_header from Microblaze and PowerPC
      of: merge of_node_*_flag() and set_node_proc_entry()
      of: merge of_read_number() an of_read_ulong()
      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
      of: merge of_*_flat_dt*() functions
      of: merge other miscellaneous prototypes
      of: merge of_find_all_nodes() implementations

 arch/microblaze/include/asm/prom.h |  135 +--------------------------------
 arch/microblaze/kernel/head.S      |    2 +-
 arch/microblaze/kernel/prom.c      |   23 ------
 arch/powerpc/include/asm/prom.h    |  147 +-----------------------------------
 arch/powerpc/kernel/prom.c         |   23 ------
 arch/sparc/include/asm/prom.h      |   55 +-------------
 drivers/of/base.c                  |   26 ++++++-
 include/linux/of.h                 |  103 +++++++++++++++++++++++++
 include/linux/of_fdt.h             |   86 +++++++++++++++++++++
 9 files changed, 221 insertions(+), 379 deletions(-)
 create mode 100644 include/linux/of_fdt.h


> I'll send out the two patches I did just to show what I mean (these are
> from before microblaze was using the OF stuff).

Got them, thanks.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15 17:06     ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-15 17:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

On Wed, Oct 14, 2009 at 7:00 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> Well, I've got to start somewhere...
>>
>> So here goes.  I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches.  Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks.  This first batch isn't
>> anything exciting, just a merge of common code
>
> This all looks OK to me.  One thing:  I started in this as well some time
> ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
> by creating asm/of.h and moving the differing bits in there ...

Thanks Stephen.

At the moment I'm purposefully experimenting with doing arch #ifdefs
in the hope that it will lead to obvious places where the code can be
generalized even further.  I'll see how it looks before I commit down
that path though.

In the mean time, I've pushed out the current series with acked-bys
added to my git server.  I think I'm ready for things to start going
into linux-next.  Since this is the first time I've asked for a tree
to be added to linux-next, please let me know if you see anything
troublesome or problematic.  Here's the tree:

The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
  Grant Likely (1):
        powerpc/5200: Update defconfigs

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6 next-devicetree

Grant Likely (12):
      of: Rework linux/of.h and asm/prom.h include ordering
      of: merge phandle, ihandle and struct property
      of: merge struct device_node
      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
      of: add common header for flattened device tree representation
      of: merge struct boot_param_header from Microblaze and PowerPC
      of: merge of_node_*_flag() and set_node_proc_entry()
      of: merge of_read_number() an of_read_ulong()
      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
      of: merge of_*_flat_dt*() functions
      of: merge other miscellaneous prototypes
      of: merge of_find_all_nodes() implementations

 arch/microblaze/include/asm/prom.h |  135 +--------------------------------
 arch/microblaze/kernel/head.S      |    2 +-
 arch/microblaze/kernel/prom.c      |   23 ------
 arch/powerpc/include/asm/prom.h    |  147 +-----------------------------------
 arch/powerpc/kernel/prom.c         |   23 ------
 arch/sparc/include/asm/prom.h      |   55 +-------------
 drivers/of/base.c                  |   26 ++++++-
 include/linux/of.h                 |  103 +++++++++++++++++++++++++
 include/linux/of_fdt.h             |   86 +++++++++++++++++++++
 9 files changed, 221 insertions(+), 379 deletions(-)
 create mode 100644 include/linux/of_fdt.h


> I'll send out the two patches I did just to show what I mean (these are
> from before microblaze was using the OF stuff).

Got them, thanks.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15 17:06     ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-15 17:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

On Wed, Oct 14, 2009 at 7:00 PM, Stephen Rothwell <sfr@canb.auug.org.au> wr=
ote:
> Hi Grant,
>
> On Tue, 06 Oct 2009 22:29:57 -0600 Grant Likely <grant.likely@secretlab.c=
a> wrote:
>>
>> Well, I've got to start somewhere...
>>
>> So here goes. =A0I've begun the work to merge and clean up the OF device
>> tree handling code and this is my first set of patches. =A0Not fully
>> tested yet, but I'm getting them out to the lists so that I can start
>> responding to comments and collecting acks. =A0This first batch isn't
>> anything exciting, just a merge of common code
>
> This all looks OK to me. =A0One thing: =A0I started in this as well some =
time
> ago and in my attempt I was hoping to avoid the ARCH ifdefs in linux/of.h
> by creating asm/of.h and moving the differing bits in there ...

Thanks Stephen.

At the moment I'm purposefully experimenting with doing arch #ifdefs
in the hope that it will lead to obvious places where the code can be
generalized even further.  I'll see how it looks before I commit down
that path though.

In the mean time, I've pushed out the current series with acked-bys
added to my git server.  I think I'm ready for things to start going
into linux-next.  Since this is the first time I've asked for a tree
to be added to linux-next, please let me know if you see anything
troublesome or problematic.  Here's the tree:

The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9=
:
  Grant Likely (1):
        powerpc/5200: Update defconfigs

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6 next-devicetree

Grant Likely (12):
      of: Rework linux/of.h and asm/prom.h include ordering
      of: merge phandle, ihandle and struct property
      of: merge struct device_node
      of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
      of: add common header for flattened device tree representation
      of: merge struct boot_param_header from Microblaze and PowerPC
      of: merge of_node_*_flag() and set_node_proc_entry()
      of: merge of_read_number() an of_read_ulong()
      of: merge of_node_get(), of_node_put() and of_find_all_nodes()
      of: merge of_*_flat_dt*() functions
      of: merge other miscellaneous prototypes
      of: merge of_find_all_nodes() implementations

 arch/microblaze/include/asm/prom.h |  135 +-------------------------------=
-
 arch/microblaze/kernel/head.S      |    2 +-
 arch/microblaze/kernel/prom.c      |   23 ------
 arch/powerpc/include/asm/prom.h    |  147 +-------------------------------=
----
 arch/powerpc/kernel/prom.c         |   23 ------
 arch/sparc/include/asm/prom.h      |   55 +-------------
 drivers/of/base.c                  |   26 ++++++-
 include/linux/of.h                 |  103 +++++++++++++++++++++++++
 include/linux/of_fdt.h             |   86 +++++++++++++++++++++
 9 files changed, 221 insertions(+), 379 deletions(-)
 create mode 100644 include/linux/of_fdt.h


> I'll send out the two patches I did just to show what I mean (these are
> from before microblaze was using the OF stuff).

Got them, thanks.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]     ` <fa686aa40910151006k43b07c30q1e43c3b1ae4af561-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-10-15 23:38         ` Stephen Rothwell
@ 2009-10-15 23:38         ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15 23:38 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q


[-- Attachment #1.1: Type: text/plain, Size: 2564 bytes --]

Hi Grant,

On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>
> In the mean time, I've pushed out the current series with acked-bys
> added to my git server.  I think I'm ready for things to start going
> into linux-next.  Since this is the first time I've asked for a tree
> to be added to linux-next, please let me know if you see anything
> troublesome or problematic.  Here's the tree:
> 
> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
>   Grant Likely (1):
>         powerpc/5200: Update defconfigs

Um, that commit is in no tree but yours ...

> are available in the git repository at:
> 
>   git://git.secretlab.ca/git/linux-2.6 next-devicetree

I have added this for today, but note that it contains stuff that is not
devicetree related.  Trees in linux-next should be based on other trees
in linux-next (almost always Linus' tree, but any other nonrebasing tree
is fine).

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15 23:38         ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15 23:38 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]

Hi Grant,

On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> In the mean time, I've pushed out the current series with acked-bys
> added to my git server.  I think I'm ready for things to start going
> into linux-next.  Since this is the first time I've asked for a tree
> to be added to linux-next, please let me know if you see anything
> troublesome or problematic.  Here's the tree:
> 
> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
>   Grant Likely (1):
>         powerpc/5200: Update defconfigs

Um, that commit is in no tree but yours ...

> are available in the git repository at:
> 
>   git://git.secretlab.ca/git/linux-2.6 next-devicetree

I have added this for today, but note that it contains stuff that is not
devicetree related.  Trees in linux-next should be based on other trees
in linux-next (almost always Linus' tree, but any other nonrebasing tree
is fine).

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-15 23:38         ` Stephen Rothwell
  0 siblings, 0 replies; 136+ messages in thread
From: Stephen Rothwell @ 2009-10-15 23:38 UTC (permalink / raw)
  To: Grant Likely
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]

Hi Grant,

On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>
> In the mean time, I've pushed out the current series with acked-bys
> added to my git server.  I think I'm ready for things to start going
> into linux-next.  Since this is the first time I've asked for a tree
> to be added to linux-next, please let me know if you see anything
> troublesome or problematic.  Here's the tree:
> 
> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
>   Grant Likely (1):
>         powerpc/5200: Update defconfigs

Um, that commit is in no tree but yours ...

> are available in the git repository at:
> 
>   git://git.secretlab.ca/git/linux-2.6 next-devicetree

I have added this for today, but note that it contains stuff that is not
devicetree related.  Trees in linux-next should be based on other trees
in linux-next (almost always Linus' tree, but any other nonrebasing tree
is fine).

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
       [not found]         ` <20091016103829.323c89d7.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  2009-10-16  3:18             ` Grant Likely
@ 2009-10-16  3:18             ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-16  3:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Thu, Oct 15, 2009 at 5:38 PM, Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org> wrote:
> Hi Grant,
>
> On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> In the mean time, I've pushed out the current series with acked-bys
>> added to my git server.  I think I'm ready for things to start going
>> into linux-next.  Since this is the first time I've asked for a tree
>> to be added to linux-next, please let me know if you see anything
>> troublesome or problematic.  Here's the tree:
>>
>> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
>>   Grant Likely (1):
>>         powerpc/5200: Update defconfigs
>
> Um, that commit is in no tree but yours ...

It should be in Ben's merge tree shortly, and Linus' shortly after
that, but yeah that was lazy.  It was the tree that I tested my
commits on, and I should have either rebased or waited until it
actually hit mainline.  I just wanted to get the ball rolling before
heading out the door for Japan.

>> are available in the git repository at:
>>
>>   git://git.secretlab.ca/git/linux-2.6 next-devicetree
>
> I have added this for today, but note that it contains stuff that is not
> devicetree related.  Trees in linux-next should be based on other trees
> in linux-next (almost always Linus' tree, but any other nonrebasing tree
> is fine).

Thanks.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-16  3:18             ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-16  3:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	sparclinux-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Thu, Oct 15, 2009 at 5:38 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> In the mean time, I've pushed out the current series with acked-bys
>> added to my git server.  I think I'm ready for things to start going
>> into linux-next.  Since this is the first time I've asked for a tree
>> to be added to linux-next, please let me know if you see anything
>> troublesome or problematic.  Here's the tree:
>>
>> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b59e9:
>>   Grant Likely (1):
>>         powerpc/5200: Update defconfigs
>
> Um, that commit is in no tree but yours ...

It should be in Ben's merge tree shortly, and Linus' shortly after
that, but yeah that was lazy.  It was the tree that I tested my
commits on, and I should have either rebased or waited until it
actually hit mainline.  I just wanted to get the ball rolling before
heading out the door for Japan.

>> are available in the git repository at:
>>
>>   git://git.secretlab.ca/git/linux-2.6 next-devicetree
>
> I have added this for today, but note that it contains stuff that is not
> devicetree related.  Trees in linux-next should be based on other trees
> in linux-next (almost always Linus' tree, but any other nonrebasing tree
> is fine).

Thanks.

g.

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

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

* Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code
@ 2009-10-16  3:18             ` Grant Likely
  0 siblings, 0 replies; 136+ messages in thread
From: Grant Likely @ 2009-10-16  3:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: monstr, devicetree-discuss, microblaze-uclinux, sparclinux,
	linuxppc-dev, davem

On Thu, Oct 15, 2009 at 5:38 PM, Stephen Rothwell <sfr@canb.auug.org.au> wr=
ote:
> Hi Grant,
>
> On Thu, 15 Oct 2009 11:06:15 -0600 Grant Likely <grant.likely@secretlab.c=
a> wrote:
>>
>> In the mean time, I've pushed out the current series with acked-bys
>> added to my git server. =A0I think I'm ready for things to start going
>> into linux-next. =A0Since this is the first time I've asked for a tree
>> to be added to linux-next, please let me know if you see anything
>> troublesome or problematic. =A0Here's the tree:
>>
>> The following changes since commit 4bdf0bb7d64cf672199519b3d808e2a82f5b5=
9e9:
>> =A0 Grant Likely (1):
>> =A0 =A0 =A0 =A0 powerpc/5200: Update defconfigs
>
> Um, that commit is in no tree but yours ...

It should be in Ben's merge tree shortly, and Linus' shortly after
that, but yeah that was lazy.  It was the tree that I tested my
commits on, and I should have either rebased or waited until it
actually hit mainline.  I just wanted to get the ball rolling before
heading out the door for Japan.

>> are available in the git repository at:
>>
>> =A0 git://git.secretlab.ca/git/linux-2.6 next-devicetree
>
> I have added this for today, but note that it contains stuff that is not
> devicetree related. =A0Trees in linux-next should be based on other trees
> in linux-next (almost always Linus' tree, but any other nonrebasing tree
> is fine).

Thanks.

g.

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

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

end of thread, other threads:[~2009-10-16  3:18 UTC | newest]

Thread overview: 136+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-07  4:29 [RFC PATCH 00/12] Merge common OpenFirmware device tree code Grant Likely
2009-10-07  4:29 ` Grant Likely
2009-10-07  4:30 ` [RFC PATCH 01/12] of: Rework linux/of.h and asm/prom.h include ordering Grant Likely
2009-10-07  4:30   ` Grant Likely
2009-10-07  4:30   ` [RFC PATCH 01/12] of: Rework linux/of.h and asm/prom.h include Grant Likely
2009-10-07  4:30 ` [RFC PATCH 02/12] of: merge phandle, ihandle and struct property Grant Likely
2009-10-07  4:30   ` Grant Likely
2009-10-07  4:30 ` Grant Likely
2009-10-07  4:30 ` [RFC PATCH 03/12] of: merge struct device_node Grant Likely
2009-10-07  4:30   ` Grant Likely
2009-10-07  4:30   ` Grant Likely
2009-10-07  4:30 ` [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h Grant Likely
2009-10-07  4:30 ` [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros Grant Likely
2009-10-07  4:30   ` [RFC PATCH 04/12] of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h Grant Likely
2009-10-07  4:30 ` [RFC PATCH 05/12] of: add common header for flattened device tree Grant Likely
2009-10-07  4:30   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
2009-10-07  4:57   ` Stephen Rothwell
2009-10-07  4:57     ` Stephen Rothwell
2009-10-07  4:57     ` [RFC PATCH 05/12] of: add common header for flattened device Stephen Rothwell
2009-10-07 12:14     ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation Michal Simek
2009-10-07 12:14       ` Michal Simek
2009-10-07 12:14       ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header Michal Simek
     [not found]       ` <4ACC861A.7020506-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2009-10-07 13:38         ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
2009-10-07 13:38           ` Grant Likely
2009-10-07 13:38           ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header Grant Likely
2009-10-07 14:07           ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation Michal Simek
2009-10-07 14:07             ` [microblaze-uclinux] Re: [RFC PATCH 05/12] of: add common header Michal Simek
2009-10-07  5:14   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Benjamin Herrenschmidt
2009-10-07  5:14     ` Benjamin Herrenschmidt
2009-10-07  5:14     ` [RFC PATCH 05/12] of: add common header for flattened device Benjamin Herrenschmidt
2009-10-07 13:41     ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
2009-10-07 13:41       ` Grant Likely
2009-10-07 13:41       ` [RFC PATCH 05/12] of: add common header for flattened device tree Grant Likely
2009-10-09  6:35   ` [RFC PATCH 05/12] of: add common header for flattened device tree representation David Gibson
2009-10-09  6:35     ` David Gibson
2009-10-09  6:35     ` [RFC PATCH 05/12] of: add common header for flattened device David Gibson
     [not found]     ` <20091009063534.GC12948-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-10-09  7:07       ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
2009-10-09  7:07         ` Grant Likely
2009-10-09  7:07         ` [RFC PATCH 05/12] of: add common header for flattened device tree Grant Likely
     [not found]         ` <fa686aa40910090007lef3fddbod0c5843abfe33be5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-14  4:47           ` [RFC PATCH 05/12] of: add common header for flattened device tree representation David Gibson
2009-10-14  4:47             ` David Gibson
2009-10-14  4:47             ` [RFC PATCH 05/12] of: add common header for flattened device David Gibson
2009-10-07  4:30 ` [RFC PATCH 05/12] of: add common header for flattened device tree representation Grant Likely
2009-10-07  4:31 ` [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze and PowerPC Grant Likely
2009-10-07  4:31 ` [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze Grant Likely
2009-10-07  4:31   ` [RFC PATCH 06/12] of: merge struct boot_param_header from Microblaze and PowerPC Grant Likely
2009-10-07  4:31 ` [RFC PATCH 07/12] of: merge of_node_*_flag() and set_node_proc_entry() Grant Likely
2009-10-07  4:31 ` Grant Likely
2009-10-07  4:31   ` Grant Likely
2009-10-07  4:31 ` [RFC PATCH 08/12] of: merge of_read_number() an of_read_ulong() Grant Likely
2009-10-07  4:31   ` Grant Likely
2009-10-07  4:31 ` Grant Likely
2009-10-07  4:31 ` [RFC PATCH 09/12] of: merge of_node_get(), Grant Likely
2009-10-07  4:31   ` [RFC PATCH 09/12] of: merge of_node_get(), of_node_put() and of_find_all_nodes() Grant Likely
2009-10-07  4:31 ` Grant Likely
2009-10-07  4:32 ` [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions Grant Likely
2009-10-07  4:32   ` Grant Likely
2009-10-09  6:36   ` David Gibson
2009-10-09  6:36     ` David Gibson
2009-10-09  6:36     ` David Gibson
     [not found]     ` <20091009063635.GD12948-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-10-09  7:03       ` Grant Likely
2009-10-09  7:03         ` Grant Likely
2009-10-09  7:03         ` Grant Likely
2009-10-07  4:32 ` Grant Likely
2009-10-07  4:32 ` [RFC PATCH 11/12] of: merge other miscellaneous prototypes Grant Likely
2009-10-07  4:32 ` Grant Likely
2009-10-07  4:32   ` Grant Likely
2009-10-07  4:32 ` [RFC PATCH 12/12] of: merge of_find_all_nodes() implementations Grant Likely
2009-10-07  4:32 ` Grant Likely
2009-10-07  4:32   ` Grant Likely
2009-10-07  4:49 ` [RFC PATCH 00/12] Merge common OpenFirmware device tree code Grant Likely
2009-10-07  4:49   ` Grant Likely
2009-10-07  4:49   ` Grant Likely
2009-10-07  5:18   ` Julian Calaby
2009-10-07  5:18     ` Julian Calaby
2009-10-07  5:18     ` Julian Calaby
     [not found]     ` <646765f40910062218s19d540f9q14c9086bedd1d9da-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-07 13:52       ` Sam Creasey
2009-10-07 13:52         ` Sam Creasey
2009-10-07 13:52         ` Sam Creasey
2009-10-07 19:30         ` Mitch Bradley
2009-10-07 19:30           ` Mitch Bradley
2009-10-07 19:30           ` Mitch Bradley
     [not found]           ` <4ACCEC67.9070106-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2009-10-07 20:54             ` Chris Newport
2009-10-07 20:54               ` Chris Newport
2009-10-07 20:54               ` Chris Newport
     [not found]               ` <Pine.LNX.4.60.0910072148040.11795-pb599fR3TxWvwYtD5Hs6llaTQe2KTcn/@public.gmane.org>
2009-10-07 21:09                 ` David Miller
2009-10-07 21:09                   ` David Miller
2009-10-07 21:09                   ` David Miller
2009-10-08  1:29                   ` Chris Newport
2009-10-08  1:29                     ` Chris Newport
     [not found]                     ` <Pine.LNX.4.60.0910080155210.12519-pb599fR3TxWvwYtD5Hs6llaTQe2KTcn/@public.gmane.org>
2009-10-08  4:39                       ` David Miller
2009-10-08  4:39                         ` David Miller
2009-10-08  4:39                         ` David Miller
     [not found]                         ` <20091007.213915.37481688.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-10-08 13:24                           ` Kjetil Oftedal
2009-10-08 13:24                             ` Kjetil Oftedal
2009-10-08 13:24                             ` Kjetil Oftedal
2009-10-07 22:57         ` Brad Boyer
2009-10-07 22:57           ` Brad Boyer
     [not found]   ` <fa686aa40910062149p5d7141e4x3ff849fd4d191f38-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-07  7:09     ` Rob Landley
2009-10-07  7:09       ` Rob Landley
2009-10-07  7:09       ` Rob Landley
2009-10-07 14:02       ` Grant Likely
2009-10-07 14:02         ` Grant Likely
2009-10-07 14:02         ` Grant Likely
     [not found]         ` <fa686aa40910070702j470785d2ka2621122a8e2f1fd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-07 14:21           ` [microblaze-uclinux] " Michal Simek
2009-10-07 14:21             ` Michal Simek
2009-10-07 14:21             ` [microblaze-uclinux] Re: [RFC PATCH 00/12] Merge common OpenFirmware Michal Simek
2009-10-07  7:27     ` [RFC PATCH 00/12] Merge common OpenFirmware device tree code David Miller
2009-10-07  7:27       ` David Miller
2009-10-07  7:27       ` David Miller
     [not found]       ` <20091007.002722.168292120.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-10-07 16:39         ` Stephen Neuendorffer
2009-10-07 16:39           ` Stephen Neuendorffer
2009-10-07 16:39           ` Stephen Neuendorffer
2009-10-07  9:02     ` Wolfram Sang
2009-10-07  9:02       ` Wolfram Sang
2009-10-07  9:02       ` Wolfram Sang
2009-10-07 22:20 ` Leif Sawyer
2009-10-07 22:39 ` David Miller
2009-10-07 22:50 ` Mitch Bradley
2009-10-15  1:00 ` Stephen Rothwell
2009-10-15  1:00   ` Stephen Rothwell
2009-10-15  1:00   ` Stephen Rothwell
     [not found]   ` <20091015120007.3780c59b.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-10-15  1:01     ` [PATCH 1/2] of: create asm/of.h Stephen Rothwell
2009-10-15  1:01       ` Stephen Rothwell
2009-10-15  1:01       ` Stephen Rothwell
2009-10-15  1:02       ` [PATCH 2/2] of: move struct property to asm/of.h Stephen Rothwell
2009-10-15  1:02         ` Stephen Rothwell
2009-10-15 17:06   ` [RFC PATCH 00/12] Merge common OpenFirmware device tree code Grant Likely
2009-10-15 17:06     ` Grant Likely
2009-10-15 17:06     ` Grant Likely
     [not found]     ` <fa686aa40910151006k43b07c30q1e43c3b1ae4af561-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-15 23:38       ` Stephen Rothwell
2009-10-15 23:38         ` Stephen Rothwell
2009-10-15 23:38         ` Stephen Rothwell
     [not found]         ` <20091016103829.323c89d7.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-10-16  3:18           ` Grant Likely
2009-10-16  3:18             ` Grant Likely
2009-10-16  3:18             ` Grant Likely

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.