From 7ffe3cd62e5af2cda1e18c6d896cab58bfb0c811 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Thu, 19 May 2016 15:23:12 -0400 Subject: Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUP Since CONFIG_OF_BOARD_SETUP depends on CONFIG_OF_LIBFDT: config OF_BOARD_SETUP bool "Set up board-specific details in device tree before boot" depends on OF_LIBFDT ... remove superfluous tests of CONFIG_OF_LIBFDT when testing for CONFIG_OF_BOARD_SETUP. Signed-off-by: Robert P. J. Day [trini: Typo fix: s/ifdefi/ifdef/] Signed-off-by: Tom Rini --- arch/powerpc/cpu/mpc5xxx/cpu.c | 8 ++++---- arch/powerpc/cpu/mpc8260/cpu.c | 4 ++-- arch/powerpc/cpu/ppc4xx/fdt.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'arch/powerpc') diff --git a/arch/powerpc/cpu/mpc5xxx/cpu.c b/arch/powerpc/cpu/mpc5xxx/cpu.c index 7a463b5e09..84fabbd473 100644 --- a/arch/powerpc/cpu/mpc5xxx/cpu.c +++ b/arch/powerpc/cpu/mpc5xxx/cpu.c @@ -96,7 +96,7 @@ unsigned long get_tbclk (void) /* ------------------------------------------------------------------------- */ -#if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP) +#ifdef CONFIG_OF_BOARD_SETUP void ft_cpu_setup(void *blob, bd_t *bd) { int div = in_8((void*)CONFIG_SYS_MBAR + 0x204) & 0x0020 ? 8 : 4; @@ -117,7 +117,7 @@ void ft_cpu_setup(void *blob, bd_t *bd) do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0); do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0); #endif -#if defined(CONFIG_OF_IDE_FIXUP) +#ifdef CONFIG_OF_IDE_FIXUP if (!ide_device_present(0)) { /* NO CF card detected -> delete ata node in DTS */ int nodeoffset = 0; @@ -132,10 +132,10 @@ void ft_cpu_setup(void *blob, bd_t *bd) } } -#endif +#endif /* CONFIG_OF_IDE_FIXUP */ fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); } -#endif +#endif /* CONFIG_OF_BOARD_SETUP */ #ifdef CONFIG_MPC5xxx_FEC /* Default initializations for FEC controllers. To override, diff --git a/arch/powerpc/cpu/mpc8260/cpu.c b/arch/powerpc/cpu/mpc8260/cpu.c index 6eed6f53a3..9f2be3cb22 100644 --- a/arch/powerpc/cpu/mpc8260/cpu.c +++ b/arch/powerpc/cpu/mpc8260/cpu.c @@ -284,7 +284,7 @@ void watchdog_reset (void) #endif /* CONFIG_WATCHDOG */ /* ------------------------------------------------------------------------- */ -#if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP) +#ifdef CONFIG_OF_BOARD_SETUP void ft_cpu_setup (void *blob, bd_t *bd) { #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\ @@ -303,7 +303,7 @@ void ft_cpu_setup (void *blob, bd_t *bd) "clock-frequency", bd->bi_intfreq, 1); fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); } -#endif /* CONFIG_OF_LIBFDT */ +#endif /* CONFIG_OF_BOARD_SETUP */ /* * Initializes on-chip ethernet controllers. diff --git a/arch/powerpc/cpu/ppc4xx/fdt.c b/arch/powerpc/cpu/ppc4xx/fdt.c index eef9c5a17f..c73509b3ee 100644 --- a/arch/powerpc/cpu/ppc4xx/fdt.c +++ b/arch/powerpc/cpu/ppc4xx/fdt.c @@ -11,7 +11,7 @@ #include #include -#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +#ifdef CONFIG_OF_BOARD_SETUP #include #include #include @@ -160,4 +160,4 @@ void ft_cpu_setup(void *blob, bd_t *bd) */ fdt_pcie_setup(blob); } -#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */ +#endif /* CONFIG_OF_BOARD_SETUP */ -- cgit v1.2.1