All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ARM: sunxi: Add ahci-sunxi driver for Allwinner SoCs sata
@ 2014-01-04  9:14 ` Hans de Goede
  0 siblings, 0 replies; 30+ messages in thread
From: Hans de Goede @ 2014-01-04  9:14 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Maxime Ripard, Oliver Schinagl, linux-ide-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi Tejun et al,

Here is the second version of the ahci-sunxi driver. Since Oliver is a bit low
on time atm, I've taken over the efforts to upstream this for now.

v1 was using the approach of having a platform device which probe method
creates a new child platform device which gets driven by ahci_platform.c,
as done by ahci_imx.c . This was rightfully frowned upon, so we've gone
looking for a better / cleaner solution.

The option of turning ahci_platform.c into a generic re-usable library to be
shared between different ahci platform drivers was considered and rejected.

Almost all functionality is already shared through libahci / ata-core,
ahci_platform.c really is just a few lines of glue-code generalized to be
shared for the simply ahci platform device case.

Modifying ahci_platform.c to be generic enough to cleanly handle more
complex platform ahci devices, results in much more complex code, which likely
will still need to be modified each time a new exotic platform device shows
up. There simply is not enough common code to share there, and making it
generic enough would grow the code to be larger then simply having stand-alone
platform drivers using libahci directly.

IOW I believe that the "last mile" of glue code  simply cannot be efficiently
generalized.

So I've decided avoiding the ahci_imx.c ugliness is best done by refactoring
ahci_sunxi.c into a stand-alone platform driver, like ie sata_highbank.c.

To put this in numbers, ahci_platform.c is 353 lines, ahci_sunxi.c using
the ahci_imx.c approach (which was using ahci_platform.c as a lib) was 305
lines + 12 new lines in ahci_platform.c. ahci_sunxi.c as a standalone driver
is 351 lines. And the old ahci_sunxi.c was missing proper suspend / resume
support.

Please review and if there are no remark add patch 1 + 2 to your tree for
Linus. The dts bits will be merged through Maxime Ripard's tree.

Thanks & Regards,

Hans

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-01-12 12:06 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-04  9:14 [PATCH v2 0/4] ARM: sunxi: Add ahci-sunxi driver for Allwinner SoCs sata Hans de Goede
2014-01-04  9:14 ` Hans de Goede
     [not found] ` <1388826878-5602-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-04  9:14   ` [PATCH v2 1/4] libahci: Add a pre ahci_start_engine hook Hans de Goede
2014-01-04  9:14     ` Hans de Goede
     [not found]     ` <1388826878-5602-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-12 12:06       ` Tejun Heo
2014-01-12 12:06         ` Tejun Heo
2014-01-04  9:14   ` [PATCH v2 2/4] ARM: sunxi: Add ahci-sunxi driver for the Allwinner SUNXi SoCs sata Hans de Goede
2014-01-04  9:14     ` Hans de Goede
     [not found]     ` <1388826878-5602-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-04 21:39       ` Arnd Bergmann
2014-01-04 21:39         ` Arnd Bergmann
2014-01-04 21:47         ` Arnd Bergmann
2014-01-04 21:47           ` Arnd Bergmann
2014-01-05 12:42           ` Olliver Schinagl
2014-01-05 12:42             ` Olliver Schinagl
     [not found]             ` <52C9534E.4000701-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
2014-01-05 13:06               ` Hans de Goede
2014-01-05 13:06                 ` Hans de Goede
2014-01-05 13:32               ` Hans de Goede
2014-01-05 13:32                 ` Hans de Goede
     [not found]                 ` <52C95ED0.5060207-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-05 14:00                   ` Olliver Schinagl
2014-01-05 14:00                     ` Olliver Schinagl
2014-01-04 23:44         ` Hans de Goede
2014-01-04 23:44           ` Hans de Goede
     [not found]           ` <52C89CC6.3010409-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-05 11:35             ` Arnd Bergmann
2014-01-05 11:35               ` Arnd Bergmann
     [not found]               ` <201401051235.11910.arnd-r2nGTMty4D4@public.gmane.org>
2014-01-05 13:29                 ` Hans de Goede
2014-01-05 13:29                   ` Hans de Goede
2014-01-04  9:14   ` [PATCH v2 3/4] ARM: sun4i: dts: Add ahci / sata support Hans de Goede
2014-01-04  9:14     ` Hans de Goede
2014-01-04  9:14   ` [PATCH v2 4/4] ARM: sun7i: " Hans de Goede
2014-01-04  9:14     ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.