Skip to contentSkip to conversation

Question on usage of #define in mpc83xx.h

U-Boot Bill Cook 2 participants 2 messages Dec 23, 2009

lore
Share & tools
lore

Bill Cook

author
#0 lore raw

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 <[email protected]> as the maintainer of SIMPC8313
and no one as the maintainer of the Freescale MPC8313ERDB.

Regards,
Bill Cook <[email protected]>

#1 lore raw
Quoted 4 lines · Bill Cook

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.

Quoted 8 lines

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.

Quoted 2 lines

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.

Quoted 4 lines

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