question about arch/powerpc/platforms/cell/celleb_scc_uhc.c

Julia Lawall julia at diku.dk
Thu Sep 2 01:51:10 EST 2010


The file arch/powerpc/platforms/cell/celleb_scc_uhc.c contains the 
following function:

static inline int uhc_clkctrl_ready(u32 val)
{
        const u32 mask = SCC_UHC_USBCEN | SCC_UHC_USBCEN;
        return((val & mask) == mask);
}

The variable mask is a bit or of two identical constants.  Later in the 
same file in the function enable_scc_uhc, I see the code:

val |= (SCC_UHC_USBCEN | SCC_UHC_USBEN);

Should the code in uhc_clkctrl_ready also be SCC_UHC_USBCEN | SCC_UHC_USBEN?
Or something else?

thanks,
julia


More information about the Linuxppc-dev mailing list