All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jochen Friedrich <jochen@scram.de>
To: linuxppc-embedded@ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH#2 4/4] [POWERPC] Fix cpm_uart driver
Date: Mon, 24 Sep 2007 19:15:43 +0200	[thread overview]
Message-ID: <46F7F0BF.5040605@scram.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]


in cpm_uart_cpm1.h, DPRAM_BASE is assigned an address derived from cpmp.
On ARC=ppc, this is a physical address with 1:1 DMA mapping which can't
be used for arithmetric compare operations with virtual addresses
returned by cpm_dpram_addr. This patch changes the assignment to use
cpm_dpram_addr as well, like in cpm_uart_cpm2.h.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 drivers/serial/cpm_uart/cpm_uart_cpm1.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

[-- Attachment #2: e99364db4224fcfaf74389d1b59ec0637d899c17.diff --]
[-- Type: text/x-patch, Size: 452 bytes --]

diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.h b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
index a99e45e..2a64778 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.h
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
@@ -37,6 +37,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
 	up->smc_tfcr = SMC_EB;
 }
 
-#define DPRAM_BASE	((unsigned char *)&cpmp->cp_dpmem[0])
+#define DPRAM_BASE	((unsigned char *)cpm_dpram_addr(0))
 
 #endif


WARNING: multiple messages have this Message-ID (diff)
From: Jochen Friedrich <jochen@scram.de>
To: linuxppc-embedded@ozlabs.org
Cc: linux-kernel@vger.kernel.org, Marcelo Tosatti <marcelo@kvack.org>
Subject: [PATCH#2 4/4] [POWERPC] Fix cpm_uart driver
Date: Mon, 24 Sep 2007 19:15:43 +0200	[thread overview]
Message-ID: <46F7F0BF.5040605@scram.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]


in cpm_uart_cpm1.h, DPRAM_BASE is assigned an address derived from cpmp.
On ARC=ppc, this is a physical address with 1:1 DMA mapping which can't
be used for arithmetric compare operations with virtual addresses
returned by cpm_dpram_addr. This patch changes the assignment to use
cpm_dpram_addr as well, like in cpm_uart_cpm2.h.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 drivers/serial/cpm_uart/cpm_uart_cpm1.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

[-- Attachment #2: e99364db4224fcfaf74389d1b59ec0637d899c17.diff --]
[-- Type: text/x-patch, Size: 452 bytes --]

diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.h b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
index a99e45e..2a64778 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.h
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
@@ -37,6 +37,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
 	up->smc_tfcr = SMC_EB;
 }
 
-#define DPRAM_BASE	((unsigned char *)&cpmp->cp_dpmem[0])
+#define DPRAM_BASE	((unsigned char *)cpm_dpram_addr(0))
 
 #endif


             reply	other threads:[~2007-09-24 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 17:15 Jochen Friedrich [this message]
2007-09-24 17:15 ` [PATCH#2 4/4] [POWERPC] Fix cpm_uart driver Jochen Friedrich

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=46F7F0BF.5040605@scram.de \
    --to=jochen@scram.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-embedded@ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.