All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Meade <chuckmeade@mindspring.com>
To: Kim Phillips <kim.phillips@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: MPC83xx SDMR setup error
Date: Thu, 22 Mar 2007 14:13:35 -0400	[thread overview]
Message-ID: <4602C74F.6040402@mindspring.com> (raw)
In-Reply-To: <20070322125712.2229ff99.kim.phillips@freescale.com>

>> However, as I mention below, it is unclear whether the buffer alignment
>> requirement is 64 bytes or 4Kbytes.  The code aligns the buffer to 64 bytes.
> 
> The rev.1 8360 manual changes the rev.0 manual's 64 bytes to a 4Kbytes alignment requirement, so it's probably best to go with 4KiB.

Thanks for the information Kim.

In light of this alignment requirement, I have updated the patch and included
it below.  The new part of the patch (the alignment change) could prevent
potentially serious problems of the SDMA using MURAM that is owned by other
units.

Chuck

diff -uprN a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
--- a/arch/powerpc/sysdev/qe_lib/qe.c	2007-03-22 14:00:02.000000000 -0400
+++ b/arch/powerpc/sysdev/qe_lib/qe.c	2007-03-22 14:01:30.000000000 -0400
@@ -251,12 +251,12 @@ static int qe_sdma_init(void)

  	/* allocate 2 internal temporary buffers (512 bytes size each) for
  	 * the SDMA */
-	sdma_buf_offset = qe_muram_alloc(512 * 2, 64);
+	sdma_buf_offset = qe_muram_alloc(512 * 2, 4096);
  	if (IS_MURAM_ERR(sdma_buf_offset))
  		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;

  reply	other threads:[~2007-03-22 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22 14:30 MPC83xx SDMR setup error Chuck Meade
2007-03-22 16:13 ` Kumar Gala
2007-03-22 17:30   ` Chuck Meade
2007-03-22 17:57     ` Kim Phillips
2007-03-22 18:13       ` Chuck Meade [this message]
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=4602C74F.6040402@mindspring.com \
    --to=chuckmeade@mindspring.com \
    --cc=kim.phillips@freescale.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 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.