Skip to contentSkip to conversation

mpc83xx: SICRL #defines

U-Boot Ron Madrid 2 participants 2 messages May 28, 2010 – May 29, 2010

lore
Share & tools
lore

Ron Madrid

author
#0 lore raw

Kim,

This is defined this way:

#define SICRL_USBDR 0x00000C00

However in order to actually set these pins to the USB_DR functionality the setting should be 0x00000800. So it appears that these (#define SICRL_*) are all masks. Each field seems to be two bits and therefore 4 possible settings.

So, should they all be used as masks, should this be changed, or should we create new '#define's for the different functionalities? I need to make a change to my config file and I thought I'd get your opinion before I submitted a patch; I can make any suggested changes with my change at the same time.

Thanks,

Ron

#1 lore raw
Quoted 11 lines · On Fri, 28 May 2010 16:44:21 -0700 Ron Madrid <[email protected]> wrote:

Kim,

This is defined this way:

#define SICRL_USBDR 0x00000C00

However in order to actually set these pins to the USB_DR functionality the setting should be 0x00000800. So it appears that these (#define SICRL_*) are all masks. Each field seems to be two bits and therefore 4 possible settings.

Quoted 5 lines

So, should they all be used as masks, should this be changed, or should we create new '#define's for the different functionalities? I need to make a change to my config file and I thought I'd get your opinion before I submitted a patch; I can make any suggested changes with my change at the same time.

It looks like the pin functions wouldn't be able to be efficiently named in a uniform fashion - I'd be ok with just introducing the four new defines SICRL_USBDR_00, SICRL_USBDR_01, and so on.

Kim