Re: [PATCH 4/4] Move of_node[attach, detach] declarations to linux/of.h

2009-11-18 Thread Andres Salomon
On Wed, 18 Nov 2009 15:48:02 -0600 Nathan Fontenot wrote: > Merge the declarations of of_attach_node and of_detach_node from the > asm/prom.h headers of powerpc and microblaze into linux/of.h. > > This update also requires adding linux/of.h to the include list for > powerpc/platforms/pseries/rec

Re: [PATCH 0/4 v2] Merge OF dynamic patches

2009-11-20 Thread Andres Salomon
On Fri, 20 Nov 2009 14:40:22 -0700 Grant Likely wrote: [...] > > But I'm really close to posting my 3rd series, so it may be better to > wait until that is published and build a patch on top of that to move > them into of_dynamic.c > Do you have any plans to deal w/ creation of the fdt (specif

[PATCH 1/4] x86: OLPC: constify an olpc_ofw() arg

2010-06-28 Thread Andres Salomon
The arguments passed to OFW shouldn't be modified; update the 'args' argument of olpc_ofw to reflect this. This saves us some later casting away of consts. Signed-off-by: Andres Salomon --- arch/x86/include/asm/olpc_ofw.h |2 +- arch/x86/kernel/olpc.c |2 +-

[PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-06-28 Thread Andres Salomon
Stick code into drivers/of/pdt.c (Prom Device Tree) that other architectures with OpenFirmware resident in memory can make use of. Signed-off-by: Andres Salomon --- arch/sparc/Kconfig |1 + arch/sparc/include/asm/prom.h | 15 +++- arch/sparc/kernel/prom.h| 14

[PATCH 3/4] proc: unify PROC_DEVICETREE config

2010-06-28 Thread Andres Salomon
Microblaze and PPC both use PROC_DEVICETREE, and OLPC will as well.. put the Kconfig option into fs/ rather than in arch/*/Kconfig. Signed-off-by: Andres Salomon --- arch/microblaze/Kconfig |8 arch/powerpc/Kconfig|8 fs/proc/Kconfig |8 3

[PATCH 4/4] x86: OLPC: add OLPC device-tree support

2010-06-28 Thread Andres Salomon
Make use of PROC_DEVICETREE to export the tree, and sparc's PROMTREE code to call into OLPC's Open Firmware to build the tree. (Yes, I know this leaks memory by simply using kmalloc) Signed-off-by: Andres Salomon --- arch/x86/Kconfig |5 ++ arch/x86/i

[PATCH 0/4] RFC: OLPC/x86 device tree code

2010-06-28 Thread Andres Salomon
Hi, I'm looking for input on the following patches; they're based upon the OFW patch that's currently in the x86-tip tree[0], and they've only been compile tested (on x86 and sparc64). This stuff takes the sparc device tree creation code and makes it available for multiple architectures, which OL

Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support

2010-06-29 Thread Andres Salomon
On Tue, 29 Jun 2010 01:12:36 -0700 Grant Likely wrote: > Hi Andres, comments below Thanks! > > On Mon, Jun 28, 2010 at 7:00 PM, Andres Salomon > wrote: > > > > Make use of PROC_DEVICETREE to export the tree, and sparc's > > PROMTREE code to call int

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-06-29 Thread Andres Salomon
On Tue, 29 Jun 2010 00:50:08 -0700 Grant Likely wrote: > On Mon, Jun 28, 2010 at 7:00 PM, Andres Salomon wrote: > > > > Stick code into drivers/of/pdt.c (Prom Device Tree) that other > > architectures with OpenFirmware resident in memory can make use of. > > > &

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-06-29 Thread Andres Salomon
On Tue, 29 Jun 2010 15:42:54 -0600 Grant Likely wrote: > On Tue, Jun 29, 2010 at 9:03 AM, Andres Salomon > wrote: [...] > > > Sparc and OLPC have very similar > > mechanisms for getting device tree info from OFW, so it makes sense > > to share code between them. &g

Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support

2010-06-30 Thread Andres Salomon
On Wed, 30 Jun 2010 15:13:26 -0600 Grant Likely wrote: > On Tue, Jun 29, 2010 at 8:23 AM, Andres Salomon > wrote: > > On Tue, 29 Jun 2010 01:12:36 -0700 > > Grant Likely wrote: [...] > >> > +extern void prom_build_devicetree(void); > >> > + > >

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-07-05 Thread Andres Salomon
On Wed, 30 Jun 2010 15:52:51 -0600 Grant Likely wrote: > On Tue, Jun 29, 2010 at 5:36 PM, Andres Salomon > wrote: > > On Tue, 29 Jun 2010 15:42:54 -0600 > > Grant Likely wrote: > > > >> On Tue, Jun 29, 2010 at 9:03 AM, Andres Salomon > >> wrote: >

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-07-05 Thread Andres Salomon
On Mon, 05 Jul 2010 19:22:21 -0700 (PDT) David Miller wrote: > From: Andres Salomon > Date: Wed, 7 Jul 2010 04:07:34 + > > > - For the pdt, calling into the prom once for each property/node to > >create a fdt, and then unflattening it. This is better than the &

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-07-06 Thread Andres Salomon
On Tue, 6 Jul 2010 03:21:21 -0600 Grant Likely wrote: > On Mon, Jun 28, 2010 at 8:00 PM, Andres Salomon > wrote: > > > > Stick code into drivers/of/pdt.c (Prom Device Tree) that other > > architectures with OpenFirmware resident in memory can make use of. > > >

Re: [PATCH 2/4] sparc: break out some prom device-tree building code out into drivers/of

2010-07-06 Thread Andres Salomon
On Tue, 6 Jul 2010 16:06:54 -0600 Grant Likely wrote: [...] > Okay, so it is only the userspace interface that you're interested in, > correct? You have no needs/plans (as of yet) to register devices out > of the device tree? > Correct. ___ devicetr

[PATCH] sparc: move is_root_node from private header to of.h

2010-07-11 Thread Andres Salomon
Make is_root_node available for all archs to use, as it's not PROM-specific. Also rename it to of_is_root_node, and a few other minor changes for style/consistency. Signed-off-by: Andres Salomon --- arch/sparc/kernel/prom.h|8 arch/sparc/kernel/prom_64.c |

Re: [PATCH] sparc: move is_root_node from private header to of.h

2010-07-12 Thread Andres Salomon
On Mon, 12 Jul 2010 09:53:04 -0600 Grant Likely wrote: > On Tue, Jul 13, 2010 at 3:42 AM, Andres Salomon > wrote: > > > > Make is_root_node available for all archs to use, as it's not > > PROM-specific. Also rename it to of_is_root_node, and a few other > >

[PATCH 1/3] sparc: break out some PROM device-tree building code out into drivers/of

2010-08-08 Thread Andres Salomon
Transitioning into making this useful for architectures other than sparc. Signed-off-by: Andres Salomon --- arch/sparc/kernel/prom_common.c | 190 +-- drivers/of/pdt.c| 217 +++ 2 files changed, 218

[PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific

2010-08-08 Thread Andres Salomon
Clean up pdt.c: - make build dependent upon config OF_PROMTREE - #ifdef out the sparc-specific stuff - create pdt-specific header - create a pdt_ops struct that pdt uses to call arch-specific prom routines Signed-off-by: Andres Salomon --- arch/sparc/Kconfig |1 + arch

[PATCH 3/3] sparc: add pdt/of_pdt namespace to pdt code

2010-08-08 Thread Andres Salomon
For symbols still lacking namespace qualifiers, add of_pdt to non-static stuff and pdt_ to static names. Signed-off-by: Andres Salomon --- arch/sparc/kernel/leon_kernel.c |2 +- drivers/of/pdt.c| 40 +++--- include/linux/of_pdt.h

Re: [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific

2010-08-08 Thread Andres Salomon
On Sun, 8 Aug 2010 23:12:21 -0600 Grant Likely wrote: > Hi Andres, thanks for the patch. Comments below. > > g. > > On Sun, Aug 8, 2010 at 9:11 PM, Andres Salomon > wrote: [...] > > + > >  unsigned int prom_early_allocated __initdata; > > > > -#inclu

olpc ofw question

2010-08-10 Thread Andres Salomon
Hi, I've run a comparison between OLPC's old OFW code (which mounts the device-tree at /ofw, and makes use of the sparc code) versus the code which I'm planning to send upstream (which mounts the device-tree at /proc/device-tree, and makes use of PROC_DEVTREE). The results are here: http://dev.q

Re: olpc ofw question

2010-08-11 Thread Andres Salomon
On Wed, 11 Aug 2010 22:48:43 +0200 (CEST) "Segher Boessenkool" wrote: > > I've run a comparison between OLPC's old OFW code (which mounts the > > device-tree at /ofw, and makes use of the sparc code) versus the > > code which I'm planning to send upstream (which mounts the > > device-tree at /pro

Re: olpc ofw question

2010-08-14 Thread Andres Salomon
On Wed, 11 Aug 2010 15:53:44 -1000 Mitch Bradley wrote: [...] > > The "proc_of.c" code that I wrote in Dec 2006 uses the > package-to-path method mentioned above, getting the "n...@addr" > representation (package-to-path returns the full path, but you can > easily extract just the tail component

Re: [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific

2010-08-15 Thread Andres Salomon
On Sun, 08 Aug 2010 22:34:44 -0700 (PDT) David Miller wrote: > From: Andres Salomon > Date: Mon, 9 Aug 2010 01:32:45 -0400 > > > On Sun, 8 Aug 2010 23:12:21 -0600 > > Grant Likely wrote: > > > >> If you have to explicitly cast these function point

[PATCH 0/9] add OLPC device-tree support

2010-08-29 Thread Andres Salomon
These patches modify drivers/of, sparc, and x86 accordingly to add OLPC device-tree support. Updates have been made based upon Grant and Davem's comments. They've been compile-tested on sparc64 and x86, and runtime tested on OLPC machines. Dave's 25edd6946 commit caused some conflicts w/ patch #

[PATCH 1/9] of: move phandle/ihandle into types.h

2010-08-29 Thread Andres Salomon
We need phandle for some exported sparc headers; of.h isn't an exported header, and it would be silly to export it when all we really need is one or two types from it. So, move the phandle/ihandle definitions into types.h. Signed-off-by: Andres Salomon --- include/linux/of.h|

[PATCH 2/9] sparc: convert various prom_* functions to use phandle

2010-08-29 Thread Andres Salomon
Rather than passing around ints everywhere, use the phandle type where appropriate for the various functions that talk to the PROM. Note: this has only been compile-tested for 64bit sparc. Signed-off-by: Andres Salomon --- arch/sparc/include/asm/floppy_32.h |3 +- arch/sparc/include/asm

[PATCH 3/9] sparc: break out some PROM device-tree building code out into drivers/of

2010-08-29 Thread Andres Salomon
Transitioning into making this useful for architectures other than sparc. This is a verbatim copy of all functions/variables that've been moved. Signed-off-by: Andres Salomon --- arch/sparc/kernel/prom_common.c | 190 +-- drivers/of/pdt.c|

[PATCH 4/9] sparc: make drivers/of/pdt.c no longer sparc-only

2010-08-29 Thread Andres Salomon
Clean up pdt.c: - make build dependent upon config OF_PROMTREE - #ifdef out the sparc-specific stuff - create pdt-specific header Signed-off-by: Andres Salomon --- arch/sparc/Kconfig |1 + arch/sparc/include/asm/prom.h |5 ++- arch/sparc/kernel/prom.h|6

[PATCH 5/9] of: no longer call prom_ functions directly; use an ops structure

2010-08-29 Thread Andres Salomon
define the ops struct as well. Signed-off-by: Andres Salomon --- arch/sparc/kernel/prom_common.c | 37 - drivers/of/pdt.c| 39 ++- include/linux/of_pdt.h | 20 +++- 3 files

[PATCH 6/9] of: add of_pdt namespace to pdt code

2010-08-29 Thread Andres Salomon
For symbols still lacking namespace qualifiers, add an of_pdt_ prefix. Signed-off-by: Andres Salomon --- arch/sparc/kernel/leon_kernel.c |2 +- drivers/of/pdt.c| 40 +++--- include/linux/of_pdt.h |2 +- 3 files changed, 22

[PATCH 7/9] of: add package-to-path support to pdt

2010-08-29 Thread Andres Salomon
"name" property if it fails). Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 43 ++- include/linux/of_pdt.h |3 +++ 2 files changed, 45 insertions(+), 1 deletions(-) diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c index 31a4fb8.

[PATCH 8/9] x86: of: irq additions to make drivers/of/* build on x86

2010-08-29 Thread Andres Salomon
This functionality overlaps with patches previously submitted by Stephen Neuendorffer. I don't care whose eventually get applied, so long as drivers/of/* becomes buildable on x86. Signed-off-by: Andres Salomon --- arch/x86/include/asm/irq.h |5 + arch/x86/kernel/irq.c |

[PATCH 9/9] x86: OLPC: add OLPC device-tree support

2010-08-29 Thread Andres Salomon
late /proc/device-tree. Signed-off-by: Andres Salomon --- arch/x86/Kconfig|2 + arch/x86/include/asm/olpc_ofw.h |4 + arch/x86/include/asm/prom.h |1 + arch/x86/kernel/Makefile|1 + arch/x86/kernel/olpc_ofw.c |8 ++ arch/x86/kernel/olpc_prom.c

Re: [PATCH 9/9] x86: OLPC: add OLPC device-tree support

2010-08-30 Thread Andres Salomon
On Mon, 30 Aug 2010 12:14:57 -0600 Grant Likely wrote: > On Sun, Aug 29, 2010 at 10:07 PM, Andres Salomon > wrote: > > > > Make use of PROC_DEVICETREE to export the tree, and sparc's > > PROMTREE code to call into OLPC's Open Firmware to build the tree. >

Re: [PATCH 1/9] of: move phandle/ihandle into types.h

2010-09-03 Thread Andres Salomon
On Mon, 30 Aug 2010 07:06:27 +0200 Sam Ravnborg wrote: > On Sun, Aug 29, 2010 at 11:53:52PM -0400, Andres Salomon wrote: > > > > We need phandle for some exported sparc headers; of.h isn't an > > exported header, and it would be silly to export it when all we > >

[PATCH 1/2] x86: of: remove references to NO_IRQ in drivers/of/platform.c

2010-09-10 Thread Andres Salomon
Instead of referencing NO_IRQ in platform.c, define some helper functions in irq.c to call instead from platform.c. Keep NO_IRQ usage local to irq.c, and define NO_IRQ if not defined in headers. Signed-off-by: Andres Salomon --- drivers/of/irq.c | 39

[PATCH 2/2] x86: of: define irq functions to allow drivers/of/* to build on x86

2010-09-10 Thread Andres Salomon
- Define a stub irq_create_of_mapping for x86 as a stop-gap solution until drivers/of/irq is further along. - Define irq_dispose_mapping for x86 to appease of_i2c.c Signed-off-by: Andres Salomon --- arch/x86/include/asm/irq.h |3 +++ arch/x86/kernel/irq.c |8 include

Re: [PATCH 2/2] x86: of: define irq functions to allow drivers/of/* to build on x86

2010-09-20 Thread Andres Salomon
On Fri, 10 Sep 2010 12:21:35 -0600 Grant Likely wrote: > On Fri, Sep 10, 2010 at 08:14:58PM +0200, Ingo Molnar wrote: > > > > * Grant Likely wrote: > > > > > On Fri, Sep 10, 2010 at 06:01:51AM -0700, Andres Salomon wrote: > > > > > > > &g

Re: [PATCH 2/2] x86: of: define irq functions to allow drivers/of/* to build on x86

2010-09-21 Thread Andres Salomon
On Tue, 21 Sep 2010 11:45:37 +0200 (CEST) Thomas Gleixner wrote: > On Mon, 20 Sep 2010, Andres Salomon wrote: > > On Fri, 10 Sep 2010 12:21:35 -0600 > > Grant Likely wrote: > > > > > On Fri, Sep 10, 2010 at 08:14:58PM +0200, Ingo Molnar wrote: > >

[PATCH 1/2 v2] of: move phandle/ihandle into types.h and export to userspace

2010-10-08 Thread Andres Salomon
ff-by: Andres Salomon --- include/linux/of.h|3 --- include/linux/types.h |7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index cad7cf0..db184dc 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -25,9

[PATCH 2/2 v2] sparc: convert various prom_* functions to use phandle

2010-10-08 Thread Andres Salomon
Rather than passing around ints everywhere, use the phandle type where appropriate for the various functions that talk to the PROM. v2: use __kernel_phandle in openprom.h instead of phandle. Note: this has only been compile-tested for 64bit sparc. Signed-off-by: Andres Salomon --- arch/sparc

[PATCH] sparc: stop exporting openprom.h header

2010-10-08 Thread Andres Salomon
It's unknown why openprom.h was being exported; there doesn't seem to be any reason for it currently, and it creates headaches with userspace being able to potentially use the structures in there. So, don't export it anymore. Signed-off-by: Andres Salomon --- arch/sparc/inc

Re: [PATCH 1/2 v2] of: move phandle/ihandle into types.h and export to userspace

2010-10-08 Thread Andres Salomon
On Fri, 8 Oct 2010 12:27:45 -0600 Grant Likely wrote: > On Fri, Oct 08, 2010 at 10:45:57AM -0700, David Miller wrote: > > From: Grant Likely > > Date: Fri, 8 Oct 2010 11:36:50 -0600 > > > > > Weird. Yeah, no other platforms expect to get a phandle type > > > definition from the kernel headers.

[PATCH v3] sparc: convert various prom_* functions to use phandle

2010-10-08 Thread Andres Salomon
: Andres Salomon --- arch/sparc/include/asm/floppy_32.h |3 +- arch/sparc/include/asm/openprom.h | 16 + arch/sparc/include/asm/oplib_32.h | 44 +- arch/sparc/include/asm/oplib_64.h | 39 +++--- arch/sparc/kernel/auxio_32.c |4

Re: [PATCH] sparc: stop exporting openprom.h header

2010-10-08 Thread Andres Salomon
On Fri, 8 Oct 2010 13:00:25 -0600 Grant Likely wrote: > On Fri, Oct 8, 2010 at 12:52 PM, David Miller > wrote: > > From: Andres Salomon > > Date: Fri, 8 Oct 2010 11:34:24 -0700 > > > >> > >> It's unknown why openprom.h was being exported;

Re: [PATCH] sparc: stop exporting openprom.h header

2010-10-09 Thread Andres Salomon
On Sat, 9 Oct 2010 02:51:43 -0600 Grant Likely wrote: > On Fri, Oct 08, 2010 at 02:34:50PM -0700, Andres Salomon wrote: > > On Fri, 8 Oct 2010 13:00:25 -0600 > > Grant Likely wrote: > > > > > On Fri, Oct 8, 2010 at 12:52 PM, David Miller > > > wrote: >

Re: [PATCH] sparc: stop exporting openprom.h header

2010-10-10 Thread Andres Salomon
On Sat, 9 Oct 2010 23:13:24 -0600 Grant Likely wrote: > On Sat, Oct 09, 2010 at 01:48:08PM -0700, Andres Salomon wrote: > > On Sat, 9 Oct 2010 02:51:43 -0600 > > Grant Likely wrote: > > [...] > Hmmm, series fails to build on sparc32, and doesn't appear to be >

[PATCH 1/7] sparc: make drivers/of/pdt.c no longer sparc-only

2010-10-10 Thread Andres Salomon
Clean up pdt.c: - make build dependent upon config OF_PROMTREE - #ifdef out the sparc-specific stuff - create pdt-specific header Signed-off-by: Andres Salomon --- arch/sparc/Kconfig |1 + arch/sparc/include/asm/prom.h |5 ++- arch/sparc/kernel/prom.h|6

[PATCH 2/7] of: no longer call prom_ functions directly; use an ops structure

2010-10-10 Thread Andres Salomon
define the ops struct as well. Signed-off-by: Andres Salomon --- arch/sparc/kernel/prom_common.c | 36 ++- drivers/of/pdt.c| 40 +- include/linux/of_pdt.h | 20 ++- 3 files changed

[PATCH 3/5] of: add of_pdt namespace to pdt code

2010-10-10 Thread Andres Salomon
For symbols still lacking namespace qualifiers, add an of_pdt_ prefix. Signed-off-by: Andres Salomon --- arch/sparc/kernel/leon_kernel.c |2 +- drivers/of/pdt.c| 40 +++--- include/linux/of_pdt.h |2 +- 3 files changed, 22

[PATCH 4/5] of: add package-to-path support to pdt

2010-10-10 Thread Andres Salomon
"name" property if it fails). Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 43 ++- include/linux/of_pdt.h |3 +++ 2 files changed, 45 insertions(+), 1 deletions(-) diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c index 31a4fb8.

[PATCH 5/5] x86: OLPC: add OLPC device-tree support

2010-10-10 Thread Andres Salomon
Make use of PROC_DEVICETREE to export the tree, and sparc's PROMTREE code to call into OLPC's Open Firmware to build the tree. Signed-off-by: Andres Salomon --- arch/x86/Kconfig|2 + arch/x86/include/asm/olpc_ofw.h |4 + arch/x86/include/asm/prom.h |

Re: [PATCH 1/7] sparc: make drivers/of/pdt.c no longer sparc-only

2010-10-10 Thread Andres Salomon
Whoops, that should've been 1/5, not 1/7. Two additional x86 patches snuck in there that are already in Grant's test-devicetree branch. On Sun, 10 Oct 2010 01:43:58 -0700 Andres Salomon wrote: > > Clean up pdt.c: > - make build dependent upon config OF_PROMTREE >

Re: [PATCH 1/7] sparc: make drivers/of/pdt.c no longer sparc-only

2010-10-10 Thread Andres Salomon
On Sun, 10 Oct 2010 22:04:43 -0600 Grant Likely wrote: > On Sun, Oct 10, 2010 at 02:09:05AM -0700, Andres Salomon wrote: > > Whoops, that should've been 1/5, not 1/7. Two additional x86 > > patches snuck in there that are already in Grant's test-devicetree > > br

Re: [PATCH 5/5] x86: OLPC: add OLPC device-tree support

2010-10-21 Thread Andres Salomon
On Wed, 20 Oct 2010 12:56:21 -0600 Grant Likely wrote: > On Sun, Oct 10, 2010 at 10:13 PM, Grant Likely > wrote: > > On Sun, Oct 10, 2010 at 02:06:26AM -0700, Andres Salomon wrote: > >> > >> Make use of PROC_DEVICETREE to export the tree, and sparc's > >

[PATCH] x86: OLPC: add OLPC device-tree support (v3)

2010-10-22 Thread Andres Salomon
fw_is_installed function to test for the existence and successful detection of OLPC's OFW. Signed-off-by: Andres Salomon --- arch/x86/Kconfig|6 ++ arch/x86/include/asm/olpc_ofw.h |9 ++ arch/x86/include/asm/prom.h |1 + arch/x86/kernel/Makefile|

[PATCH] x86: OLPC: speed up device tree creation during boot

2010-10-22 Thread Andres Salomon
idn't noticably affect boot time, and wasted 9k.) Signed-off-by: Andres Salomon --- arch/x86/kernel/olpc_dt.c | 27 +++ 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/olpc_dt.c b/arch/x86/kernel/olpc_dt.c index f660a11..44dd2ae 100644

Re: [PATCH] x86: OLPC: add OLPC device-tree support (v3)

2010-10-27 Thread Andres Salomon
On Wed, 27 Oct 2010 11:19:33 +0100 Grant Likely wrote: > On Fri, Oct 22, 2010 at 03:58:46PM -0700, Andres Salomon wrote: > > > > Make use of PROC_DEVICETREE to export the tree, and sparc's > > PROMTREE code to call into OLPC's Open Firmware to build the tree. &

Re: [PATCH] x86: OLPC: speed up device tree creation during boot

2010-10-27 Thread Andres Salomon
On Wed, 27 Oct 2010 11:39:24 +0100 Grant Likely wrote: > On Fri, Oct 22, 2010 at 05:22:47PM -0700, Andres Salomon wrote: > > > > Calling alloc_bootmem() for tiny chunks of memory over and over is > > really slow; on an XO-1, it caused the time between when the kernel &g

mtd: fix build error in m25p80.c

2010-10-29 Thread Andres Salomon
e. The code in question should be wrapped w/ a stricter #ifdef. Signed-off-by: Andres Salomon --- drivers/mtd/devices/m25p80.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index ea22520..184ddd5 100644 --- a/driv

[PATCH 1/3] x86: of: define irq functions to allow drivers/of/* to build on x86

2010-11-11 Thread Andres Salomon
t;The long term plan is to have the drivers/of/ code handling the mapping intelligently like powerpc currently does." But for now, just provide these functions. Signed-off-by: Andres Salomon --- arch/x86/include/asm/irq.h |3 +++ arch/x86/kernel/irq.c | 10 ++ 2 files c

[PATCH 2/3] x86: OLPC: add OLPC device-tree support (v4)

2010-11-11 Thread Andres Salomon
there are some 1200 bootmem reservations that are done during boot. Not ideal.. - add a helper olpc_ofw_is_installed function to test for the existence and successful detection of OLPC's OFW. Signed-off-by: Andres Salomon --- arch/x86/Kconfig |6 ++ arch/x86/in

[PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v2)

2010-11-11 Thread Andres Salomon
idn't noticably affect boot time, and wasted 9k.) v2: reorder function as suggested by Grant. Signed-off-by: Andres Salomon --- arch/x86/platform/olpc/olpc_dt.c | 27 ++- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/arch/x86/platform/olpc/olpc_dt.c

Re: [PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v2)

2010-11-12 Thread Andres Salomon
On Fri, 12 Nov 2010 01:48:30 -0600 Milton Miller wrote: > On Thu, 11 Nov 2010 around 21:45:46 -0800, Andres Salomon wrote: > > diff --git a/arch/x86/platform/olpc/olpc_dt.c > > b/arch/x86/platform/olpc/olpc_dt.c index b8c8ff9..0ab824d 100644 > > --- a/arch/x86/platform/olp

[PATCH 2/3] x86: OLPC: add OLPC device-tree support (v5)

2010-11-16 Thread Andres Salomon
ier during boot (during setup_arch); the downside is that there are some 1200 bootmem reservations that are done during boot. Not ideal.. - add a helper olpc_ofw_is_installed function to test for the existence and successful detection of OLPC's OFW. Signed-off-by: Andres Salomon -

[PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v3)

2010-11-16 Thread Andres Salomon
idn't noticably affect boot time, and wasted 9k.) v3: fix wasted memory buglet found by Milton Miller, and style fixes. v2: reorder prom_early_alloc as suggested by Grant Likely. Signed-off-by: Andres Salomon --- arch/x86/platform/olpc/olpc_dt.c | 28 +++- 1 files c

Re: [PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v2)

2010-11-18 Thread Andres Salomon
On Thu, 18 Nov 2010 07:04:04 -0800 "H. Peter Anvin" wrote: > On 11/18/2010 03:02 AM, Michael Ellerman wrote: > > On Thu, 2010-11-18 at 09:34 +0100, Ingo Molnar wrote: > >> > >> Look at the general balance of hardship: very little harm is done > >> (it's not a big deal if a variable is only used i

Re: [PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v2)

2010-11-19 Thread Andres Salomon
On Thu, 18 Nov 2010 09:48:59 -0800 "H. Peter Anvin" wrote: > On 11/18/2010 09:41 AM, Andres Salomon wrote: > >> > >> No, sorry, this sounds like a personal preference that is well out > >> of line with the vast majority of C programmers I've ever c

[PATCH 3/3] x86: OLPC: speed up device tree creation during boot (v4)

2010-11-29 Thread Andres Salomon
idn't noticably affect boot time, and wasted 9k.) v4: clarify comment, requested by hpa v3: fix wasted memory buglet found by Milton Miller, and style fix. v2: reorder prom_early_alloc as suggested by Grant. Signed-off-by: Andres Salomon --- arch/x86/platform/olpc/olpc_d

[PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness

2011-02-18 Thread Andres Salomon
e but first we have to > fix a DT bug/inconsistency that is preventing us from correctly > binding to the tree's devices. > > Daniel Mea culpa. The patch below fixes a bug I introduced earlier. Cc'ing the sparc folks, as this probably affects them (although I would thi

[PATCH] of/pdt: don't bother parsing pkg2path results, return as-is

2011-02-22 Thread Andres Salomon
On Fri, 18 Feb 2011 19:06:59 -0800 Andres Salomon wrote: > On Fri, 18 Feb 2011 23:42:57 + > Daniel Drake wrote: > > > On 16 February 2011 22:44, David Woodhouse > > wrote: > > > On Wed, 2011-02-16 at 22:28 +, Daniel Drake wrote: &g

Re: [PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness

2011-02-23 Thread Andres Salomon
On Wed, 23 Feb 2011 12:43:52 -0700 Grant Likely wrote: > On Fri, Feb 18, 2011 at 07:06:59PM -0800, Andres Salomon wrote: > > On Fri, 18 Feb 2011 23:42:57 + > > Daniel Drake wrote: > > > > > On 16 February 2011 22:44, David Woodhouse > > > wrote: &g

[PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v2)

2011-02-23 Thread Andres Salomon
sparc by reverting dp->name back to what sparc was originally doing (looking at the name property). v2: combine two patches and revert of_pdt_node_name to original version. Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 42 +++--- 1 files changed, 1

Re: [PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v2)

2011-02-23 Thread Andres Salomon
On Wed, 23 Feb 2011 16:28:15 -0700 Grant Likely wrote: > On Wed, Feb 23, 2011 at 03:03:57PM -0800, Andres Salomon wrote: > > > > Commit e2f2a93b changed dp->name from using the 'name' property to > > using package-to-path. This fixed /proc/device-tree cre

[PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v3)

2011-02-23 Thread Andres Salomon
and revert of_pdt_node_name to original version v3: use dp->phandle instead of passing around node Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 37 - 1 files changed, 12 insertions(+), 25 deletions(-) diff --git a/drivers/of/pdt.c b/drivers/of

Re: [PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v3)

2011-02-23 Thread Andres Salomon
On Wed, 23 Feb 2011 19:47:08 -0700 Grant Likely wrote: > On Wed, Feb 23, 2011 at 04:34:42PM -0800, Andres Salomon wrote: > > > > Commit e2f2a93b changed dp->name from using the 'name' property to > > using package-to-path. This fixed /proc/device-tree cre

Re: [PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v2)

2011-02-23 Thread Andres Salomon
On Wed, 23 Feb 2011 21:06:38 -0700 Grant Likely wrote: > On Wed, Feb 23, 2011 at 04:16:30PM -0800, Andres Salomon wrote: > > On Wed, 23 Feb 2011 16:28:15 -0700 > > Grant Likely wrote: > > > > > On Wed, Feb 23, 2011 at 03:03:57PM -0800, Andres Salomon wrote: &g

[PATCH] of/pdt: allow DT device matching by fixing 'name' brokenness (v4)

2011-02-23 Thread Andres Salomon
and revert of_pdt_node_name to original version v3: use dp->phandle instead of passing around node v4: warn/bail out for non-sparc archs if pkg2path is not set Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 50 ++ 1 files changed, 22 inse

Re: [PATCH v5] of/promtree: allow DT device matching by fixing 'name' brokenness

2011-02-24 Thread Andres Salomon
On Thu, 24 Feb 2011 10:04:41 -0700 Grant Likely wrote: > From: Andres Salomon > > Commit e2f2a93b, "of/promtree: add package-to-path support to pdt" > changed dp->name from using the 'name' property to using > package-to-path. This fixed /proc/device-tr

[PATCH v6] of/pdt: allow DT device matching by fixing 'name' brokenness

2011-02-24 Thread Andres Salomon
and revert of_pdt_node_name to original version v3: use dp->phandle instead of passing around node v4: warn/bail out for non-sparc archs if pkg2path is not set v6: rework functions based on Grant's suggestions; WARN_ON if no pkg2path hook Signed-off-by: Andres Salomon --- drivers/of/p

Re: [PATCH v5] of/promtree: allow DT device matching by fixing 'name' brokenness

2011-02-24 Thread Andres Salomon
On Thu, 24 Feb 2011 12:42:34 -0700 Grant Likely wrote: > On Thu, Feb 24, 2011 at 09:33:41AM -0800, Andres Salomon wrote: > > On Thu, 24 Feb 2011 10:04:41 -0700 > > Grant Likely wrote: > > > > > From: Andres Salomon [...] > > > static inline voi

Re: [PATCH v5] of/promtree: allow DT device matching by fixing 'name' brokenness

2011-02-24 Thread Andres Salomon
On Thu, 24 Feb 2011 12:42:34 -0700 Grant Likely wrote: > On Thu, Feb 24, 2011 at 09:33:41AM -0800, Andres Salomon wrote: > > On Thu, 24 Feb 2011 10:04:41 -0700 > > Grant Likely wrote: > > > > > From: Andres Salomon > > > [...] > I've

[PATCH] x86: OLPC: have prom_early_alloc BUG rather than return NULL

2011-02-24 Thread Andres Salomon
..similar to what sparc's prom_early_alloc does. Signed-off-by: Andres Salomon --- arch/x86/platform/olpc/olpc_dt.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index dab8746..044bda5 100644

Re: [PATCH v5] of/promtree: allow DT device matching by fixing 'name' brokenness

2011-02-25 Thread Andres Salomon
On Thu, 24 Feb 2011 23:06:06 -0700 Grant Likely wrote: > On Thu, Feb 24, 2011 at 1:01 PM, Andres Salomon > wrote: > > On Thu, 24 Feb 2011 12:42:34 -0700 > > Grant Likely wrote: > >> If firmware is buggy, then pkg2path must deal with it.  It is not > >> okay

Re: [RFC 1/3] OLPC: Use device tree for platform identification

2011-03-04 Thread Andres Salomon
The x86 folks should probably be cc'd as well.. Overall, this looks good, just a few minor issues below. On Fri, 4 Mar 2011 17:12:14 + (GMT) Daniel Drake wrote: > Make OLPC fully depend on device tree, and use it to identify the OLPC > platform details. Some nodes are exposed as platform d

Re: [RFC 3/3] olpc-battery: bind to device tree

2011-03-04 Thread Andres Salomon
Acked-by: Andres Salomon On Fri, 4 Mar 2011 17:12:40 + (GMT) Daniel Drake wrote: > This is cleaner, and allows suspend/resume (wakeup) handlers to be > added in an upcoming patch. > > Signed-off-by: Daniel Drake > --- > drivers/power/olp

Re: [RFC 2/3] OLPC: add missing elements to device tree

2011-03-05 Thread Andres Salomon
On Fri, 4 Mar 2011 21:50:42 -0700 Grant Likely wrote: > On Fri, Mar 04, 2011 at 05:12:34PM +, Daniel Drake wrote: > > In response to new device tree code in the kernel, OLPC will start > > using it for probing of certain devices. However, some firmware > > fixes are needed to put the devicetr

Re: [RFC 1/3] OLPC: Use device tree for platform identification

2011-03-08 Thread Andres Salomon
On Tue, 8 Mar 2011 21:13:00 + Daniel Drake wrote: > On 4 March 2011 18:01, Andres Salomon wrote: > >> +static int __init declare_of_platform_devices(void) > >> +{ > >> +     return of_platform_bus_probe(NULL, of_ids, NULL); > >> +} > >&

[PATCH 0/3] switch DT creation to using of_attach_node

2011-03-09 Thread Andres Salomon
These patches cause of_attach_node to be used by OF core, both for promtree and flattree building. ___ devicetree-discuss mailing list devicetree-discuss@lists.ozlabs.org https://lists.ozlabs.org/listinfo/devicetree-discuss

[PATCH 1/3] of: remove OF_DYNAMIC config option

2011-03-09 Thread Andres Salomon
ttach_node safe to call with the node's parent being NULL; the only time this should happen is with the root node. Later patches will be using of_attach_node to link the root node. Signed-off-by: Andres Salomon --- drivers/of/Kconfig |4 drivers/of/base.c | 17 -

[PATCH 2/3] of/promtree: switch to building the DT using of_attach_node

2011-03-09 Thread Andres Salomon
o note that this changes what gets passed to the of_pdt_build_more() hook. The only user of this hook is sparc's leon_kernel.c, which ends up using it to call prom_amba_init. However, prom_amba_init isn't actually set in the kernel, so I can't tell whether this actually breaks behavior

[PATCH 3/3] of/flattree: use of_attach_node to build tree, and associated cleanups

2011-03-09 Thread Andres Salomon
-off-by: Andres Salomon --- drivers/of/fdt.c | 42 -- include/linux/of.h |1 - 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index af824e7..e70cee8 100644 --- a/drivers/of/fdt.c +++ b/drivers/of

Re: [RFC 2/3] OLPC: add missing elements to device tree

2011-03-09 Thread Andres Salomon
On Sat, 5 Mar 2011 17:19:43 -0700 Grant Likely wrote: > On Sat, Mar 05, 2011 at 09:23:47AM -0800, Andres Salomon wrote: > > On Fri, 4 Mar 2011 21:50:42 -0700 > > Grant Likely wrote: > > > > > > +static void __init prom_alloc_property(struct device_node > >

Re: [PATCH 3/3] of/flattree: use of_attach_node to build tree, and associated cleanups

2011-03-12 Thread Andres Salomon
On Sat, 12 Mar 2011 02:10:56 -0700 Grant Likely wrote: > On Wed, Mar 09, 2011 at 04:16:07PM -0800, Andres Salomon wrote: > > Use a common function (of_attach_node) to build the device tree. > > This simplifies the flat device tree creation a bit, and as an > > added bonu

Re: [RFC v2] OLPC: add missing elements to device tree

2011-03-15 Thread Andres Salomon
Looks good to me as well. Acked-by: Andres Salomon This should probably be forwarded to the x86 folks. On Mon, 14 Mar 2011 21:33:35 -0600 Grant Likely wrote: > On Sat, Mar 12, 2011 at 06:04:48PM +, Daniel Drake wrote: > > In response to new device tree code in the kernel, OLPC w

[PATCH 0/4] switch DT creation to using of_attach_node (v2)

2011-03-17 Thread Andres Salomon
ng each in their entirety. Andres Salomon (4): of: rework of_attach_node, removing CONFIG_OF_DYNAMIC of/promtree: switch to building the DT using of_attach_node of/flattree: minor cleanups of/flattree: use of_attach_node to build tree b/drivers/of/Kconfig |4 b/

[PATCH 2/4] of/promtree: switch to building the DT using of_attach_node

2011-03-17 Thread Andres Salomon
ds up using it to call prom_amba_init. However, prom_amba_init isn't actually set in the kernel, so I can't tell whether this actually breaks behavior or not. Signed-off-by: Andres Salomon --- drivers/of/pdt.c | 30 ++ 1 files changed, 6 insertions(+

[PATCH 3/4] of/flattree: minor cleanups

2011-03-17 Thread Andres Salomon
- static-ize some functions - add some additional comments Signed-off-by: Andres Salomon --- drivers/of/fdt.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index af824e7..c9db49c 100644 --- a/drivers/of/fdt.c +++ b/drivers/of

  1   2   >