Re: Any guides for adding new IDE chipset drivers?
From: Alex Bennee
Date: Wed Feb 18 2004 - 05:48:06 EST
On Tue, 2004-02-17 at 19:10, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 17 of February 2004 15:27, Alex Bennee wrote:
> >
> > Thanks. I'll base my driver on this one as it does seem quite easy
> > to follow. However I'm wondering what the point of the begin/end functions
> > are. The dma_read/write functions just seem to call dma_count which starts
> > the dma requests going.
>
> hwif->ide_dma_count() is gone in 2.6.3-rc4.
Ok that makes sense. However I'm working with 2.4 as I'm not ready to
make the jump in versions yet. However the rest of your notes make
things clearer.
> ATAPI drivers (ie. ide-cd.c) and TCQ code (ide-tcq.c)
> use ->ide_dma_begin() and ->ide_dma_end() directly.
>
> DMA timeout recovery functions also call ->ide_dma_end().
I take it the dma_test_irq() function is called from the ide layer can
just test to see if the DMA engine has finished its transfer?
> > Am I missing something here? Is all that required from the higher level a
> > single call to dma_read/write or should I be expecting a series of calls to
> > setup a transfer?
>
> To setup a DMA transfer:
>
> ATA: ->ide_dma_{read,write}() (they call ->ide_dma_begin()) or
> __ide_dma_queued_{read,write}() (they may call ->ide_dma_begin())
>
> ATAPI: ->ide_dma_{read,write}() + ->ide_dma_begin()
>
> Hope this helps.
It does thanks :-)
--
Alex, homepage: http://www.bennee.com/~alex/
Leela: "Well, it's a type M planet, so it should at least have
Roddenberries."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/