Re: [PATCH 0/2] mpc5200 ac97 gpio reset

2010-06-08 Thread Wolfgang Denk
Dear Jon Smirl, In message you wrote: > > Would making a change in uboot be a better solution? Eric, can you > verify if changing uboot also fixes the problem? To me it seems better if the driver itself does what needs to be done instead of relying on specific settings that may or may not be do

[PATCH] powerpc: rtas_flash cannot be a module

2010-06-08 Thread Anton Blanchard
When trying to flash a machine via the update_flash command, I received the following error: Restarting system. FLASH: kernel bug...flash list header addr above 4GB The code in question has a comment that the flash list should be in the kernel data and therefore under 4GB: /*

Re: [PATCH 0/2] mpc5200 ac97 gpio reset

2010-06-08 Thread Jon Smirl
On Tue, Jun 8, 2010 at 12:46 PM, Eric Millbrandt wrote: > These patches reimplement the reset fuction in the ac97 to use gpio pins > instead of using the mpc5200 ac97 reset functionality in the psc.  This > avoids a problem in which attached ac97 devices go into "test" mode appear > unresponsive.

[PATCH 3/3] powerpc/85xx: Cleanup QE initialization for MPC85xxMDS boards

2010-06-08 Thread Anton Vorontsov
The mpc85xx_mds_setup_arch() function is incomprehensible and unmaintainable. Factor out all QE specific stuff into mpc85xx_mds_qe_init() and mpc85xx_mds_reset_ucc_phys(). Also move QE stuff out of mpc85xx_mds_pic_init(). The diff is unreadable, but only because the code was so. ;-) It should be

[PATCH 2/3] powerpc/85xx: Fix booting for P1021MDS boards

2010-06-08 Thread Anton Vorontsov
P1021 processors have no dedicated ROM to store the QE microcode, so the fimrware is stored externally, and it is U-Boot responsibility to load it. It might be that the board is booting without QE, e.g. currently U-Boot doesn't support QE for P1021MDS boards, which means that QE isn't initialized,

[PATCH 1/3] powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards

2010-06-08 Thread Anton Vorontsov
The code inside '#ifdef CONFIG_QUICC_ENGINE' makes the mpc85xx_mds_setup_arch() return early if no QE nodes present, and so SWIOTLB is never initialized. This patch fixes the issue by moving SWIOTLB code above QE. Signed-off-by: Anton Vorontsov --- arch/powerpc/platforms/85xx/mpc85xx_mds.c |

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 12:41:47PM -0600, Grant Likely wrote: [...] > >> This is a common pattern. > > > > This can't be true because it produces ugly casts and fragile > > code all over the place -- which is exactly what everybody > > tries to avoid in the kernel. > > Fragile? How? &var[1] *alw

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
On Tue, Jun 8, 2010 at 10:46 AM, Anton Vorontsov wrote: > On Tue, Jun 08, 2010 at 10:02:49AM -0600, Grant Likely wrote: >> On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov >> wrote: >> > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: >> > [...] >> >> +     dev = kzalloc(sizeof(*dev

[PATCH 0/2] mpc5200 ac97 gpio reset

2010-06-08 Thread Eric Millbrandt
These patches reimplement the reset fuction in the ac97 to use gpio pins instead of using the mpc5200 ac97 reset functionality in the psc. This avoids a problem in which attached ac97 devices go into "test" mode appear unresponsive. These patches were tested on a pcm030 baseboard and on custom ha

[PATCH 1/2] powerpc/5200: Export port-config

2010-06-08 Thread Eric Millbrandt
Allow device drivers to safely modify port-config. This allows device drivers access to gpio pins to manually bit-bang slave devices. Signed-off-by: Eric Millbrandt --- arch/powerpc/include/asm/mpc52xx.h |2 + arch/powerpc/platforms/52xx/mpc52xx_common.c | 61 +++

[PATCH 2/2] sound/soc: mpc5200_psc_ac97: Use gpio pins for cold reset.

2010-06-08 Thread Eric Millbrandt
The implementation of the ac97 "cold" reset is flawed. If the sync and output lines are high when reset is asserted the attached ac97 device may go into test mode. Avoid this by reconfiguring the psc to gpio mode and generating the reset manually. Signed-off-by: Eric Millbrandt --- arch/powerp

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 10:02:49AM -0600, Grant Likely wrote: > On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov > wrote: > > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: > > [...] > >> +     dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), > >> GFP_KERNEL); > >>      

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov wrote: > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: > [...] >> +     dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), >> GFP_KERNEL); >>       if (!dev) >>               return NULL; >> - >>       dev->dev.of_node = of_

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: [...] > + dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), GFP_KERNEL); > if (!dev) > return NULL; > - > dev->dev.of_node = of_node_get(np); > dev->dev.dma_mask = &dev->archdata.dma_mask; >

Re: [PATCH] kexec, ppc64: Wait for online/possible CPUs only.

2010-06-08 Thread Michael Ellerman
On Tue, 2010-06-08 at 17:38 +1000, Matt Evans wrote: > kexec_perpare_cpus_wait() iterates i through NR_CPUS to check > paca[i].kexec_state of each to make sure they have quiesced. > However now we have dynamic PACA allocation, paca[NR_CPUS] is not necessarily > valid and we overrun the array; spur

[PATCH 3/5] of/address: Merge all of the bus translation code

2010-06-08 Thread Grant Likely
Microblaze and PowerPC share a large chunk of code for translating OF device tree data into usable addresses. There aren't many differences between the two, so merge the codebase wholesale rather than trying to work out the independent bits. Signed-off-by: Grant Likely CC: Michal Simek CC: Wolf

[PATCH 4/6] of/device: Merge of_platform_bus_probe()

2010-06-08 Thread Grant Likely
Merge common code between PowerPC and microblaze. This patch merges the code that scans the tree and registers devices. The functions merged are of_platform_bus_probe(), of_platform_bus_create(), and of_platform_device_create(). This patch also move the of_default_bus_ids[] table out of a Microb

[PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
When allocating a platform_device to represent an OF node, also allocate space for the resource table and populate it with IRQ and reg property information. This change is in preparation for merging the of_platform_bus_type with the platform_bus_type so that existing platform_driver code can retri

[PATCH 5/6] of: Merge of_device_alloc

2010-06-08 Thread Grant Likely
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely CC: Michal Simek CC: Grant Likely CC: Benjamin Herrenschmidt CC: Stephen Rothwell CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org CC: devicetree-disc...@lists.ozlabs.org --- arch/microblaze/include

[PATCH 3/6] of: Modify of_device_get_modalias to be passed struct device

2010-06-08 Thread Grant Likely
Now that the of_node pointer is part of struct device, of_device_get_modalias could be used on any struct device that has the device node pointer set. This patch changes of_device_get_modalias to accept a struct device instead of a struct of_device. Signed-off-by: Grant Likely CC: Michal Simek

[PATCH 2/6] of/device: merge of_device_uevent

2010-06-08 Thread Grant Likely
Merge common code between powerpc and microblaze Signed-off-by: Grant Likely CC: Michal Simek CC: Wolfram Sang CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org --- arch/microblaze/include/asm/of_device.h |3 -- arch/microbl

[PATCH 1/6] of: Use full node name in resource structures

2010-06-08 Thread Grant Likely
Resource names appear in human readable output, so when extracting IRQ and address resources from a device tree node, use the full node name to give proper context in places like /proc/iomem. Signed-off-by: Grant Likely CC: Michal Simek CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: micro

[PATCH 0/6] OF device code merges and improvements

2010-06-08 Thread Grant Likely
These patches merge more common of_device code between microblaze and powerpc and some other miscellaneous improvement in preparation for the merge of of_platform_bus_type with platform_bus_type. These patches are based on top of the IRQ and address code merge which I posted earlier. If you want

Re: [PATCH] powerpc: Fix integer constant warning

2010-06-08 Thread David Howells
Josh Boyer wrote: > It might not matter, since Paul sent a patch to remove this file entirely. Yeah, I saw that after... David ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-threaded interrupt handlers

2010-06-08 Thread Esben Haabendal
On Tue, 2010-06-08 at 01:18 +0200, Thomas Gleixner wrote: > On Mon, 7 Jun 2010, Esben Haabendal wrote: > > On Mon, Jun 7, 2010 at 5:06 PM, Thomas Gleixner wrote: > > > > > Maybe you understand now, why I was pretty sure upfront, that your > > > approach was wrong even without knowing all the gor

[PATCH 4/5] of/address: little-endian fixes

2010-06-08 Thread Grant Likely
Fix some endian issues in the OF address translation code. Signed-off-by: Grant Likely CC: Michal Simek CC: Wolfram Sang CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org --- drivers/of/address.c | 12 +++- 1 files cha

[PATCH 0/5] Merge common address translation code (ppc & mb)

2010-06-08 Thread Grant Likely
These five patches merge common code for decoding address ranges from the device tree.  Simple mechanical change.  There should be no functional difference except for the last patch which restricts the no-ranges code to be powerpc-only. These patches are based on top of the IRQ merge which I poste

[PATCH 5/5] of/address: restrict 'no-ranges' kludge to powerpc

2010-06-08 Thread Grant Likely
Certain Apple machines don't use the ranges property correctly, but the workaround should not be applied on other architectures. This patch disables the workaround for non-powerpc architectures. Signed-off-by: Grant Likely CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: linuxppc-dev@lists.

[PATCH 2/5] of/address: merge of_address_to_resource()

2010-06-08 Thread Grant Likely
Merge common code between PowerPC and Microblaze. This patch also moves the prototype of pci_address_to_pio() out of pci-bridge.h and into prom.h because the only user of pci_address_to_pio() is of_address_to_resource(). Signed-off-by: Grant Likely CC: Michal Simek CC: Grant Likely CC: Wolfram

[PATCH 1/5] of/address: merge of_iomap()

2010-06-08 Thread Grant Likely
Merge common code between Microblaze and PowerPC. This patch creates new of_address.h and address.c files to containing address translation and mapping routines. First routine to be moved it of_iomap() Signed-off-by: Grant Likely CC: Michal Simek CC: Wolfram Sang CC: Stephen Rothwell CC: Ben

Re: [PATCH] powerpc: Fix integer constant warning

2010-06-08 Thread Josh Boyer
On Tue, Jun 08, 2010 at 02:12:26PM +0100, David Howells wrote: >Steve Best wrote: > >> -#define KERNELBASE (0xc000) >> +#define KERNELBASE (0xc000ULL) > >Is this the right fix? The code producing the warning is subtracting >0xc000 from a 32-bit number: It migh

Re: [PATCH] powerpc: Fix integer constant warning

2010-06-08 Thread David Howells
Steve Best wrote: > -#define KERNELBASE (0xc000) > +#define KERNELBASE (0xc000ULL) Is this the right fix? The code producing the warning is subtracting 0xc000 from a 32-bit number: naca = ntohl(*((u_int32_t*) &inbuf[0x0C])) - KERNELBASE; which seems

[PATCH] kexec, ppc64: Wait for online/possible CPUs only.

2010-06-08 Thread Matt Evans
kexec_perpare_cpus_wait() iterates i through NR_CPUS to check paca[i].kexec_state of each to make sure they have quiesced. However now we have dynamic PACA allocation, paca[NR_CPUS] is not necessarily valid and we overrun the array; spurious "cpu is not possible, ignoring" errors result. This pat

Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-threaded interrupt handlers

2010-06-08 Thread Esben Haabendal
On Tue, 2010-06-08 at 08:58 +0200, Thomas Gleixner wrote: > On Mon, 7 Jun 2010, Esben Haabendal wrote: > > > On Mon, Jun 7, 2010 at 5:06 PM, Thomas Gleixner wrote: > > > > > Maybe you understand now, why I was pretty sure upfront, that your > > > approach was wrong even without knowing all the

Packet error when using kgdb

2010-06-08 Thread yy Hong
Hi all: I want to use kgdb debug kernel and driver on 8641d_hpcn. I refer to Essential linux device drivers. I compile the kernel, open Magic SysRq key and kgdb option in menuconfig. But, when I use ttyS0 connect to target board. I meet the error: Ignoring packet error, continuing... Ignoring