Thread (27 messages) 27 messages, 7 authors, 2014-07-15

[PATCH v2 6/7] ata: Add support for the Tegra124 SATA controller

From: Thierry Reding <hidden>
Date: 2014-07-15 09:31:58
Also in: linux-ide, linux-tegra, lkml

On Tue, Jul 15, 2014 at 10:55:29AM +0200, Hans de Goede wrote:
On 07/15/2014 09:12 AM, Mikko Perttunen wrote:
[...]
quoted
Other subsystems I've been in don't have this kind of helper
library, so diverging here seems weird.
Well the usb uhci-platform and ehci-platform drivers are doing the same,
what we're trying to do here is avoid needless code duplication and
if possible (for ehci and uhci it currently is) make it so that adding
support for a new soc only requires adding dt stuff + a phy driver,
without touching the ?hci code at all. Again I can see that this
is not possible for the Tegra124.
I don't think helper libraries are good at managing resources. They are
very good for extracting common /functionality/ so that it doesn't have
to be duplicated. That's where the commonalities really are. Resource
allocation and setup are usually where the differences are. Trying to
extract that into common helpers often results in clumsy code.

Also, since resources and setup sequences are often very different, the
chances are that adding support for a new SoC will always require
extending the helpers to cope with that new type of resource that the
new SoC now requires, or bumping the maximum number of resources of an
existing type.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140715/1f255e55/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help