Re: [net-next PATCH 1/1] drivers: net: cpsw: Add support for new CPSW IP version

Felipe Balbi
2013-07-31T20:26:17Z

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

Hi,

On Wed, Jul 31, 2013 at 10:20:07PM +0200, Richard Cochran wrote:
> On Wed, Jul 31, 2013 at 11:07:56PM +0300, Felipe Balbi wrote:
> >
> > what I'm saying is that we can give new IP revision a chance to work if
> > they have no programming model differences (except for, perhaps, new
> > features and different erratas).
>
> But it also has a chance to fail when there are differences.
> Comparing CPSW V1 with V2, it appears that TI likes to move the
> registers around between versions. To me, this is reason enough to
> make the driver defensive.

oh well, we can go on and on with this. Unfortunately we (SW team) don't
have control over the HW folks. We strongly suggest that they don't
break SW compatibility, and that's starting to become true.

You can very well expect next version of CPSW to be SW compatible. If it
isn't, then TI will send patches to add a new revision check and treat
it well. We are the first ones to have access to new versions of all
our IPs anyway.

And, IMHO, even if HW engineers decides to move registers around in CPSW
v3, that still doesn't chage the fact that defaulting to highest known
revision is a good practice.

Bailing out just because the revision check isn't what you expect it to
be is a very poor practice and leads to periodic patches updating
'switch' statements all over the place.

--
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]