[0/2] A counter-proposal for the literals transition

2007-10-26 Thread David Gibson
So I've been doing some thinking and coding today on the dts-versioning / new-style literals issue. Here's a set of two patches which need a little polish, but I think demonstrate a better way to handle the transition; and a start on some not-directly-related improvements to the parser design.

[1/2] dtc: Simplify lexing/parsing of literals vs. node/property names

2007-10-26 Thread David Gibson
The current scheme of having CELLDATA and MEMRESERVE states to recognize hex literals instead of node or property names is arse-backwards. The patch switches things around so that literals are lexed in normal states, and property/node names are only recognized in the special PROPNODENAME state,

[2/2] dtc: Switch dtc to C-style literals

2007-10-26 Thread David Gibson
This patch introduces a new version of dts file, distinguished from older files by starting with the special token /dts-v1/. dts files in the new version take C-style literals instead of the old bare hex or OF-style base notation. In addition, the range for of memreserve entries (/memreserve/

[PATCH 03/16] Use of_get_next_parent() in pci_dma_bus_setup_pSeriesLP()

2007-10-26 Thread Michael Ellerman
pci_dma_bus_setup_pSeriesLP() should use of_get_next_parent() to safely iterate through the parent nodes. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/iommu.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[PATCH 07/16] Use of_get_next_parent() in xics_setup_8259_cascade()

2007-10-26 Thread Michael Ellerman
Use of_get_next_parent() in xics_setup_8259_cascade() to simplify the loop logic. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/xics.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/pseries/xics.c

[PATCH 08/16] Use of_get_next_parent() in pseries_mpic_init_IRQ()

2007-10-26 Thread Michael Ellerman
Use of_get_next_parent() in pseries_mpic_init_IRQ() to simplify the loop logic. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/setup.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/pseries/setup.c

[PATCH 09/16] Use of_get_next_parent() in axon_msi.c

2007-10-26 Thread Michael Ellerman
We can use of_get_next_parent() in two places in axon_msi.c to simplify the looping logic. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/axon_msi.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 10/16] Use of_get_next_child() in EEH gather_pci_data()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in the EEH gather_pci_data() routine to safely traverse the node's children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git

[PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in the eeh_restore_bars() routine to safely traverse the node's children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git

[PATCH 12/16] Use of_get_next_child() in eeh_add_device_tree_early()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in the eeh_add_device_tree_early() routine to safely traverse the node's children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 16/16] Use of_get_next_child() in EEH print_device_node_tree()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in print_device_node_tree() to safely traverse the node's children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh_driver.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 15/16] Use of_get_next_child() in eeh_reset_device()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in eeh_reset_device() to safely traverse the node's children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- Linas, I don't grok the logic in here, can you check it's OK. The old code would potentially not walk through all siblings if pe_dn-node was not

[PATCH 02/16] Use of_get_next_parent() in pci_dma_bus_setup_pSeries()

2007-10-26 Thread Michael Ellerman
pci_dma_bus_setup_pSeries() should use of_get_next_parent() to safely iterate through the parent nodes. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/iommu.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 01/16] Add of_get_next_parent()

2007-10-26 Thread Michael Ellerman
Iterating through a device node's parents is simple enough, but dealing with the refcounts properly is a little ugly, and replicating that logic is asking for someone to get it wrong or forget it all together, eg: while (dn != NULL) { /* loop body */ tmp = of_get_parent(dn);

[PATCH 06/16] Use of_get_next_child() in pci_dma_bus_setup_pSeries()

2007-10-26 Thread Michael Ellerman
pci_dma_bus_setup_pSeries() should use of_get_next_child() to safely iterate through the nodes children. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 13/16] Use of_get_next_child() in __eeh_mark_slot()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in __eeh_mark_slot() to safely traverse the node's children. To achieve this we need to change __eeh_mark_slot() to take the parent node, not the child. This is also safer, as passing anything other than node-child to the existing routine will not traverse all

[PATCH 14/16] Use of_get_next_child() in __eeh_clear_slot()

2007-10-26 Thread Michael Ellerman
We should use of_get_next_child() in __eeh_clear_slot() to safely traverse the node's children. To achieve this we need to change __eeh_clear_slot() to take the parent node, not the child. This is also safer, as passing anything other than node-child to the existing routine will not traverse all

[PATCH 04/16] Use of_get_next_parent() in pci_dma_dev_setup_pSeries()

2007-10-26 Thread Michael Ellerman
pci_dma_dev_setup_pSeries() should use of_get_next_parent() to safely iterate through the parent nodes. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/iommu.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[PATCH 05/16] Use of_get_next_parent() in pci_dma_dev_setup_pSeriesLP()

2007-10-26 Thread Michael Ellerman
pci_dma_dev_setup_pSeriesLP() should use of_get_next_parent() to safely iterate through the parent nodes. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/iommu.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 09/16] Use of_get_next_parent() in axon_msi.c

2007-10-26 Thread Stephen Rothwell
On Fri, 26 Oct 2007 16:54:41 +1000 (EST) Michael Ellerman [EMAIL PROTECTED] wrote: +++ b/arch/powerpc/platforms/cell/axon_msi.c @@ -125,7 +125,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev) return NULL; } - for (; dn; tmp =

Re: [PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()

2007-10-26 Thread Stephen Rothwell
On Fri, 26 Oct 2007 16:54:43 +1000 (EST) Michael Ellerman [EMAIL PROTECTED] wrote: +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -841,11 +841,8 @@ void eeh_restore_bars(struct pci_dn *pdn) if ((pdn-eeh_mode EEH_MODE_SUPPORTED) !IS_BRIDGE(pdn-class_code)) __restore_bars

Re: [i2c] i2c-mpc.c driver issues

2007-10-26 Thread Jean Delvare
Hi Jocke, On Wed, 24 Oct 2007 23:06:13 +0200, Tjernlund wrote: While browsing the i2c-mpc.c driver I noticed some things that look odd to me so I figured I report them. Could not find a maintainer in the MAINTANERS file so I sent here, cc:ed linuxppc-dev as well. 1) There are a lot of

Re: ppc manual paging question

2007-10-26 Thread Wang, Baojun
On Monday 22 October 2007 16:04:14, Benjamin Herrenschmidt wrote: Yup, I've found how does the kernel handle tlbs, I think the most important thing is I forgot read/write the SPRN_SPRG3 register as _switch does. SPRG3 is for use by the operating system for whatever you want... if you are

Re: [PATCH 01/16] Add of_get_next_parent()

2007-10-26 Thread David Miller
From: Michael Ellerman [EMAIL PROTECTED] Date: Fri, 26 Oct 2007 16:54:31 +1000 (EST) Iterating through a device node's parents is simple enough, but dealing with the refcounts properly is a little ugly, and replicating that logic is asking for someone to get it wrong or forget it all together,

Re: [i2c] i2c-mpc.c driver issues

2007-10-26 Thread Joakim Tjernlund
On Fri, 2007-10-26 at 11:53 +0200, Jean Delvare wrote: Hi Jocke, On Wed, 24 Oct 2007 23:06:13 +0200, Tjernlund wrote: While browsing the i2c-mpc.c driver I noticed some things that look odd to me so I figured I report them. Could not find a maintainer in the MAINTANERS file so I sent

Re: [RFC] [PATCH] PowerPC: Workaround for the 440EP(x)/GR(x) processors identical PVR issue.

2007-10-26 Thread Valentine Barshak
Benjamin Herrenschmidt wrote: On Thu, 2007-10-25 at 22:16 +0400, Valentine Barshak wrote: PowerPC 440EP(x) 440GR(x) processors have the same PVR values, since they have identical cores. However, FPU is not supported on GR(x) and enabling APU instruction broadcast in the CCR0 register (to

[PATCH] ehea: add kexec support

2007-10-26 Thread Jan-Bernd Themann
eHEA resources that are allocated via H_CALLs have a unique identifier each. These identifiers are necessary to free the resources. A reboot notifier is used to free all eHEA resources before the indentifiers get lost, i.e before kexec starts a new kernel. Signed-off-by: Jan-Bernd Themann [EMAIL

[PATCH 1/2] USB: Rework OHCI PPC OF for new bindings

2007-10-26 Thread Valentine Barshak
Rework ohci-ppc-of driver to use big-endian property instead of ohci-be/ohci-le compatible strings. Also remove unnecessary user-selectable USB_OHCI_HCD_PPC_OF_LE/BE stuff, because USB_OHCI_BIG_ENDIAN_DESC/MMIO should always be enabled for ppc and USB_OHCI_LITTLE_ENDIAN is selected for

Re: [RFC] [PATCH] PowerPC: Workaround for the 440EP(x)/GR(x) processors identical PVR issue.

2007-10-26 Thread Benjamin Herrenschmidt
On Fri, 2007-10-26 at 15:05 +0400, Valentine Barshak wrote: It's not enough. We need to enable APU instruction broadcast for EP(x) (call __init_fpu_44x in arch/powerpc/kernel/cpu_setup_44x.S). Or do you suggest to or-in FPU feature bit and enable APUIB later, not in the cpu_setup

Re: [linux-usb-devel] [PATCH 1/2] USB: Rework OHCI PPC OF for new bindings

2007-10-26 Thread Valentine Barshak
Matt Sealey wrote: Valentine Barshak wrote: Matt Sealey wrote: Compatible property on /[EMAIL PROTECTED]/[EMAIL PROTECTED] is We should also keep ohci-bigendian and ohci-be in the match table. Eh.. maybe. I am currently moving on the assumption that the correct device tree for the

compile warning

2007-10-26 Thread Sergej Stepanov
Hello! I have at compile time the following warning: WARNING: vmlinux.o(.text+0x10f5c): Section mismatch: reference to .init.text:cpm_muram_init (between 'cpm2_reset' and 'cpm2_smc_clk_setup') Could it make some problem? Thanks. -- Sergej I. Stepanov IDS GmbH Nobelstr. 18, Zim. 2.1.05

Re: [PATCH 4/4] DTC: Begin the path to sane literals and expressions.

2007-10-26 Thread Jon Loeliger
So, like, the other day David Gibson mumbled: Ah... I think I see the source of our misunderstanding. Sorry if I was unclear. I'm not saying that the version token would be invisible to the parser, just that it would be recognized by the lexer first. Ah! Right. OK, I see what you are

Re: [PATCH 4/4] DTC: Begin the path to sane literals and expressions.

2007-10-26 Thread David Gibson
On Fri, Oct 26, 2007 at 08:07:49AM -0500, Jon Loeliger wrote: So, like, the other day David Gibson mumbled: Ah... I think I see the source of our misunderstanding. Sorry if I was unclear. I'm not saying that the version token would be invisible to the parser, just that it would be

Re: [PATCH v4.2] FEC - fast ethernet controller for mpc52xx

2007-10-26 Thread Dale Farnsworth
On Fri, Oct 26, 2007 at 01:59:09PM +0200, Domen Puncer wrote: +static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) +{ + struct net_device *dev = dev_id; + struct mpc52xx_fec_priv *priv = netdev_priv(dev); + + spin_lock(priv-lock); + + while

Re: compile warning

2007-10-26 Thread Kumar Gala
On Oct 26, 2007, at 8:25 AM, Sergej Stepanov wrote: Hello! I have at compile time the following warning: WARNING: vmlinux.o(.text+0x10f5c): Section mismatch: reference to .init.text:cpm_muram_init (between 'cpm2_reset' and 'cpm2_smc_clk_setup') Could it make some problem? It should be

Re: [PATCH] fix appletouch geyser 1 breakage

2007-10-26 Thread Dmitry Torokhov
On 10/25/07, Benjamin Berg [EMAIL PROTECTED] wrote: On Thu, 2007-25-10 at 15:23 +0200, Johannes Berg wrote: On Wed, 2007-10-24 at 10:29 -0400, Dmitry Torokhov wrote: Do yo know who has powerbooks with older geyser models (0x214, 215, 216)? Not sure, Benjamin? We're talking about the

[PATCH 1/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Valentine Barshak
This adds device-tree aware PowerPC 44x NDFC (NAND Flash Controller) driver. The code is based on the original ndfc.c driver by Thomas Gleixner. The major difference is that here we try to handle all chips found as one mtd device instead of having a separate one on each chip. The partition

[PATCH 2/2] PowerPC: NDFC entry for PowerPC 440EPx Sequoia DTS

2007-10-26 Thread Valentine Barshak
NDFC (NAND Flash Controller) DTS entry for PowerPC 440EPx Sequoia board. The NDFC is relocatable in EBC space. Signed-off-by: Valentine Barshak [EMAIL PROTECTED] --- arch/powerpc/boot/dts/sequoia.dts | 20 1 files changed, 20 insertions(+) diff -pruN

[PATCH] [POWERPC] Fix CONFIG_SMP=n build breaks

2007-10-26 Thread Olof Johansson
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n: arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set': arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id' arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':

[PATCH 0/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Valentine Barshak
I've worked in parallel with Stefan Roese on the new OF NDFC support. This version (as well as Stefan's) is based on the original NDFC driver by Thomas Gleixner. The major difference is that the original implements each chip connected NDFC banks as a separate MTD device. Here I try to have one

Re: [PATCH 2/2] PowerPC: NDFC entry for PowerPC 440EPx Sequoia DTS

2007-10-26 Thread Sergei Shtylyov
Hello. Valentine Barshak wrote: NDFC (NAND Flash Controller) DTS entry for PowerPC 440EPx Sequoia board. The NDFC is relocatable in EBC space. Signed-off-by: Valentine Barshak [EMAIL PROTECTED] You need to documents the layout in the Documentation/powerpc/booting-without-of.txt file

[PATCH] PowerPC: 44x device-tree aware NDFC bindings

2007-10-26 Thread Valentine Barshak
PowerPC 44x NAND Flash Controller (NDFC) bindings Signed-off-by: Valentine Barshak [EMAIL PROTECTED] --- Documentation/powerpc/booting-without-of.txt | 43 +++ 1 files changed, 43 insertions(+) --- linux-2.6.orig/Documentation/powerpc/booting-without-of.txt 2007-10-26

Re: [PATCH] [POWERPC] Fix CONFIG_SMP=n build break

2007-10-26 Thread Arnd Bergmann
On Friday 26 October 2007, Olof Johansson wrote: Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n: arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set': arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'

[PATCH] Allow sharing of CMOS clock setup.

2007-10-26 Thread Randy Vinson
From 61da8cf1f92043925ea20ffafafaf0874d761b0e Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Wed, 24 Oct 2007 17:36:59 -0700 Subject: [PATCH] Allow sharing of CMOS clock setup. Move the CMOS RTC clock setup code from arch/powerpc/platforms/fsl_uli1575.c to

Re: [PATCH 0/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Josh Boyer
On Fri, 26 Oct 2007 20:30:58 +0400 Valentine Barshak [EMAIL PROTECTED] wrote: I've worked in parallel with Stefan Roese on the new OF NDFC support. This version (as well as Stefan's) is based on the original NDFC driver by Thomas Gleixner. The major difference is that the original implements

Re: reg adjust_total_lowmem

2007-10-26 Thread Scott Wood
On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote: On Oct 25, 2007, at 10:51 PM, Surya Ravikiran wrote: Hi, I am trying to bootup a Linux kernel, on a FS eval board with 256M. I pass the kernel argument mem=252M, and see that the kernel boots up fine, but with much less

Re: [PATCH] fix appletouch geyser 1 breakage

2007-10-26 Thread Johannes Berg
Johannes, and what is product ID for your touchpad? It's 0x20e, listed as 'fountain' johannes signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org

Re: reg adjust_total_lowmem

2007-10-26 Thread Scott Wood
Scott Wood wrote: On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote: The reason you have 192M is that lowmem is the total amount of memory that can be covered by up to three CAM entries. In the case of setting mem=252M that max that three CAM entries can cover is 192M (64

[PATCH] [Powerpc] fix switch_slb handling of 1T ESID values

2007-10-26 Thread Will Schmidt
[Powerpc] fix switch_slb handling of 1T ESID values Now that we have 1TB segment size support, we need to be using the GET_ESID_1T macro when comparing ESID values for pc,stack, and unmapped_base within switch_slb() when we're on a CPU that supports it. This also happens to fix a

Re: reg adjust_total_lowmem

2007-10-26 Thread Kumar Gala
On Fri, 26 Oct 2007, Scott Wood wrote: Scott Wood wrote: On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote: The reason you have 192M is that lowmem is the total amount of memory that can be covered by up to three CAM entries. In the case of setting mem=252M that max that

Re: [PATCH 0/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Thomas Gleixner
On Fri, 26 Oct 2007, Valentine Barshak wrote: The major difference is that the original implements each chip connected NDFC banks as a separate MTD device. Here I try to have one MTD device spread on all chips found. However, the chips should have equal ID's and sizes, but I've never seen

Re: reg adjust_total_lowmem

2007-10-26 Thread Scott Wood
Kumar Gala wrote: On Fri, 26 Oct 2007, Scott Wood wrote: Scott Wood wrote: On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote: The reason you have 192M is that lowmem is the total amount of memory that can be covered by up to three CAM entries. In the case of setting mem=252M

Re: [PATCH 1/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Stephen Rothwell
On Fri, 26 Oct 2007 20:39:58 +0400 Valentine Barshak [EMAIL PROTECTED] wrote: +static int __devinit parse_partitions(struct of_ndfc *ndfc, + struct of_device *dev) +{ + const char *partname; + static const char *part_probe_types[] + = {

Re: [PATCH] [Powerpc] fix switch_slb handling of 1T ESID values

2007-10-26 Thread Benjamin Herrenschmidt
On Fri, 2007-10-26 at 15:46 -0500, Will Schmidt wrote: [Powerpc] fix switch_slb handling of 1T ESID values Now that we have 1TB segment size support, we need to be using the GET_ESID_1T macro when comparing ESID values for pc,stack, and unmapped_base within switch_slb() when we're on a CPU

Re: [PATCH 1/2] PowerPC: Add 44x NDFC device-tree aware support

2007-10-26 Thread Stefan Roese
Hi Valentine, On Friday 26 October 2007, Valentine Barshak wrote: This adds device-tree aware PowerPC 44x NDFC (NAND Flash Controller) driver. The code is based on the original ndfc.c driver by Thomas Gleixner. The major difference is that here we try to handle all chips found as one mtd