[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/3] ARM: sunxi: Add an ahci-platform compatible AHCI driver for the Allwinner SUNXi series of SoCs
Dear Tejun Heo,

On Wed, 4 Dec 2013 08:23:12 -0500, Tejun Heo wrote:

> > But again, point me (for dummies ;) in the right direction and I'll
> > work on it with some help.
> Richard and Shawn recently worked on ahci_imx. Can you guys please
> talk with each other and figure out what can be done to share as much
> as possible among these new platform-specific drivers? I'd really
> like to see the common things factored out as much as possible with
> only the actual hardware differences described for each device.

Also, please Cc me on such discussions. I have a pending AHCI platform
driver for another ARM SoC family. It is very similar to ahci_platform,
but needs to do a few more things that are SoC specific (map an
additional register area, and do some SoC-specific stuff with them).

For the moment, we're left with two approaches:

* Do what Oliver did, where the ahci_<foo> driver will do its own
SoC-specific stuff, and then will register an additional
platform_device to trigger the ->probe() of the generic
ahci_platform driver. I must say I don't really like this solution,
since it involves having two platform_device registered for the same
piece of hardware (one platform_device to trigger the ->probe of
ahci_<foo>, and another one to trigger the ->probe of ahci_platform).

* Duplicate in ahci_<foo> the (relatively small) amount of code that
is present in ahci_platform.

From my point of view, ahci_platform should be turned into a small
"library", that provides an API for ahci_<foo> drivers to 1/ do their
own custom stuff and 2/ do the common ahci_platform stuff.

This way we avoid the registration of two platform_device for the same
piece of hardware, and we avoid the duplication of code.

Want me to propose a RFC for this idea?

Best regards,

Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering

 \ /
  Last update: 2013-12-06 10:21    [W:0.092 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site