Skip to contentSkip to conversation

tigon3 Ethernet - any users / testers out there?

U-Boot Wolfgang Denk 1 participant 1 message Sep 11, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I'm looking for users / testers for the TIGON3 Ethernet driver. The only board that uses it is the BMW board, which is orphaned.

I'm trying to fix the compiler warnings raised by this driver:

tigon3.c: In function 'LM_InitializeAdapter':
tigon3.c:1625: warning: dereferencing type-punned pointer will break strict-aliasing rules tigon3.c: In function 'LM_ResetAdapter':
tigon3.c:2616: warning: dereferencing type-punned pointer will break strict-aliasing rules tigon3.c:2630: warning: dereferencing type-punned pointer will break strict-aliasing rules

The first one is trivial to fix.

The other two are caused by cod ethat looks like this (after preprocessing):

	Value16 = readl(&((pDevice)->pMemView->PciCfg.PciXCommand));

However, according to tigon3.h, PciXCommand is a 16 bit register:

	...
	T3_16BIT_REGISTER PciXCommand;
	...

I wonder if accessing the 16 bit register using a 32 bit accessor macro is OK at all, or if we should rather use a 16 bit accessor - and if the resultung code would still work if we did.

Comments welcome.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The trouble with our times is that the future is not what it used  to
be.                                                     - Paul Valery