* ISA DMA
@ 2001-12-19 10:21 Adrian Cox
2001-12-20 8:36 ` David Müller (ELSOFT AG)
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Cox @ 2001-12-19 10:21 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
The current 2.4-devel tree never assigns any memory to the ISA DMA zone,
irrespective of the setting of ISA_DMA_THRESHOLD. As I'm currently
trying to get a floppy working on a platform with 24-bit ISA DMA in its
Southbridge, this looks like a problem.
How do people feel about the attached patch? This should only change
behavior for platforms which set ISA_DMA_THRESHOLD to a value other than
0 or (-1)L.
--
Adrian Cox http://www.humboldt.co.uk/
[-- Attachment #2: isadma.patch --]
[-- Type: text/plain, Size: 819 bytes --]
===== arch/ppc/mm/init.c 1.41 vs edited =====
--- 1.41/arch/ppc/mm/init.c Fri Nov 30 15:07:14 2001
+++ edited/arch/ppc/mm/init.c Wed Dec 19 10:15:44 2001
@@ -440,11 +440,18 @@
kmap_prot = PAGE_KERNEL;
#endif /* CONFIG_HIGHMEM */
- /*
- * All pages are DMA-able so we put them all in the DMA zone.
- */
- zones_size[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
- for (i = 1; i < MAX_NR_ZONES; i++)
+ if (ISA_DMA_THRESHOLD && ISA_DMA_THRESHOLD < total_lowmem - 1)
+ {
+ zones_size[ZONE_DMA] = (ISA_DMA_THRESHOLD + 1) >> PAGE_SHIFT;
+ zones_size[ZONE_NORMAL] =
+ (total_lowmem - ISA_DMA_THRESHOLD - 1) >> PAGE_SHIFT;
+ }
+ else
+ {
+ zones_size[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
+ zones_size[ZONE_NORMAL] = 0;
+ }
+ for (i = 2; i < MAX_NR_ZONES; i++)
zones_size[i] = 0;
#ifdef CONFIG_HIGHMEM
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ISA DMA
2001-12-19 10:21 ISA DMA Adrian Cox
@ 2001-12-20 8:36 ` David Müller (ELSOFT AG)
2001-12-20 9:50 ` Adrian Cox
0 siblings, 1 reply; 5+ messages in thread
From: David Müller (ELSOFT AG) @ 2001-12-20 8:36 UTC (permalink / raw)
To: Adrian Cox; +Cc: linuxppc-dev
Hi
Seems like you are facing the same problem as i do. But IIRC i think you
have to adjust the code in include/asm/dma.h (and possibly other places)
as well (at least in 2.4.14, not sure about the later kernels).
BTW:
What south bridge do you use? Some of the newer ones offer 32bit
addressing capability for DMA.
Adrian Cox wrote:
> The current 2.4-devel tree never assigns any memory to the ISA DMA zone,
> irrespective of the setting of ISA_DMA_THRESHOLD. As I'm currently
> trying to get a floppy working on a platform with 24-bit ISA DMA in its
> Southbridge, this looks like a problem.
>
> How do people feel about the attached patch? This should only change
> behavior for platforms which set ISA_DMA_THRESHOLD to a value other than
> 0 or (-1)L.
>
[stuff deleted]
Dave
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ISA DMA
2001-12-20 8:36 ` David Müller (ELSOFT AG)
@ 2001-12-20 9:50 ` Adrian Cox
2001-12-20 10:09 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Cox @ 2001-12-20 9:50 UTC (permalink / raw)
To: David Müller (ELSOFT AG); +Cc: linuxppc-dev
David Müller (ELSOFT AG) wrote:
> Seems like you are facing the same problem as i do. But IIRC i think you
> have to adjust the code in include/asm/dma.h (and possibly other places)
> as well (at least in 2.4.14, not sure about the later kernels).
The main problem I can see is that the code always writes to the
DMA_HI_PAGE_x registers, irrespective of whether they actually exist.
This should be harmless, as nothing else is mapped to those locations.
> What south bridge do you use? Some of the newer ones offer 32bit
> addressing capability for DMA.
Via686a. As I understand it, 32-bit DMA uses the DMA_HI_PAGE_x registers
from 0x487 to 0x48a, and the Via manual doesn't claim to have any
registers in that range. The only 32-bit DMA southbridge I've
encountered is the Winbond chip on the Sandpoint, and that chip doesn't
have UDMA66, USB, and audio.
--
Adrian Cox http://www.humboldt.co.uk/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ISA DMA
2001-12-20 9:50 ` Adrian Cox
@ 2001-12-20 10:09 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2001-12-20 10:09 UTC (permalink / raw)
To: Adrian Cox; +Cc: David Müller (ELSOFT AG), Linux/PPC Development
On Thu, 20 Dec 2001, Adrian Cox wrote:
> David Müller (ELSOFT AG) wrote:
> > What south bridge do you use? Some of the newer ones offer 32bit
> > addressing capability for DMA.
>
> Via686a. As I understand it, 32-bit DMA uses the DMA_HI_PAGE_x registers
> from 0x487 to 0x48a, and the Via manual doesn't claim to have any
> registers in that range. The only 32-bit DMA southbridge I've
> encountered is the Winbond chip on the Sandpoint, and that chip doesn't
> have UDMA66, USB, and audio.
And the Winbond South Bridge on the LongTrail (most probably the same chip).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ISA DMA
@ 2001-12-20 16:42 Michael Sokolov
0 siblings, 0 replies; 5+ messages in thread
From: Michael Sokolov @ 2001-12-20 16:42 UTC (permalink / raw)
To: adrian, d.mueller; +Cc: linuxppc-dev
Adrian Cox <adrian@humboldt.co.uk> wrote:
> Via686a. As I understand it, 32-bit DMA uses the DMA_HI_PAGE_x registers
> from 0x487 to 0x48a, and the Via manual doesn't claim to have any
> registers in that range.
It is also my understanding that VT82C686/A/B offers 24-bit DMA addressing
only.
On the Adirondack I plan to use the floppy disk controller (the only ISA DMA
user) in non-DMA mode only. I hope Linux can do that. The memory map we've
adopted does not have memory at PCI address 0 at all, so 24-bit DMA means no
DMA at all rather than bottom 16 MB only. It is really too late to change the
memory map now, it would be so much pain that I would much rather settle for
using non-DMA mode only for floppies.
> The only 32-bit DMA southbridge I've
> encountered is the Winbond chip on the Sandpoint, and that chip doesn't
> have UDMA66, USB, and audio.
Acer Labs 1543 has it according to its manual (see the latter for where the
registers are, I don't remember).
We have that bridge on the K2. Ironically, there we don't have a floppy disk
port, so we have good ISA DMA on the board where we don't need it but don't
have it on a board where we do...
MS
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-12-20 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-19 10:21 ISA DMA Adrian Cox
2001-12-20 8:36 ` David Müller (ELSOFT AG)
2001-12-20 9:50 ` Adrian Cox
2001-12-20 10:09 ` Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2001-12-20 16:42 Michael Sokolov
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).