Subject: DMA Problem. Help me.

From: Tred Lim <[email-masked]>
Date: Tue, 14 Mar 2000 00:11:53 +0900

Hi,

My name is Tred Lim.
I'm poring ARM Linux 2.2.14-rmk1 to our SA-1110 based platform.

It seems that current kernel has a problem with DMA buffer on SA-1100/1110.
Although DMA controller finished read transfer successfully, DMA buffer doesn't
contain valid data.
I could solve this by inserting flush_cache_all() or flush_page_to_ram() before
accessing DMA buffer.
There han been no such kind of of problem with DMA write transfer.

I guess DMA buffer should be non-cacheable and non-bufferable. If so, how
can I do this? I have two choices. I have no idea if these are right way
to solve this.

1. Just use flush_cache_all() or flush_page_to_ram().
2. Modify mem_init() to mark all or some DMA pages as non-cacheable and
non-bufferable.

I will be waiting for any suggestions. Is there anybody who can write a fix for
this?

Regards,

Tred Lim

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: Nicolas Pitre <[email-masked]>
Date: Mon, 13 Mar 2000 11:08:51 -0500 (EST)

> I'm poring ARM Linux 2.2.14-rmk1 to our SA-1110 based platform.

Did you use my SA1100 patches from ftp.netwinder.org/users/n/nico/ ?

> Although DMA controller finished read transfer successfully, DMA buffer doesn't

You have a classique cache coherency problem which affects the ARM
processors.

> can I do this? 

You could use ioremap() to get a non-cacheable virtual address for some
memory.  See sa1100fb.c in the above mentionned patch for an example.

PS: netwinder.org is scheduled to be down for few hours today.

Nicolas