[U-Boot] Question on usage of #define in mpc83xx.h

I have a board based on the Freescale MPC8313ERDB configuration. I was having a problem with the output of the USBDR_DRIVE_VBUS pin (we have flakey power on USB devices). I traced this to an incorrect configuration of the SICRL register. The definition in mpc83xx.h for SICRL_USBDR is 0x00000C00 which seems to be a mask telling which bits control that pin. However, when used in MPC8313ERDB.h and SIMPC8313.h board configurations (and hence my configuration), it is or'd into the definition of SICRL. The problem is that according to the reference manual setting both bits in this field is undefined.
So the question, are the #defines in mpc83xx.h meant to be bit masks? or should these (at least SICRL_USBDR) be changed to reflect intended usage? Alternatively, the board configuration files should be updated to set this field correctly. I see Ron Madrid info@sheldoninst.com as the maintainer of SIMPC8313 and no one as the maintainer of the Freescale MPC8313ERDB.
Regards, Bill Cook cook@isgchips.com

--- On Wed, 12/23/09, Bill Cook cook@isgchips.com wrote:
of the SICRL register. The definition in mpc83xx.h for SICRL_USBDR is 0x00000C00 which seems to be a mask telling which bits control that pin. However, when used in MPC8313ERDB.h and SIMPC8313.h board configurations (and hence my configuration), it is or'd into the definition of SICRL. The problem is that according to the reference manual setting both bits in this field is undefined.
I, like you followed the MPC8313ERDB.h config file. However, I have not seen the problems your are seeing. Then again, I am probably not testing the USB as vigorously as you are. In the coming weeks I will be.
So the question, are the #defines in mpc83xx.h meant to be bit masks?
I think that's what was intended since there are two bits for most configurations of SICRL fields and only one #define, not 4.
Alternatively, the board configuration files should be updated to set this field correctly.
Will take care of mine after a consensus is reached.
Ron Madrid
participants (2)
-
Bill Cook
-
Ron Madrid