Re: [PATCH v2] m68k/amiga - zorro.c: set up z->dev.dma_mask for the DMA API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

that's odd - the DMA setup code in the old ESP drivers does program the
full 32 bit addresses on DMA set-up. No masking off to 24 bit.

All boards except for the Fastlane are ZorroII. Writes to the DMA
registers are done byte-wise there (only on the Fastlane, the target
address is written as one longword), so this suggests there is a limit
to the data bus width, but doesn't speak to the address bus width.

I'm sure Amigas weren't limited to 16 MB of RAM (pretty certain kullervo
had 32 or 64 MB). No evidence of Amiga SCSI ever using a DMA bounce
buffer (as we've had to use on Atari). How would the old SCSI drivers
have worked, if DMA can't address the full 32 bit space?

Either way, the SCSI driver works even without DMA mask set up - it only
spits an ugly warning at probe. Might be better to shelve this for now.

Cheers,

	Michael

Am 03.03.2018 um 22:31 schrieb Geert Uytterhoeven:
On Sat, Mar 3, 2018 at 12:08 AM, Christoph Hellwig <hch@xxxxxx> wrote:
Assuming all zorro devices can deal fine with a 32-bit dma mask:

No they don't. Zorro II has a 24-bit bus, Zorro III has a 32-bit bus.
So it should be something like:

    switch (z->rom.er_Type & ERT_TYPEMASK) {
    case ERT_ZORROIII:
            z->dev.coherent_dma_mask = DMA_BIT_MASK(32);
            break;
    case ERT_ZORROII:
    default:
            z->dev.coherent_dma_mask = DMA_BIT_MASK(24);
            break;
    }

Other types are not defined, but I have no idea how expansion boards for
the original Amiga 1000 ("Zorro I") are represented. As that one had a 24-bit
bus, using 24 for the default should be fine.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux