On Wed, Jun 9, 2010 at 10:34 PM, Kumar Gala <[email protected]> wrote:
> +int is_core_disabled(int nr) {
> + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
> + u32 coredisrl = in_be32(&gur->coredisrl);
You don't need to declare the variable as volatile if you use an I/O accessor.
> +int is_core_disabled(int nr) {
> + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
> + u32 devdisr = in_be32(&gur->devdisr);
Same thing here.
> +
> + switch (nr) {
> + case 0:
> + return (devdisr & MPC85xx_DEVDISR_CPU0);
> + break;
> + case 1:
> + return (devdisr & MPC85xx_DEVDISR_CPU1);
> + break;
And you don't need a 'break' after a 'return' in a switch-case
statement. You also don't need parentheses around the expression in
the 'return' statement.
--
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot