From: Chuck Meade <chuckmeade@mindspring.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: MPC83xx SDMR setup error
Date: Thu, 22 Mar 2007 10:30:18 -0400 [thread overview]
Message-ID: <460292FA.8050206@mindspring.com> (raw)
There appears to be an error in the MPC83xx SDMR setup in
arch/powerpc/sysdev/qe_lib/qe.c line 259. Since 0x1 shifted right 13 bits
(QE_SDMR_CEN_SHIFT) will always be zero, the CEN field will be set to
zero. This means the SDMR buffer size will always be 512, rather than
the intended (and allocated) 1024 bytes.
In addition, and not shown in the patch below, there is a conflict in the
alignment requirement for the value to be written to the SDEBCR register.
The SDEBCR holds the address in MURAM of the buffer to be used by the SDMA
controller. In the MPC8323ERM.pdf section 18.1.7 titled "SDMA Internal
Resource", it states that "the base address must be aligned to a 4KByte
boundary." However, later in the description of the SDEBCR in section
18.1.8.9, it states that the address must be "64 bytes aligned". The code
in arch/powerpc/sysdev/qe_lib/qe.c (line 254) that allocates this buffer
aligns it to a 64-byte boundary. This is only correct if the manual section
18.1.7, which requires a 4KByte alignment, is wrong. Which manual section
is correct?
Chuck
--- a/linux-2.6/arch/powerpc/sysdev/qe_lib/qe.c 2007-01-13 09:37:03.000000000 -0500
+++ b/linux-2.6/arch/powerpc/sysdev/qe_lib/qe.c 2007-03-22 09:48:46.000000000 -0400
@@ -256,7 +256,7 @@ static int qe_sdma_init(void)
return -ENOMEM;
out_be32(&sdma->sdebcr, sdma_buf_offset & QE_SDEBCR_BA_MASK);
- out_be32(&sdma->sdmr, (QE_SDMR_GLB_1_MSK | (0x1 >>
+ out_be32(&sdma->sdmr, (QE_SDMR_GLB_1_MSK | (0x1 <<
QE_SDMR_CEN_SHIFT)));
return 0;
next reply other threads:[~2007-03-22 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 14:30 Chuck Meade [this message]
2007-03-22 16:13 ` MPC83xx SDMR setup error Kumar Gala
2007-03-22 17:30 ` Chuck Meade
2007-03-22 17:57 ` Kim Phillips
2007-03-22 18:13 ` Chuck Meade
2007-03-26 20:10 ` Kumar Gala
2007-03-26 22:53 ` Segher Boessenkool
2007-03-27 0:22 ` Chuck Meade
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=460292FA.8050206@mindspring.com \
--to=chuckmeade@mindspring.com \
--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 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).