* MPC8xx and IDMA !?!?
@ 2002-04-17 8:28 Steven Scholz
2002-04-19 12:00 ` Steven Scholz
0 siblings, 1 reply; 4+ messages in thread
From: Steven Scholz @ 2002-04-17 8:28 UTC (permalink / raw)
To: LinuxPPC, Dan Malek
Hi there,,
a while ago (aprox. kernel 2.4.11) I succesfully played around with IDMA
on MPC855/860.
This old kernel is still working on my hardware.
BUT:
The code is NOT working on recent kernels (I pulled it yesterday).
I set up the IDMA. Trigger DREQ0 using a GPIO pin. SDMACK1 is going LOW
but then instead of toggeling it just stays LOW. And instead of
transfering data the MPC8xx just hangs.
Have there been changes to the DMA stuff in the MPC8xx?
Or in the DPRAM layout or maybe in the CPM interrupt stuff (although I
disabled the IDMA int.) ???
Any idea and/or help is very much appreciated!
Thanks,
Steven
--
mfg Steven Scholz
imc Meßsysteme GmbH
Voltastr. 5
13355 Berlin
Germany
fon: +49 30 467090-0
fax: +49 30 4631576
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MPC8xx and IDMA !?!?
2002-04-17 8:28 MPC8xx and IDMA !?!? Steven Scholz
@ 2002-04-19 12:00 ` Steven Scholz
2002-04-19 18:15 ` Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Steven Scholz @ 2002-04-19 12:00 UTC (permalink / raw)
To: LinuxPPC, Dan Malek, Frank Przybylski
To whom it may concern,
> a while ago (aprox. kernel 2.4.11) I succesfully played around with IDMA
> on MPC855/860.
> ...
> The code is NOT working on recent kernels (I pulled it yesterday).
> I set up the IDMA. Trigger DREQ0 using a GPIO pin. SDMACK1 is going LOW
> but then instead of toggeling it just stays LOW. And instead of
> transfering data the MPC8xx just hangs.
>
> Have there been changes in the DPRAM layout ..?
I (think I) figured out the problem:
I use
m8xx_cpm_dpalloc( sizeof(idma_bd_t) );
to allocate space for the buffer descriptors in the DP ram.
The User Man says "Note that IBASE should be burst-aligned (divisible by
16)"
(Does the English "should be" means "have to be, otherwise everything
goes wrong!"???)
The older kernel versions always returned (by pure accident?) a
burst-aligned address (%16) (e.g. 0x850 offset from dpmem start). So
everything was fine.
The newer kernels return (by pure accident?) a NON burst-aligned address
(e.g. 0x0918) und the IDMA crashes.
So my workaround for now is to allocate more than I need and correct the
value for IBASE like
ibase += ibase % 16
Could anyone think of a better solution? Since I waste at least 16 bytes
in the DPRAM.
BTW:
Where is Wolfgangs m8xx_cpm_dpfree() !?!?
I can't find it in the recent source trees.
Cheers,
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MPC8xx and IDMA !?!?
2002-04-19 12:00 ` Steven Scholz
@ 2002-04-19 18:15 ` Dan Malek
2002-04-23 15:39 ` Steven Scholz
0 siblings, 1 reply; 4+ messages in thread
From: Dan Malek @ 2002-04-19 18:15 UTC (permalink / raw)
To: Steven Scholz; +Cc: LinuxPPC, Frank Przybylski
Steven Scholz wrote:
> So my workaround for now is to allocate more than I need and correct the
> value for IBASE like
> ibase += ibase % 16
>
> Could anyone think of a better solution? Since I waste at least 16 bytes
> in the DPRAM.
That's the way I always did it on 8xx. For 8260, I added a second alignment
parameter to dpram_alloc(). If the address it would return isn't properly
aligned, it will waste sufficient memory behind your back to make this
happen :-) At least it won't waste any if you align and the sizes are
modulo the alignment.
> Where is Wolfgangs m8xx_cpm_dpfree() !?!?
Sitting in my basket of things to do. I wanted to add the alignment
to the 8xx as well, and this complicates the free function because it
doesn't know alignment was done with the region you may have allocated.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-23 15:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-17 8:28 MPC8xx and IDMA !?!? Steven Scholz
2002-04-19 12:00 ` Steven Scholz
2002-04-19 18:15 ` Dan Malek
2002-04-23 15:39 ` Steven Scholz
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).