[U-Boot] MII - Incorrect type specified for offset addr

Mike Frysinger vapier at gentoo.org
Mon Aug 8 03:14:55 CEST 2011


On Monday, July 25, 2011 01:50:29 Hebbar, Gururaja wrote:
> We have an upcoming SOC with Ethernet controller which has registers with
> offsets crossing 0x110. In order to access these registers, we use
> miiphy_read() & miiphy_write() api provided by Standard u-boot mii phy
> util code (common/miiphyutil.c).
> 
> However the syntax of miiphy_read() & miiphy_write() is as below
> 
> int miiphy_read (char *devname, unsigned char addr, unsigned char reg,
> 		 unsigned short *value);
> 
> int miiphy_write (char *devname, unsigned char addr, unsigned char reg,
> 		  unsigned short value);
> 
> Here the "reg" argument is of type "unsigned char" which limits the offset
> to a max of 0xff. In linux, they are using u32 as type.
> 
> Right now we have modified the type to short and using it.
> 
> Is this correct?
> If yes, can we send a patch for the same?
> If not, what is the alternative?

yes, it should get changed to a u16.  feel free to post a patch for it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110807/157e89f6/attachment.pgp 


More information about the U-Boot mailing list