From: Heiko Schocher <hs@denx.de>
To: linuxppc-embedded@ozlabs.org
Subject: [PATCH] CPM_UART: Fixed SMC handling for CPM2 processors
Date: Mon, 12 Feb 2007 11:33:42 +0100 [thread overview]
Message-ID: <1171276422.14090.54.camel@Apollo> (raw)
In-Reply-To: Pine.LNX.4.64.0611071451130.3291@host32.eke.fi
Hello Vitaly,
I tried the Patch from Kalle Pokki
http://ozlabs.org/pipermail/linuxppc-embedded/2006-November/025108.html
but my SMC didnt work, without this patch, it works fine. I think that
the pram_base must be set the follwing way:
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
b/drivers/serial/cpm_uart/cpm_uart_core.c
index ea85f6a..76ab6e5 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1025,6 +1025,7 @@ int cpm_uart_drv_get_platform_data(struct
platform_device *pdev, int is_con)
struct uart_cpm_port *pinfo;
int line;
u32 mem, pram, pram_base;
+ int base;
idx = pdata->fs_no = fs_uart_get_id(pdata);
@@ -1050,11 +1051,12 @@ int cpm_uart_drv_get_platform_data(struct
platform_device *pdev, int is_con)
if (!(r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram")))
return -EINVAL;
pram = (u32)ioremap(r->start, r->end - r->start + 1);
-
+ base = r->start;
+
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram_base");
if (r) {
pram_base = r->start;
- out_be16((u16 *)pram_base, pram & 0xffff);
+ out_be16((u16 *)pram_base, base & 0xffff);
}
if(idx > fsid_smc2_uart) {
with this patch it works fine :-)
Best regards
Heiko
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
next reply other threads:[~2007-02-12 10:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 10:33 Heiko Schocher [this message]
2007-02-12 17:55 ` [PATCH] CPM_UART: Fixed SMC handling for CPM2 processors Vitaly Bordug
2007-02-13 8:09 ` Heiko Schocher
2007-02-13 11:42 ` Vitaly Bordug
-- strict thread matches above, loose matches on Subject: below --
2006-11-06 13:29 Kalle Pokki
2006-11-06 17:55 ` Vitaly Bordug
2006-11-06 20:49 ` Kalle Pokki
2006-11-07 12:08 ` Vitaly Bordug
2006-11-07 13:21 ` Kalle Pokki
2006-11-07 14:47 ` Vitaly Bordug
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=1171276422.14090.54.camel@Apollo \
--to=hs@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).