linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PPC4XX DMA polarity bug in linuxppc-2.6.9
@ 2004-12-10  9:09 Colin Wernham
  2004-12-10 17:09 ` Matt Porter
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Wernham @ 2004-12-10  9:09 UTC (permalink / raw)
  To: linuxppc-embedded

[a copy of this has also been posted on linuxppc-dev]

I believe that there is a PPC4xx DMA driver bug in the following kernel, =

file and function:
   linuxppc-2.6.9,
    /arch/ppc/syslib/ppc4xx_dma.c,
    ppc4xx_init_dma_channel()

Symptoms are:
DMA does not work as the polarity bits (DMA Req, Ack, EOT) are not set=20
correctly in the DMA controller using the ppc4xx_init_dma_channel()=20
function call, but when this is called twice in succession, then it does =

work.

Cause is (I believe):
/arch/ppc/syslib/ppc4xx_dma.c:
On line 469 the old polarity bits in p_dma_ch are ORed in when it should =

be ORing in the new polarity bits from p_init. p_init is then saved into =

p_dma_ch. This means that it only gets correctly programmed when the=20
function is called twice:

    467  /* clear all polarity signals and then "or" in new signal =
levels */
    468  polarity &=3D ~GET_DMA_POLARITY(dmanr);
    469  polarity |=3D p_dma_ch->polarity;

Fix should be:
    469  polarity |=3D p_init->polarity;

Is there anyone else using the PPC4XX DMA?

Colin Wernham

^ permalink raw reply	[flat|nested] 5+ messages in thread
* PPC4XX DMA polarity bug in linuxppc-2.6.9
@ 2004-12-09 10:13 Colin Wernham
  2004-12-13  9:48 ` Mark Powell
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Wernham @ 2004-12-09 10:13 UTC (permalink / raw)
  To: linuxppc-dev

I believe that there is a PPC4xx DMA driver bug in the following kernel, 
file and function:
   linuxppc-2.6.9,
    /arch/ppc/syslib/ppc4xx_dma.c,
    ppc4xx_init_dma_channel()

Symptoms are:
DMA does not work as the polarity bits (DMA Req, Ack, EOT) are not set 
correctly in the DMA controller using the ppc4xx_init_dma_channel() 
function call, but when this is called twice in succession, then it does 
work.

Cause is (I believe):
/arch/ppc/syslib/ppc4xx_dma.c:
On line 469 the old polarity bits in p_dma_ch are ORed in when it should 
be ORing in the new polarity bits from p_init. p_init is then saved into 
p_dma_ch. This means that it only gets correctly programmed when the 
function is called twice:

    467  /* clear all polarity signals and then "or" in new signal levels */
    468  polarity &= ~GET_DMA_POLARITY(dmanr);
    469  polarity |= p_dma_ch->polarity;

Fix could be:
    469  polarity |= p_init->polarity;

Is there anyone else using the PPC4XX DMA?

Colin Wernham

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-13  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10  9:09 PPC4XX DMA polarity bug in linuxppc-2.6.9 Colin Wernham
2004-12-10 17:09 ` Matt Porter
2004-12-10 17:22   ` Stephen Williams
  -- strict thread matches above, loose matches on Subject: below --
2004-12-09 10:13 Colin Wernham
2004-12-13  9:48 ` Mark Powell

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).