Subject: Re: [PATCH] pasemi: electra IDE/pata_platform glue

From: Arnd Bergmann <[email-masked]>
Date: Sun, 13 May 2007 02:48:22 +0200

On Sunday 13 May 2007, Alan Cox wrote:
> > Why not provide a proper pata_of.c driver based on ata_generic? That
> > will help the next person that has a builtin ata controller and wants
> > to get it running as an of_device.
> 
> Easier to use pata_platform I would think ? Just create the OF device and
> bind it to pata_platform.

Not sure I understand what you mean. pata_platform expects a platform_device,
which cannot be cast from an of_device.

Actually, it might be possible to merge the common parts of pata_platform,
ata_generic and ata_of into one module, and have one driver for each
of the three bus_types on top of it. Currently, the only difference between
ata_generic and pata_platform is the ->set_mode function, which can
probably be made generic (controlled by a flag in the ata_port).

Olof, have you looked at which of the two ->set_mode functions is more
appropriate for electra? I would guess that you actually want to use
the ata_generic one.

	Arnd <><