Re: [patch 2/5] Staging: vme: add VME userspace driver

Emilio G. Cota
2009-08-11T21:01:58Z

Martyn Welch wrote:
> I disagree. The bridge drivers should register their resources with the
> core. The core, or a layer above it, can control how those resources are
> used. This moves the complexity you want for managing the windows to a
> level that will work on all underlying drivers rather than having to be
> written explicitly for each one. The mechanism I have provided does this
> discovery.

nah, it would be foolish to think we can write an upper layer
that covers every corner case for every bridge we're gonna
encounter. For instance, imagine a bridge that has 10 windows,
with the annoying feature that window#10 *only* accepts CS/CSR
mappings. How stupid is that? Very stupid. But what would be
more stupid is to write allegedly 'generic' interfaces that
break every time a bridge comes up with a stupid feature.

So that doesn't belong to a generic interface. Now, to avoid
code duplication between two (or more) _very_ similar bridges,
we just share the 'resource management' code among those,
privately. And that's pretty much it.

Regards,
E.