From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Thu, 8 Aug 2013 19:08:13 -0700 Subject: [U-Boot] powerpc/b4860: Disable unused devices using DEVDISR register In-Reply-To: <1372763107-19942-1-git-send-email-Sandeep@freescale.com> References: <1372763107-19942-1-git-send-email-Sandeep@freescale.com> Message-ID: <52044F0D.10802@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > + > +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. > 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