MPC83xx SDMR setup error
Kumar Gala
galak at kernel.crashing.org
Tue Mar 27 06:10:08 EST 2007
On Mar 22, 2007, at 1:13 PM, Chuck Meade wrote:
>>> 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
Can you send this with a more proper header/subject and Signed-off-
by, according to Documentation/SubmittingPatches
- kumar
> 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;
More information about the Linuxppc-dev
mailing list