From: Jochen Friedrich <jochen@scram.de>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-embedded@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH4/4] [POWERPC] Fix cpm_uart driver
Date: Tue, 25 Sep 2007 14:09:03 +0200 [thread overview]
Message-ID: <46F8FA5F.3050907@scram.de> (raw)
In-Reply-To: <46F80049.2030509@freescale.com>
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:
pinfo->rx_bd_base and pinfo->tx_bd_base are both initialized with an
address obtained by cpm_dpram_addr(). In both ppc and powerpc, this is
an address relative to dpram_vbase in commproc.c
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 initialize DPRAM_BASE.
On ARCH=ppc, cpmp is a physical address with 1:1 virtual mapping ("well
known address"). On ARC=powerpc, this is an address obtained by
ioremap(), however it's a different ioremap() call than dpram_vbase is
obtained from, so noone can guarantee
cpmp is always the same as dpram_vbase even on ARCH=powerpc.
To me, it looks like setting DPRAM_BASE to cpm_dpram_addr(0) is the fix
as it makes the DPRAM offset a defined result.
Thanks,
Jochen
next prev parent reply other threads:[~2007-09-25 12:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-23 20:17 [PATCH4/4] [POWERPC] Fix cpm_uart driver Jochen Friedrich
2007-09-24 15:57 ` Scott Wood
2007-09-24 17:06 ` Jochen Friedrich
2007-09-24 18:22 ` Scott Wood
2007-09-24 19:16 ` Dan Malek
2007-09-24 19:29 ` Scott Wood
2007-09-26 20:32 ` Rune Torgersen
2007-09-26 20:41 ` Scott Wood
2007-09-25 12:09 ` Jochen Friedrich [this message]
2007-09-25 15:11 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F8FA5F.3050907@scram.de \
--to=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox