All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 4/4] 82xx: MGCOGE support
Date: Tue, 29 Jan 2008 11:22:55 +0100	[thread overview]
Message-ID: <479EFE7F.4000104@denx.de> (raw)
In-Reply-To: <mailman.813.1200609119.6908.linuxppc-dev@ozlabs.org>

Hello,

To get the serial console on the SMC2 working, the
following patch is needed:

Fixing serial console on a SMC on MPC82xx based
board and using CONFIG_PPC_CPM_NEW_BINDING

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 drivers/serial/cpm_uart/cpm_uart_core.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index b5e4478..7e610c2 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -978,9 +978,24 @@ static int cpm_uart_init_port(struct device_node *np,
 		pinfo->sccup = pram;
 	} else if (of_device_is_compatible(np, "fsl,cpm1-smc-uart") ||
 	           of_device_is_compatible(np, "fsl,cpm2-smc-uart")) {
+		u16 __iomem *pram_base;
+		struct resource res;
+
 		pinfo->flags |= FLAG_SMC;
 		pinfo->smcp = mem;
 		pinfo->smcup = pram;
+
+		if (of_address_to_resource(np, 1, &res)) {
+			ret = -ENOMEM;
+			goto out_pram;
+		}
+		pram_base = of_iomap(np, 2);
+		if (!pram_base) {
+			ret = -ENOMEM;
+			goto out_pram;
+		}
+		*pram_base = res.start;
+		iounmap (pram_base);
 	} else {
 		ret = -ENODEV;
 		goto out_pram;
-- 
1.5.2.2

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  parent reply	other threads:[~2008-01-29 10:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.813.1200609119.6908.linuxppc-dev@ozlabs.org>
2008-01-29 10:20 ` [PATCH 1/4] 82xx: MGCOGE support Heiko Schocher
2008-01-29 10:21 ` [PATCH 2/4] " Heiko Schocher
2008-01-29 10:22 ` [PATCH 3/4] " Heiko Schocher
2008-01-29 19:20   ` Scott Wood
2008-01-29 19:26     ` Jon Loeliger
2008-01-29 10:22 ` Heiko Schocher [this message]
2008-01-29 19:24   ` [PATCH 4/4] " Scott Wood
2008-01-29 19:31     ` Scott Wood
2008-01-30  9:49   ` [PATCH v2] " Heiko Schocher
2008-02-01 20:45     ` Scott Wood
2008-03-07 13:12       ` Heiko Schocher
2008-03-07 14:55         ` Kumar Gala
2008-03-09  9:53       ` [PATCH v3] " Heiko Schocher

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=479EFE7F.4000104@denx.de \
    --to=hs@denx.de \
    --cc=linuxppc-dev@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.