[PATCH 0/4] drivers/ata: add low-level I/O calls

Jeff Garzik jeff at garzik.org
Sat Jan 13 03:58:34 EST 2007


Akira Iguchi wrote:
> Dear everyone,
> 
> This is the patchset (based on 2.6.20-rc4) to add low-level I/O calls
> which access the taskfile registers. The idea comes from drivers/ide
> IN*/OUT* calls.
> 
> As you know, these calls are unnecessary for most libata drivers.
> But the Celleb PATA driver needs them to use the libata common code.
> And using these calls, it is possible to remove similar code
> about PIO/MMIO access.

Sorry, but NAK.

libata intentionally provides higher level hooks than just I/O accessors.

A low level I/O hook approach makes it difficult to take into account 
platform-specific details like mmiowb(), especially on embedded platforms.

The high level hook approach also enables greater efficiency.  For 
example, an embedded platform could do

	__raw_writeb(datum, mmio_address + ATA_REG_FOO);
	__raw_writeb(datum, mmio_address + ATA_REG_BAR);
	eieio();

to optimize an entire taskfile-read or taskfile-write operation.

	Jeff






More information about the Linuxppc-dev mailing list