
On Monday, February 17, 2014 at 10:40:41 AM, Gerhard Sittig wrote: [...]
Why don't you just use structure with padding as the rest of the U-Boot does ? Like so:
struct regs {
u8 reg1; u8 pad1[n]; u8 reg2;
... };
does not apply here -- these are "adapter registers behind USB", very much like "PHY registers behind MII communication"; the driver won't pass addresses to I/O accessors, but will pass register numbers as parameters to USB API calls
You'd be passing offset of the register in the structure, right ?
[...]
Uh, this code is not quite clear to me ... can you not simplify this weird loop? [...]
again, this was copied from asix; its core is checking for the ethernet link status, what makes it look so weird is the "nice" user presentation of whether the link already was established or needed to get established first -- will see how I can rephrase it
thank you for reviewing!
Thanks
Best regards, Marek Vasut