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

From: Jeff Garzik <[email-masked]>
Date: Fri, 12 Jan 2007 11:58:34 -0500

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