RE: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-26 Thread Rune Torgersen
> From: Scott Wood > Maybe that's how it was, but the current code initializes it (more or > less) directly with IMAP_ADDR, which also gets fed into ioremap. > > One of the two has got to be wrong. arch/ppc maps the immr area 1:1 into kernel memory, so ioremap and physical are the same. See

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-26 Thread Scott Wood
On Wed, Sep 26, 2007 at 03:32:29PM -0500, Rune Torgersen wrote: > > From: Scott Wood > > Maybe that's how it was, but the current code initializes it (more or > > less) directly with IMAP_ADDR, which also gets fed into ioremap. > > > > One of the two has got to be wrong. > > arch/ppc maps the

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-26 Thread Scott Wood
On Wed, Sep 26, 2007 at 03:32:29PM -0500, Rune Torgersen wrote: From: Scott Wood Maybe that's how it was, but the current code initializes it (more or less) directly with IMAP_ADDR, which also gets fed into ioremap. One of the two has got to be wrong. arch/ppc maps the immr area 1:1

RE: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-26 Thread Rune Torgersen
From: Scott Wood Maybe that's how it was, but the current code initializes it (more or less) directly with IMAP_ADDR, which also gets fed into ioremap. One of the two has got to be wrong. arch/ppc maps the immr area 1:1 into kernel memory, so ioremap and physical are the same. See

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-25 Thread Scott Wood
On Tue, Sep 25, 2007 at 02:09:03PM +0200, Jochen Friedrich wrote: > In cpm_uart_core.c, the operation "pinfo->rx_bd_base - DPRAM_BASE" is > used to calculate the DPRAM offset. So DPRAM_BASE must be relative to > dpram_vbase in commproc.c as well. However, cpm_uart_cpm1.h uses cpmp in >

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-25 Thread Jochen Friedrich
Hi Scott, Yikes. Please don't change cpm_uart_cpm1.h, as it's correct for arch/powerpc, and there are numerous other places that assume cpmp is virtual (including in the very same function that assigns it a physical address). I'm still not convinced cpm_uart_cpm1.h is correct:

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-25 Thread Jochen Friedrich
Hi Scott, Yikes. Please don't change cpm_uart_cpm1.h, as it's correct for arch/powerpc, and there are numerous other places that assume cpmp is virtual (including in the very same function that assigns it a physical address). I'm still not convinced cpm_uart_cpm1.h is correct:

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-25 Thread Scott Wood
On Tue, Sep 25, 2007 at 02:09:03PM +0200, Jochen Friedrich wrote: In cpm_uart_core.c, the operation pinfo-rx_bd_base - DPRAM_BASE is used to calculate the DPRAM offset. So DPRAM_BASE must be relative to dpram_vbase in commproc.c as well. However, cpm_uart_cpm1.h uses cpmp in commproc.c to

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Dan Malek wrote: On Sep 24, 2007, at 11:22 AM, Scott Wood wrote: cpmp is a physical address on arch/ppc? No, it's a well known ioremaped() address into the IMMR space. Maybe that's how it was, but the current code initializes it (more or less) directly with IMAP_ADDR, which also gets fed

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Dan Malek
On Sep 24, 2007, at 11:22 AM, Scott Wood wrote: cpmp is a physical address on arch/ppc? No, it's a well known ioremaped() address into the IMMR space. The only physical addresses in any of the CPM/CPM2 are those required to by the buffer descriptors. There are DPRAM offsets, but they should

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Jochen Friedrich wrote: Scott Wood schrieb: Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Jochen Friedrich
Scott Wood schrieb: Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual address into a physical

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual address into a physical first. Huh?

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual address into a physical first. Huh?

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Jochen Friedrich
Scott Wood schrieb: Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual address into a physical

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Jochen Friedrich wrote: Scott Wood schrieb: Jochen Friedrich wrote: In cpm_uart_core, functions cpm_uart_init_bd and cpm_uart_init_scc an offset into DP RAM is calculated by substracting a physical memory constant from an virtual address. This patch fixes the problem by converting the virtual

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Dan Malek
On Sep 24, 2007, at 11:22 AM, Scott Wood wrote: cpmp is a physical address on arch/ppc? No, it's a well known ioremaped() address into the IMMR space. The only physical addresses in any of the CPM/CPM2 are those required to by the buffer descriptors. There are DPRAM offsets, but they should

Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver

2007-09-24 Thread Scott Wood
Dan Malek wrote: On Sep 24, 2007, at 11:22 AM, Scott Wood wrote: cpmp is a physical address on arch/ppc? No, it's a well known ioremaped() address into the IMMR space. Maybe that's how it was, but the current code initializes it (more or less) directly with IMAP_ADDR, which also gets fed