[U-Boot] powerpc/b4860: Disable unused devices using DEVDISR register

York Sun
2013-08-09T02:08:13Z

On 07/02/2013 04:05 AM, Sandeep Singh wrote:
> Explicitly disabling unused IPs/blocks. This will lower
> power consumption.
>
> Signed-off-by: Sandeep Singh <Sandeep@freescale.com>
>

<snip>

> +
> +void cpu_device_disable()
> +{
> + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
> +
> + /* get devdisr */
> + u32 *devdisr1 = in_be32(&gur->devdisr);
> + u32 *devdisr2 = in_be32(&gur->devdisr2);
> + u32 *devdisr3 = in_be32(&gur->devdisr3);
> + u32 *devdisr4 = in_be32(&gur->devdisr4);
> + u32 *devdisr5 = in_be32(&gur->devdisr5);
> +

in_be32 returns u32, not u32 *. You will have compiling warnings here.

<snip>

> diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
> index 64a6f9c..143d561 100644
> --- a/arch/powerpc/include/asm/processor.h
> +++ b/arch/powerpc/include/asm/processor.h
> @@ -1125,6 +1125,7 @@
> #define SVR_B4860 0X868000
> #define SVR_G4860 0x868001
> #define SVR_G4060 0x868003
> +#define SVR_B4060 0x868002
> #define SVR_B4440 0x868100
> #define SVR_G4440 0x868101
> #define SVR_B4420 0x868102
> diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
> index b1b012c..5e2efd3 100644
> --- a/board/freescale/b4860qds/b4860qds.c
> +++ b/board/freescale/b4860qds/b4860qds.c
> @@ -575,6 +575,8 @@ int board_early_init_r(void)
> int ret;
> u32 svr = SVR_SOC_VER(get_svr());
>
> + cpu_device_disable();

You don't have prototype for this function.

> +
> /* Create law for MAPLE only for personalities having MAPLE */
> if ((svr == SVR_B4860) || (svr == SVR_B4440) ||
> (svr == SVR_B4420) || (svr == SVR_B4220)) {
>

This hunk doesn't apply. Please check your code base.

York