[U-Boot] [PATCH v2 15/15] of: clean up OF_CONTROL ifdef conditionals

Simon Glass sjg at chromium.org
Mon Aug 3 16:06:50 CEST 2015


On 1 August 2015 at 07:14, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> We have flipped CONFIG_SPL_DISABLE_OF_CONTROL.  We have cleansing
> devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
> away the ugly logic in include/fdtdec.h:
>
>  #ifdef CONFIG_OF_CONTROL
>  # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
>  #  define OF_CONTROL 0
>  # else
>  #  define OF_CONTROL 1
>  # endif
>  #else
>  # define OF_CONTROL 0
>  #endif
>
> Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute.  It refers to
> CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
> SPL.
>
> Also, we no longer have to cancel CONFIG_OF_CONTROL in
> include/config_uncmd_spl.h and scripts/Makefile.spl.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
>
> Changes in v2: None
>
>  arch/arm/cpu/armv7/am33xx/board.c                    |  2 +-
>  arch/arm/cpu/armv7/exynos/pinmux.c                   |  2 +-
>  arch/arm/include/asm/arch-exynos/dwmmc.h             |  2 --
>  arch/arm/include/asm/arch-exynos/mipi_dsim.h         |  2 --
>  arch/arm/include/asm/arch-exynos/mmc.h               |  2 --
>  arch/arm/mach-tegra/clock.c                          |  4 ++--
>  arch/arm/mach-tegra/tegra114/clock.c                 |  4 ++--
>  arch/arm/mach-tegra/tegra124/clock.c                 |  4 ++--
>  arch/arm/mach-tegra/tegra20/clock.c                  |  4 ++--
>  arch/arm/mach-tegra/tegra30/clock.c                  |  4 ++--
>  board/xilinx/microblaze-generic/microblaze-generic.c |  2 +-
>  board/xilinx/zynq/board.c                            |  2 +-
>  common/cli.c                                         |  4 ++--
>  common/spl/spl.c                                     |  3 +--
>  drivers/core/Makefile                                |  6 +++---
>  drivers/core/device.c                                |  4 ++--
>  drivers/core/lists.c                                 |  2 +-
>  drivers/core/root.c                                  |  6 +++---
>  drivers/gpio/mxc_gpio.c                              |  2 +-
>  drivers/gpio/vybrid_gpio.c                           |  2 +-
>  drivers/i2c/s3c24x0_i2c.c                            |  4 ++--
>  drivers/input/Makefile                               |  2 +-
>  drivers/input/tegra-kbc.c                            |  2 +-
>  drivers/mmc/exynos_dw_mmc.c                          |  2 +-
>  drivers/mmc/s5p_sdhci.c                              |  2 +-
>  drivers/mmc/tegra_mmc.c                              |  2 +-
>  drivers/mmc/zynq_sdhci.c                             |  2 +-
>  drivers/mtd/spi/sf_probe.c                           |  6 +++---
>  drivers/net/xilinx_emaclite.c                        |  2 +-
>  drivers/net/zynq_gem.c                               |  2 +-
>  drivers/power/exynos-tmu.c                           |  2 +-
>  drivers/power/pmic/pmic_max77686.c                   |  4 ++--
>  drivers/serial/ns16550.c                             |  2 +-
>  drivers/serial/serial-uclass.c                       |  4 ++--
>  drivers/serial/serial_omap.c                         |  2 +-
>  drivers/serial/serial_pl01x.c                        |  2 +-
>  drivers/serial/serial_tegra.c                        |  4 ++--
>  drivers/serial/serial_uniphier.c                     |  2 +-
>  drivers/serial/serial_zynq.c                         |  2 +-
>  drivers/sound/max98095.c                             |  2 +-
>  drivers/sound/wm8994.c                               |  2 +-
>  drivers/tpm/tpm_tis_i2c.c                            |  2 +-
>  drivers/video/exynos_dp.c                            |  4 ++--
>  drivers/video/exynos_dp_lowlevel.c                   |  2 +-
>  drivers/video/exynos_fb.c                            |  8 ++++----
>  drivers/video/exynos_fimd.c                          |  4 ++--
>  drivers/video/exynos_mipi_dsi.c                      |  4 ++--
>  drivers/video/tegra.c                                |  2 +-
>  include/cli.h                                        |  2 +-
>  include/config_uncmd_spl.h                           |  3 ---
>  include/configs/microblaze-generic.h                 |  3 ++-
>  include/configs/socfpga_common.h                     |  2 +-
>  include/dm/device.h                                  |  4 ++--
>  include/fdtdec.h                                     | 10 ----------
>  lib/Makefile                                         | 11 ++++-------
>  lib/fdtdec.c                                         |  2 +-
>  scripts/Makefile.uncmd_spl                           |  3 ---
>  57 files changed, 79 insertions(+), 104 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list