Patchwork [U-Boot] powerpc/85xx: Fix compile errors if CONFIG_SYS_{BR, OR}0_PRELIM aren't set

login
register
mail settings
Submitter Kumar Gala
Date May 20, 2011, 6:06 a.m.
Message ID <1305871589-16179-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/96528/
State Accepted
Commit 9829feffec9c8c7a1d25da1dae54f0fea080f7a2
Delegated to: Kumar Gala
Headers show

Comments

Kumar Gala - May 20, 2011, 6:06 a.m.
Add ifdef protection in LBC code to handle the case in which
CONFIG_SYS_BR0_PRELIM and CONFIG_SYS_OR0_PRELIM arent defined for a
build.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Kumar Gala - May 27, 2011, 12:41 p.m.
On May 20, 2011, at 1:06 AM, Kumar Gala wrote:

> Add ifdef protection in LBC code to handle the case in which
> CONFIG_SYS_BR0_PRELIM and CONFIG_SYS_OR0_PRELIM arent defined for a
> build.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/cpu/mpc8xxx/fsl_lbc.c |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)

applied to next

- k

Patch

diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index 7598ebf..d78962f 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -58,8 +58,10 @@  void init_early_memctl_regs(void)
 #endif
 	/* now restrict to preliminary range */
 	if (init_br1) {
+#if defined(CONFIG_SYS_BR0_PRELIM) && defined(CONFIG_SYS_OR0_PRELIM)
 		set_lbc_br(0, CONFIG_SYS_BR0_PRELIM);
 		set_lbc_or(0, CONFIG_SYS_OR0_PRELIM);
+#endif
 
 #if defined(CONFIG_SYS_BR1_PRELIM) && defined(CONFIG_SYS_OR1_PRELIM)
 		set_lbc_or(1, CONFIG_SYS_OR1_PRELIM);