The Freescale SATA controller is almost-but-not-quite AHCI. This is a
heavily modified AHCI driver. This driver still has some rough edges, which I'm
seeking assistance/review for, to clean it up both in terms of
removing/refactoring and improving error handling.
What I would like to do in the not-too-distant future is to extract the more or
less common portions of SATA drivers into a separate file/library, with
callbacks into the driver-specific routines. For example, most drivers support
FIS-based switching, but all implement their own. There is a SATA one in
dev/ata/ata-sata.c, but it works with the single-request-issue generic ATA
driver. Also, the timeouts can be merged to use callbacks, and the channel
structure can be mostly unified into a base structure with drivers 'subclassing'
it.