[RFC PATCH v2 48/56] kconfig: Drop use of CONFIG_IS_ENABLED()
Simon Glass
sjg at chromium.org
Sat Feb 4 01:26:11 CET 2023
We can now use IS_ENABLED() to have the same effect, at least for the
single-parameter case. Change all the existing uses.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
arch/arc/lib/bootm.c | 2 +-
arch/arc/lib/start.S | 4 +-
arch/arm/cpu/arm11/cpu.c | 12 +-
arch/arm/cpu/arm1136/start.S | 8 +-
arch/arm/cpu/arm720t/start.S | 10 +-
arch/arm/cpu/arm920t/start.S | 8 +-
arch/arm/cpu/arm926ejs/cache.c | 14 +-
arch/arm/cpu/arm926ejs/cpu.c | 2 +-
arch/arm/cpu/arm926ejs/start.S | 10 +-
arch/arm/cpu/arm946es/start.S | 6 +-
arch/arm/cpu/armv7/cache_v7.c | 8 +-
arch/arm/cpu/armv7/cache_v7_asm.S | 2 +-
.../cpu/armv7/iproc-common/hwinit-common.c | 2 +-
arch/arm/cpu/armv7/ls102xa/cpu.c | 4 +-
arch/arm/cpu/armv7/start.S | 16 +-
arch/arm/cpu/armv7/vf610/generic.c | 2 +-
arch/arm/cpu/armv7m/cache.c | 8 +-
arch/arm/cpu/armv8/cache_v8.c | 12 +-
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 8 +-
arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 10 +-
arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 2 +-
arch/arm/cpu/armv8/fsl-layerscape/soc.c | 2 +-
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 +-
arch/arm/include/asm/arch-am33xx/chilisom.h | 2 +-
.../asm/arch-fsl-layerscape/fsl_icid.h | 2 +-
arch/arm/include/asm/arch-lpc32xx/i2c.h | 2 +-
arch/arm/include/asm/arch-rockchip/boot0.h | 2 +-
.../include/asm/arch-rockchip/sdram_rk322x.h | 2 +-
.../include/asm/arch-rockchip/sdram_rk3288.h | 2 +-
arch/arm/include/asm/assembler.h | 2 +-
arch/arm/include/asm/cache.h | 2 +-
arch/arm/include/asm/global_data.h | 2 +-
arch/arm/include/asm/mach-imx/mxc_i2c.h | 6 +-
arch/arm/include/asm/omap_gpio.h | 2 +-
arch/arm/include/asm/omap_i2c.h | 2 +-
arch/arm/include/asm/proc-armv/ptrace.h | 2 +-
arch/arm/include/asm/string.h | 6 +-
arch/arm/lib/bdinfo.c | 2 +-
arch/arm/lib/bootm.c | 4 +-
arch/arm/lib/cache-cp15.c | 6 +-
arch/arm/lib/cache.c | 6 +-
arch/arm/lib/crt0.S | 8 +-
arch/arm/lib/crt0_64.S | 4 +-
arch/arm/lib/interrupts_64.c | 2 +-
arch/arm/lib/lib1funcs.S | 2 +-
arch/arm/lib/memcpy.S | 2 +-
arch/arm/lib/memset.S | 2 +-
arch/arm/lib/psci-dt.c | 6 +-
arch/arm/lib/spl.c | 4 +-
arch/arm/lib/vectors.S | 6 +-
arch/arm/mach-at91/arm920t/lowlevel_init.S | 4 +-
arch/arm/mach-at91/include/mach/at91sam9260.h | 2 +-
arch/arm/mach-at91/spl_at91.c | 2 +-
arch/arm/mach-davinci/da850_lowlevel.c | 2 +-
arch/arm/mach-davinci/include/mach/gpio.h | 2 +-
arch/arm/mach-exynos/mmu-arm64.c | 4 +-
arch/arm/mach-exynos/pinmux.c | 2 +-
arch/arm/mach-exynos/soc.c | 2 +-
arch/arm/mach-imx/cache.c | 2 +-
arch/arm/mach-imx/hab.c | 4 +-
arch/arm/mach-imx/i2c-mxv7.c | 2 +-
arch/arm/mach-imx/imx8/cpu.c | 2 +-
arch/arm/mach-imx/imx8m/soc.c | 6 +-
arch/arm/mach-imx/mx5/soc.c | 2 +-
arch/arm/mach-imx/mx7/soc.c | 2 +-
arch/arm/mach-imx/syscounter.c | 2 +-
arch/arm/mach-k3/am642_init.c | 4 +-
arch/arm/mach-k3/am654_init.c | 4 +-
arch/arm/mach-k3/common.c | 4 +-
arch/arm/mach-k3/sysfw-loader.c | 20 +--
arch/arm/mach-keystone/init.c | 2 +-
arch/arm/mach-lpc32xx/devices.c | 2 +-
arch/arm/mach-omap2/am33xx/board.c | 18 +--
arch/arm/mach-omap2/am33xx/chilisom.c | 4 +-
arch/arm/mach-omap2/am33xx/clk_synthesizer.c | 6 +-
arch/arm/mach-omap2/boot-common.c | 2 +-
arch/arm/mach-omap2/clocks-common.c | 2 +-
arch/arm/mach-omap2/omap3/board.c | 8 +-
arch/arm/mach-omap2/omap3/lowlevel_init.S | 4 +-
arch/arm/mach-omap2/omap5/hwinit.c | 2 +-
arch/arm/mach-omap2/omap5/sec_entry_cpu1.S | 6 +-
arch/arm/mach-omap2/sec-common.c | 4 +-
arch/arm/mach-rmobile/cpu_info.c | 2 +-
arch/arm/mach-rockchip/bootrom.c | 4 +-
arch/arm/mach-rockchip/px30/syscon_px30.c | 2 +-
arch/arm/mach-rockchip/rk3036/rk3036.c | 2 +-
arch/arm/mach-rockchip/rk3066/syscon_rk3066.c | 2 +-
arch/arm/mach-rockchip/rk3188/syscon_rk3188.c | 2 +-
arch/arm/mach-rockchip/rk3288/syscon_rk3288.c | 2 +-
arch/arm/mach-rockchip/rk3368/syscon_rk3368.c | 2 +-
arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 4 +-
arch/arm/mach-rockchip/rk3568/syscon_rk3568.c | 2 +-
arch/arm/mach-rockchip/rv1126/syscon_rv1126.c | 2 +-
arch/arm/mach-rockchip/spl-boot-order.c | 4 +-
arch/arm/mach-rockchip/spl.c | 2 +-
arch/arm/mach-rockchip/tpl.c | 2 +-
arch/arm/mach-s5pc1xx/cache.c | 2 +-
arch/arm/mach-socfpga/misc.c | 4 +-
arch/arm/mach-socfpga/spl_agilex.c | 2 +-
arch/arm/mach-socfpga/spl_n5x.c | 2 +-
arch/arm/mach-socfpga/spl_s10.c | 2 +-
.../mach-stm32mp/cmd_stm32prog/stm32prog.c | 12 +-
arch/arm/mach-stm32mp/cpu.c | 4 +-
arch/arm/mach-stm32mp/fdt.c | 2 +-
arch/arm/mach-stm32mp/spl.c | 2 +-
arch/arm/mach-sunxi/board.c | 6 +-
arch/arm/mach-sunxi/pmic_bus.c | 8 +-
arch/arm/mach-tegra/board.c | 4 +-
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 +-
arch/arm/mach-u8500/cache.c | 2 +-
arch/arm/mach-zynq/cpu.c | 6 +-
arch/microblaze/cpu/cache.c | 4 +-
arch/microblaze/cpu/exception.c | 4 +-
arch/microblaze/cpu/start.S | 2 +-
arch/microblaze/lib/bootm.c | 2 +-
arch/mips/cpu/cpu.c | 2 +-
arch/mips/cpu/start.S | 8 +-
arch/mips/lib/bootm.c | 22 +--
arch/mips/mach-mtmips/mt7621/spl/start.S | 6 +-
arch/mips/mach-mtmips/mt7628/lowlevel_init.S | 6 +-
arch/powerpc/cpu/mpc83xx/start.S | 2 +-
arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 2 +-
arch/powerpc/cpu/mpc85xx/start.S | 2 +-
arch/powerpc/cpu/mpc85xx/tlb.c | 2 +-
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 6 +-
arch/powerpc/cpu/mpc85xx/u-boot.lds | 4 +-
arch/powerpc/cpu/mpc8xxx/law.c | 4 +-
arch/powerpc/include/asm/fsl_i2c.h | 2 +-
arch/riscv/cpu/ax25/cache.c | 26 +--
arch/riscv/cpu/ax25/cpu.c | 2 +-
arch/riscv/cpu/cpu.c | 14 +-
arch/riscv/cpu/fu740/spl.c | 2 +-
arch/riscv/cpu/start.S | 28 ++--
arch/riscv/include/asm/encoding.h | 2 +-
arch/riscv/include/asm/global_data.h | 6 +-
arch/riscv/include/asm/string.h | 6 +-
arch/riscv/lib/asm-offsets.c | 2 +-
arch/riscv/lib/bootm.c | 4 +-
arch/riscv/lib/interrupts.c | 2 +-
arch/riscv/lib/smp.c | 2 +-
arch/riscv/lib/spl.c | 2 +-
arch/sandbox/cpu/start.c | 2 +-
arch/sandbox/include/asm/clk.h | 2 +-
arch/sandbox/include/asm/serial.h | 2 +-
arch/x86/cpu/acpi_gpe.c | 4 +-
arch/x86/cpu/apollolake/cpu_spl.c | 2 +-
arch/x86/cpu/apollolake/hostbridge.c | 10 +-
arch/x86/cpu/apollolake/lpc.c | 2 +-
arch/x86/cpu/apollolake/pch.c | 2 +-
arch/x86/cpu/apollolake/pmc.c | 4 +-
arch/x86/cpu/apollolake/spl.c | 4 +-
arch/x86/cpu/apollolake/uart.c | 6 +-
arch/x86/cpu/broadwell/pch.c | 2 +-
arch/x86/cpu/cpu.c | 2 +-
arch/x86/cpu/i386/interrupt.c | 2 +-
arch/x86/cpu/intel_common/car2.S | 2 +-
arch/x86/cpu/intel_common/cpu_from_spl.c | 2 +-
arch/x86/cpu/intel_common/itss.c | 8 +-
arch/x86/cpu/intel_common/p2sb.c | 8 +-
arch/x86/cpu/qemu/qemu.c | 2 +-
arch/x86/cpu/u-boot-spl.lds | 2 +-
arch/x86/include/asm/arch-apollolake/gpio.h | 2 +-
.../include/asm/arch-apollolake/hostbridge.h | 2 +-
arch/x86/include/asm/arch-apollolake/pmc.h | 2 +-
arch/x86/include/asm/arch-apollolake/uart.h | 2 +-
arch/x86/include/asm/byteorder.h | 2 +-
arch/x86/include/asm/cpu.h | 2 +-
arch/x86/include/asm/global_data.h | 4 +-
arch/x86/include/asm/itss.h | 2 +-
arch/x86/include/asm/mp.h | 2 +-
arch/x86/include/asm/msr.h | 2 +-
arch/x86/include/asm/p2sb.h | 2 +-
arch/x86/include/asm/string.h | 2 +-
arch/x86/include/asm/sysreset.h | 2 +-
arch/x86/include/asm/types.h | 2 +-
arch/x86/lib/acpi_table.c | 2 +-
arch/x86/lib/bootm.c | 6 +-
arch/x86/lib/e820.c | 4 +-
arch/x86/lib/fsp/fsp_common.c | 2 +-
arch/x86/lib/fsp/fsp_dram.c | 2 +-
arch/x86/lib/fsp2/fsp_dram.c | 4 +-
arch/x86/lib/init_helpers.c | 2 +-
arch/x86/lib/interrupts.c | 4 +-
arch/x86/lib/lpc-uclass.c | 2 +-
arch/x86/lib/relocate.c | 4 +-
arch/x86/lib/spl.c | 2 +-
arch/x86/lib/tpl.c | 4 +-
arch/xtensa/cpu/start.S | 8 +-
board/Marvell/octeontx2_cn913x/board.c | 2 +-
board/Seagate/dockstar/dockstar.c | 2 +-
board/Seagate/goflexhome/goflexhome.c | 2 +-
board/alliedtelesis/x530/x530.c | 2 +-
board/bosch/acc/acc.c | 2 +-
board/bosch/guardian/board.c | 2 +-
board/bosch/shc/board.c | 2 +-
board/buffalo/lsxl/lsxl.c | 2 +-
board/cavium/thunderx/thunderx.c | 2 +-
board/cloudengines/pogo_v4/pogo_v4.c | 2 +-
board/compulab/cl-som-imx7/cl-som-imx7.c | 4 +-
board/compulab/common/eeprom.h | 2 +-
board/davinci/da8xxevm/omapl138_lcdk.c | 2 +-
board/eets/pdu001/board.c | 4 +-
board/engicam/imx8mp/icore_mx8mp.c | 2 +-
board/engicam/imx8mp/spl.c | 2 +-
board/engicam/stm32mp1/spl.c | 2 +-
board/engicam/stm32mp1/stm32mp1.c | 6 +-
board/freescale/common/emc2305.c | 4 +-
board/freescale/common/i2c_common.c | 2 +-
board/freescale/common/i2c_common.h | 2 +-
board/freescale/common/qixis.c | 4 +-
board/freescale/common/sys_eeprom.c | 20 +--
board/freescale/imx8mn_evk/spl.c | 2 +-
board/freescale/imx8mp_evk/imx8mp_evk.c | 2 +-
board/freescale/imx8mp_evk/spl.c | 2 +-
board/freescale/imx8mq_evk/spl.c | 2 +-
board/freescale/imx8qm_mek/imx8qm_mek.c | 2 +-
board/freescale/imx8qxp_mek/imx8qxp_mek.c | 2 +-
board/freescale/imx8ulp_evk/imx8ulp_evk.c | 2 +-
board/freescale/imx93_evk/spl.c | 2 +-
board/freescale/ls1012aqds/ls1012aqds.c | 2 +-
board/freescale/ls1012ardb/eth.c | 2 +-
board/freescale/ls1012ardb/ls1012ardb.c | 12 +-
board/freescale/ls1021atwr/ls1021atwr.c | 2 +-
board/freescale/ls1028a/ls1028a.c | 2 +-
board/freescale/ls1043aqds/ls1043aqds.c | 2 +-
board/freescale/ls1088a/eth_ls1088aqds.c | 16 +-
board/freescale/ls1088a/ls1088a.c | 58 +++----
board/freescale/ls2080aqds/eth.c | 14 +-
board/freescale/ls2080aqds/ls2080aqds.c | 2 +-
board/freescale/mpc837xerdb/mpc837xerdb.c | 2 +-
board/freescale/p1010rdb/p1010rdb.c | 8 +-
board/freescale/p1010rdb/tlb.c | 2 +-
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +-
board/freescale/p1_p2_rdb_pc/spl.c | 2 +-
board/freescale/p1_p2_rdb_pc/tlb.c | 2 +-
board/freescale/t102xrdb/t102xrdb.c | 2 +-
board/friendlyarm/nanopi2/lcds.c | 2 +-
board/friendlyarm/nanopi2/onewire.c | 6 +-
board/gateworks/gw_ventana/eeprom.c | 10 +-
board/google/chromebook_coral/coral.c | 4 +-
board/google/veyron/veyron.c | 4 +-
board/grinn/chiliboard/board.c | 4 +-
board/hisilicon/hikey/hikey.c | 2 +-
board/hisilicon/hikey960/hikey960.c | 2 +-
board/hisilicon/poplar/poplar.c | 2 +-
board/k+p/kp_imx53/kp_imx53.c | 2 +-
board/keymile/common/ivm.c | 2 +-
board/kontron/pitx_imx8m/spl.c | 6 +-
board/kontron/sl-mx6ul/sl-mx6ul.c | 4 +-
board/kontron/sl-mx8mm/sl-mx8mm.c | 4 +-
board/kontron/sl28/sl28.c | 2 +-
board/l+g/vinco/vinco.c | 4 +-
board/mediatek/mt8183/mt8183_pumpkin.c | 4 +-
board/mediatek/mt8516/mt8516_pumpkin.c | 4 +-
board/qca/ap152/ap152.c | 2 +-
board/renesas/draak/draak.c | 2 +-
board/renesas/salvator-x/salvator-x.c | 4 +-
board/renesas/ulcb/ulcb.c | 2 +-
board/rockchip/evb_rk3399/evb-rk3399.c | 4 +-
board/samsung/common/board.c | 2 +-
board/samsung/trats/trats.c | 10 +-
board/samsung/trats2/trats2.c | 6 +-
board/sandbox/sandbox.c | 2 +-
board/siemens/common/board.c | 2 +-
board/siemens/common/factoryset.c | 14 +-
board/siemens/common/factoryset.h | 2 +-
board/siemens/draco/board.c | 2 +-
board/siemens/iot2050/board.c | 2 +-
board/somlabs/visionsom-6ull/visionsom-6ull.c | 2 +-
board/st/common/stm32mp_dfu.c | 2 +-
board/st/stih410-b2260/board.c | 2 +-
board/st/stm32mp1/spl.c | 4 +-
board/st/stm32mp1/stm32mp1.c | 14 +-
board/st/stv0991/stv0991.c | 2 +-
board/sunxi/board.c | 2 +-
board/synopsys/hsdk/hsdk.c | 2 +-
board/tcl/sl50/board.c | 2 +-
board/technexion/pico-imx7d/pico-imx7d.c | 2 +-
board/ti/am335x/board.c | 6 +-
board/ti/am43xx/board.c | 10 +-
board/ti/am57xx/board.c | 6 +-
board/ti/am64x/evm.c | 4 +-
board/ti/common/board_detect.c | 4 +-
board/ti/dra7xx/evm.c | 6 +-
board/ti/j721e/evm.c | 2 +-
board/ti/ks2_evm/board_k2g.c | 2 +-
board/toradex/apalis-imx8/apalis-imx8.c | 2 +-
board/toradex/verdin-imx8mp/spl.c | 2 +-
board/tplink/wdr4300/wdr4300.c | 2 +-
board/tq/tqma6/tqma6.c | 6 +-
board/udoo/neo/neo.c | 2 +-
board/wandboard/wandboard.c | 4 +-
board/xilinx/common/board.c | 4 +-
board/xilinx/common/fru_ops.c | 2 +-
board/xilinx/versal/board.c | 2 +-
board/xilinx/zynq/board.c | 2 +-
board/xilinx/zynqmp/zynqmp.c | 12 +-
boot/bootm.c | 22 +--
boot/bootm_os.c | 2 +-
boot/bootstd-uclass.c | 2 +-
boot/image-board.c | 26 +--
boot/image-fdt.c | 12 +-
boot/image-fit.c | 10 +-
boot/image-pre-load.c | 2 +-
boot/image.c | 14 +-
boot/vbe_simple.c | 2 +-
cmd/bdinfo.c | 2 +-
cmd/bootefi.c | 6 +-
cmd/clk.c | 4 +-
cmd/date.c | 4 +-
cmd/disk.c | 6 +-
cmd/dm.c | 4 +-
cmd/eeprom.c | 10 +-
cmd/i2c.c | 106 ++++++-------
cmd/mmc.c | 28 ++--
cmd/mvebu/bubt.c | 2 +-
cmd/nvedit.c | 2 +-
cmd/reiser.c | 2 +-
cmd/sb.c | 2 +-
cmd/sf.c | 4 +-
cmd/spi.c | 6 +-
cmd/zfs.c | 2 +-
common/bloblist.c | 2 +-
common/board_f.c | 16 +-
common/board_r.c | 12 +-
common/cli.c | 4 +-
common/console.c | 30 ++--
common/dlmalloc.c | 4 +-
common/event.c | 8 +-
common/hash.c | 34 ++--
common/hwconfig.c | 2 +-
common/init/board_init.c | 10 +-
common/iomux.c | 2 +-
common/log.c | 2 +-
common/malloc_simple.c | 2 +-
common/spl/spl.c | 76 ++++-----
common/spl/spl_atf.c | 4 +-
common/spl/spl_ext.c | 2 +-
common/spl/spl_fat.c | 2 +-
common/spl/spl_fit.c | 16 +-
common/spl/spl_mmc.c | 8 +-
common/spl/spl_nand.c | 2 +-
common/spl/spl_net.c | 2 +-
common/spl/spl_nor.c | 2 +-
common/spl/spl_ram.c | 10 +-
common/spl/spl_sata.c | 2 +-
common/spl/spl_spi.c | 6 +-
common/spl/spl_ubi.c | 2 +-
common/spl/spl_usb.c | 2 +-
common/spl/spl_xip.c | 2 +-
common/stdio.c | 4 +-
common/usb.c | 14 +-
common/usb_hub.c | 18 +--
common/usb_kbd.c | 12 +-
common/usb_storage.c | 34 ++--
common/xyzModem.c | 4 +-
disk/disk-uclass.c | 2 +-
disk/part.c | 14 +-
disk/part_amiga.h | 2 +-
disk/part_dos.c | 6 +-
disk/part_efi.c | 10 +-
disk/part_mac.h | 2 +-
doc/develop/driver-model/i2c-howto.rst | 2 +-
doc/develop/driver-model/livetree.rst | 2 +-
doc/develop/driver-model/of-plat.rst | 10 +-
doc/develop/spl.rst | 6 +-
drivers/adc/meson-saradc.c | 6 +-
drivers/ata/dwc_ahsata.c | 2 +-
drivers/block/blk-uclass.c | 2 +-
drivers/block/host-uclass.c | 2 +-
drivers/block/host_dev.c | 2 +-
drivers/clk/clk-uclass.c | 14 +-
drivers/clk/clk_fixed_factor.c | 2 +-
drivers/clk/clk_fixed_rate.c | 4 +-
drivers/clk/clk_sandbox.c | 2 +-
drivers/clk/clk_scmi.c | 2 +-
drivers/clk/imx/clk-imx8mm.c | 4 +-
drivers/clk/imx/clk-imx8mn.c | 4 +-
drivers/clk/mediatek/clk-mt7622.c | 2 +-
drivers/clk/mediatek/clk-mt7623.c | 2 +-
drivers/clk/mediatek/clk-mt7629.c | 2 +-
drivers/clk/mediatek/clk-mt7981.c | 2 +-
drivers/clk/mediatek/clk-mt7986.c | 2 +-
drivers/clk/rockchip/clk_px30.c | 6 +-
drivers/clk/rockchip/clk_rk3036.c | 2 +-
drivers/clk/rockchip/clk_rk3066.c | 8 +-
drivers/clk/rockchip/clk_rk3188.c | 8 +-
drivers/clk/rockchip/clk_rk322x.c | 2 +-
drivers/clk/rockchip/clk_rk3288.c | 10 +-
drivers/clk/rockchip/clk_rk3308.c | 6 +-
drivers/clk/rockchip/clk_rk3328.c | 2 +-
drivers/clk/rockchip/clk_rk3368.c | 18 +--
drivers/clk/rockchip/clk_rk3399.c | 24 +--
drivers/clk/rockchip/clk_rk3568.c | 10 +-
drivers/clk/rockchip/clk_rv1108.c | 2 +-
drivers/clk/rockchip/clk_rv1126.c | 8 +-
drivers/core/device.c | 46 +++---
drivers/core/dump.c | 2 +-
drivers/core/fdtaddr.c | 14 +-
drivers/core/lists.c | 8 +-
drivers/core/ofnode.c | 16 +-
drivers/core/read.c | 2 +-
drivers/core/regmap.c | 2 +-
drivers/core/root.c | 24 +--
drivers/core/simple-bus.c | 6 +-
drivers/core/syscon-uclass.c | 4 +-
drivers/core/uclass.c | 12 +-
drivers/core/util.c | 2 +-
drivers/crypto/aspeed/aspeed_hace.c | 2 +-
drivers/crypto/fsl/jr.c | 24 +--
drivers/crypto/hash/hash_sw.c | 2 +-
drivers/ddr/fsl/main.c | 8 +-
drivers/ddr/fsl/options.c | 4 +-
drivers/dfu/dfu_sf.c | 8 +-
drivers/dma/apbh_dma.c | 2 +-
drivers/dma/dma-uclass.c | 2 +-
drivers/fastboot/fb_mmc.c | 4 +-
drivers/firmware/firmware-uclass.c | 2 +-
drivers/firmware/psci.c | 2 +-
drivers/fpga/fpga.c | 4 +-
drivers/fpga/xilinx.c | 2 +-
drivers/fpga/zynqmppl.c | 12 +-
drivers/gpio/at91_gpio.c | 12 +-
drivers/gpio/atmel_pio4.c | 2 +-
drivers/gpio/bcm2835_gpio.c | 2 +-
drivers/gpio/da8xx_gpio.c | 4 +-
drivers/gpio/da8xx_gpio.h | 2 +-
drivers/gpio/gpio-uclass.c | 16 +-
drivers/gpio/imx_rgpio2p.c | 2 +-
drivers/gpio/intel_gpio.c | 6 +-
drivers/gpio/mpc83xx_spisel_boot.c | 4 +-
drivers/gpio/mpc8xxx_gpio.c | 4 +-
drivers/gpio/mvebu_gpio.c | 2 +-
drivers/gpio/mxc_gpio.c | 12 +-
drivers/gpio/mxs_gpio.c | 10 +-
drivers/gpio/omap_gpio.c | 14 +-
drivers/gpio/sandbox.c | 12 +-
drivers/gpio/sunxi_gpio.c | 4 +-
drivers/i2c/designware_i2c.c | 12 +-
drivers/i2c/designware_i2c.h | 2 +-
drivers/i2c/fsl_i2c.c | 6 +-
drivers/i2c/i2c-emul-uclass.c | 4 +-
drivers/i2c/i2c-uclass.c | 18 +--
drivers/i2c/lpc32xx_i2c.c | 4 +-
drivers/i2c/muxes/pca954x.c | 4 +-
drivers/i2c/mv_i2c.c | 2 +-
drivers/i2c/mvtwsi.c | 16 +-
drivers/i2c/mxc_i2c.c | 8 +-
drivers/i2c/omap24xx_i2c.c | 8 +-
drivers/i2c/sun6i_p2wi.c | 4 +-
drivers/i2c/sun8i_rsb.c | 4 +-
drivers/input/input.c | 2 +-
drivers/iommu/iommu-uclass.c | 6 +-
drivers/misc/cros_ec.c | 2 +-
drivers/misc/fs_loader.c | 2 +-
drivers/misc/gsc.c | 2 +-
drivers/misc/irq-uclass.c | 4 +-
drivers/misc/irq_sandbox.c | 2 +-
drivers/misc/misc-uclass.c | 2 +-
drivers/misc/p2sb-uclass.c | 6 +-
drivers/misc/test_drv.c | 2 +-
drivers/mmc/davinci_mmc.c | 26 +--
drivers/mmc/dw_mmc.c | 2 +-
drivers/mmc/fsl_esdhc.c | 6 +-
drivers/mmc/fsl_esdhc_imx.c | 52 +++---
drivers/mmc/ftsdc010_mci.c | 8 +-
drivers/mmc/jz_mmc.c | 4 +-
drivers/mmc/mmc-uclass.c | 24 +--
drivers/mmc/mmc.c | 148 +++++++++---------
drivers/mmc/mmc_legacy.c | 6 +-
drivers/mmc/mmc_private.h | 8 +-
drivers/mmc/mmc_write.c | 8 +-
drivers/mmc/mtk-sd.c | 8 +-
drivers/mmc/mxsmmc.c | 32 ++--
drivers/mmc/octeontx_hsmmc.c | 2 +-
drivers/mmc/omap_hsmmc.c | 60 +++----
drivers/mmc/pci_mmc.c | 2 +-
drivers/mmc/renesas-sdhi.c | 40 ++---
drivers/mmc/rockchip_dw_mmc.c | 6 +-
drivers/mmc/rockchip_sdhci.c | 2 +-
drivers/mmc/sandbox_mmc.c | 2 +-
drivers/mmc/sdhci.c | 24 +--
drivers/mmc/socfpga_dw_mmc.c | 2 +-
drivers/mmc/stm32_sdmmc2.c | 4 +-
drivers/mmc/sunxi_mmc.c | 2 +-
drivers/mmc/tmio-common.h | 2 +-
drivers/mmc/uniphier-sd.c | 2 +-
drivers/mtd/mtdcore.c | 2 +-
drivers/mtd/mtdpart.c | 4 +-
drivers/mtd/nand/raw/davinci_nand.c | 2 +-
drivers/mtd/nand/raw/fsl_elbc_nand.c | 2 +-
drivers/mtd/nand/raw/mxs_nand.c | 2 +-
drivers/mtd/nand/raw/nand.c | 6 +-
drivers/mtd/nand/raw/nand_base.c | 4 +-
drivers/mtd/nand/raw/omap_elm.c | 2 +-
drivers/mtd/nand/raw/omap_gpmc.c | 2 +-
drivers/mtd/spi/sf-uclass.c | 4 +-
drivers/mtd/spi/sf_internal.h | 4 +-
drivers/mtd/spi/sf_mtd.c | 6 +-
drivers/mtd/spi/sf_probe.c | 14 +-
drivers/mtd/spi/spi-nor-core.c | 12 +-
drivers/mtd/spi/spi-nor-ids.c | 2 +-
drivers/mtd/spi/spi-nor-tiny.c | 2 +-
drivers/net/designware.c | 14 +-
drivers/net/designware.h | 4 +-
drivers/net/eth-phy-uclass.c | 4 +-
drivers/net/fec_mxc.c | 10 +-
drivers/net/fec_mxc.h | 2 +-
drivers/net/fm/fm.c | 6 +-
drivers/net/mvneta.c | 6 +-
drivers/net/mvpp2.c | 8 +-
drivers/net/rtl8169.c | 2 +-
drivers/net/sh_eth.c | 10 +-
drivers/net/smc911x.c | 2 +-
drivers/net/sun8i_emac.c | 10 +-
drivers/net/ti/cpsw.c | 4 +-
drivers/pch/pch-uclass.c | 2 +-
drivers/pci/pci_rom.c | 2 +-
drivers/pci/pcie_dw_mvebu.c | 2 +-
drivers/pci/pcie_imx.c | 4 +-
drivers/phy/meson-axg-mipi-dphy.c | 4 +-
drivers/phy/meson-g12a-usb2.c | 12 +-
drivers/phy/meson-g12a-usb3-pcie.c | 4 +-
drivers/phy/meson-gxbb-usb2.c | 8 +-
drivers/phy/meson-gxl-usb2.c | 12 +-
drivers/phy/nop-phy.c | 16 +-
drivers/phy/phy-imx8mq-usb.c | 8 +-
drivers/pinctrl/intel/pinctrl_apl.c | 6 +-
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 12 +-
drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 4 +-
drivers/pinctrl/mtmips/pinctrl-mt7620.c | 12 +-
drivers/pinctrl/mtmips/pinctrl-mt7621.c | 18 +--
drivers/pinctrl/mtmips/pinctrl-mt7628.c | 18 +--
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 4 +-
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 4 +-
drivers/pinctrl/nxp/pinctrl-mxs.c | 2 +-
drivers/pinctrl/pinctrl-generic.c | 4 +-
drivers/pinctrl/pinctrl-qe-io.c | 2 +-
drivers/pinctrl/pinctrl-stmfx.c | 4 +-
drivers/pinctrl/pinctrl-uclass.c | 10 +-
drivers/pinctrl/pinctrl_stm32.c | 4 +-
drivers/pinctrl/renesas/pfc.c | 4 +-
drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rv1126.c | 2 +-
.../pinctrl/uniphier/pinctrl-uniphier-core.c | 6 +-
.../pinctrl/uniphier/pinctrl-uniphier-pro4.c | 2 +-
.../pinctrl/uniphier/pinctrl-uniphier-pro5.c | 2 +-
drivers/power/axp305.c | 2 +-
drivers/power/domain/power-domain-uclass.c | 2 +-
drivers/power/exynos-tmu.c | 2 +-
drivers/power/palmas.c | 2 +-
drivers/power/pmic/as3722.c | 4 +-
drivers/power/pmic/axp.c | 4 +-
drivers/power/pmic/bd71837.c | 2 +-
drivers/power/pmic/pca9450.c | 2 +-
drivers/power/pmic/pmic-uclass.c | 2 +-
drivers/power/pmic/pmic_tps62362.c | 6 +-
drivers/power/pmic/pmic_tps65217.c | 18 +--
drivers/power/pmic/pmic_tps65218.c | 4 +-
drivers/power/pmic/pmic_tps65910.c | 6 +-
drivers/power/pmic/rk8xx.c | 8 +-
drivers/power/pmic/stpmic1.c | 6 +-
drivers/power/power_i2c.c | 8 +-
drivers/power/twl4030.c | 2 +-
drivers/power/twl6030.c | 2 +-
drivers/ram/k3-am654-ddrss.c | 2 +-
drivers/ram/rockchip/dmc-rk3368.c | 8 +-
drivers/ram/rockchip/sdram_rk3066.c | 4 +-
drivers/ram/rockchip/sdram_rk3188.c | 8 +-
drivers/ram/rockchip/sdram_rk322x.c | 8 +-
drivers/ram/rockchip/sdram_rk3288.c | 8 +-
drivers/ram/rockchip/sdram_rk3328.c | 8 +-
drivers/ram/rockchip/sdram_rk3399.c | 10 +-
drivers/reboot-mode/reboot-mode-gpio.c | 8 +-
drivers/reboot-mode/reboot-mode-rtc.c | 4 +-
drivers/reboot-mode/reboot-mode-uclass.c | 2 +-
drivers/remoteproc/rproc-uclass.c | 2 +-
drivers/reset/reset-at91.c | 2 +-
drivers/reset/reset-socfpga.c | 2 +-
drivers/rtc/ds1337.c | 2 +-
drivers/rtc/ds3231.c | 2 +-
drivers/rtc/pcf8563.c | 2 +-
drivers/rtc/pt7c4338.c | 2 +-
drivers/rtc/rtc-uclass.c | 2 +-
drivers/rtc/sandbox_rtc.c | 4 +-
drivers/serial/atmel_usart.c | 12 +-
drivers/serial/ns16550.c | 26 +--
drivers/serial/sandbox.c | 6 +-
drivers/serial/serial-uclass.c | 32 ++--
drivers/serial/serial_bcm283x_mu.c | 4 +-
drivers/serial/serial_bcm283x_pl011.c | 2 +-
drivers/serial/serial_lpuart.c | 10 +-
drivers/serial/serial_mt7620.c | 10 +-
drivers/serial/serial_mtk.c | 2 +-
drivers/serial/serial_mxc.c | 8 +-
drivers/serial/serial_ns16550.c | 4 +-
drivers/serial/serial_omap.c | 10 +-
drivers/serial/serial_pl01x.c | 6 +-
drivers/serial/serial_pl01x_internal.h | 2 +-
drivers/serial/serial_rockchip.c | 6 +-
drivers/serial/serial_sbi.c | 2 +-
drivers/serial/serial_semihosting.c | 2 +-
drivers/serial/serial_sh.c | 6 +-
drivers/serial/serial_stm32.c | 2 +-
drivers/serial/serial_xen.c | 6 +-
drivers/spi/atmel_spi.c | 10 +-
drivers/spi/cf_spi.c | 4 +-
drivers/spi/davinci_spi.c | 4 +-
drivers/spi/designware_spi.c | 6 +-
drivers/spi/fsl_espi.c | 6 +-
drivers/spi/ich.c | 8 +-
drivers/spi/ich.h | 2 +-
drivers/spi/mvebu_a3700_spi.c | 6 +-
drivers/spi/mxc_spi.c | 8 +-
drivers/spi/mxs_spi.c | 8 +-
drivers/spi/nxp_fspi.c | 10 +-
drivers/spi/omap3_spi.c | 4 +-
drivers/spi/pl022_spi.c | 4 +-
drivers/spi/renesas_rpc_spi.c | 4 +-
drivers/spi/rk_spi.c | 8 +-
drivers/spi/rockchip_sfc.c | 8 +-
drivers/spi/sh_qspi.c | 4 +-
drivers/spi/spi-uclass.c | 12 +-
drivers/spi/ti_qspi.c | 2 +-
drivers/sysreset/sysreset_sandbox.c | 2 +-
drivers/timer/andes_plmt_timer.c | 2 +-
drivers/timer/cadence-ttc.c | 2 +-
drivers/timer/dw-apb-timer.c | 8 +-
drivers/timer/omap-timer.c | 2 +-
drivers/timer/ostm_timer.c | 2 +-
drivers/timer/riscv_timer.c | 2 +-
drivers/timer/rockchip_timer.c | 12 +-
drivers/timer/sandbox_timer.c | 2 +-
drivers/timer/sifive_clint_timer.c | 2 +-
drivers/timer/timer-uclass.c | 6 +-
drivers/timer/tsc_timer.c | 8 +-
drivers/tpm/tpm-uclass.c | 2 +-
drivers/tpm/tpm2_tis_spi.c | 2 +-
drivers/usb/cdns3/core.c | 6 +-
drivers/usb/common/common.c | 2 +-
drivers/usb/common/usb_urb.c | 2 +-
drivers/usb/dwc3/core.c | 4 +-
drivers/usb/dwc3/core.h | 2 +-
drivers/usb/dwc3/dwc3-generic.c | 12 +-
drivers/usb/dwc3/dwc3-layerscape.c | 6 +-
drivers/usb/dwc3/dwc3-meson-g12a.c | 8 +-
drivers/usb/dwc3/dwc3-meson-gxl.c | 8 +-
drivers/usb/gadget/ci_udc.c | 4 +-
drivers/usb/gadget/composite.c | 2 +-
drivers/usb/gadget/dwc2_udc_otg.c | 16 +-
drivers/usb/gadget/f_fastboot.c | 2 +-
drivers/usb/gadget/udc/udc-uclass.c | 4 +-
drivers/usb/host/dwc2.c | 14 +-
drivers/usb/host/dwc3-of-simple.c | 2 +-
drivers/usb/host/ehci-atmel.c | 2 +-
drivers/usb/host/ehci-hcd.c | 12 +-
drivers/usb/host/ehci-marvell.c | 4 +-
drivers/usb/host/ehci-mx6.c | 18 +--
drivers/usb/host/ehci-mxs.c | 4 +-
drivers/usb/host/ehci-pci.c | 8 +-
drivers/usb/host/ehci-vf.c | 2 +-
drivers/usb/host/ohci-da8xx.c | 2 +-
drivers/usb/host/ohci-hcd.c | 10 +-
drivers/usb/host/ohci-lpc32xx.c | 8 +-
drivers/usb/host/ohci.h | 4 +-
drivers/usb/host/r8a66597-hcd.c | 4 +-
drivers/usb/host/xhci-dwc3.c | 2 +-
drivers/usb/host/xhci-mem.c | 6 +-
drivers/usb/mtu3/mtu3_plat.c | 4 +-
drivers/usb/musb-new/musb_uboot.c | 16 +-
drivers/usb/musb-new/omap2430.c | 6 +-
drivers/usb/musb-new/ti-musb.c | 20 +--
drivers/video/dw_hdmi.c | 2 +-
drivers/video/meson/meson_dw_hdmi.c | 4 +-
drivers/video/mxsfb.c | 2 +-
drivers/video/nexell_display.c | 4 +-
drivers/video/video-uclass.c | 6 +-
drivers/w1-eeprom/w1-eeprom-uclass.c | 2 +-
drivers/w1/w1-uclass.c | 2 +-
drivers/watchdog/designware_wdt.c | 8 +-
drivers/watchdog/imx_watchdog.c | 4 +-
drivers/watchdog/omap_wdt.c | 4 +-
drivers/watchdog/wdt-uclass.c | 2 +-
env/env.c | 2 +-
env/mmc.c | 4 +-
env/sf.c | 2 +-
fs/fat/fat.c | 6 +-
fs/fs.c | 8 +-
include/_exports.h | 4 +-
include/asm-generic/global_data.h | 28 ++--
include/asm-generic/gpio.h | 2 +-
include/atf_common.h | 2 +-
include/binman_sym.h | 6 +-
include/blk.h | 8 +-
include/bootdev.h | 2 +-
include/bootstage.h | 4 +-
include/cli.h | 2 +-
include/clk.h | 10 +-
include/configs/MPC8548CDS.h | 2 +-
include/configs/kmcent2.h | 2 +-
include/configs/mv-common.h | 2 +-
include/configs/p1_p2_rdb_pc.h | 2 +-
include/configs/sunxi-common.h | 2 +-
include/configs/ti_omap4_common.h | 2 +-
include/configs/x530.h | 2 +-
include/dfu.h | 12 +-
include/dm/acpi.h | 2 +-
include/dm/device-internal.h | 14 +-
include/dm/device.h | 30 ++--
include/dm/device_compat.h | 2 +-
include/dm/devres.h | 2 +-
include/dm/ofnode.h | 6 +-
include/dm/pinctrl.h | 4 +-
include/dm/platdata.h | 6 +-
include/dm/read.h | 8 +-
include/dm/root.h | 2 +-
include/dm/uclass-internal.h | 4 +-
include/dm/util.h | 4 +-
include/dma.h | 4 +-
include/dt-structs.h | 2 +-
include/dwc3-uboot.h | 2 +-
include/efi_loader.h | 6 +-
include/env_internal.h | 2 +-
include/errno.h | 2 +-
include/event.h | 10 +-
include/exports.h | 4 +-
include/generic-phy.h | 2 +-
include/handoff.h | 2 +-
include/hash.h | 2 +-
include/hwspinlock.h | 2 +-
include/i2c.h | 6 +-
include/i2c_eeprom.h | 2 +-
include/image.h | 6 +-
include/init.h | 2 +-
include/iommu.h | 4 +-
include/irq.h | 2 +-
include/linux/compiler_types.h | 2 +-
include/linux/mtd/mtd.h | 4 +-
include/linux/mtd/spi-nor.h | 2 +-
include/linux/usb/gadget.h | 2 +-
include/linux/usb/phy.h | 2 +-
include/log.h | 10 +-
include/malloc.h | 2 +-
include/mmc.h | 36 ++---
include/mpc85xx.h | 2 +-
include/nand.h | 2 +-
include/net.h | 2 +-
include/ns16550.h | 4 +-
include/nvmem.h | 2 +-
include/palmas.h | 2 +-
include/part.h | 10 +-
include/phys2bus.h | 2 +-
include/power-domain.h | 16 +-
include/power/max77686_pmic.h | 2 +-
include/power/pmic.h | 12 +-
include/power/regulator.h | 2 +-
include/reboot-mode/reboot-mode-gpio.h | 4 +-
include/remoteproc.h | 2 +-
include/reset.h | 2 +-
include/rtc.h | 2 +-
include/sdhci.h | 2 +-
include/semihosting.h | 4 +-
include/serial.h | 2 +-
include/spi.h | 4 +-
include/spi_flash.h | 2 +-
include/spl.h | 2 +-
include/syscon.h | 2 +-
include/sysinfo.h | 2 +-
include/tlv_eeprom.h | 6 +-
include/twl4030.h | 2 +-
include/twl6030.h | 2 +-
include/usb.h | 12 +-
include/usb/xhci.h | 8 +-
include/xilinx.h | 2 +-
include/zynqmppl.h | 2 +-
lib/display_options.c | 2 +-
lib/efi_loader/efi_conformance.c | 2 +-
lib/efi_loader/efi_console.c | 4 +-
lib/efi_loader/efi_device_path.c | 2 +-
lib/efi_loader/efi_disk.c | 2 +-
lib/efi_loader/efi_root_node.c | 4 +-
lib/efi_selftest/efi_selftest_ecpt.c | 2 +-
lib/fdtdec.c | 24 +--
lib/hang.c | 4 +-
lib/hashtable.c | 2 +-
lib/hexdump.c | 2 +-
lib/image-sparse.c | 2 +-
lib/lmb.c | 4 +-
lib/panic.c | 2 +-
lib/rsa/rsa-sign.c | 2 +-
lib/rsa/rsa-verify.c | 10 +-
lib/semihosting.c | 2 +-
lib/string.c | 2 +-
lib/time.c | 2 +-
lib/tiny-printf.c | 6 +-
lib/vsprintf.c | 8 +-
net/bootp.c | 2 +-
net/eth-uclass.c | 4 +-
net/eth_common.c | 2 +-
scripts/basic/fixdep.c | 2 +-
test/cmd_ut.c | 2 +-
test/dm/clk_ccf.c | 4 +-
test/dm/core.c | 2 +-
test/dm/fastboot.c | 2 +-
test/dm/of_platdata.c | 4 +-
test/dm/part.c | 2 +-
test/dm/spi.c | 2 +-
test/lib/kconfig.c | 8 +-
test/lib/kconfig_spl.c | 8 +-
test/print_ut.c | 4 +-
test/test-main.c | 16 +-
test/unicode_ut.c | 4 +-
827 files changed, 2398 insertions(+), 2398 deletions(-)
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 2dd003445f8..926815b2a36 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -65,7 +65,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
"(fake run for tracing)" : "");
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) {
r0 = 2;
r2 = (unsigned int)images->ft_addr;
} else {
diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S
index 9f5547e552d..711d39684de 100644
--- a/arch/arc/lib/start.S
+++ b/arch/arc/lib/start.S
@@ -17,7 +17,7 @@ ENTRY(_start)
lr r5, [ARC_BCR_IC_BUILD]
breq r5, 0, 1f ; I$ doesn't exist
lr r5, [ARC_AUX_IC_CTRL]
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
bclr r5, r5, 0 ; 0 - Enable, 1 is Disable
#else
bset r5, r5, 0 ; I$ exists, but is not used
@@ -38,7 +38,7 @@ ENTRY(_start)
breq r5, 0, 1f ; D$ doesn't exist
lr r5, [ARC_AUX_DC_CTRL]
bclr r5, r5, 6 ; Invalidate (discard w/o wback)
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
bclr r5, r5, 0 ; Enable (+Inv)
#else
bset r5, r5, 0 ; Disable (+Inv)
diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index ffe35111d58..7badab0c9c1 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -54,7 +54,7 @@ static void cache_flush(void)
asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (i));
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void invalidate_dcache_all(void)
{
asm volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0));
@@ -90,7 +90,7 @@ void flush_dcache_range(unsigned long start, unsigned long stop)
asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
}
-#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
void invalidate_dcache_all(void)
{
}
@@ -98,15 +98,15 @@ void invalidate_dcache_all(void)
void flush_dcache_all(void)
{
}
-#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
void enable_caches(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
icache_enable();
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
dcache_enable();
#endif
}
diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 4bc27f63736..27cef699516 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -39,7 +39,7 @@ reset:
msr cpsr,r0
/* the mask ROM code should have PLL and others stable */
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
bl cpu_init_crit
#endif
@@ -62,7 +62,7 @@ c_runtime_cpu_setup:
*
*************************************************************************
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
cpu_init_crit:
/*
* flush v4 I/D caches
@@ -81,7 +81,7 @@ cpu_init_crit:
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
mcr p15, 0, r0, c1, c0, 0
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/*
* Jump to board specific initialization... The Mask ROM will have already initialized
* basic memory. Go here to bump up clock rate and handle wake up conditions.
@@ -91,4 +91,4 @@ cpu_init_crit:
mov lr, ip /* restore link */
#endif
mov pc, lr /* back to my caller */
-#endif /* !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S
index 9ad1f031429..357ec9480ff 100644
--- a/arch/arm/cpu/arm720t/start.S
+++ b/arch/arm/cpu/arm720t/start.S
@@ -37,8 +37,8 @@ reset:
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
- !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
bl cpu_init_crit
#endif
@@ -62,8 +62,8 @@ c_runtime_cpu_setup:
*************************************************************************
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
- !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
cpu_init_crit:
mov ip, lr
@@ -76,4 +76,4 @@ cpu_init_crit:
mov lr, ip
mov pc, lr
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index cba4a1f0358..dd90bb51270 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -39,7 +39,7 @@ reset:
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
bl cpu_init_crit
#endif
@@ -64,7 +64,7 @@ c_runtime_cpu_setup:
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
cpu_init_crit:
/*
* flush v4 I/D caches
@@ -83,7 +83,7 @@ cpu_init_crit:
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
mcr p15, 0, r0, c1, c0, 0
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/*
* before relocating, we have to setup RAM timing
* because memory timing is board-dependend, you will
@@ -95,4 +95,4 @@ cpu_init_crit:
mov lr, ip
#endif
mov pc, lr
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 95963d2665f..a3b8ba48ab5 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -8,7 +8,7 @@
#include <linux/types.h>
#include <common.h>
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void invalidate_dcache_all(void)
{
asm volatile("mcr p15, 0, %0, c7, c6, 0\n" : : "r"(0));
@@ -48,7 +48,7 @@ void flush_dcache_range(unsigned long start, unsigned long stop)
asm volatile("mcr p15, 0, %0, c7, c10, 4\n" : : "r"(0));
}
-#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
void invalidate_dcache_all(void)
{
}
@@ -56,7 +56,7 @@ void invalidate_dcache_all(void)
void flush_dcache_all(void)
{
}
-#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
/*
* Stub implementations for l2 cache operations
@@ -64,11 +64,11 @@ void flush_dcache_all(void)
__weak void l2_cache_disable(void) {}
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
__weak void invalidate_l2_cache(void) {}
#endif
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
/* Invalidate entire I-cache and branch predictor array */
void invalidate_icache_all(void)
{
@@ -82,10 +82,10 @@ void invalidate_icache_all(void) {}
void enable_caches(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
icache_enable();
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
dcache_enable();
#endif
}
diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c
index 2ce413a7f86..b9e7f51b6e6 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -60,7 +60,7 @@ int cleanup_before_linux (void)
/* flush I/D-cache */
static void cache_flush (void)
{
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
unsigned long i = 0;
asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i));
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index c882bd39eab..239b2e7a179 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -52,7 +52,7 @@ save_boot_params_ret:
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
bl cpu_init_crit
#endif
@@ -75,7 +75,7 @@ c_runtime_cpu_setup:
*
*************************************************************************
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
cpu_init_crit:
/*
* flush D cache before disabling it
@@ -101,12 +101,12 @@ flush_dcache:
bic r0, r0, #0x00002000 /* clear bit 13 (--V- ----) */
#endif
orr r0, r0, #0x00000002 /* set bit 1 (A) Align */
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
#endif
mcr p15, 0, r0, c1, c0, 0
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/*
* Go setup Memory and board specific bits prior to relocation.
*/
@@ -115,7 +115,7 @@ flush_dcache:
mov lr, r4 /* restore link */
#endif
mov pc, lr /* back to my caller */
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
/*************************************************************************
*
diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S
index 2d5186774a7..e7c50168c7f 100644
--- a/arch/arm/cpu/arm946es/start.S
+++ b/arch/arm/cpu/arm946es/start.S
@@ -45,7 +45,7 @@ reset:
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
bl cpu_init_crit
#endif
@@ -70,7 +70,7 @@ c_runtime_cpu_setup:
*/
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
cpu_init_crit:
/*
* flush v4 I/D caches
@@ -89,7 +89,7 @@ cpu_init_crit:
orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
mcr p15, 0, r0, c1, c0, 0
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/*
* Go setup Memory and board specific bits prior to relocation.
*/
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 19ff4323528..44a5e0946d7 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -14,7 +14,7 @@
#define ARMV7_DCACHE_INVAL_RANGE 1
#define ARMV7_DCACHE_CLEAN_INVAL_RANGE 2
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
/* Asm functions from cache_v7_asm.S */
void v7_flush_dcache_all(void);
@@ -151,7 +151,7 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop)
flush_dcache_range(start, stop);
v7_inval_tlb();
}
-#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
void invalidate_dcache_all(void)
{
}
@@ -176,9 +176,9 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop)
{
}
-#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
/* Invalidate entire I-cache and branch predictor array */
void invalidate_icache_all(void)
{
diff --git a/arch/arm/cpu/armv7/cache_v7_asm.S b/arch/arm/cpu/armv7/cache_v7_asm.S
index e38d72f87fc..cd63ef0e7c8 100644
--- a/arch/arm/cpu/armv7/cache_v7_asm.S
+++ b/arch/arm/cpu/armv7/cache_v7_asm.S
@@ -5,7 +5,7 @@
#include <linux/sizes.h>
#include <asm/system.h>
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
#define ARM(x...)
#define THUMB(x...) x
#else
diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
index 896d2f95694..99cd9f71d67 100644
--- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
@@ -7,7 +7,7 @@
#include <cpu_func.h>
#include <asm/cache.h>
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index c455969609f..c4d51cd5ae3 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -34,7 +34,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
/*
* Bit[1] of the descriptor indicates the descriptor type,
@@ -223,7 +223,7 @@ void enable_caches(void)
invalidate_dcache_all();
set_cr(get_cr() | CR_C);
}
-#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
uint get_svr(void)
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 7d7aac021e2..86fd7d38816 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -98,7 +98,7 @@ switch_to_hypervisor_ret:
orr r0, r0, #0xc0 @ disable FIQ and IRQ
msr cpsr,r0
-#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
+#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE)
/*
* Setup vector:
*/
@@ -115,11 +115,11 @@ switch_to_hypervisor_ret:
#endif
/* the mask ROM code should have PLL and others stable */
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
#ifdef CONFIG_CPU_V7A
bl cpu_init_cp15
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
bl cpu_init_crit
#endif
#endif
@@ -132,7 +132,7 @@ ENTRY(c_runtime_cpu_setup)
/*
* If I-cache is enabled invalidate it
*/
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
mcr p15, 0, r0, c7, c5, 0 @ invalidate icache
mcr p15, 0, r0, c7, c10, 4 @ DSB
mcr p15, 0, r0, c7, c5, 4 @ ISB
@@ -171,7 +171,7 @@ ENDPROC(switch_to_hypervisor)
*************************************************************************/
ENTRY(cpu_init_cp15)
-#if CONFIG_IS_ENABLED(ARMV7_SET_CORTEX_SMPEN)
+#if IS_ENABLED(CONFIG_ARMV7_SET_CORTEX_SMPEN)
/*
* The Arm Cortex-A7 TRM says this bit must be enabled before
* "any cache or TLB maintenance operations are performed".
@@ -199,7 +199,7 @@ ENTRY(cpu_init_cp15)
bic r0, r0, #0x00000007 @ clear bits 2:0 (-CAM)
orr r0, r0, #0x00000002 @ set bit 1 (--A-) Align
orr r0, r0, #0x00000800 @ set bit 11 (Z---) BTB
-#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
bic r0, r0, #0x00001000 @ clear bit 12 (I) I-cache
#else
orr r0, r0, #0x00001000 @ set bit 12 (I) I-cache
@@ -364,8 +364,8 @@ skip_errata_801819:
mov pc, r5 @ back to my caller
ENDPROC(cpu_init_cp15)
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
- !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/*************************************************************************
*
* CPU_init_critical registers
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index c23ddc12b45..e3591100dde 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -368,7 +368,7 @@ int get_clocks(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index d1aecf6a85c..cb8497b7a2b 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -58,7 +58,7 @@ enum cache_action {
FLUSH_INVAL_SET_WAY, /* d-cache clean & invalidate by set/ways */
};
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
struct dcache_config {
u32 ways;
u32 sets;
@@ -302,7 +302,7 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
#endif
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
void invalidate_icache_all(void)
{
@@ -364,10 +364,10 @@ int icache_status(void)
void enable_caches(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
icache_enable();
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
dcache_enable();
#endif
}
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 2a226fd0633..6c6363c62f1 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -18,7 +18,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
/*
* With 4k page granule, a virtual address is split into 4 lookup parts
@@ -686,7 +686,7 @@ void mmu_change_region_attr(phys_addr_t addr, size_t siz, u64 attrs)
__asm_invalidate_tlb_all();
}
-#else /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#else /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
/*
* For SPL builds, we may want to not have dcache enabled. Any real U-Boot
@@ -723,9 +723,9 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
{
}
-#endif /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
void icache_enable(void)
{
@@ -754,7 +754,7 @@ void invalidate_icache_all(void)
__asm_invalidate_l3_icache();
}
-#else /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */
+#else /* !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) */
void icache_enable(void)
{
@@ -778,7 +778,7 @@ void invalidate_icache_all(void)
{
}
-#endif /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */
+#endif /* !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) */
/*
* Enable dCache & iCache, whether cache is actually enabled
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 12d31184ad9..b765d4f35da 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -427,7 +427,7 @@ void cpu_name(char *name)
strcpy(name, "unknown");
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
/*
* To start MMU before DDR is available, we create MMU table in SRAM.
* The base address of SRAM is CFG_SYS_FSL_OCRAM_BASE. We use three
@@ -654,7 +654,7 @@ void enable_caches(void)
icache_enable();
dcache_enable();
}
-#endif /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
+#endif /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */
#ifdef CONFIG_TFABOOT
enum boot_src __get_boot_src(u32 porsr1)
@@ -1226,7 +1226,7 @@ int timer_init(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(SYSRESET)
+#if !IS_ENABLED(CONFIG_SYSRESET)
__efi_runtime_data u32 __iomem *rstcr = (u32 *)CFG_SYS_FSL_RST_ADDR;
void __efi_runtime reset_cpu(void)
@@ -1525,7 +1525,7 @@ int dram_init_banksize(void)
return 0;
}
-#if CONFIG_IS_ENABLED(EFI_LOADER)
+#if IS_ENABLED(CONFIG_EFI_LOADER)
void efi_add_known_memory(void)
{
int i;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 4f91db49eeb..8fd07157a7f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -26,7 +26,7 @@
#endif
#include <fsl_sec.h>
#include <asm/arch-fsl-layerscape/soc.h>
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
#include <asm/armv8/sec_firmware.h>
#endif
#include <asm/arch/speed.h>
@@ -81,7 +81,7 @@ void ft_fixup_cpu(void *blob)
"device_type", "cpu", 4);
}
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) && \
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
int node;
u32 psci_ver;
@@ -146,7 +146,7 @@ remove_psci_node:
fdt_add_mem_rsv(blob, (uintptr_t)secondary_boot_code_start,
secondary_boot_code_size);
-#if CONFIG_IS_ENABLED(EFI_LOADER)
+#if IS_ENABLED(CONFIG_EFI_LOADER)
efi_add_memory_map((uintptr_t)secondary_boot_code_start,
secondary_boot_code_size, EFI_RESERVED_MEMORY_TYPE);
#endif
@@ -378,7 +378,7 @@ static void fdt_fixup_msi(void *blob)
}
#endif
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
/* Remove JR node used by SEC firmware */
void fdt_fixup_remove_jr(void *blob)
{
@@ -630,7 +630,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
else {
ccsr_sec_t __iomem *sec;
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
fdt_fixup_remove_jr(blob);
fdt_fixup_kaslr(blob);
#endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 117b7a053c5..9bbde4fae3d 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -17,7 +17,7 @@
#elif defined(CONFIG_FSL_LSCH2)
#include <asm/arch/immap_lsch2.h>
#endif
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
#include <asm/armv8/sec_firmware.h>
#endif
#ifdef CONFIG_CHAIN_OF_TRUST
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 359cbc04309..b7280cf8139 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -342,7 +342,7 @@ static void erratum_rcw_src(void)
#ifdef CONFIG_SYS_FSL_ERRATUM_A009203
static void erratum_a009203(void)
{
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
u8 __iomem *ptr;
#ifdef I2C1_BASE_ADDR
ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG);
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 61fced451eb..a589b916b55 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -104,7 +104,7 @@ void board_init_f(ulong dummy)
preloader_console_init();
spl_set_bd();
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
#ifdef CONFIG_SPL_I2C
i2c_init_all();
#endif
diff --git a/arch/arm/include/asm/arch-am33xx/chilisom.h b/arch/arm/include/asm/arch-am33xx/chilisom.h
index e423c9d071f..ede1a3f95f0 100644
--- a/arch/arm/include/asm/arch-am33xx/chilisom.h
+++ b/arch/arm/include/asm/arch-am33xx/chilisom.h
@@ -6,7 +6,7 @@
#ifndef __ARCH_ARM_MACH_CHILISOM_SOM_H__
#define __ARCH_ARM_MACH_CHILISOM_SOM_H__
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
void chilisom_enable_pin_mux(void);
void chilisom_spl_board_init(void);
#endif
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
index d5f63f4a7ed..b5462fe36cb 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
@@ -178,7 +178,7 @@ extern int fman_icid_tbl_sz;
#define SET_SEC_JR_ICID_ENTRY(jr_num, streamid) \
SET_ICID_ENTRY( \
- (CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) && \
+ (IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
(FSL_SEC_JR##jr_num##_OFFSET == \
SEC_JR3_OFFSET + CFG_SYS_FSL_SEC_OFFSET) \
? NULL \
diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h
index 3918178d3a3..0aa9463d5ba 100644
--- a/arch/arm/include/asm/arch-lpc32xx/i2c.h
+++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h
@@ -22,7 +22,7 @@ struct lpc32xx_i2c_base {
u32 stxfl;
};
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
enum {
I2C_0, I2C_1, I2C_2,
};
diff --git a/arch/arm/include/asm/arch-rockchip/boot0.h b/arch/arm/include/asm/arch-rockchip/boot0.h
index 0c375e543a5..bbb6846b79c 100644
--- a/arch/arm/include/asm/arch-rockchip/boot0.h
+++ b/arch/arm/include/asm/arch-rockchip/boot0.h
@@ -26,7 +26,7 @@
b 1f /* if overwritten, entry-address is at the next word */
1:
#endif
-#if CONFIG_IS_ENABLED(ROCKCHIP_EARLYRETURN_TO_BROM)
+#if IS_ENABLED(CONFIG_ROCKCHIP_EARLYRETURN_TO_BROM)
adr r3, entry_counter
ldr r0, [r3]
cmp r0, #1 /* check if entry_counter == 1 */
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
index 0d29aefb646..ec0720f741b 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
@@ -23,7 +23,7 @@ struct rk322x_sdram_channel {
u8 row_3_4;
u8 cs0_row;
u8 cs1_row;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/*
* For of-platdata, which would otherwise convert this into two
* byte-swapped integers. With a size of 9 bytes, this struct will
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
index 9220763fa7f..ebc3243cecc 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
@@ -22,7 +22,7 @@ struct rk3288_sdram_channel {
u8 row_3_4;
u8 cs0_row;
u8 cs1_row;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/*
* For of-platdata, which would otherwise convert this into two
* byte-swapped integers. With a size of 9 bytes, this struct will
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 8d42ef4823e..212940c293e 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -83,7 +83,7 @@
* We disable it especially for Thumb builds since those instructions
* are not made in a Thumb ready way...
*/
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
#define CALGN(code...)
#else
#define CALGN(code...) code
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index b10edf805b9..688719e6022 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -15,7 +15,7 @@
/*
* Invalidate L2 Cache using co-proc instruction
*/
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
void invalidate_l2_cache(void);
#else
static inline void invalidate_l2_cache(void)
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 9e746e380a2..0df4e0ae8b3 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -46,7 +46,7 @@ struct arch_global_data {
unsigned int tbl;
unsigned long lastinc;
unsigned long long timer_reset_value;
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
unsigned long tlb_addr;
unsigned long tlb_size;
#if defined(CONFIG_ARM64)
diff --git a/arch/arm/include/asm/mach-imx/mxc_i2c.h b/arch/arm/include/asm/mach-imx/mxc_i2c.h
index e8b330f33d1..c8c7db077f3 100644
--- a/arch/arm/include/asm/mach-imx/mxc_i2c.h
+++ b/arch/arm/include/asm/mach-imx/mxc_i2c.h
@@ -6,7 +6,7 @@
#define __ASM_ARCH_MXC_MXC_I2C_H__
#include <asm-generic/gpio.h>
#include <asm/mach-imx/iomux-v3.h>
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
#include <clk.h>
#endif
@@ -50,10 +50,10 @@ struct mxc_i2c_bus {
ulong driver_data;
int speed;
struct i2c_pads_info *pads_info;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk per_clk;
#endif
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int (*idle_bus_fn)(void *p);
void *idle_bus_data;
#else
diff --git a/arch/arm/include/asm/omap_gpio.h b/arch/arm/include/asm/omap_gpio.h
index 590a93761cf..9b00f03a069 100644
--- a/arch/arm/include/asm/omap_gpio.h
+++ b/arch/arm/include/asm/omap_gpio.h
@@ -22,7 +22,7 @@
#include <asm/arch/cpu.h>
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* Information about a GPIO bank */
struct omap_gpio_plat {
diff --git a/arch/arm/include/asm/omap_i2c.h b/arch/arm/include/asm/omap_i2c.h
index 9f0f2722343..1a1cffb38b1 100644
--- a/arch/arm/include/asm/omap_i2c.h
+++ b/arch/arm/include/asm/omap_i2c.h
@@ -3,7 +3,7 @@
#ifndef _OMAP_I2C_H
#define _OMAP_I2C_H
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
/* Information about a GPIO bank */
struct omap_i2c_plat {
diff --git a/arch/arm/include/asm/proc-armv/ptrace.h b/arch/arm/include/asm/proc-armv/ptrace.h
index 2db60d552d4..c015544cd03 100644
--- a/arch/arm/include/asm/proc-armv/ptrace.h
+++ b/arch/arm/include/asm/proc-armv/ptrace.h
@@ -161,7 +161,7 @@ struct pt_regs {
#define user_mode(regs) \
(((regs)->ARM_cpsr & 0xf) == 0)
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
#define thumb_mode(regs) \
(((regs)->ARM_cpsr & T_BIT))
#else
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h
index ead3f2c3564..a464944e339 100644
--- a/arch/arm/include/asm/string.h
+++ b/arch/arm/include/asm/string.h
@@ -14,12 +14,12 @@ extern char * strrchr(const char * s, int c);
#undef __HAVE_ARCH_STRCHR
extern char * strchr(const char * s, int c);
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMCPY)
#define __HAVE_ARCH_MEMCPY
#endif
extern void * memcpy(void *, const void *, __kernel_size_t);
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMMOVE)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMMOVE)
#define __HAVE_ARCH_MEMMOVE
#else
#undef __HAVE_ARCH_MEMMOVE
@@ -30,7 +30,7 @@ extern void * memmove(void *, const void *, __kernel_size_t);
extern void * memchr(const void *, int, __kernel_size_t);
#undef __HAVE_ARCH_MEMZERO
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMSET)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMSET)
#define __HAVE_ARCH_MEMSET
#endif
extern void * memset(void *, int, __kernel_size_t);
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 5e6eaad968d..e62a13a3b96 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -40,7 +40,7 @@ void arch_print_bdinfo(void)
if (gd->arch.resv_ram)
bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
#endif
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
#endif
bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index c56285738a2..d2384b04ea1 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -199,7 +199,7 @@ static void boot_prep_linux(struct bootm_headers *images)
{
char *commandline = env_get("bootargs");
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
debug("using: FDT\n");
if (image_setup_linux(images)) {
panic("FDT creation failed!");
@@ -354,7 +354,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
announce_and_cleanup(fake);
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len)
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len)
r2 = (unsigned long)images->ft_addr;
else
r2 = gd->bd->bi_boot_params;
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 0893915b300..b4330c24613 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -13,7 +13,7 @@
#include <linux/compiler.h>
#include <asm/armv7_mpu.h>
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
DECLARE_GLOBAL_DATA_PTR;
@@ -258,7 +258,7 @@ static void cache_disable(uint32_t cache_bit)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
void icache_enable(void)
{
return;
@@ -290,7 +290,7 @@ int icache_status(void)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void dcache_enable(void)
{
return;
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 1a589c7e2a0..d6194a2ed1a 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -80,7 +80,7 @@ static unsigned long noncached_next;
void noncached_set_region(void)
{
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
mmu_set_region_dcache_behaviour(noncached_start,
noncached_end - noncached_start,
DCACHE_OFF);
@@ -122,7 +122,7 @@ phys_addr_t noncached_alloc(size_t size, size_t align)
}
#endif /* CONFIG_SYS_NONCACHED_MEMORY */
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
void invalidate_l2_cache(void)
{
unsigned int val = 0;
@@ -140,7 +140,7 @@ int arch_reserve_mmu(void)
__weak int arm_reserve_mmu(void)
{
-#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
/* reserve TLB table */
gd->arch.tlb_size = PGTABLE_SIZE;
gd->relocaddr -= gd->arch.tlb_size;
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index 85435b66d07..dca944fac26 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -92,7 +92,7 @@ clbss_l:cmp r0, r1 /* while not at end of BSS */
ENTRY(_main)
/* Call arch_very_early_init before initializing C runtime environment. */
-#if CONFIG_IS_ENABLED(ARCH_VERY_EARLY_INIT)
+#if IS_ENABLED(CONFIG_ARCH_VERY_EARLY_INIT)
bl arch_very_early_init
#endif
@@ -115,7 +115,7 @@ ENTRY(_main)
mov r9, r0
bl board_init_f_init_reserve
-#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL)
+#if defined(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_SERIAL)
bl debug_uart_init
#endif
@@ -171,7 +171,7 @@ here:
bl c_runtime_cpu_setup /* we still call old routine here */
#endif
-#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK)
+#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_FRAMEWORK)
#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_EARLY_BSS)
CLEAR_BSS
@@ -193,7 +193,7 @@ here:
mov r0, r9 /* gd_t */
ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */
/* call board_init_r */
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD)
ldr lr, =board_init_r /* this is auto-relocated! */
bx lr
#else
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index dcc924dd2f4..e9dd9f22ab9 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -92,7 +92,7 @@ ENTRY(_main)
mov x18, x0
bl board_init_f_init_reserve
-#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL)
+#if defined(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_SERIAL)
bl debug_uart_init
#endif
@@ -140,7 +140,7 @@ relocation_return:
*/
bl c_runtime_cpu_setup /* still call old routine */
#endif /* !CONFIG_SPL_BUILD */
-#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK)
+#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_FRAMEWORK)
#if defined(CONFIG_SPL_BUILD)
bl spl_relocate_stack_gd /* may return NULL */
/* set up gd here, outside any C code, if new stack is returned */
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index 2e091415a46..e635375e18b 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -161,7 +161,7 @@ void do_bad_error(struct pt_regs *pt_regs)
*/
void do_sync(struct pt_regs *pt_regs)
{
- if (CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK) &&
+ if (IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK) &&
smh_emulate_trap(pt_regs))
return;
efi_restore_gd();
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S
index de15d09e360..dae83ee6bf0 100644
--- a/arch/arm/lib/lib1funcs.S
+++ b/arch/arm/lib/lib1funcs.S
@@ -361,7 +361,7 @@ ENDPROC(Ldiv0)
.popsection
/* Thumb-1 specialities */
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
.pushsection .text.__gnu_thumb1_case_sqi, "ax"
ENTRY(__gnu_thumb1_case_sqi)
push {r1}
diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S
index a1c996f94ef..ceb36f5d628 100644
--- a/arch/arm/lib/memcpy.S
+++ b/arch/arm/lib/memcpy.S
@@ -53,7 +53,7 @@
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
.syntax unified
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
.thumb
.thumb_func
#endif
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
index 2277d120267..789586d4fab 100644
--- a/arch/arm/lib/memset.S
+++ b/arch/arm/lib/memset.S
@@ -13,7 +13,7 @@
.align 5
.syntax unified
-#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
+#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
.thumb
.thumb_func
#endif
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 903b3357048..5421a89be08 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -10,7 +10,7 @@
#include <linux/sizes.h>
#include <linux/kernel.h>
#include <asm/psci.h>
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
#include <asm/armv8/sec_firmware.h>
#endif
@@ -64,7 +64,7 @@ int fdt_psci(void *fdt)
return nodeoff;
init_psci_node:
-#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
psci_ver = sec_firmware_support_psci_version();
#elif defined(CONFIG_ARMV7_PSCI_1_0) || defined(CONFIG_ARMV8_PSCI)
psci_ver = ARM_PSCI_VER_1_0;
@@ -85,7 +85,7 @@ init_psci_node:
return tmp;
}
-#if !CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
+#if !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT)
/*
* The Secure firmware framework isn't able to support PSCI version 0.1.
*/
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index b13897495da..ed7497e2052 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -50,7 +50,7 @@ void __weak board_init_f(ulong dummy)
* This function jumps to an image with argument. Normally an FDT or ATAGS
* image.
*/
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
#ifdef CONFIG_ARM64
void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
{
@@ -78,7 +78,7 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
#endif /* CONFIG_ARM64 */
#endif
-#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
+#if IS_ENABLED(CONFIG_OPTEE_IMAGE)
void __noreturn jump_to_image_optee(struct spl_image_info *spl_image)
{
/* flush and turn off caches before jumping to OPTEE */
diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 7cf7d1636f5..4de37e7292f 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -24,7 +24,7 @@
#else
b reset
#endif
-#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
+#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE)
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -89,7 +89,7 @@ _start:
ARM_VECTORS
#endif /* !defined(CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK) */
-#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
+#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE)
/*
*************************************************************************
*
@@ -135,7 +135,7 @@ _fiq: .word fiq
#ifdef CONFIG_SPL_BUILD
-#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
+#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE)
.align 5
undefined_instruction:
software_interrupt:
diff --git a/arch/arm/mach-at91/arm920t/lowlevel_init.S b/arch/arm/mach-at91/arm920t/lowlevel_init.S
index ee977be0304..df9a28b33ee 100644
--- a/arch/arm/mach-at91/arm920t/lowlevel_init.S
+++ b/arch/arm/mach-at91/arm920t/lowlevel_init.S
@@ -10,7 +10,7 @@
#include <config.h>
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
#include <asm/arch/hardware.h>
#include <asm/arch/at91_mc.h>
@@ -148,4 +148,4 @@ SMRDATA1:
.word CFG_SYS_SDRAM_VAL
SMRDATA1E:
/* SMRDATA1 is 176 bytes long */
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 103db269533..45c6c19eaf4 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -133,7 +133,7 @@
/*
* Other misc defines
*/
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
#define ATMEL_PIO_PORTS 3 /* these SoCs have 3 PIO */
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
#endif
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index dfba9f730c1..ae5e506c8ea 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -79,7 +79,7 @@ void __weak spl_board_init(void)
void board_init_f(ulong dummy)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int ret;
ret = spl_early_init();
diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c
index 08c8f592524..47870401c77 100644
--- a/arch/arm/mach-davinci/da850_lowlevel.c
+++ b/arch/arm/mach-davinci/da850_lowlevel.c
@@ -289,7 +289,7 @@ int arch_cpu_init(void)
/* GPIO setup */
board_gpio_init();
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
ns16550_init((struct ns16550 *)(CFG_SYS_NS16550_COM1),
CFG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
#endif
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
index e5a40534141..fd6cc86b63b 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -18,7 +18,7 @@
#define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67)
#define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8)
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
#define gpio_status() gpio_info()
#endif
#define GPIO_NAME_SIZE 20
diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c
index 8d8c64e8f8f..e811a2217f3 100644
--- a/arch/arm/mach-exynos/mmu-arm64.c
+++ b/arch/arm/mach-exynos/mmu-arm64.c
@@ -30,7 +30,7 @@ static struct mm_region exynos7420_mem_map[] = {
struct mm_region *mem_map = exynos7420_mem_map;
-#elif CONFIG_IS_ENABLED(EXYNOS7870)
+#elif IS_ENABLED(CONFIG_EXYNOS7870)
static struct mm_region exynos7870_mem_map[] = {
{
@@ -63,7 +63,7 @@ static struct mm_region exynos7870_mem_map[] = {
struct mm_region *mem_map = exynos7870_mem_map;
-#elif CONFIG_IS_ENABLED(EXYNOS7880)
+#elif IS_ENABLED(CONFIG_EXYNOS7880)
static struct mm_region exynos7880_mem_map[] = {
{
diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c
index ad3fbf2da7a..6ecb8892cbe 100644
--- a/arch/arm/mach-exynos/pinmux.c
+++ b/arch/arm/mach-exynos/pinmux.c
@@ -897,7 +897,7 @@ int exynos_pinmux_config(int peripheral, int flags)
return -1;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int exynos4_pinmux_decode_periph_id(const void *blob, int node)
{
int err;
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index a07c87a2c8e..a7989ae41a6 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -27,7 +27,7 @@ void reset_cpu(void)
#endif
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c
index ab9b621a2a6..f9a84007fe1 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -39,7 +39,7 @@ void enable_ca7_smp(void)
}
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index c6747b257c4..b4a322ff77e 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -587,12 +587,12 @@ static ulong get_image_ivt_offset(ulong img_addr)
buf = map_sysmem(img_addr, 0);
switch (genimg_get_format(buf)) {
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY:
return (image_get_image_size((struct legacy_img_hdr *)img_addr)
+ 0x1000 - 1) & ~(0x1000 - 1);
#endif
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
return (fit_get_size(buf) + 0x1000 - 1) & ~(0x1000 - 1);
#endif
diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c
index a5866cf9f70..4992700d170 100644
--- a/arch/arm/mach-imx/i2c-mxv7.c
+++ b/arch/arm/mach-imx/i2c-mxv7.c
@@ -108,7 +108,7 @@ int setup_i2c(unsigned i2c_index, int speed, int slave_addr,
if (ret)
goto err_idle;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
bus_i2c_init(i2c_index, speed, slave_addr, force_idle_bus, p);
#endif
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 318bfc590b7..4f1b576b551 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -546,7 +546,7 @@ void enable_caches(void)
dcache_enable();
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
u64 get_page_table_size(void)
{
u64 one_pt = MAX_PTE_ENTRIES * sizeof(u64);
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 8050406613d..5cbc8997683 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -530,7 +530,7 @@ static int imx8m_check_clock(void *ctx, struct event *event)
struct udevice *dev;
int ret;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = uclass_get_device_by_name(UCLASS_CLK,
"clock-controller at 30380000",
&dev);
@@ -558,7 +558,7 @@ int arch_cpu_init(void)
{
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
icache_enable();
#endif
@@ -1397,7 +1397,7 @@ set_status:
#endif
#endif
-#if !CONFIG_IS_ENABLED(SYSRESET)
+#if !IS_ENABLED(CONFIG_SYSRESET)
void reset_cpu(void)
{
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index 47f531dc856..95a230ac537 100644
--- a/arch/arm/mach-imx/mx5/soc.c
+++ b/arch/arm/mach-imx/mx5/soc.c
@@ -64,7 +64,7 @@ u32 __weak get_board_rev(void)
}
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 550e392550e..8d61de5ec45 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -226,7 +226,7 @@ const struct rproc_att hostmap[] = {
};
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
/* enable all periherial can be accessed in nosec mode */
static void init_csu(void)
{
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 129efac6fa6..1cbfc1d7570 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -59,7 +59,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec)
return usec;
}
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
int timer_init(void)
{
struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index 96f292ea75c..16c5dda8e07 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -65,7 +65,7 @@ static void store_boot_info_from_rom(void)
sizeof(struct rom_extended_boot_data));
}
-#if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC)
+#if defined(CONFIG_K3_LOAD_SYSFW) && IS_ENABLED(CONFIG_DM_MMC)
void k3_mmc_stop_clock(void)
{
if (spl_boot_device() == BOOT_DEVICE_MMC1) {
@@ -118,7 +118,7 @@ void do_dt_magic(void)
}
#endif
-#if CONFIG_IS_ENABLED(USB_STORAGE)
+#if IS_ENABLED(CONFIG_USB_STORAGE)
static int fixup_usb_boot(const void *fdt_blob)
{
int ret = 0;
diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c
index 768fdd69602..cc645289ae3 100644
--- a/arch/arm/mach-k3/am654_init.c
+++ b/arch/arm/mach-k3/am654_init.c
@@ -81,7 +81,7 @@ static void store_boot_index_from_rom(void)
bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
}
-#if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC)
+#if defined(CONFIG_K3_LOAD_SYSFW) && IS_ENABLED(CONFIG_DM_MMC)
void k3_mmc_stop_clock(void)
{
if (spl_boot_device() == BOOT_DEVICE_MMC1) {
@@ -110,7 +110,7 @@ void k3_mmc_restart_clock(void)
void k3_mmc_stop_clock(void) {}
void k3_mmc_restart_clock(void) {}
#endif
-#if CONFIG_IS_ENABLED(DFU) || CONFIG_IS_ENABLED(USB_STORAGE)
+#if IS_ENABLED(CONFIG_DFU) || IS_ENABLED(CONFIG_USB_STORAGE)
#define CTRLMMR_SERDES0_CTRL 0x00104080
#define PCIE_LANE0 0x1
static int fixup_usb_boot(void)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index a2adb791f6c..069a771a871 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -37,7 +37,7 @@ enum {
IMAGE_AMT,
};
-#if CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS)
+#if IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS)
static const char *image_os_match[IMAGE_AMT] = {
"arm-trusted-firmware",
"tee",
@@ -264,7 +264,7 @@ start_arm64:
}
#endif
-#if CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS)
+#if IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS)
void board_fit_image_post_process(const void *fit, int node, void **p_image,
size_t *p_size)
{
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index cd50a2ae9f0..a21daf1fcca 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -297,7 +297,7 @@ static void k3_sysfw_configure_using_fit(void *fit,
ret);
}
-#if CONFIG_IS_ENABLED(DFU)
+#if IS_ENABLED(CONFIG_DFU)
static int k3_sysfw_dfu_download(void *addr)
{
char dfu_str[50];
@@ -318,7 +318,7 @@ exit:
}
#endif
-#if CONFIG_IS_ENABLED(SPI_LOAD)
+#if IS_ENABLED(CONFIG_SPI_LOAD)
static void *k3_sysfw_get_spi_addr(void)
{
struct udevice *dev;
@@ -346,7 +346,7 @@ static void k3_sysfw_spi_copy(u32 *dst, u32 *src, size_t len)
}
#endif
-#if CONFIG_IS_ENABLED(NOR_SUPPORT)
+#if IS_ENABLED(CONFIG_NOR_SUPPORT)
static void *get_sysfw_hf_addr(void)
{
struct udevice *dev;
@@ -372,7 +372,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
struct spl_image_info spl_image = { 0 };
struct spl_boot_device bootdev = { 0 };
struct ti_sci_handle *ti_sci;
-#if CONFIG_IS_ENABLED(SPI_LOAD)
+#if IS_ENABLED(CONFIG_SPI_LOAD)
void *sysfw_spi_base;
#endif
int ret = 0;
@@ -401,7 +401,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
/* Load combined System Controller firmware and config data image */
switch (bootdev.boot_device) {
-#if CONFIG_IS_ENABLED(MMC)
+#if IS_ENABLED(CONFIG_MMC)
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
case BOOT_DEVICE_MMC2_2:
@@ -423,7 +423,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
#endif
break;
#endif
-#if CONFIG_IS_ENABLED(SPI_LOAD)
+#if IS_ENABLED(CONFIG_SPI_LOAD)
case BOOT_DEVICE_SPI:
sysfw_spi_base = k3_sysfw_get_spi_addr();
if (!sysfw_spi_base)
@@ -432,7 +432,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);
break;
#endif
-#if CONFIG_IS_ENABLED(NOR_SUPPORT)
+#if IS_ENABLED(CONFIG_NOR_SUPPORT)
case BOOT_DEVICE_HYPERFLASH:
sysfw_spi_base = get_sysfw_hf_addr();
if (!sysfw_spi_base)
@@ -441,7 +441,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);
break;
#endif
-#if CONFIG_IS_ENABLED(YMODEM_SUPPORT)
+#if IS_ENABLED(CONFIG_YMODEM_SUPPORT)
case BOOT_DEVICE_UART:
#ifdef CONFIG_K3_EARLY_CONS
/*
@@ -459,12 +459,12 @@ void k3_sysfw_loader(bool rom_loaded_sysfw,
ret = spl_ymodem_load_image(&spl_image, &bootdev);
break;
#endif
-#if CONFIG_IS_ENABLED(DFU)
+#if IS_ENABLED(CONFIG_DFU)
case BOOT_DEVICE_DFU:
ret = k3_sysfw_dfu_download(sysfw_load_address);
break;
#endif
-#if CONFIG_IS_ENABLED(USB_STORAGE)
+#if IS_ENABLED(CONFIG_USB_STORAGE)
case BOOT_DEVICE_USB:
ret = spl_usb_load(&spl_image, &bootdev,
CONFIG_SYS_USB_FAT_BOOT_PARTITION,
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 1954e69e9f0..e5730844317 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -208,7 +208,7 @@ void reset_cpu(void)
void enable_caches(void)
{
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
/* Enable D-cache. I-cache is already enabled in start.S */
dcache_enable();
#endif
diff --git a/arch/arm/mach-lpc32xx/devices.c b/arch/arm/mach-lpc32xx/devices.c
index 6a67a3591aa..66b954ed00e 100644
--- a/arch/arm/mach-lpc32xx/devices.c
+++ b/arch/arm/mach-lpc32xx/devices.c
@@ -40,7 +40,7 @@ void lpc32xx_uart_init(unsigned int uart_id)
&clk->u3clk + (uart_id - 3));
}
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct ns16550_plat lpc32xx_uart[] = {
{ .base = UART3_BASE, .reg_shift = 2,
.clock = CFG_SYS_NS16550_CLK, .fcr = UART_FCR_DEFVAL, },
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index a52d04d85c8..c553758d3ae 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -57,7 +57,7 @@
#define AM43XX_RDWRLVLFULL_START 0x80000000
/* SPI flash. */
-#if CONFIG_IS_ENABLED(DM_SPI) && !CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_SPI) && !IS_ENABLED(CONFIG_OF_CONTROL)
#define AM33XX_SPI0_BASE 0x48030000
#define AM33XX_SPI0_OFFSET (AM33XX_SPI0_BASE + OMAP4_MCSPI_REG_OFFSET)
#endif
@@ -66,7 +66,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
sdram_init();
#endif
@@ -85,7 +85,7 @@ int dram_init_banksize(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct ns16550_plat am33xx_serial[] = {
{ .base = CFG_SYS_NS16550_COM1, .reg_shift = 2,
.clock = CFG_SYS_NS16550_CLK, .fcr = UART_FCR_DEFVAL, },
@@ -118,7 +118,7 @@ U_BOOT_DRVINFOS(am33xx_uarts) = {
# endif
};
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static const struct omap_i2c_plat am33xx_i2c[] = {
{ I2C_BASE1, 100000, OMAP_I2C_REV_V2},
{ I2C_BASE2, 100000, OMAP_I2C_REV_V2},
@@ -132,7 +132,7 @@ U_BOOT_DRVINFOS(am33xx_i2c) = {
};
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static const struct omap_gpio_plat am33xx_gpio[] = {
{ 0, AM33XX_GPIO0_BASE },
{ 1, AM33XX_GPIO1_BASE },
@@ -155,7 +155,7 @@ U_BOOT_DRVINFOS(am33xx_gpios) = {
#endif
};
#endif
-#if CONFIG_IS_ENABLED(DM_SPI) && !CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_SPI) && !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct omap3_spi_plat omap3_spi_pdata = {
.regs = (struct mcspi *)AM33XX_SPI0_OFFSET,
.pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT,
@@ -168,7 +168,7 @@ U_BOOT_DRVINFO(am33xx_spi) = {
#endif
#endif
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
static const struct gpio_bank gpio_bank_am33xx[] = {
{ (void *)AM33XX_GPIO0_BASE },
{ (void *)AM33XX_GPIO1_BASE },
@@ -282,7 +282,7 @@ int arch_misc_init(void)
#endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT))
@@ -530,7 +530,7 @@ void board_init_f(ulong dummy)
static int am33xx_dm_post_init(void *ctx, struct event *event)
{
hw_data_init();
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
early_system_init();
#endif
return 0;
diff --git a/arch/arm/mach-omap2/am33xx/chilisom.c b/arch/arm/mach-omap2/am33xx/chilisom.c
index 459bac13e05..a7c483e6adb 100644
--- a/arch/arm/mach-omap2/am33xx/chilisom.c
+++ b/arch/arm/mach-omap2/am33xx/chilisom.c
@@ -22,7 +22,7 @@
#include <power/tps65217.h>
#include <spl.h>
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
@@ -182,4 +182,4 @@ void sdram_init(void)
&ddr3_chilisom_emif_reg_data, 0);
}
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
diff --git a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
index c9b9502aef6..ae1ba9442bf 100644
--- a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
+++ b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
@@ -29,7 +29,7 @@ static int clk_synthesizer_reg_read(struct udevice *dev, int addr, u8 *buf)
/* Enable Bye read */
addr = addr | CLK_SYNTHESIZER_BYTE_MODE;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/* Send the command byte */
rc = i2c_write(CONFIG_CLK_SYNTHESIZER_I2C_ADDR, addr, 1, buf, 1);
if (rc)
@@ -72,7 +72,7 @@ static int clk_synthesizer_reg_write(struct udevice *dev, int addr, u8 val)
cmd[0] = addr | CLK_SYNTHESIZER_BYTE_MODE;
cmd[1] = val;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
rc = i2c_write(CONFIG_CLK_SYNTHESIZER_I2C_ADDR, addr, 1, cmd, 2);
#else
rc = dm_i2c_write(dev, addr, cmd, 2);
@@ -96,7 +96,7 @@ int setup_clock_synthesizer(struct clk_synth *data)
int rc;
u8 val = 0;
struct udevice *dev = NULL;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
rc = i2c_probe(CONFIG_CLK_SYNTHESIZER_I2C_ADDR);
if (rc) {
printf("i2c probe failed at address 0x%x\n",
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 401d12c6ca3..84751364b46 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -296,7 +296,7 @@ void spl_board_init(void)
#if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
gpmc_init();
#endif
-#if defined(CONFIG_SPL_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_SPL_I2C) && !IS_ENABLED(CONFIG_DM_I2C)
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
#endif
#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW)
diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
index 390d1f2a649..2bee7c29ab1 100644
--- a/arch/arm/mach-omap2/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
@@ -945,7 +945,7 @@ void prcm_init(void)
enable_basic_uboot_clocks();
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
void gpi2c_init(void)
{
static int gpi2c = 1;
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 8b70251457e..77dd1abee75 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -35,8 +35,8 @@ extern omap3_sysinfo sysinfo;
static void omap3_invalidate_l2_cache_secure(void);
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_GPIO)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
/* Manually initialize GPIO banks when OF_CONTROL doesn't */
static const struct omap_gpio_plat omap34xx_gpio[] = {
{ 0, OMAP34XX_GPIO1_BASE },
@@ -76,8 +76,8 @@ void early_system_init(void)
hw_data_init();
}
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
- !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
/******************************************************************************
* Routine: secure_unlock
diff --git a/arch/arm/mach-omap2/omap3/lowlevel_init.S b/arch/arm/mach-omap2/omap3/lowlevel_init.S
index ab7cdcf3d42..142ed59d49e 100644
--- a/arch/arm/mach-omap2/omap3/lowlevel_init.S
+++ b/arch/arm/mach-omap2/omap3/lowlevel_init.S
@@ -170,8 +170,8 @@ pll_div_val5:
go_to_speed_end:
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
- !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \
+ !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
ENTRY(lowlevel_init)
ldr sp, SRAM_STACK
str ip, [sp] /* stash ip register */
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index edab9a92982..f2a7ce77e4c 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -27,7 +27,7 @@
u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
static struct gpio_bank gpio_bank_54xx[8] = {
{ (void *)OMAP54XX_GPIO1_BASE },
{ (void *)OMAP54XX_GPIO2_BASE },
diff --git a/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S b/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
index 32de9d3d4fd..0ad3793f84a 100644
--- a/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
+++ b/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
@@ -16,7 +16,7 @@
.arch_extension sec
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
.global flush_dcache_range
#endif
@@ -79,7 +79,7 @@ ENTRY(omap_smc_sec_cpu1)
push {r4, r5, lr}
ldr r4, =omap_smc_sec_cpu1_args
stm r4, {r0,r1,r2,r3} @ Save args to memory
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
mov r0, r4
mov r1, #CONFIG_SYS_CACHELINE_SIZE
add r1, r0, r1 @ dcache is not enabled on CPU1, so
@@ -109,7 +109,7 @@ ENDPROC(omap_smc_sec_cpu1)
*/
.section .data
omap_smc_sec_cpu1_args:
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
.balign CONFIG_SYS_CACHELINE_SIZE
.rept CONFIG_SYS_CACHELINE_SIZE/4
.word 0
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 64560b21e3f..cc0e40d1be2 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -338,7 +338,7 @@ int secure_tee_install(u32 addr)
debug("tee_info.tee_arg0 = %08X\n", tee_info.tee_arg0);
debug("tee_file_size = %d\n", tee_file_size);
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
flush_dcache_range(
rounddown((u32)loadptr, ARCH_DMA_MINALIGN),
roundup((u32)loadptr + tee_file_size, ARCH_DMA_MINALIGN));
@@ -361,7 +361,7 @@ int secure_tee_install(u32 addr)
/* Reuse the tee_info buffer for SMC params */
smc_cpu1_params = (u32 *)&tee_info;
smc_cpu1_params[0] = 0;
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
flush_dcache_range((u32)smc_cpu1_params, (u32)smc_cpu1_params +
roundup(sizeof(u32), ARCH_DMA_MINALIGN));
#endif
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 246029ac294..34f683a9bb2 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -21,7 +21,7 @@ int arch_cpu_init(void)
/* R-Car Gen3 D-cache is enabled in memmap-gen3.c */
#ifndef CONFIG_RCAR_GEN3
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
dcache_enable();
diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index b36e559e871..30170dbb90b 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -25,7 +25,7 @@ static void _back_to_bootrom(enum rockchip_bootrom_cmd brom_cmd)
void back_to_bootrom(enum rockchip_bootrom_cmd brom_cmd)
{
-#if CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)
+#if IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT)
puts("Returning to boot ROM...\n");
#endif
_back_to_bootrom(brom_cmd);
@@ -100,7 +100,7 @@ int save_boot_params(void)
ret = 1;
break;
default:
-#if CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)
+#if IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT)
puts("FATAL: unexpected command to back_to_bootrom()\n");
#endif
hang();
diff --git a/arch/arm/mach-rockchip/px30/syscon_px30.c b/arch/arm/mach-rockchip/px30/syscon_px30.c
index 37e88f5ccb9..9ca80c3e088 100644
--- a/arch/arm/mach-rockchip/px30/syscon_px30.c
+++ b/arch/arm/mach-rockchip/px30/syscon_px30.c
@@ -22,7 +22,7 @@ U_BOOT_DRIVER(syscon_px30) = {
.of_match = px30_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int px30_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
index 0a072cf03a8..7a40ec6f72e 100644
--- a/arch/arm/mach-rockchip/rk3036/rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
@@ -44,7 +44,7 @@ void board_debug_uart_init(void)
}
#endif
-#if !CONFIG_IS_ENABLED(RAM)
+#if !IS_ENABLED(CONFIG_RAM)
/*
* When CONFIG_RAM is enabled, the dram_init() function is implemented
* in sdram.c.
diff --git a/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c b/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c
index a598f6400de..816222a0861 100644
--- a/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c
+++ b/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c
@@ -23,7 +23,7 @@ U_BOOT_DRIVER(syscon_rk3066) = {
.of_match = rk3066_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rk3066_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
index 917ff37c0fc..f1b8d541988 100644
--- a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
@@ -23,7 +23,7 @@ U_BOOT_DRIVER(syscon_rk3188) = {
.of_match = rk3188_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rk3188_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
index 9c1ae880c74..521e63e1036 100644
--- a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
@@ -24,7 +24,7 @@ U_BOOT_DRIVER(syscon_rk3288) = {
.of_match = rk3288_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rk3288_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
index dc2d831dd84..83e55b222a1 100644
--- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
@@ -29,7 +29,7 @@ U_BOOT_DRIVER(syscon_rk3368) = {
.of_match = rk3368_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rk3368_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
index 2b5746cb31b..c03992ab89b 100644
--- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
@@ -21,13 +21,13 @@ static const struct udevice_id rk3399_syscon_ids[] = {
U_BOOT_DRIVER(syscon_rk3399) = {
.name = "rk3399_syscon",
.id = UCLASS_SYSCON,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.of_match = rk3399_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rk3399_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c b/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c
index 5407e7827f5..872aa1e2e11 100644
--- a/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c
+++ b/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c
@@ -18,7 +18,7 @@ U_BOOT_DRIVER(syscon_rk3568) = {
.name = "rk3568_syscon",
.id = UCLASS_SYSCON,
.of_match = rk3568_syscon_ids,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
};
diff --git a/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c b/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c
index 599ea66e3d6..5b66945c9f7 100644
--- a/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c
+++ b/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c
@@ -22,7 +22,7 @@ U_BOOT_DRIVER(syscon_rv1126) = {
.of_match = rv1126_syscon_ids,
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int rv1126_syscon_bind_of_plat(struct udevice *dev)
{
dev->driver_data = dev->driver->of_match->data;
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 93b8e7de4d0..89a3fa95caf 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -10,7 +10,7 @@
#include <spl.h>
#include <asm/global_data.h>
-#if CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_OF_LIBFDT)
/**
* spl_node_to_boot_device() - maps from a DT-node to a SPL boot device
* @node: of_offset of the node
@@ -101,7 +101,7 @@ __weak const char *board_spl_was_booted_from(void)
void board_boot_order(u32 *spl_boot_list)
{
/* In case of no fdt (or only plat), use spl_boot_device() */
- if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (!IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_PLATDATA)) {
spl_boot_list[0] = spl_boot_device();
return;
}
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 30be6404252..56a5dc7b74a 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -60,7 +60,7 @@ u32 spl_boot_device(void)
defined(CONFIG_TARGET_CHROMEBOOK_KEVIN)
return BOOT_DEVICE_SPI;
#endif
- if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM))
+ if (IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM))
return BOOT_DEVICE_BOOTROM;
return boot_device;
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index fdd0c592b3e..0254add4e7e 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -18,7 +18,7 @@
#include <linux/bitops.h>
#include <linux/kconfig.h>
-#if CONFIG_IS_ENABLED(BANNER_PRINT)
+#if IS_ENABLED(CONFIG_BANNER_PRINT)
#include <timestamp.h>
#endif
diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c
index b390bdf8278..abb2cbd206d 100644
--- a/arch/arm/mach-s5pc1xx/cache.c
+++ b/arch/arm/mach-s5pc1xx/cache.c
@@ -11,7 +11,7 @@
#include <cpu_func.h>
#include <asm/cache.h>
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
dcache_enable();
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index b09b898051b..4d5f5461f8c 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -58,10 +58,10 @@ int dram_init(void)
void enable_caches(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
icache_enable();
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
dcache_enable();
#endif
}
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index ee5a9dc1e2f..577031e6ad8 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -71,7 +71,7 @@ void board_init_f(ulong dummy)
hang();
}
-#if CONFIG_IS_ENABLED(ALTERA_SDRAM)
+#if IS_ENABLED(CONFIG_ALTERA_SDRAM)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
debug("DRAM init failed: %d\n", ret);
diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index d056871d292..f0352db854a 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -78,7 +78,7 @@ void board_init_f(ulong dummy)
hang();
}
-#if CONFIG_IS_ENABLED(ALTERA_SDRAM)
+#if IS_ENABLED(CONFIG_ALTERA_SDRAM)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
printf("DRAM init failed: %d\n", ret);
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index c20e87cdbef..00fe32e77ef 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -76,7 +76,7 @@ void board_init_f(ulong dummy)
clrbits_le32(CCU_REG_ADDR(CCU_IOM_MPRT_ADMASK_MEM_RAM0),
CCU_ADMASK_P_MASK | CCU_ADMASK_NS_MASK);
-#if CONFIG_IS_ENABLED(ALTERA_SDRAM)
+#if IS_ENABLED(CONFIG_ALTERA_SDRAM)
struct udevice *dev;
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index baa156acf9e..b7558e911fa 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1358,7 +1358,7 @@ static int dfu_init_entities(struct stm32prog_data *data)
alt_nb++; /* OTP*/
}
- if (CONFIG_IS_ENABLED(DM_PMIC))
+ if (IS_ENABLED(CONFIG_DM_PMIC))
alt_nb++; /* PMIC NVMEM*/
if (data->part_nb == 0)
@@ -1412,7 +1412,7 @@ static int dfu_init_entities(struct stm32prog_data *data)
if (!ret && IS_ENABLED(CONFIG_CMD_STM32PROG_OTP) && otp_size)
ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, otp_size);
- if (!ret && CONFIG_IS_ENABLED(DM_PMIC))
+ if (!ret && IS_ENABLED(CONFIG_DM_PMIC))
ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, PMIC_SIZE);
if (ret)
@@ -1483,7 +1483,7 @@ int stm32prog_otp_read(struct stm32prog_data *data, u32 offset, u8 *buffer,
/* call the service */
result = -EOPNOTSUPP;
- if (data->tee && CONFIG_IS_ENABLED(OPTEE))
+ if (data->tee && IS_ENABLED(CONFIG_OPTEE))
result = optee_ta_invoke(data, TA_NVMEM_READ, NVMEM_OTP,
data->otp_part, OTP_SIZE_TA);
else if (IS_ENABLED(CONFIG_ARM_SMCCC))
@@ -1525,7 +1525,7 @@ int stm32prog_otp_start(struct stm32prog_data *data)
}
result = -EOPNOTSUPP;
- if (data->tee && CONFIG_IS_ENABLED(OPTEE)) {
+ if (data->tee && IS_ENABLED(CONFIG_OPTEE)) {
result = optee_ta_invoke(data, TA_NVMEM_WRITE, NVMEM_OTP,
data->otp_part, OTP_SIZE_TA);
} else if (IS_ENABLED(CONFIG_ARM_SMCCC)) {
@@ -1735,7 +1735,7 @@ static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset)
}
}
- if (CONFIG_IS_ENABLED(MMC) &&
+ if (IS_ENABLED(CONFIG_MMC) &&
data->cur_part->part_id < 0) {
char cmdbuf[60];
@@ -1977,7 +1977,7 @@ void stm32prog_clean(struct stm32prog_data *data)
free(data->otp_part);
free(data->buffer);
- if (CONFIG_IS_ENABLED(OPTEE) && data->tee) {
+ if (IS_ENABLED(CONFIG_OPTEE) && data->tee) {
tee_close_session(data->tee, data->tee_session);
data->tee = NULL;
data->tee_session = 0x0;
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index dc4112d5e6c..c293526a392 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -87,10 +87,10 @@ static void early_enable_caches(void)
{
/* I-cache is already enabled in start.S: cpu_init_cp15 */
- if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+ if (IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
return;
- if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
+ if (!(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))) {
gd->arch.tlb_size = PGTABLE_SIZE;
gd->arch.tlb_addr = (unsigned long)&early_tlb;
}
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c
index c21c5c42fe1..70ac26442be 100644
--- a/arch/arm/mach-stm32mp/fdt.c
+++ b/arch/arm/mach-stm32mp/fdt.c
@@ -481,7 +481,7 @@ int ft_system_setup(void *blob, struct bd_info *bd)
if (soc < 0)
return soc;
- if (CONFIG_IS_ENABLED(STM32_ETZPC)) {
+ if (IS_ENABLED(CONFIG_STM32_ETZPC)) {
ret = stm32_fdt_fixup_etzpc(blob, soc);
if (ret)
return ret;
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index 19d9fe04e08..030011e8de8 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -235,7 +235,7 @@ void board_init_f(ulong dummy)
* activate cache on DDR only when DDR is fully initialized
* to avoid speculative access and issue in get_ram_size()
*/
- if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+ if (!IS_ENABLED(CONFIG_SYS_DCACHE_OFF))
mmu_set_region_dcache_behaviour(STM32_DDR_BASE,
CONFIG_DDR_CACHEABLE_SIZE,
DCACHE_DEFAULT_OPTION);
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 1f31aac607c..eac0a27b952 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -456,7 +456,7 @@ void board_init_f(ulong dummy)
spl_init();
preloader_console_init();
-#if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_I2C) && IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
/* Needed early by sunxi_board_init if PMU is enabled */
i2c_init_board();
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -465,7 +465,7 @@ void board_init_f(ulong dummy)
}
#endif /* CONFIG_SPL_BUILD */
-#if !CONFIG_IS_ENABLED(SYSRESET)
+#if !IS_ENABLED(CONFIG_SYSRESET)
void reset_cpu(void)
{
#if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40)
@@ -498,7 +498,7 @@ void reset_cpu(void)
}
#endif /* CONFIG_SYSRESET */
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index c0908406370..b08091c9e60 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -25,7 +25,7 @@
#define AXP221_CHIP_ADDR 0x68
-#if CONFIG_IS_ENABLED(PMIC_AXP)
+#if IS_ENABLED(CONFIG_PMIC_AXP)
static struct udevice *pmic;
#else
static int pmic_i2c_address(void)
@@ -49,7 +49,7 @@ int pmic_bus_init(void)
if (!needs_init)
return 0;
-#if CONFIG_IS_ENABLED(PMIC_AXP)
+#if IS_ENABLED(CONFIG_PMIC_AXP)
ret = uclass_get_device_by_driver(UCLASS_PMIC, DM_DRIVER_GET(axp_pmic),
&pmic);
#else
@@ -75,7 +75,7 @@ int pmic_bus_init(void)
int pmic_bus_read(u8 reg, u8 *data)
{
-#if CONFIG_IS_ENABLED(PMIC_AXP)
+#if IS_ENABLED(CONFIG_PMIC_AXP)
return pmic_read(pmic, reg, data, 1);
#else
if (IS_ENABLED(CONFIG_SYS_I2C_SUN6I_P2WI))
@@ -89,7 +89,7 @@ int pmic_bus_read(u8 reg, u8 *data)
int pmic_bus_write(u8 reg, u8 data)
{
-#if CONFIG_IS_ENABLED(PMIC_AXP)
+#if IS_ENABLED(CONFIG_PMIC_AXP)
return pmic_write(pmic, reg, &data, 1);
#else
if (IS_ENABLED(CONFIG_SYS_I2C_SUN6I_P2WI))
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index f8b61a2b3e3..c4c155e1dfe 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -257,7 +257,7 @@ void board_init_uart_f(void)
#endif
}
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static struct ns16550_plat ns16550_com1_pdata = {
.base = CFG_SYS_NS16550_COM1,
.reg_shift = 2,
@@ -270,7 +270,7 @@ U_BOOT_DRVINFO(ns16550_com1) = {
};
#endif
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && !defined(CONFIG_ARM64)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 77c8ad978e5..238b149c65f 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -657,7 +657,7 @@ void clock_ll_start_uart(enum periph_id periph_id)
reset_set_enable(periph_id, 0);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int clock_decode_periph_id(struct udevice *dev)
{
enum periph_id id;
@@ -671,7 +671,7 @@ int clock_decode_periph_id(struct udevice *dev)
assert(clock_periph_id_isvalid(id));
return id;
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
int clock_verify(void)
{
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index 703a2314e70..cbffc1e308f 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -616,7 +616,7 @@ void reset_set_enable(enum periph_id periph_id, int enable)
writel(reg, reset);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/*
* Convert a device tree clock ID to our peripheral ID. They are mostly
* the same but we are very cautious so we check that a valid clock ID is
@@ -652,7 +652,7 @@ enum periph_id clk_id_to_periph_id(int clk_id)
return clk_id;
}
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
void clock_early_init(void)
{
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index bbfe1846526..e6dda2a1526 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -766,7 +766,7 @@ void reset_set_enable(enum periph_id periph_id, int enable)
writel(reg, reset);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/*
* Convert a device tree clock ID to our peripheral ID. They are mostly
* the same but we are very cautious so we check that a valid clock ID is
@@ -832,7 +832,7 @@ enum periph_id clk_id_to_periph_id(int clk_id)
return clk_id;
}
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
void clock_early_init(void)
{
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index 3b50a811942..5e244759f10 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -541,7 +541,7 @@ void reset_set_enable(enum periph_id periph_id, int enable)
writel(reg, reset);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/*
* Convert a device tree clock ID to our peripheral ID. They are mostly
* the same but we are very cautious so we check that a valid clock ID is
@@ -576,7 +576,7 @@ enum periph_id clk_id_to_periph_id(int clk_id)
return clk_id;
}
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
void clock_early_init(void)
{
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index c835cd0d47b..14e83a8c79e 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -596,7 +596,7 @@ void reset_set_enable(enum periph_id periph_id, int enable)
writel(reg, reset);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/*
* Convert a device tree clock ID to our peripheral ID. They are mostly
* the same but we are very cautious so we check that a valid clock ID is
@@ -634,7 +634,7 @@ enum periph_id clk_id_to_periph_id(int clk_id)
return clk_id;
}
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
void clock_early_init(void)
{
diff --git a/arch/arm/mach-u8500/cache.c b/arch/arm/mach-u8500/cache.c
index 05a91346a89..91ed974ad0d 100644
--- a/arch/arm/mach-u8500/cache.c
+++ b/arch/arm/mach-u8500/cache.c
@@ -11,7 +11,7 @@
#define PL310_WAY_MASK 0xff
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index 3b6518c71c9..f6e09aa9fb6 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -17,7 +17,7 @@
#define ZYNQ_SILICON_VER_MASK 0xF0000000
#define ZYNQ_SILICON_VER_SHIFT 28
-#if CONFIG_IS_ENABLED(FPGA)
+#if IS_ENABLED(CONFIG_FPGA)
xilinx_desc fpga = {
.family = xilinx_zynq,
.iface = devcfg,
@@ -86,7 +86,7 @@ void reset_cpu(void)
;
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
@@ -111,7 +111,7 @@ static int __maybe_unused cpu_desc_id(void)
#if defined(CONFIG_ARCH_EARLY_INIT_R)
int arch_early_init_r(void)
{
-#if CONFIG_IS_ENABLED(FPGA)
+#if IS_ENABLED(CONFIG_FPGA)
int cpu_id = cpu_desc_id();
if (cpu_id < 0)
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index 829e6c7ae60..6ed87878304 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
static void __invalidate_icache(ulong addr, ulong size)
{
- if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WIC)) {
+ if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USE_WIC)) {
for (int i = 0; i < size;
i += gd_cpuinfo()->icache_line_length) {
asm volatile (
@@ -36,7 +36,7 @@ void invalidate_icache_all(void)
static void __flush_dcache(ulong addr, ulong size)
{
- if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) {
+ if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USE_WDC)) {
for (int i = 0; i < size;
i += gd_cpuinfo()->dcache_line_length) {
asm volatile (
diff --git a/arch/microblaze/cpu/exception.c b/arch/microblaze/cpu/exception.c
index 9414776afa7..ff642ea1eb0 100644
--- a/arch/microblaze/cpu/exception.c
+++ b/arch/microblaze/cpu/exception.c
@@ -21,7 +21,7 @@ void _hw_exception_handler (void)
printf("Hardware exception at 0x%x address\n", address);
R17(address);
- if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP) &&
+ if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP) &&
(state & 0x1000)) {
/*
* For exceptions in delay slots, the return address is stored
@@ -64,7 +64,7 @@ void _hw_exception_handler (void)
hang();
}
-#if CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USR_EXCEP)
+#if IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USR_EXCEP)
void _exception_handler (void)
{
puts("User vector_exception\n");
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index a620e0b207c..fc71e7731f6 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -201,7 +201,7 @@ __setup_exceptions:
rsubi r8, r10, 0x6
sh r6, r4, r8
-#if CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USR_EXCEP)
+#if IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USR_EXCEP)
/* user_vector_exception */
swi r2, r4, 0x8 /* user vector exception - imm opcode */
swi r3, r4, 0xC /* user vector exception - brai opcode */
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 930384f4015..3157d423a0f 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -73,7 +73,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
static void boot_prep_linux(struct bootm_headers *images)
{
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
debug("using: FDT\n");
if (image_setup_linux(images)) {
printf("FDT creation failed! hanging...");
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c
index b304026a67c..59b52cc5590 100644
--- a/arch/mips/cpu/cpu.c
+++ b/arch/mips/cpu/cpu.c
@@ -12,7 +12,7 @@
#include <asm/mipsregs.h>
#include <asm/reboot.h>
-#if !CONFIG_IS_ENABLED(SYSRESET)
+#if !IS_ENABLED(CONFIG_SYSRESET)
void __weak _machine_restart(void)
{
fprintf(stderr, "*** reset failed ***\n");
diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index 2acc21d5871..c89118c24e3 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -47,7 +47,7 @@
and sp, sp, t0 # force 16 byte alignment
move k0, sp # save gd pointer
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
- !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
li t2, CONFIG_VAL(SYS_MALLOC_F_LEN)
PTR_SUBU \
sp, sp, t2 # reserve space for early malloc
@@ -64,7 +64,7 @@
nop
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
- !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset
#endif
.endm
@@ -229,7 +229,7 @@ wr_done:
# endif
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
# ifdef CONFIG_SYS_MIPS_CACHE_INIT_RAM_LOAD
/* Initialize any external memory */
PTR_LA t9, lowlevel_init
@@ -250,7 +250,7 @@ wr_done:
nop
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
# ifndef CONFIG_SYS_MIPS_CACHE_INIT_RAM_LOAD
/* Initialize any external memory */
PTR_LA t9, lowlevel_init
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index ab92bd06b0e..dab2aaa55f5 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -149,7 +149,7 @@ static void linux_env_set(const char *env_name, const char *env_val)
strcpy(linux_env_p, env_name);
linux_env_p += strlen(env_name);
- if (CONFIG_IS_ENABLED(MALTA)) {
+ if (IS_ENABLED(CONFIG_MALTA)) {
linux_env_p++;
linux_env[++linux_env_idx] = linux_env_p;
} else {
@@ -170,7 +170,7 @@ static void linux_env_legacy(struct bootm_headers *images)
const char *cp;
ulong rd_start, rd_size;
- if (CONFIG_IS_ENABLED(MEMSIZE_IN_BYTES)) {
+ if (IS_ENABLED(CONFIG_MEMSIZE_IN_BYTES)) {
sprintf(env_buf, "%lu", (ulong)gd->ram_size);
debug("## Giving linux memsize in bytes, %lu\n",
(ulong)gd->ram_size);
@@ -207,7 +207,7 @@ static void linux_env_legacy(struct bootm_headers *images)
if (cp)
linux_env_set("eth1addr", cp);
- if (CONFIG_IS_ENABLED(MALTA)) {
+ if (IS_ENABLED(CONFIG_MALTA)) {
sprintf(env_buf, "%un8r", gd->baudrate);
linux_env_set("modetty0", env_buf);
}
@@ -224,7 +224,7 @@ static int boot_reloc_fdt(struct bootm_headers *images)
return 0;
}
-#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && IS_ENABLED(CONFIG_OF_LIBFDT)
boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr);
return boot_relocate_fdt(&images->lmb, &images->ft_addr,
&images->ft_len);
@@ -233,7 +233,7 @@ static int boot_reloc_fdt(struct bootm_headers *images)
#endif
}
-#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && IS_ENABLED(CONFIG_OF_LIBFDT)
int arch_fixup_fdt(void *blob)
{
u64 mem_start = virt_to_phys((void *)gd->ram_base);
@@ -253,20 +253,20 @@ static int boot_setup_fdt(struct bootm_headers *images)
static void boot_prep_linux(struct bootm_headers *images)
{
- if (CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && images->ft_len) {
boot_reloc_fdt(images);
boot_setup_fdt(images);
} else {
- if (CONFIG_IS_ENABLED(MIPS_BOOT_CMDLINE_LEGACY)) {
+ if (IS_ENABLED(CONFIG_MIPS_BOOT_CMDLINE_LEGACY)) {
linux_cmdline_legacy(images);
- if (!CONFIG_IS_ENABLED(MIPS_BOOT_ENV_LEGACY))
+ if (!IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY))
linux_cmdline_append(images);
linux_cmdline_dump();
}
- if (CONFIG_IS_ENABLED(MIPS_BOOT_ENV_LEGACY))
+ if (IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY))
linux_env_legacy(images);
}
}
@@ -281,7 +281,7 @@ static void boot_jump_linux(struct bootm_headers *images)
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
- if (CONFIG_IS_ENABLED(MALTA))
+ if (IS_ENABLED(CONFIG_MALTA))
linux_extra = gd->ram_size;
#if IS_ENABLED(CONFIG_BOOTSTAGE_FDT)
@@ -291,7 +291,7 @@ static void boot_jump_linux(struct bootm_headers *images)
bootstage_report();
#endif
- if (CONFIG_IS_ENABLED(RESTORE_EXCEPTION_VECTOR_BASE))
+ if (IS_ENABLED(CONFIG_RESTORE_EXCEPTION_VECTOR_BASE))
trap_restore();
if (images->ft_len)
diff --git a/arch/mips/mach-mtmips/mt7621/spl/start.S b/arch/mips/mach-mtmips/mt7621/spl/start.S
index d2f9c031cba..3bd6a989115 100644
--- a/arch/mips/mach-mtmips/mt7621/spl/start.S
+++ b/arch/mips/mach-mtmips/mt7621/spl/start.S
@@ -38,7 +38,7 @@
and sp, sp, t0 # force 16 byte alignment
move k0, sp # save gd pointer
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
- !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
li t2, CONFIG_VAL(SYS_MALLOC_F_LEN)
PTR_SUBU \
sp, sp, t2 # reserve space for early malloc
@@ -55,7 +55,7 @@
nop
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
- !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset
#endif
.endm
@@ -199,7 +199,7 @@ ENTRY(_start)
/* Set up initial stack and global data */
setup_stack_gd
-#if CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+#if IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
/* Set malloc base */
li t0, (CFG_SYS_INIT_SP_ADDR + 15) & (~15)
PTR_S t0, GD_MALLOC_BASE(k0) # gd->malloc_base offset
diff --git a/arch/mips/mach-mtmips/mt7628/lowlevel_init.S b/arch/mips/mach-mtmips/mt7628/lowlevel_init.S
index cb369fbc275..b620e14f714 100644
--- a/arch/mips/mach-mtmips/mt7628/lowlevel_init.S
+++ b/arch/mips/mach-mtmips/mt7628/lowlevel_init.S
@@ -23,7 +23,7 @@
.set noreorder
LEAF(mips_sram_init)
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
/* Setup CPU PLL */
li t0, DELAY_USEC(1000000)
li t1, KSEG1ADDR(SYSCTL_BASE + SYSCTL_ROM_STATUS_REG)
@@ -111,7 +111,7 @@ _cpu_pll_done:
sub a1, CONFIG_SYS_DCACHE_LINE_SIZE
bnez a1, 3b
nop
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
jr ra
nop
@@ -127,7 +127,7 @@ NESTED(lowlevel_init, 0, ra)
move ra, s0
-#if CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
+#if IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
/* Set malloc base */
li t0, (SYS_INIT_SP_ADDR + 15) & (~15)
PTR_S t0, GD_MALLOC_BASE(k0) # gd->malloc_base offset
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index 032871313d1..361b975c661 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -40,7 +40,7 @@
#endif
#if defined(CONFIG_NAND_SPL) || \
- (defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL))
+ (defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_INIT_MINIMAL))
#define MINIMAL_SPL
#endif
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 4b6c8485ba9..1c4e673c820 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -178,7 +178,7 @@ void cpu_init_early_f(void *fdt)
invalidate_tlb(1);
#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && \
- !(CONFIG_IS_ENABLED(INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \
+ !(IS_ENABLED(CONFIG_INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \
!defined(CONFIG_NAND_SPL)
disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB);
#endif
diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S
index 21ad14aef35..62afacd1ccf 100644
--- a/arch/powerpc/cpu/mpc85xx/start.S
+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -28,7 +28,7 @@
#define LAW_EN 0x80000000
#if defined(CONFIG_NAND_SPL) || \
- (defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL))
+ (defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_INIT_MINIMAL))
#define MINIMAL_SPL
#endif
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 2a78f0fe502..a897609c5c6 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -45,7 +45,7 @@ __weak void init_tlbs(void)
}
#if !defined(CONFIG_NAND_SPL) && \
- (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
+ (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL))
void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
phys_addr_t *rpn)
{
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
index d918b4395bf..a86a289edb4 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
@@ -23,7 +23,7 @@ SECTIONS
. = IMAGE_TEXT_BASE;
.text : {
/* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
-#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
+#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC)
KEEP(*(.bootpg))
#endif
*(.text*)
@@ -63,7 +63,7 @@ SECTIONS
__init_end = .;
_end = .;
-#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
+#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC)
#if defined(CONFIG_SDCARD) && !defined(CFG_SYS_MMC_U_BOOT_OFFS)
mmc_u_boot_offs = .;
#endif
@@ -81,7 +81,7 @@ SECTIONS
#endif
/* For nor and nand is needed the SPL with section .resetvec */
-#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
+#if !IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC)
#if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
#ifndef BOOT_PAGE_OFFSET
#define BOOT_PAGE_OFFSET 0x1000
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds
index 3af0dfdf336..5d467ffaed5 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds
@@ -27,7 +27,7 @@ SECTIONS
/* Read-only sections, merged into text segment: */
.text :
{
-#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
+#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC)
KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
#endif
*(.text*)
@@ -82,7 +82,7 @@ SECTIONS
__init_end = .;
_end = .;
-#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
+#if !IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC)
.bootpg RESET_VECTOR_ADDRESS - 0xffc :
{
arch/powerpc/cpu/mpc85xx/start.o (.bootpg)
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index b0183edb064..16765c6d612 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -80,7 +80,7 @@ void disable_law(u8 idx)
}
#if !defined(CONFIG_NAND_SPL) && \
- (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
+ (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL))
static int get_law_entry(u8 i, struct law_entry *e)
{
u32 lawar;
@@ -111,7 +111,7 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
}
#if !defined(CONFIG_NAND_SPL) && \
- (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
+ (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL))
int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
{
u32 idx;
diff --git a/arch/powerpc/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h
index 1b1766180a7..545c6961d0f 100644
--- a/arch/powerpc/include/asm/fsl_i2c.h
+++ b/arch/powerpc/include/asm/fsl_i2c.h
@@ -68,7 +68,7 @@ typedef struct fsl_i2c_base {
u8 res6[0xE8];
} fsl_i2c_t;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct fsl_i2c_dev {
struct fsl_i2c_base __iomem *base; /* register base */
u32 i2c_clk;
diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 35f23c748d1..b0f56ecae8a 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -13,7 +13,7 @@
#include <asm/csr.h>
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
/* mcctlcommand */
#define CCTL_REG_MCCTLCOMMAND_NUM 0x7cc
@@ -46,9 +46,9 @@ static void _cache_disable(void)
void flush_dcache_all(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL);
#endif
#endif
@@ -67,9 +67,9 @@ void invalidate_dcache_range(unsigned long start, unsigned long end)
void icache_enable(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
asm volatile (
"csrr t1, mcache_ctl\n\t"
"ori t0, t1, 0x1\n\t"
@@ -82,9 +82,9 @@ void icache_enable(void)
void icache_disable(void)
{
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
asm volatile (
"fence.i\n\t"
"csrr t1, mcache_ctl\n\t"
@@ -98,9 +98,9 @@ void icache_disable(void)
void dcache_enable(void)
{
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
asm volatile (
"csrr t1, mcache_ctl\n\t"
"ori t0, t1, 0x2\n\t"
@@ -116,9 +116,9 @@ void dcache_enable(void)
void dcache_disable(void)
{
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL);
asm volatile (
"csrr t1, mcache_ctl\n\t"
@@ -138,7 +138,7 @@ int icache_status(void)
int ret = 0;
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
asm volatile (
"csrr t1, mcache_ctl\n\t"
"andi %0, t1, 0x01\n\t"
@@ -157,7 +157,7 @@ int dcache_status(void)
int ret = 0;
#ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
asm volatile (
"csrr t1, mcache_ctl\n\t"
"andi %0, t1, 0x02\n\t"
diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c
index c4c2de2ef05..1a703679054 100644
--- a/arch/riscv/cpu/ax25/cpu.c
+++ b/arch/riscv/cpu/ax25/cpu.c
@@ -46,7 +46,7 @@ int cleanup_before_linux(void)
void harts_early_init(void)
{
- if (CONFIG_IS_ENABLED(RISCV_MMODE)) {
+ if (IS_ENABLED(CONFIG_RISCV_MMODE)) {
unsigned long long mcache_ctl_val = csr_read(CSR_MCACHE_CTL);
if (!(mcache_ctl_val & V5_MCACHE_CTL_DC_COHEN_EN))
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index d34c8efce09..f6f20085bb4 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -19,7 +19,7 @@
* The variables here must be stored in the data section since they are used
* before the bss section is available.
*/
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
u32 hart_lottery __section(".data") = 0;
#ifdef CONFIG_AVAILABLE_HARTS
@@ -58,13 +58,13 @@ static inline bool supports_extension(char ext)
return false;
#else /* !CONFIG_CPU */
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
return csr_read(CSR_MISA) & (1 << (ext - 'a'));
-#else /* !CONFIG_IS_ENABLED(RISCV_MMODE) */
+#else /* !IS_ENABLED(CONFIG_RISCV_MMODE) */
#warning "There is no way to determine the available extensions in S-mode."
#warning "Please convert your board to use the RISC-V CPU driver."
return false;
-#endif /* CONFIG_IS_ENABLED(RISCV_MMODE) */
+#endif /* IS_ENABLED(CONFIG_RISCV_MMODE) */
#endif /* CONFIG_CPU */
}
@@ -87,7 +87,7 @@ static int riscv_cpu_probe(void)
* there's nothing to do, since we just need to clear any existing IPIs, and
* that is handled by the sending of an ipi itself.
*/
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1)
{
}
@@ -107,7 +107,7 @@ int riscv_cpu_setup(void *ctx, struct event *event)
csr_write(CSR_FCSR, 0);
}
- if (CONFIG_IS_ENABLED(RISCV_MMODE)) {
+ if (IS_ENABLED(CONFIG_RISCV_MMODE)) {
/*
* Enable perf counters for cycle, time,
* and instret counters only
@@ -128,7 +128,7 @@ int riscv_cpu_setup(void *ctx, struct event *event)
#endif
}
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
ret = riscv_init_ipi();
if (ret)
return ret;
diff --git a/arch/riscv/cpu/fu740/spl.c b/arch/riscv/cpu/fu740/spl.c
index c6816e9ed4c..e7e6dab62e1 100644
--- a/arch/riscv/cpu/fu740/spl.c
+++ b/arch/riscv/cpu/fu740/spl.c
@@ -33,6 +33,6 @@ void harts_early_init(void)
* Clear feature disable CSR to '0' to turn on all features for
* each core. This operation must be in M-mode.
*/
- if (CONFIG_IS_ENABLED(RISCV_MMODE))
+ if (IS_ENABLED(CONFIG_RISCV_MMODE))
csr_write(CSR_U74_FEATURE_DISABLE, 0);
}
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index 4687bca3c99..67a843b4119 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -40,7 +40,7 @@ secondary_harts_relocation_error:
.section .text
.globl _start
_start:
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
csrr a0, CSR_MHARTID
#endif
@@ -72,14 +72,14 @@ _start:
*/
csrw MODE_PREFIX(ie), zero
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* check if hart is within range */
/* tp: hart id */
li t0, CONFIG_NR_CPUS
bge tp, t0, hart_out_of_bounds_loop
/* set xSIE bit to receive IPIs */
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
li t0, MIE_MSIE
#else
li t0, SIE_SSIE
@@ -110,7 +110,7 @@ call_board_init_f_0:
mv s0, a0
/* setup stack */
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* tp: hart id */
slli t0, tp, CONFIG_STACK_SIZE_SHIFT
sub sp, a0, t0
@@ -122,7 +122,7 @@ call_board_init_f_0:
call_harts_early_init:
jal harts_early_init
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
/*
* Pick hart to initialize global data and run U-Boot. The other harts
* wait for initialization to complete.
@@ -140,7 +140,7 @@ call_harts_early_init:
* accesses gd).
*/
mv gp, s0
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
bnez tp, secondary_hart_loop
#endif
#endif
@@ -152,7 +152,7 @@ call_harts_early_init:
/* save the boot hart id to global_data */
SREG tp, GD_BOOT_HART(gp)
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
#ifdef CONFIG_AVAILABLE_HARTS
la t0, available_harts_lock
amoswap.w.rl zero, zero, 0(t0)
@@ -219,7 +219,7 @@ spl_stack_gd_setup:
mv s0, a0
/* setup stack on main hart */
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* tp: hart id */
slli t0, tp, CONFIG_STACK_SIZE_SHIFT
sub sp, s0, t0
@@ -227,7 +227,7 @@ spl_stack_gd_setup:
mv sp, s0
#endif
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* set new stack and global data pointer on secondary harts */
spl_secondary_hart_stack_gd_setup:
la a0, secondary_hart_relocate
@@ -270,7 +270,7 @@ relocate_code:
*Set up the stack
*/
stack_setup:
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* tp: hart id */
slli t0, tp, CONFIG_STACK_SIZE_SHIFT
sub sp, s2, t0
@@ -365,7 +365,7 @@ clbss_l:
blt t0, t1, clbss_l
relocate_secondary_harts:
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
/* send relocation IPI */
la t0, secondary_hart_relocate
add a0, t0, t6
@@ -409,7 +409,7 @@ call_board_init_r:
*/
jr t4 /* jump to board_init_r() */
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
hart_out_of_bounds_loop:
/* Harts in this loop are out of bounds, increase CONFIG_NR_CPUS. */
wfi
@@ -436,9 +436,9 @@ secondary_hart_relocate:
secondary_hart_loop:
wfi
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
csrr t0, MODE_PREFIX(ip)
-#if CONFIG_IS_ENABLED(RISCV_MMODE)
+#if IS_ENABLED(CONFIG_RISCV_MMODE)
andi t0, t0, MIE_MSIE
#else
andi t0, t0, SIE_SSIE
diff --git a/arch/riscv/include/asm/encoding.h b/arch/riscv/include/asm/encoding.h
index 56c5da86e86..b48b6d9c263 100644
--- a/arch/riscv/include/asm/encoding.h
+++ b/arch/riscv/include/asm/encoding.h
@@ -12,7 +12,7 @@
#include <linux/bitops.h>
#endif
-#if CONFIG_IS_ENABLED(RISCV_SMODE)
+#if IS_ENABLED(CONFIG_RISCV_SMODE)
#define MODE_PREFIX(__suffix) s##__suffix
#else
#define MODE_PREFIX(__suffix) m##__suffix
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
index 6fdc86dd8b1..803a24b0705 100644
--- a/arch/riscv/include/asm/global_data.h
+++ b/arch/riscv/include/asm/global_data.h
@@ -18,16 +18,16 @@
struct arch_global_data {
long boot_hart; /* boot hart id */
phys_addr_t firmware_fdt_addr;
-#if CONFIG_IS_ENABLED(SIFIVE_CLINT)
+#if IS_ENABLED(CONFIG_SIFIVE_CLINT)
void __iomem *clint; /* clint base address */
#endif
#ifdef CONFIG_ANDES_PLICSW
void __iomem *plicsw; /* plic base address */
#endif
-#if CONFIG_IS_ENABLED(SMP)
+#if IS_ENABLED(CONFIG_SMP)
struct ipi_data ipi[CONFIG_NR_CPUS];
#endif
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
#ifdef CONFIG_AVAILABLE_HARTS
ulong available_harts;
#endif
diff --git a/arch/riscv/include/asm/string.h b/arch/riscv/include/asm/string.h
index 7dee3e4c9f6..b49c37655d1 100644
--- a/arch/riscv/include/asm/string.h
+++ b/arch/riscv/include/asm/string.h
@@ -23,19 +23,19 @@
#undef __HAVE_ARCH_MEMZERO
#undef __HAVE_ARCH_MEMCPY
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMCPY)
#define __HAVE_ARCH_MEMCPY
#endif
extern void *memcpy(void *, const void *, __kernel_size_t);
#undef __HAVE_ARCH_MEMMOVE
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMMOVE)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMMOVE)
#define __HAVE_ARCH_MEMMOVE
#endif
extern void *memmove(void *, const void *, __kernel_size_t);
#undef __HAVE_ARCH_MEMZERO
-#if CONFIG_IS_ENABLED(USE_ARCH_MEMSET)
+#if IS_ENABLED(CONFIG_USE_ARCH_MEMSET)
#define __HAVE_ARCH_MEMSET
#endif
extern void *memset(void *, int, __kernel_size_t);
diff --git a/arch/riscv/lib/asm-offsets.c b/arch/riscv/lib/asm-offsets.c
index 452dfcea97f..f046223e55b 100644
--- a/arch/riscv/lib/asm-offsets.c
+++ b/arch/riscv/lib/asm-offsets.c
@@ -16,7 +16,7 @@ int main(void)
{
DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart));
DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr));
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
#ifdef CONFIG_AVAILABLE_HARTS
DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts));
#endif
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 276677a5e2f..bf3c556ee65 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -64,7 +64,7 @@ static void announce_and_cleanup(int fake)
static void boot_prep_linux(struct bootm_headers *images)
{
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
debug("using: FDT\n");
if (image_setup_linux(images)) {
printf("FDT creation failed! hanging...");
@@ -94,7 +94,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
announce_and_cleanup(fake);
if (!fake) {
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) {
#ifdef CONFIG_SMP
ret = smp_call_function(images->ep,
(ulong)images->ft_addr, 0, 0);
diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index e966afa7e3e..5ace1264099 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -152,7 +152,7 @@ ulong handle_trap(ulong cause, ulong epc, ulong tval, struct pt_regs *regs)
efi_restore_gd();
if (cause == CAUSE_BREAKPOINT &&
- CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK)) {
+ IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK)) {
ulong pre_addr = epc - 4, post_addr = epc + 4;
/* Check for prior and post addresses to be in same page. */
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index 4f073a016ff..3887390d94e 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -45,7 +45,7 @@ static int send_ipi_many(struct ipi_data *ipi, int wait)
continue;
}
-#if !CONFIG_IS_ENABLED(XIP)
+#if !IS_ENABLED(CONFIG_XIP)
#ifdef CONFIG_AVAILABLE_HARTS
/* skip if hart is not available */
if (!(gd->arch.available_harts & (1 << reg)))
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index f4d3b67e5dd..1823cf242c0 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -43,7 +43,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
void *fdt_blob;
__maybe_unused int ret;
-#if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL)
+#if IS_ENABLED(CONFIG_LOAD_FIT) || IS_ENABLED(CONFIG_LOAD_FIT_FULL)
fdt_blob = spl_image->fdt_addr;
#else
fdt_blob = (void *)gd->fdt_blob;
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 234652872ec..e0c5db2a522 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -537,7 +537,7 @@ int sandbox_main(int argc, char *argv[])
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
gd->malloc_base = CFG_MALLOC_F_ADDR;
#endif
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
gd->default_log_level = state->default_log_level;
#endif
setup_ram_buf(state);
diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h
index df7156fe317..b6ad4f44fa3 100644
--- a/arch/sandbox/include/asm/clk.h
+++ b/arch/sandbox/include/asm/clk.h
@@ -63,7 +63,7 @@ struct sandbox_clk_test {
/* Platform data for the sandbox fixed-rate clock driver */
struct sandbox_clk_fixed_rate_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_sandbox_fixed_clock dtplat;
#endif
struct clk_fixed_rate fixed;
diff --git a/arch/sandbox/include/asm/serial.h b/arch/sandbox/include/asm/serial.h
index 16589a1b219..ac35b276502 100644
--- a/arch/sandbox/include/asm/serial.h
+++ b/arch/sandbox/include/asm/serial.h
@@ -10,7 +10,7 @@
#include <dt-structs.h>
struct sandbox_serial_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_sandbox_serial dtplat;
#endif
int colour; /* Text colour to use for output, -1 for none */
diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c
index da01e71335f..2fa01c2e56c 100644
--- a/arch/x86/cpu/acpi_gpe.c
+++ b/arch/x86/cpu/acpi_gpe.c
@@ -72,7 +72,7 @@ static int acpi_gpe_of_xlate(struct irq *irq, struct ofnode_phandle_args *args)
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
static int acpi_gpe_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq)
{
memset(acpi_irq, '\0', sizeof(*acpi_irq));
@@ -94,7 +94,7 @@ static int acpi_gpe_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq)
static const struct irq_ops acpi_gpe_ops = {
.read_and_clear = acpi_gpe_read_and_clear,
.of_xlate = acpi_gpe_of_xlate,
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
.get_acpi = acpi_gpe_get_acpi,
#endif
};
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index 8f48457ee22..1f8dd5888f5 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -118,7 +118,7 @@ static int arch_cpu_init_tpl(void)
ret = uclass_first_device_err(UCLASS_SERIAL, &serial);
if (ret)
return log_msg_ret("serial", ret);
- if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT)) {
ret = uclass_first_device_err(UCLASS_SPI, &spi);
if (ret)
return log_msg_ret("SPI", ret);
diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c
index 2405dec8525..cb26a6e2e82 100644
--- a/arch/x86/cpu/apollolake/hostbridge.c
+++ b/arch/x86/cpu/apollolake/hostbridge.c
@@ -42,7 +42,7 @@ enum {
TOLUD = 0xbc,
};
-#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)
static const struct nhlt_format_config dmic_1ch_formats[] = {
/* 48 KHz 16-bits per sample. */
{
@@ -220,7 +220,7 @@ static int apl_hostbridge_of_to_plat(struct udevice *dev)
ret = uclass_first_device_err(UCLASS_PINCTRL, &pinctrl);
if (ret)
return log_msg_ret("no hostbridge PINCTRL", ret);
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int root;
/* Get length of PCI Express Region */
@@ -267,7 +267,7 @@ static int apl_acpi_hb_get_name(const struct udevice *dev, char *out_name)
return acpi_copy_name(out_name, "RHUB");
}
-#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)
static int apl_acpi_hb_write_tables(const struct udevice *dev,
struct acpi_ctx *ctx)
{
@@ -369,13 +369,13 @@ ulong sa_get_tseg_base(struct udevice *dev)
struct acpi_ops apl_hostbridge_acpi_ops = {
.get_name = apl_acpi_hb_get_name,
-#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)
.write_tables = apl_acpi_hb_write_tables,
.setup_nhlt = apl_acpi_setup_nhlt,
#endif
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_hostbridge_ids[] = {
{ .compatible = "intel,apl-hostbridge" },
{ }
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c
index 4be6366f043..e9cc66ca898 100644
--- a/arch/x86/cpu/apollolake/lpc.c
+++ b/arch/x86/cpu/apollolake/lpc.c
@@ -128,7 +128,7 @@ struct acpi_ops apl_lpc_acpi_ops = {
.inject_dsdt = southbridge_inject_dsdt,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_lpc_ids[] = {
{ .compatible = "intel,apl-lpc" },
{ }
diff --git a/arch/x86/cpu/apollolake/pch.c b/arch/x86/cpu/apollolake/pch.c
index a0f9b031dea..127e0405f69 100644
--- a/arch/x86/cpu/apollolake/pch.c
+++ b/arch/x86/cpu/apollolake/pch.c
@@ -23,7 +23,7 @@ static const struct pch_ops apl_pch_ops = {
.set_spi_protect = apl_set_spi_protect,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_pch_ids[] = {
{ .compatible = "intel,apl-pch" },
{ }
diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c
index 163119e2e9e..1200c55e5ac 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -107,7 +107,7 @@ int apl_pmc_ofdata_to_uc_plat(struct udevice *dev)
struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev);
struct apl_pmc_plat *plat = dev_get_plat(dev);
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
u32 base[6];
int size;
int ret;
@@ -206,7 +206,7 @@ static const struct acpi_pmc_ops apl_pmc_ops = {
.global_reset_set_enable = apl_global_reset_set_enable,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_pmc_ids[] = {
{ .compatible = "intel,apl-pmc" },
{ }
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index 7ec27dcc2af..7a1ede5f784 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -41,7 +41,7 @@ static int rom_load_image(struct spl_image_info *spl_image,
spl_image->name = "U-Boot";
log_debug("Reading from mapped SPI %lx, size %lx\n", spl_pos, spl_size);
- if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT)) {
ret = uclass_find_first_device(UCLASS_SPI_FLASH, &dev);
if (ret)
return log_msg_ret("spi_flash", ret);
@@ -68,7 +68,7 @@ static int rom_load_image(struct spl_image_info *spl_image,
}
SPL_LOAD_IMAGE_METHOD("Mapped SPI", 2, BOOT_DEVICE_SPI_MMAP, rom_load_image);
-#if CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)
+#if IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT)
static int apl_flash_std_read(struct udevice *dev, u32 offset, size_t len,
void *buf)
diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c
index a9362436000..4d045e7a6f8 100644
--- a/arch/x86/cpu/apollolake/uart.c
+++ b/arch/x86/cpu/apollolake/uart.c
@@ -81,7 +81,7 @@ static int apl_ns16550_probe(struct udevice *dev)
{
struct apl_ns16550_plat *plat = dev_get_plat(dev);
- if (!CONFIG_IS_ENABLED(PCI))
+ if (!IS_ENABLED(CONFIG_PCI))
apl_uart_init(plat->ns16550.bdf, plat->ns16550.base);
return ns16550_serial_probe(dev);
@@ -89,7 +89,7 @@ static int apl_ns16550_probe(struct udevice *dev)
static int apl_ns16550_of_to_plat(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_apl_ns16550 *dtplat;
struct apl_ns16550_plat *plat = dev_get_plat(dev);
struct ns16550_plat ns;
@@ -123,7 +123,7 @@ static int apl_ns16550_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_ns16550_serial_ids[] = {
{ .compatible = "intel,apl-ns16550" },
{ },
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index 37fcddbb9b0..66bcac7b2bf 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -602,7 +602,7 @@ static int broadwell_pch_init(struct udevice *dev)
static int broadwell_pch_probe(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(X86_32BIT_INIT)) {
+ if (IS_ENABLED(CONFIG_X86_32BIT_INIT)) {
if (!(gd->flags & GD_FLG_RELOC))
return broadwell_pch_early_init(dev);
else
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 6fe6eaf6c84..5f4306dd35e 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)
return 0;
}
-#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
void show_boot_progress(int val)
{
outb(val, POST_PORT);
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index fae2544c456..40cfd48c141 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -253,7 +253,7 @@ int disable_interrupts(void)
{
long flags;
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
asm volatile ("pushfq ; popq %0 ; cli\n" : "=g" (flags) : );
#else
asm volatile ("pushfl ; popl %0 ; cli\n" : "=g" (flags) : );
diff --git a/arch/x86/cpu/intel_common/car2.S b/arch/x86/cpu/intel_common/car2.S
index c4f64b17694..1fb52481cc5 100644
--- a/arch/x86/cpu/intel_common/car2.S
+++ b/arch/x86/cpu/intel_common/car2.S
@@ -434,7 +434,7 @@ find_llc_subleaf:
jmp car_init_ret
#endif
-#if CONFIG_IS_ENABLED(X86_16BIT_INIT)
+#if IS_ENABLED(CONFIG_X86_16BIT_INIT)
_dt_ucode_base_size:
/* These next two fields are filled in by binman */
.globl ucode_base
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index 1c0dcedb582..c9382365d3f 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -24,7 +24,7 @@ int arch_cpu_init(void)
{
int ret;
-#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
+#if IS_ENABLED(CONFIG_HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
struct spl_handoff *ho = gd->spl_handoff;
gd->arch.hob_list = ho->arch.hob_list;
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index ec73b3d8931..a76e68e1b78 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -154,8 +154,8 @@ static int route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
static int itss_bind(struct udevice *dev)
{
/* This is not set with basic of-platdata, so set it manually */
- if (CONFIG_IS_ENABLED(OF_PLATDATA) &&
- !CONFIG_IS_ENABLED(OF_PLATDATA_INST))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA) &&
+ !IS_ENABLED(CONFIG_OF_PLATDATA_INST))
dev->driver_data = X86_IRQT_ITSS;
return 0;
@@ -166,7 +166,7 @@ static int itss_of_to_plat(struct udevice *dev)
struct itss_priv *priv = dev_get_priv(dev);
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct itss_plat *plat = dev_get_plat(dev);
struct dtd_intel_itss *dtplat = &plat->dtplat;
@@ -213,7 +213,7 @@ static const struct irq_ops itss_ops = {
#endif
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id itss_ids[] = {
{ .compatible = "intel,itss", .data = X86_IRQT_ITSS },
{ }
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index e4e53f73c08..c5bd7b15d1a 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -88,7 +88,7 @@ int p2sb_of_to_plat(struct udevice *dev)
struct p2sb_uc_priv *upriv = dev_get_uclass_priv(dev);
struct p2sb_plat *plat = dev_get_plat(dev);
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int ret;
u32 base[2];
@@ -133,7 +133,7 @@ static int intel_p2sb_set_hide(struct udevice *dev, bool hide)
{
u16 vendor;
- if (!CONFIG_IS_ENABLED(PCI))
+ if (!IS_ENABLED(CONFIG_PCI))
return -EPERM;
p2sb_set_hide_bit(dev, hide);
@@ -159,7 +159,7 @@ static int p2sb_remove(struct udevice *dev)
static int p2sb_child_post_bind(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
int ret;
u32 pid;
@@ -177,7 +177,7 @@ static const struct p2sb_ops p2sb_ops = {
.set_hide = intel_p2sb_set_hide,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id p2sb_ids[] = {
{ .compatible = "intel,p2sb" },
{ }
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 06ede763a14..bfa05fd6239 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -97,7 +97,7 @@ static void qemu_chipset_init(void)
}
}
-#if CONFIG_IS_ENABLED(X86_32BIT_INIT)
+#if IS_ENABLED(CONFIG_X86_32BIT_INIT)
int arch_cpu_init(void)
{
post_code(POST_CPU_INIT);
diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.lds
index a0a2a06a18c..8812e51a7cb 100644
--- a/arch/x86/cpu/u-boot-spl.lds
+++ b/arch/x86/cpu/u-boot-spl.lds
@@ -65,7 +65,7 @@ SECTIONS
_image_binary_end = .;
-#if CONFIG_IS_ENABLED(SEPARATE_BSS)
+#if IS_ENABLED(CONFIG_SEPARATE_BSS)
. = 0x120000;
#endif
.bss (OVERLAY) : {
diff --git a/arch/x86/include/asm/arch-apollolake/gpio.h b/arch/x86/include/asm/arch-apollolake/gpio.h
index 762160da882..d235ab590dd 100644
--- a/arch/x86/include/asm/arch-apollolake/gpio.h
+++ b/arch/x86/include/asm/arch-apollolake/gpio.h
@@ -495,7 +495,7 @@
* @dtplat: of-platdata data from C struct
*/
struct apl_gpio_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Put this first since driver model will copy the data here */
struct dtd_intel_apl_pinctrl dtplat;
#endif
diff --git a/arch/x86/include/asm/arch-apollolake/hostbridge.h b/arch/x86/include/asm/arch-apollolake/hostbridge.h
index f4dce0d5224..c79b0a658ed 100644
--- a/arch/x86/include/asm/arch-apollolake/hostbridge.h
+++ b/arch/x86/include/asm/arch-apollolake/hostbridge.h
@@ -16,7 +16,7 @@
* @bdf: Bus/device/function of hostbridge
*/
struct apl_hostbridge_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_apl_hostbridge dtplat;
#endif
u32 *early_pads;
diff --git a/arch/x86/include/asm/arch-apollolake/pmc.h b/arch/x86/include/asm/arch-apollolake/pmc.h
index 23ac8fe7e20..a4e7130707a 100644
--- a/arch/x86/include/asm/arch-apollolake/pmc.h
+++ b/arch/x86/include/asm/arch-apollolake/pmc.h
@@ -7,7 +7,7 @@
#define ASM_ARCH_PMC_H
struct apl_pmc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_apl_pmc dtplat;
#endif
pci_dev_t bdf;
diff --git a/arch/x86/include/asm/arch-apollolake/uart.h b/arch/x86/include/asm/arch-apollolake/uart.h
index c3ca171b83b..bce55c501f8 100644
--- a/arch/x86/include/asm/arch-apollolake/uart.h
+++ b/arch/x86/include/asm/arch-apollolake/uart.h
@@ -18,7 +18,7 @@
* dev_get_plat() without any offsets or adjustments.
*/
struct apl_ns16550_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_apl_ns16550 dtplat;
#endif
struct ns16550_plat ns16550;
diff --git a/arch/x86/include/asm/byteorder.h b/arch/x86/include/asm/byteorder.h
index a2d1fd8703b..554cc9d0a97 100644
--- a/arch/x86/include/asm/byteorder.h
+++ b/arch/x86/include/asm/byteorder.h
@@ -19,7 +19,7 @@ static __inline__ __u32 ___arch__swab32(__u32 x)
static __inline__ __u16 ___arch__swab16(__u16 x)
{
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
return _constant_swab16(x);
#else
__asm__("xchgb %b0,%h0" /* swap bytes */ \
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 3346012d335..b94623237a7 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -161,7 +161,7 @@ static inline unsigned int cpuid_edx(unsigned int op)
return edx;
}
-#if !CONFIG_IS_ENABLED(X86_64)
+#if !IS_ENABLED(CONFIG_X86_64)
/* Standard macro to see if a specific flag is changeable */
static inline int flag_is_changeable_p(uint32_t flag)
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 22d103df4ee..7be1e29df8a 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -130,7 +130,7 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
#ifndef __ASSEMBLY__
-# if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64)
+# if defined(CONFIG_EFI_APP) || IS_ENABLED(CONFIG_X86_64)
/* TODO(sjg at chromium.org): Consider using a fixed register for gd on x86_64 */
#define gd global_data_ptr
@@ -141,7 +141,7 @@ static inline notrace gd_t *get_fs_gd_ptr(void)
{
gd_t *gd_ptr;
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
asm volatile("fs mov 0, %0\n" : "=r" (gd_ptr));
#else
asm volatile("fs movl 0, %0\n" : "=r" (gd_ptr));
diff --git a/arch/x86/include/asm/itss.h b/arch/x86/include/asm/itss.h
index 6d4793277e6..0a627daeb58 100644
--- a/arch/x86/include/asm/itss.h
+++ b/arch/x86/include/asm/itss.h
@@ -45,7 +45,7 @@
#define PCR_ITSS_ITSSPRC 0x3300
struct itss_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Put this first since driver model will copy the data here */
struct dtd_intel_itss dtplat;
#endif
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index f4c4d6c257c..004e736efb9 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -111,7 +111,7 @@ int x86_mp_init(void);
*/
typedef void (*mp_run_func)(void *arg);
-#if CONFIG_IS_ENABLED(SMP) && !CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_SMP) && !IS_ENABLED(CONFIG_X86_64)
/**
* mp_run_on_cpus() - Run a function on one or all CPUs
*
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index eb3ddde8c07..b12836f253e 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -59,7 +59,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux)
* edx:eax, while for x86_64 it doesn't mean rdx:rax or edx:eax. Instead,
* it means rax *or* rdx.
*/
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
#define DECLARE_ARGS(val, low, high) unsigned low, high
#define EAX_EDX_VAL(val, low, high) ((low) | ((u64)(high) << 32))
#define EAX_EDX_ARGS(val, low, high) "a" (low), "d" (high)
diff --git a/arch/x86/include/asm/p2sb.h b/arch/x86/include/asm/p2sb.h
index 6f63eae8e27..1ec0c4285f7 100644
--- a/arch/x86/include/asm/p2sb.h
+++ b/arch/x86/include/asm/p2sb.h
@@ -8,7 +8,7 @@
/* Platform data for the P2SB */
struct p2sb_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_p2sb dtplat;
#endif
ulong mmio_base;
diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h
index 0254a022160..b22e04e9e42 100644
--- a/arch/x86/include/asm/string.h
+++ b/arch/x86/include/asm/string.h
@@ -14,7 +14,7 @@ extern char *strrchr(const char *s, int c);
#undef __HAVE_ARCH_STRCHR
extern char *strchr(const char *s, int c);
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
#undef __HAVE_ARCH_MEMCPY
extern void *memcpy(void *, const void *, __kernel_size_t);
diff --git a/arch/x86/include/asm/sysreset.h b/arch/x86/include/asm/sysreset.h
index 5e586f51c00..5d43b860c27 100644
--- a/arch/x86/include/asm/sysreset.h
+++ b/arch/x86/include/asm/sysreset.h
@@ -8,7 +8,7 @@
#include <dt-structs.h>
struct x86_sysreset_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_x86_reset dtplat;
#endif
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index ba500015603..856c26d9cd2 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -10,7 +10,7 @@ typedef unsigned short umode_t;
*/
#ifdef __KERNEL__
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
#define BITS_PER_LONG 64
#else
#define BITS_PER_LONG 32
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index e3b7e9a4bbe..0032a2fd965 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -179,7 +179,7 @@ int acpi_write_tcpa(struct acpi_ctx *ctx, const struct acpi_writer *entry)
if (!IS_ENABLED(CONFIG_TPM_V1))
return -ENOENT;
- if (!CONFIG_IS_ENABLED(BLOBLIST))
+ if (!IS_ENABLED(CONFIG_BLOBLIST))
return -ENXIO;
tcpa = ctx->current;
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 873e2bc176f..776628f3211 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -78,7 +78,7 @@ static int boot_prep_linux(struct bootm_headers *images)
size_t len;
int ret;
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) {
debug("using: FDT\n");
if (image_setup_linux(images)) {
puts("FDT creation failed! hanging...");
@@ -166,7 +166,7 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit)
* TODO(sjg at chromium.org): Support booting both 32-bit and
* 64-bit kernels from 64-bit U-Boot.
*/
-#if !CONFIG_IS_ENABLED(X86_64)
+#if !IS_ENABLED(CONFIG_X86_64)
return cpu_jump_to_64bit(setup_base, load_address);
#endif
} else {
@@ -230,7 +230,7 @@ static ulong get_sp(void)
{
ulong ret;
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
ret = gd->start_addr_sp;
#else
asm("mov %%esp, %0" : "=r"(ret) : );
diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c
index 12fcff12380..91443f78a77 100644
--- a/arch/x86/lib/e820.c
+++ b/arch/x86/lib/e820.c
@@ -37,7 +37,7 @@ __weak unsigned int install_e820_map(unsigned int max_entries,
return 4;
}
-#if CONFIG_IS_ENABLED(EFI_LOADER)
+#if IS_ENABLED(CONFIG_EFI_LOADER)
void efi_add_known_memory(void)
{
struct e820_entry e820[E820MAX];
@@ -82,4 +82,4 @@ void efi_add_known_memory(void)
}
}
}
-#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */
+#endif /* IS_ENABLED(CONFIG_EFI_LOADER) */
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 8f2977a8070..54ed2c2c8b4 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -61,7 +61,7 @@ void board_final_init(void)
debug("OK\n");
}
-#if CONFIG_IS_ENABLED(DM_RTC)
+#if IS_ENABLED(CONFIG_DM_RTC)
int fsp_save_s3_stack(void)
{
struct udevice *dev;
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 3805a011dda..db4e3ff5fa2 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -182,7 +182,7 @@ unsigned int install_e820_map(unsigned int max_entries,
return num_entries;
}
-#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
+#if IS_ENABLED(CONFIG_HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
int handoff_arch_save(struct spl_handoff *ho)
{
ho->arch.usable_ram_top = gd->bd->bi_dram[0].size;
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index f9ea1ab3baa..7b31d4ce0c4 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -59,7 +59,7 @@ int dram_init(void)
gd->arch.mrc[MRC_TYPE_VAR].len);
#endif
} else {
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
struct spl_handoff *ho = gd->spl_handoff;
if (!ho) {
@@ -82,7 +82,7 @@ phys_size_t board_get_usable_ram_top(phys_size_t total_size)
if (!ll_boot_init())
return gd->ram_size;
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
struct spl_handoff *ho = gd->spl_handoff;
log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top);
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index f33194045f9..a5773f49b52 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -14,7 +14,7 @@ DECLARE_GLOBAL_DATA_PTR;
int init_cache_f_r(void)
{
- bool do_mtrr = CONFIG_IS_ENABLED(X86_32BIT_INIT) ||
+ bool do_mtrr = IS_ENABLED(CONFIG_X86_32BIT_INIT) ||
IS_ENABLED(CONFIG_FSP_VERSION2);
int ret;
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index 33d6eb49d75..da6f5b414d0 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -34,7 +34,7 @@
#include <irq_func.h>
#include <asm/interrupt.h>
-#if !CONFIG_IS_ENABLED(X86_64)
+#if !IS_ENABLED(CONFIG_X86_64)
struct irq_action {
interrupt_handler_t *handler;
@@ -130,7 +130,7 @@ void do_irq(int hw_irq)
#if defined(CONFIG_CMD_IRQ)
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
-#if !CONFIG_IS_ENABLED(X86_64)
+#if !IS_ENABLED(CONFIG_X86_64)
struct idt_ptr ptr;
int irq;
diff --git a/arch/x86/lib/lpc-uclass.c b/arch/x86/lib/lpc-uclass.c
index 67b931d3b28..ef63ddc7373 100644
--- a/arch/x86/lib/lpc-uclass.c
+++ b/arch/x86/lib/lpc-uclass.c
@@ -10,7 +10,7 @@
UCLASS_DRIVER(lpc) = {
.id = UCLASS_LPC,
.name = "lpc",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index c97f2db6d03..c16bce00351 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -49,7 +49,7 @@ int clear_bss(void)
}
#endif
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
static void do_elf_reloc_fixups64(unsigned int text_base, uintptr_t size,
Elf64_Rela *re_src, Elf64_Rela *re_end)
{
@@ -167,7 +167,7 @@ int do_elf_reloc_fixups(void)
#else
panic("No CONFIG_PPL_TEXT_BASE");
#endif
-#if CONFIG_IS_ENABLED(X86_64)
+#if IS_ENABLED(CONFIG_X86_64)
do_elf_reloc_fixups64(text_base, size, re_src, re_end);
#else
do_elf_reloc_fixups32(text_base, size, re_src, re_end);
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index c91fc49ac6a..4d359096f71 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -97,7 +97,7 @@ static int x86_spl_init(void)
}
#endif
preloader_console_init();
-#if !defined(CONFIG_TPL) && !CONFIG_IS_ENABLED(CPU)
+#if !defined(CONFIG_TPL) && !IS_ENABLED(CONFIG_CPU)
ret = print_cpuinfo();
if (ret) {
debug("%s: print_cpuinfo() failed\n", __func__);
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 18b05b2f672..f85380fa7c9 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -117,7 +117,7 @@ void spl_board_init(void)
preloader_console_init();
}
-#if !CONFIG_IS_ENABLED(PCI)
+#if !IS_ENABLED(CONFIG_PCI)
/*
* This is a fake PCI bus for TPL when it doesn't have proper PCI. It is enough
* to bind the devices on the PCI bus, some of which have early-regs properties
@@ -129,7 +129,7 @@ void spl_board_init(void)
* for devices, so the TPL BARs continue to be used. Once U-Boot starts it does
* the auto allocation (after relocation).
*/
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id tpl_fake_pci_ids[] = {
{ .compatible = "pci-x86" },
{ }
diff --git a/arch/xtensa/cpu/start.S b/arch/xtensa/cpu/start.S
index 580df65ea78..136471825a4 100644
--- a/arch/xtensa/cpu/start.S
+++ b/arch/xtensa/cpu/start.S
@@ -164,19 +164,19 @@ _start:
* enable data/instruction cache for relocated image.
*/
#if XCHAL_HAVE_SPANNING_WAY && \
- !(CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && \
- CONFIG_IS_ENABLED(SYS_ICACHE_OFF))
+ !(IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && \
+ IS_ENABLED(CONFIG_SYS_ICACHE_OFF))
srli a7, a4, 29
slli a7, a7, 29
addi a7, a7, XCHAL_SPANNING_WAY
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
rdtlb1 a8, a7
srli a8, a8, 4
slli a8, a8, 4
addi a8, a8, CA_WRITEBACK
wdtlb a8, a7
#endif
-#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF)
ritlb1 a8, a7
srli a8, a8, 4
slli a8, a8, 4
diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeontx2_cn913x/board.c
index 3d20cfb2fab..b5e0eeca2ff 100644
--- a/board/Marvell/octeontx2_cn913x/board.c
+++ b/board/Marvell/octeontx2_cn913x/board.c
@@ -23,7 +23,7 @@ int board_early_init_f(void)
int board_early_init_r(void)
{
- if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
+ if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
/* Check if any existing regulator should be turned down */
regulators_enable_boot_off(false);
}
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index d72e3ef24ee..f68acd98091 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -115,7 +115,7 @@ int board_init(void)
return 0;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
#define GREEN_LED BIT(14)
#define ORANGE_LED BIT(15)
#define BOTH_LEDS (GREEN_LED | ORANGE_LED)
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index caea89c10e0..9e40fa2cbdf 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -113,7 +113,7 @@ int board_init(void)
return 0;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
#define GREEN_LED BIT(14)
#define ORANGE_LED BIT(15)
#define BOTH_LEDS (GREEN_LED | ORANGE_LED)
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index 80ad62c2c66..73fbd58d2b9 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -122,7 +122,7 @@ int board_init(void)
void arch_preboot_os(void)
{
- if (CONFIG_IS_ENABLED(WDT))
+ if (IS_ENABLED(CONFIG_WDT))
wdt_stop_all();
}
diff --git a/board/bosch/acc/acc.c b/board/bosch/acc/acc.c
index 770ca8b711b..fbc6be39d1b 100644
--- a/board/bosch/acc/acc.c
+++ b/board/bosch/acc/acc.c
@@ -726,7 +726,7 @@ void reset_cpu(ulong addr)
hang();
}
-#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
void show_boot_progress(int val)
{
u32 fuseval;
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index c31e2c86a2d..23961b66584 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -40,7 +40,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
static const struct ddr_data ddr3_data = {
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index e3a9c00e809..94e3098164c 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -480,7 +480,7 @@ int board_eth_init(struct bd_info *bis)
}
#endif
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
static void bosch_check_reset_pin(void)
{
if (readl(GPIO1_BASE + OMAP_GPIO_IRQSTATUS_SET_0) & RESET_MASK) {
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 6a866b5470d..d03caa699a8 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -301,7 +301,7 @@ int misc_init_r(void)
return 0;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
void show_boot_progress(int progress)
{
if (progress > 0)
diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index ab20825ed36..44d7ebd4558 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -16,7 +16,7 @@
#include <cavium/atf.h>
#include <asm/armv8/mmu.h>
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
#include <dm/platform_data/serial_pl01x.h>
static const struct pl01x_serial_plat serial0 = {
diff --git a/board/cloudengines/pogo_v4/pogo_v4.c b/board/cloudengines/pogo_v4/pogo_v4.c
index 61ce0d59c77..c2c80fea943 100644
--- a/board/cloudengines/pogo_v4/pogo_v4.c
+++ b/board/cloudengines/pogo_v4/pogo_v4.c
@@ -111,7 +111,7 @@ int board_init(void)
return 0;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
#define GREEN_LED BIT(22)
#define RED_LED BIT(24)
#define BOTH_LEDS (GREEN_LED | RED_LED)
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 1b08a2c5abf..d000f2f32e8 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -267,7 +267,7 @@ int board_init(void)
return 0;
}
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
@@ -293,7 +293,7 @@ int power_init_board(void)
return 0;
}
-#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
+#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */
/*
* cl_som_imx7_setup_wdog() - watchdog configuration.
diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h
index 9bd7604a999..d08d8a1fd01 100644
--- a/board/compulab/common/eeprom.h
+++ b/board/compulab/common/eeprom.h
@@ -10,7 +10,7 @@
#define _EEPROM_
#include <errno.h>
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
u32 cl_eeprom_get_board_rev(uint eeprom_bus);
int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 5ffd420fff3..17cd0620736 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -295,7 +295,7 @@ int misc_init_r(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
#ifdef CONFIG_MMC_DAVINCI
static struct davinci_mmc mmc_sd0 = {
.reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index de224d4d283..15ee65b5354 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -162,7 +162,7 @@ static void set_mpu_and_core_voltage(void)
}
}
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static const struct ddr_data ddr2_data = {
.datardsratio0 = MT47H128M16RT25E_RD_DQS,
.datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE,
@@ -265,7 +265,7 @@ void sdram_init(void)
config_ddr(266, &ioregs, &ddr2_data,
&ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
}
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
#ifdef CONFIG_DEBUG_UART
void board_debug_uart_init(void)
diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c
index 500080c7cff..a82acec336d 100644
--- a/board/engicam/imx8mp/icore_mx8mp.c
+++ b/board/engicam/imx8mp/icore_mx8mp.c
@@ -47,7 +47,7 @@ static int setup_eqos(void)
return set_clk_eqos(ENET_125MHZ);
}
-#if CONFIG_IS_ENABLED(NET)
+#if IS_ENABLED(CONFIG_NET)
int board_phy_config(struct phy_device *phydev)
{
if (phydev->drv->config)
diff --git a/board/engicam/imx8mp/spl.c b/board/engicam/imx8mp/spl.c
index 6a16d58ae5a..8680eac6df8 100644
--- a/board/engicam/imx8mp/spl.c
+++ b/board/engicam/imx8mp/spl.c
@@ -52,7 +52,7 @@ struct i2c_pads_info i2c_pad_info1 = {
},
};
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/engicam/stm32mp1/spl.c b/board/engicam/stm32mp1/spl.c
index 2b7779cc01d..3c2587778b1 100644
--- a/board/engicam/stm32mp1/spl.c
+++ b/board/engicam/stm32mp1/spl.c
@@ -12,7 +12,7 @@ static u32 opp_voltage_mv __section(".data");
void board_vddcore_init(u32 voltage_mv)
{
- if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER))
+ if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER))
opp_voltage_mv = voltage_mv;
}
diff --git a/board/engicam/stm32mp1/stm32mp1.c b/board/engicam/stm32mp1/stm32mp1.c
index 5223e9bae8d..3f84db8bd0b 100644
--- a/board/engicam/stm32mp1/stm32mp1.c
+++ b/board/engicam/stm32mp1/stm32mp1.c
@@ -59,9 +59,9 @@ enum env_location env_get_location(enum env_operation op, int prio)
switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
case BOOT_FLASH_SD:
case BOOT_FLASH_EMMC:
- if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC))
return ENVL_MMC;
- else if (CONFIG_IS_ENABLED(ENV_IS_IN_EXT4))
+ else if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4))
return ENVL_EXT4;
else
return ENVL_NOWHERE;
@@ -74,7 +74,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
return ENVL_NOWHERE;
case BOOT_FLASH_NOR:
- if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
else
return ENVL_NOWHERE;
diff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c
index 9a75c5a09dd..376bd2401ca 100644
--- a/board/freescale/common/emc2305.c
+++ b/board/freescale/common/emc2305.c
@@ -24,7 +24,7 @@ void set_fan_speed(u8 data, int chip_addr)
I2C_EMC2305_FAN5};
for (index = 0; index < NUM_OF_FANS; index++) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
if (i2c_write(chip_addr, Fan[index], 1, &data, 1) != 0) {
printf("Error: failed to change fan speed @%x\n",
Fan[index]);
@@ -48,7 +48,7 @@ void emc2305_init(int chip_addr)
u8 data;
data = I2C_EMC2305_CMD;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
if (i2c_write(chip_addr, I2C_EMC2305_CONF, 1, &data, 1) != 0)
printf("Error: failed to configure EMC2305\n");
#else
diff --git a/board/freescale/common/i2c_common.c b/board/freescale/common/i2c_common.c
index 119ed3c6171..758a98a9d30 100644
--- a/board/freescale/common/i2c_common.c
+++ b/board/freescale/common/i2c_common.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include "i2c_common.h"
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
/* If DM is in use, retrieve the chip for the specified bus number */
int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev)
diff --git a/board/freescale/common/i2c_common.h b/board/freescale/common/i2c_common.h
index 77a7b6aedd7..b2600a9ff73 100644
--- a/board/freescale/common/i2c_common.h
+++ b/board/freescale/common/i2c_common.h
@@ -9,7 +9,7 @@
#define __NXP_I2C_COMMON_H__
/* Common functionality shared by the I2C drivers for VID and the mux. */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
#define DEVICE_HANDLE_T struct udevice *
#define I2C_READ(dev, register, data, length) \
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c
index da2c1de078b..f54c03a32f0 100644
--- a/board/freescale/common/qixis.c
+++ b/board/freescale/common/qixis.c
@@ -32,7 +32,7 @@
#ifdef CFG_SYS_I2C_FPGA_ADDR
u8 qixis_read_i2c(unsigned int reg)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_reg_read(CFG_SYS_I2C_FPGA_ADDR, reg);
#else
struct udevice *dev;
@@ -47,7 +47,7 @@ u8 qixis_read_i2c(unsigned int reg)
void qixis_write_i2c(unsigned int reg, u8 value)
{
u8 val = value;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_reg_write(CFG_SYS_I2C_FPGA_ADDR, reg, val);
#else
struct udevice *dev;
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index 431f8caeb03..0a7f661b14b 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -152,7 +152,7 @@ static int read_eeprom(void)
{
int ret;
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
unsigned int bus;
#endif
#endif
@@ -161,13 +161,13 @@ static int read_eeprom(void)
return 0;
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
bus = i2c_get_bus_num();
i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM);
#endif
#endif
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
(void *)&e, sizeof(e));
@@ -186,7 +186,7 @@ static int read_eeprom(void)
#endif
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_set_bus_num(bus);
#endif
#endif
@@ -223,7 +223,7 @@ static int prog_eeprom(void)
int i;
void *p;
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
unsigned int bus;
#endif
#endif
@@ -237,7 +237,7 @@ static int prog_eeprom(void)
#endif
update_crc();
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
bus = i2c_get_bus_num();
i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM);
@@ -250,7 +250,7 @@ static int prog_eeprom(void)
* complete a given write.
*/
for (i = 0, p = &e; i < sizeof(e); i += 8, p += 8) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, i,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
p, min((int)(sizeof(e) - i), 8));
@@ -279,7 +279,7 @@ static int prog_eeprom(void)
/* Verify the write by reading back the EEPROM and comparing */
struct eeprom e2;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
(void *)&e2, sizeof(e2));
@@ -302,7 +302,7 @@ static int prog_eeprom(void)
ret = -1;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
i2c_set_bus_num(bus);
#endif
@@ -594,7 +594,7 @@ unsigned int get_cpu_board_revision(void)
u8 minor; /* 0x05 Board revision, minor */
} be;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
(void *)&be, sizeof(be));
#else
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 380abecd746..08bf99c8af1 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -60,7 +60,7 @@ void spl_board_init(void)
printf("Failed to find clock node. Check device tree\n");
}
-#if CONFIG_IS_ENABLED(DM_PMIC_PCA9450)
+#if IS_ENABLED(CONFIG_DM_PMIC_PCA9450)
int power_init_board(void)
{
struct udevice *dev;
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index ce211d486ab..2ad4a6646e9 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -42,7 +42,7 @@ static int setup_eqos(void)
return set_clk_eqos(ENET_125MHZ);
}
-#if CONFIG_IS_ENABLED(NET)
+#if IS_ENABLED(CONFIG_NET)
int board_phy_config(struct phy_device *phydev)
{
if (phydev->drv->config)
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index f1b285417d0..f5ee5b47e2b 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -67,7 +67,7 @@ struct i2c_pads_info i2c_pad_info1 = {
},
};
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index bea9ddc9960..718d825e44e 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis)
return 0;
}
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index 682099ad9cf..ae4a6322170 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -53,7 +53,7 @@ int board_early_init_f(void)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static void board_gpio_init(void)
{
/* TODO */
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index 21cfa142f3b..75615c4f0f5 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -59,7 +59,7 @@ int board_early_init_f(void)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static void board_gpio_init(void)
{
struct gpio_desc desc;
diff --git a/board/freescale/imx8ulp_evk/imx8ulp_evk.c b/board/freescale/imx8ulp_evk/imx8ulp_evk.c
index 5aad1074a86..ee65a8070a7 100644
--- a/board/freescale/imx8ulp_evk/imx8ulp_evk.c
+++ b/board/freescale/imx8ulp_evk/imx8ulp_evk.c
@@ -127,7 +127,7 @@ int board_early_init_f(void)
int board_late_init(void)
{
-#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC)
+#if IS_ENABLED(CONFIG_ENV_IS_IN_MMC)
board_late_mmc_env_init();
#endif
return 0;
diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c
index 38cfbac6ea6..7f406f54bdf 100644
--- a/board/freescale/imx93_evk/spl.c
+++ b/board/freescale/imx93_evk/spl.c
@@ -50,7 +50,7 @@ void spl_dram_init(void)
ddr_init(&dram_timing);
}
-#if CONFIG_IS_ENABLED(DM_PMIC_PCA9450)
+#if IS_ENABLED(CONFIG_DM_PMIC_PCA9450)
int power_init_board(void)
{
struct udevice *dev;
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 194b5d27295..b34ad6aa170 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -113,7 +113,7 @@ int misc_init_r(void)
u8 mux_sdhc_cd = 0x80;
int bus_num = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c
index 5c661274987..5ba7ef6daa3 100644
--- a/board/freescale/ls1012ardb/eth.c
+++ b/board/freescale/ls1012ardb/eth.c
@@ -29,7 +29,7 @@ static inline void ls1012ardb_reset_phy(void)
{
#ifdef CONFIG_TARGET_LS1012ARDB
/* Through reset IO expander reset both RGMII and SGMII PHYs */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 62c935e4d3e..a661e8ff6ee 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -44,7 +44,7 @@ int checkboard(void)
puts("Board: LS1012ARDB ");
/* Initialize i2c early for Serial flash bank information */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR,
@@ -195,7 +195,7 @@ int esdhc_status_fixup(void *blob, const char *compat)
u8 io = 0;
int ret, bus_num = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR,
@@ -234,7 +234,7 @@ int esdhc_status_fixup(void *blob, const char *compat)
* 10 - eMMC Memory
* 11 - SPI
*/
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, I2C_MUX_IO_0, &io, 1);
#else
ret = i2c_read(I2C_MUX_IO_ADDR, I2C_MUX_IO_0, 1, &io, 1);
@@ -273,7 +273,7 @@ static int switch_to_bank1(void)
u8 data = 0xf4, chip_addr = 0x24, offset_addr = 0x03;
int ret, bus_num = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(bus_num, chip_addr,
@@ -338,7 +338,7 @@ static int switch_to_bank2(void)
u8 chip_addr = 0x24;
int ret, i, bus_num = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(bus_num, chip_addr,
@@ -361,7 +361,7 @@ static int switch_to_bank2(void)
* CS routed to SPI memory bank2
*/
for (i = 0; i < sizeof(data); i++) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_write(dev, offset_addr[i], &data[i], 1);
#else /* Non DM I2C support - will be removed */
ret = i2c_write(chip_addr, offset_addr[i], 1, &data[i], 1);
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index cf5f9f219b0..6e47175b290 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -457,7 +457,7 @@ void ls1twr_program_regulator(void)
#define MC34VR500_ADDR 0x8
#define MC34VR500_DEVICEID 0x4
#define MC34VR500_DEVICEID_MASK 0x0f
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index faecb609924..2a33fbc327d 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -85,7 +85,7 @@ int board_init(void)
#if defined(CONFIG_TARGET_LS1028ARDB)
u8 val = I2C_MUX_CH_DEFAULT;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_MUX_PCA_ADDR_PRI, 0x0b, 1, &val, 1);
#else
struct udevice *dev;
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index 841d8b59bb4..f2f0db74923 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -310,7 +310,7 @@ void board_retimer_init(void)
/* Retimer is connected to I2C1_CH7_CH5 */
select_i2c_ch_pca9547(I2C_MUX_CH7, bus_num);
reg = I2C_MUX_CH5;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index 8fe643f70b9..844361097a0 100644
--- a/board/freescale/ls1088a/eth_ls1088aqds.c
+++ b/board/freescale/ls1088a/eth_ls1088aqds.c
@@ -114,12 +114,12 @@ static void sgmii_configure_repeater(int dpmac)
{0x18, NULL}, {0x23, ®_val[3]},
{0x2d, ®_val[4]}, {4, ®_val[5]},
};
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *udev;
#endif
/* Set I2c to Slot 1 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(0x77, 0, 0, &a, 1);
#else
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
@@ -173,7 +173,7 @@ static void sgmii_configure_repeater(int dpmac)
return;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev);
#endif
@@ -184,7 +184,7 @@ static void sgmii_configure_repeater(int dpmac)
reg_pair[5].val = &ch_b_eq[i];
reg_pair[6].val = &ch_b_ctl2[j];
for (k = 0; k < 10; k++) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(i2c_phy_addr,
reg_pair[k].addr,
1, reg_pair[k].val, 1);
@@ -257,12 +257,12 @@ static void qsgmii_configure_repeater(int dpmac)
const char *dev = mdio_names[EMI1_SLOT1];
int ret = 0;
unsigned short value;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *udev;
#endif
/* Set I2c to Slot 1 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(0x77, 0, 0, &a, 1);
#else
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
@@ -304,7 +304,7 @@ static void qsgmii_configure_repeater(int dpmac)
return;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev);
#endif
@@ -316,7 +316,7 @@ static void qsgmii_configure_repeater(int dpmac)
reg_pair[6].val = &ch_b_ctl2[j];
for (k = 0; k < 10; k++) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(i2c_phy_addr,
reg_pair[k].addr,
1, reg_pair[k].val, 1);
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 0d3f22ce2bb..a3299e11361 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -431,7 +431,7 @@ void board_retimer_init(void)
/* Access to Control/Shared register */
reg = 0x0;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1);
#else
struct udevice *dev;
@@ -441,7 +441,7 @@ void board_retimer_init(void)
#endif
/* Read device revision and ID */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR, 1, 1, ®, 1);
#else
dm_i2c_read(dev, 1, ®, 1);
@@ -450,20 +450,20 @@ void board_retimer_init(void)
/* Enable Broadcast. All writes target all channel register sets */
reg = 0x0c;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1);
#else
dm_i2c_write(dev, 0xff, ®, 1);
#endif
/* Reset Channel Registers */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR, 0, 1, ®, 1);
#else
dm_i2c_read(dev, 0, ®, 1);
#endif
reg |= 0x4;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0, 1, ®, 1);
#else
dm_i2c_write(dev, 0, ®, 1);
@@ -471,45 +471,45 @@ void board_retimer_init(void)
/* Set data rate as 10.3125 Gbps */
reg = 0x90;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x60, 1, ®, 1);
#else
dm_i2c_write(dev, 0x60, ®, 1);
#endif
reg = 0xb3;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x61, 1, ®, 1);
#else
dm_i2c_write(dev, 0x61, ®, 1);
#endif
reg = 0x90;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x62, 1, ®, 1);
#else
dm_i2c_write(dev, 0x62, ®, 1);
#endif
reg = 0xb3;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x63, 1, ®, 1);
#else
dm_i2c_write(dev, 0x63, ®, 1);
#endif
reg = 0xcd;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x64, 1, ®, 1);
#else
dm_i2c_write(dev, 0x64, ®, 1);
#endif
/* Select VCO Divider to full rate (000) */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1);
#else
dm_i2c_read(dev, 0x2F, ®, 1);
#endif
reg &= 0x0f;
reg |= 0x70;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1);
#else
dm_i2c_write(dev, 0x2F, ®, 1);
@@ -521,7 +521,7 @@ void board_retimer_init(void)
/* Access to Control/Shared register */
reg = 0x0;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1);
#else
i2c_get_chip_for_busnum(0, I2C_RETIMER_ADDR2, 1, &dev);
@@ -529,7 +529,7 @@ void board_retimer_init(void)
#endif
/* Read device revision and ID */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR2, 1, 1, ®, 1);
#else
dm_i2c_read(dev, 1, ®, 1);
@@ -538,20 +538,20 @@ void board_retimer_init(void)
/* Enable Broadcast. All writes target all channel register sets */
reg = 0x0c;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1);
#else
dm_i2c_write(dev, 0xff, ®, 1);
#endif
/* Reset Channel Registers */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR2, 0, 1, ®, 1);
#else
dm_i2c_read(dev, 0, ®, 1);
#endif
reg |= 0x4;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0, 1, ®, 1);
#else
dm_i2c_write(dev, 0, ®, 1);
@@ -559,45 +559,45 @@ void board_retimer_init(void)
/* Set data rate as 10.3125 Gbps */
reg = 0x90;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x60, 1, ®, 1);
#else
dm_i2c_write(dev, 0x60, ®, 1);
#endif
reg = 0xb3;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x61, 1, ®, 1);
#else
dm_i2c_write(dev, 0x61, ®, 1);
#endif
reg = 0x90;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x62, 1, ®, 1);
#else
dm_i2c_write(dev, 0x62, ®, 1);
#endif
reg = 0xb3;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x63, 1, ®, 1);
#else
dm_i2c_write(dev, 0x63, ®, 1);
#endif
reg = 0xcd;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x64, 1, ®, 1);
#else
dm_i2c_write(dev, 0x64, ®, 1);
#endif
/* Select VCO Divider to full rate (000) */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_read(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1);
#else
dm_i2c_read(dev, 0x2F, ®, 1);
#endif
reg &= 0x0f;
reg |= 0x70;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_write(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1);
#else
dm_i2c_write(dev, 0x2F, ®, 1);
@@ -665,7 +665,7 @@ int get_serdes_volt(void)
u8 chan = PWM_CHANNEL0;
/* Select the PAGE 0 using PMBus commands PAGE for VDD */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(I2C_SVDD_MONITOR_ADDR,
PMBUS_CMD_PAGE, 1, &chan, 1);
#else
@@ -683,7 +683,7 @@ int get_serdes_volt(void)
}
/* Read the output voltage using PMBus command READ_VOUT */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_read(I2C_SVDD_MONITOR_ADDR,
PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2);
#else
@@ -704,7 +704,7 @@ int set_serdes_volt(int svdd)
svdd & 0xFF, (svdd & 0xFF00) >> 8};
/* Write the desired voltage code to the SVDD regulator */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(I2C_SVDD_MONITOR_ADDR,
PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5);
#else
@@ -745,7 +745,7 @@ int set_serdes_volt(int svdd)
printf("SVDD changing of RDB\n");
/* Read the BRDCFG54 via CLPD */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_read(CFG_SYS_I2C_FPGA_ADDR,
QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);
#else
@@ -765,7 +765,7 @@ int set_serdes_volt(int svdd)
brdcfg4 = brdcfg4 | 0x08;
/* Write to the BRDCFG4 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(CFG_SYS_I2C_FPGA_ADDR,
QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);
#else
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index 6da6e5c8415..6fd7fe01678 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -125,12 +125,12 @@ static void sgmii_configure_repeater(int serdes_port)
};
int *riser_phy_addr = &xqsgii_riser_phy_addr[0];
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *udev;
#endif
/* Set I2c to Slot 1 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(0x77, 0, 0, &a, 1);
#else
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
@@ -151,7 +151,7 @@ static void sgmii_configure_repeater(int serdes_port)
mii_bus = 1;
dpmac_id = dpmac + 9;
a = 0xb;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(0x76, 0, 0, &a, 1);
#else
ret = i2c_get_chip_for_busnum(0, 0x76, 1, &udev);
@@ -198,7 +198,7 @@ static void sgmii_configure_repeater(int serdes_port)
reg_pair[6].val = &ch_b_ctl2[j];
for (k = 0; k < 10; k++) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(i2c_addr[dpmac],
reg_pair[k].addr,
1, reg_pair[k].val, 1);
@@ -277,12 +277,12 @@ static void qsgmii_configure_repeater(int dpmac)
const char *dev = "LS2080A_QDS_MDIO0";
int ret = 0;
unsigned short value;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *udev;
#endif
/* Set I2c to Slot 1 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(0x77, 0, 0, &a, 1);
#else
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
@@ -347,7 +347,7 @@ static void qsgmii_configure_repeater(int dpmac)
reg_pair[6].val = &ch_b_ctl2[j];
for (k = 0; k < 10; k++) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(i2c_phy_addr,
reg_pair[k].addr,
1, reg_pair[k].val, 1);
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 91db618227d..6eae758ce44 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -216,7 +216,7 @@ int board_init(void)
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
rtc_enable_32khz_output(0, CFG_SYS_I2C_RTC_ADDR);
#else
rtc_enable_32khz_output();
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 97884a39796..6abfe507419 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -176,7 +176,7 @@ int board_early_init_f(void)
}
#ifdef CONFIG_FSL_ESDHC
-#if !(CONFIG_IS_ENABLED(DM_MMC) || CONFIG_IS_ENABLED(DM_USB))
+#if !(IS_ENABLED(CONFIG_DM_MMC) || IS_ENABLED(CONFIG_DM_USB))
int board_mmc_init(struct bd_info *bd)
{
struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index c6ad33018fb..ed50cb87d91 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -134,7 +134,7 @@ int config_board_mux(int ctrl_type)
ccsr_gur_t __iomem *gur = (void *)(CFG_SYS_MPC85XX_GUTS_ADDR);
u8 tmp;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
#if defined(CONFIG_TARGET_P1010RDB_PA)
@@ -370,7 +370,7 @@ int i2c_pca9557_read(int type)
u8 val;
int bus_num = I2C_PCA9557_BUS_NUM;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
@@ -412,7 +412,7 @@ int checkboard(void)
printf("Board: %sRDB-PA, ", cpu->name);
#elif defined(CONFIG_TARGET_P1010RDB_PB)
printf("Board: %sRDB-PB, ", cpu->name);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
@@ -455,7 +455,7 @@ int checkboard(void)
case 0xe:
puts("SDHC\n");
val = 0x60; /* set pca9557 pin input/output */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
dm_i2c_write(dev, 3, &val, 1);
#else
i2c_write(I2C_PCA9557_ADDR2, 3, 1, &val, 1);
diff --git a/board/freescale/p1010rdb/tlb.c b/board/freescale/p1010rdb/tlb.c
index 265cde81a3c..e967ff6b741 100644
--- a/board/freescale/p1010rdb/tlb.c
+++ b/board/freescale/p1010rdb/tlb.c
@@ -72,7 +72,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
0, 7, BOOKE_PAGESZ_1M, 1),
-#if defined(CONFIG_SYS_RAMBOOT) || !CONFIG_IS_ENABLED(COMMON_INIT_DDR)
+#if defined(CONFIG_SYS_RAMBOOT) || !IS_ENABLED(CONFIG_COMMON_INIT_DDR)
SET_TLB_ENTRY(1, CFG_SYS_DDR_SDRAM_BASE, CFG_SYS_DDR_SDRAM_BASE,
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M,
0, 8, BOOKE_PAGESZ_1G, 1),
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index c3bd2837aa2..a85ff1e7b41 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -242,7 +242,7 @@ int checkboard(void)
in_8(&cpld_data->pcba_rev) & 0x0F);
/* Initialize i2c early for rom_loc and flash bank information */
- #if CONFIG_IS_ENABLED(DM_I2C)
+ #if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index e107ddefb0f..940cf6d7e4d 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -109,7 +109,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
#endif
#endif
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
i2c_init_all();
#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
diff --git a/board/freescale/p1_p2_rdb_pc/tlb.c b/board/freescale/p1_p2_rdb_pc/tlb.c
index 94773969e9d..fc758e9d224 100644
--- a/board/freescale/p1_p2_rdb_pc/tlb.c
+++ b/board/freescale/p1_p2_rdb_pc/tlb.c
@@ -74,7 +74,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
0, 7, BOOKE_PAGESZ_1M, 1),
#endif
-#if defined(CONFIG_SYS_RAMBOOT) || !CONFIG_IS_ENABLED(COMMON_INIT_DDR)
+#if defined(CONFIG_SYS_RAMBOOT) || !IS_ENABLED(CONFIG_COMMON_INIT_DDR)
/* **M** - 1G DDR for eSDHC/eSPI/NAND boot */
SET_TLB_ENTRY(1, CFG_SYS_DDR_SDRAM_BASE, CFG_SYS_DDR_SDRAM_BASE,
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M,
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index 2303aa8fb93..e75b608e10e 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -249,7 +249,7 @@ static u32 t1023rdb_ctrl(u32 ctrl_type)
u8 tmp;
int bus_num = I2C_PCA6408_BUS_NUM;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/board/friendlyarm/nanopi2/lcds.c b/board/friendlyarm/nanopi2/lcds.c
index 7303e53af92..05d097b00ec 100644
--- a/board/friendlyarm/nanopi2/lcds.c
+++ b/board/friendlyarm/nanopi2/lcds.c
@@ -689,7 +689,7 @@ int bd_get_lcd_density(void)
return bd_lcd_config[lcd_idx].dpi;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int bd_fixup_lcd_fdt(void *blob, struct nxp_lcd *lcd)
{
return 0;
diff --git a/board/friendlyarm/nanopi2/onewire.c b/board/friendlyarm/nanopi2/onewire.c
index 56f0f2dfceb..dc841f36fed 100644
--- a/board/friendlyarm/nanopi2/onewire.c
+++ b/board/friendlyarm/nanopi2/onewire.c
@@ -35,7 +35,7 @@ static int bus_type = -1;
static int lcd_id = -1;
static unsigned short lcd_fwrev;
static int current_brightness = -1;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static struct udevice *i2c_dev;
#endif
@@ -182,7 +182,7 @@ static int onewire_i2c_do_request(unsigned char req, unsigned char *buf)
tx[0] = req;
tx[1] = crc8_ow(req << 24, 8);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
if (dm_i2c_write(i2c_dev, 0, tx, 2))
return -EIO;
@@ -214,7 +214,7 @@ static void onewire_i2c_init(void)
unsigned char buf[4];
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_chip_for_busnum(ONEWIRE_I2C_BUS,
ONEWIRE_I2C_ADDR, 0, &i2c_dev);
#else
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index e622a9ba9e4..6bb8d9ecb23 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -24,7 +24,7 @@
struct ventana_board_info ventana_info;
int board_type;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *i2c_get_dev(int busno, int slave)
{
struct udevice *dev, *bus;
@@ -53,7 +53,7 @@ int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len)
int retry = 3;
int n = 0;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
dev = i2c_get_dev(BOARD_EEPROM_BUSNO, chip);
@@ -69,7 +69,7 @@ int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len)
#endif
while (n++ < retry) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, addr, buf, len);
#else
ret = i2c_read(chip, addr, alen, buf, len);
@@ -90,7 +90,7 @@ int gsc_i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len)
int retry = 3;
int n = 0;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
dev = i2c_get_dev(BOARD_EEPROM_BUSNO, chip);
@@ -104,7 +104,7 @@ int gsc_i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len)
#endif
while (n++ < retry) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_write(dev, addr, buf, len);
#else
ret = i2c_write(chip, addr, alen, buf, len);
diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c
index 9e23f5cd31e..10ccdd7f151 100644
--- a/board/google/chromebook_coral/coral.c
+++ b/board/google/chromebook_coral/coral.c
@@ -37,7 +37,7 @@ static int coral_check_ll_boot(void *ctx, struct event *event)
{
if (!ll_boot_init()) {
printf("Running as secondary loader");
- if (CONFIG_IS_ENABLED(COREBOOT_SYSINFO) &&
+ if (IS_ENABLED(CONFIG_COREBOOT_SYSINFO) &&
gd->arch.coreboot_table) {
int ret;
@@ -303,7 +303,7 @@ struct sysinfo_ops coral_sysinfo_ops = {
.get_str = coral_get_str,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id coral_ids[] = {
{ .compatible = "google,coral" },
{ }
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 32dbcdc4d10..73d76e879cb 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -21,7 +21,7 @@
* 'voltage-table' property.
*/
#ifndef CONFIG_SPL_BUILD
-#if !CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)
+#if !IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM)
static int veyron_init(void)
{
struct udevice *dev;
@@ -77,7 +77,7 @@ int board_early_init_r(void)
struct udevice *dev;
int ret;
-#if !CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)
+#if !IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM)
if (!fdt_node_check_compatible(gd->fdt_blob, 0, "google,veyron")) {
ret = veyron_init();
if (ret)
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index b472ca5b94a..d71c8508636 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
static __maybe_unused struct ctrl_dev *cdev =
(struct ctrl_dev *)CTRL_DEVICE_BASE;
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static struct module_pin_mux uart0_pin_mux[] = {
{OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */
{OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */
@@ -84,7 +84,7 @@ void am33xx_spl_board_init(void)
{
chilisom_spl_board_init();
}
-#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */
/*
* Basic board specific setup. Pinmux has been handled already.
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index c9a2d60ee56..4ae224eba6a 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -76,7 +76,7 @@ U_BOOT_DRVINFOS(hi6220_gpios) = {
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct pl01x_serial_plat serial_plat = {
#if CONFIG_CONS_INDEX == 1
diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
index f41fabbad09..73afae26e07 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -24,7 +24,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
#include <dm/platform_data/serial_pl01x.h>
static const struct pl01x_serial_plat serial_plat = {
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index b89e7e86976..b53be6e9e5a 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -40,7 +40,7 @@ static struct mm_region poplar_mem_map[] = {
struct mm_region *mem_map = poplar_mem_map;
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct pl01x_serial_plat serial_plat = {
.base = REG_BASE_UART0,
.type = TYPE_PL010,
diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c
index 7c3a695cb25..eb460c3077f 100644
--- a/board/k+p/kp_imx53/kp_imx53.c
+++ b/board/k+p/kp_imx53/kp_imx53.c
@@ -155,7 +155,7 @@ int board_late_init(void)
return ret;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
#define GPIO_DR 0x0
#define GPIO_GDIR 0x4
#define GPIO_ALT1 0x1
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index 67db0c50f47..7ab16cd4cde 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -342,7 +342,7 @@ static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset)
int ivm_read_eeprom(unsigned char *buf, int len, int mac_address_offset)
{
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *eedev = NULL;
ret = i2c_get_chip_for_busnum(CONFIG_KM_IVM_BUS,
diff --git a/board/kontron/pitx_imx8m/spl.c b/board/kontron/pitx_imx8m/spl.c
index f6fd17048d0..be60e96f046 100644
--- a/board/kontron/pitx_imx8m/spl.c
+++ b/board/kontron/pitx_imx8m/spl.c
@@ -68,7 +68,7 @@ static struct i2c_pads_info i2c_pad_info1 = {
},
};
-#if CONFIG_IS_ENABLED(MMC)
+#if IS_ENABLED(CONFIG_MMC)
#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 12)
#define USDHC1_PWR_GPIO IMX_GPIO_NR(2, 10)
#define USDHC2_PWR_GPIO IMX_GPIO_NR(2, 19)
@@ -181,7 +181,7 @@ const char *spl_board_loader_name(u32 boot_device)
}
#endif
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
static int pfuze_mode_init(struct pmic *p, u32 mode)
@@ -288,7 +288,7 @@ void board_init_f(ulong dummy)
setup_i2c(0, 100000, 0x7f, &i2c_pad_info1);
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
power_init_board();
#endif
diff --git a/board/kontron/sl-mx6ul/sl-mx6ul.c b/board/kontron/sl-mx6ul/sl-mx6ul.c
index 0f45ea84fc7..bfa22aae5e7 100644
--- a/board/kontron/sl-mx6ul/sl-mx6ul.c
+++ b/board/kontron/sl-mx6ul/sl-mx6ul.c
@@ -91,9 +91,9 @@ enum env_location env_get_location(enum env_operation op, int prio)
if (prio)
return ENVL_UNKNOWN;
- if (sl_mx6ul_is_spi_nor_boot() && CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+ if (sl_mx6ul_is_spi_nor_boot() && IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
- else if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+ else if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC))
return ENVL_MMC;
return ENVL_NOWHERE;
diff --git a/board/kontron/sl-mx8mm/sl-mx8mm.c b/board/kontron/sl-mx8mm/sl-mx8mm.c
index 250195694ba..54ed8ec3ba6 100644
--- a/board/kontron/sl-mx8mm/sl-mx8mm.c
+++ b/board/kontron/sl-mx8mm/sl-mx8mm.c
@@ -146,11 +146,11 @@ enum env_location env_get_location(enum env_operation op, int prio)
* Make sure that the environment is loaded from
* the MMC if we are running from SD card or eMMC.
*/
- if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC) &&
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC) &&
(boot_dev == SD1_BOOT || boot_dev == SD2_BOOT))
return ENVL_MMC;
- if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
return ENVL_NOWHERE;
diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c
index 89948e087f1..9954b47487b 100644
--- a/board/kontron/sl28/sl28.c
+++ b/board/kontron/sl28/sl28.c
@@ -69,7 +69,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
if (prio)
return ENVL_UNKNOWN;
- if (!CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+ if (!IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
return ENVL_NOWHERE;
/* write and erase always operate on the environment */
diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
index b3c176dd59a..b8a2a2c1790 100644
--- a/board/l+g/vinco/vinco.c
+++ b/board/l+g/vinco/vinco.c
@@ -33,7 +33,7 @@
DECLARE_GLOBAL_DATA_PTR;
/* FIXME gpio code here need to handle through DM_GPIO */
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
{
return bus == 0 && cs == 0;
@@ -166,7 +166,7 @@ int board_init(void)
/* adress of boot parameters */
gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
vinco_spi0_hw_init();
#endif
diff --git a/board/mediatek/mt8183/mt8183_pumpkin.c b/board/mediatek/mt8183/mt8183_pumpkin.c
index db613ebdc4f..4ffc5538dba 100644
--- a/board/mediatek/mt8183/mt8183_pumpkin.c
+++ b/board/mediatek/mt8183/mt8183_pumpkin.c
@@ -13,7 +13,7 @@ int board_init(void)
struct udevice *dev;
int ret;
- if (CONFIG_IS_ENABLED(USB_GADGET)) {
+ if (IS_ENABLED(CONFIG_USB_GADGET)) {
ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
if (ret) {
pr_err("%s: Cannot find USB device\n", __func__);
@@ -21,7 +21,7 @@ int board_init(void)
}
}
- if (CONFIG_IS_ENABLED(USB_ETHER))
+ if (IS_ENABLED(CONFIG_USB_ETHER))
usb_ether_init();
return 0;
diff --git a/board/mediatek/mt8516/mt8516_pumpkin.c b/board/mediatek/mt8516/mt8516_pumpkin.c
index 42f3863b92c..d9827fe8ae7 100644
--- a/board/mediatek/mt8516/mt8516_pumpkin.c
+++ b/board/mediatek/mt8516/mt8516_pumpkin.c
@@ -17,7 +17,7 @@ int board_late_init(void)
struct udevice *dev;
int ret;
- if (CONFIG_IS_ENABLED(USB_GADGET)) {
+ if (IS_ENABLED(CONFIG_USB_GADGET)) {
ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
if (ret) {
pr_err("%s: Cannot find USB device\n", __func__);
@@ -25,7 +25,7 @@ int board_late_init(void)
}
}
- if (CONFIG_IS_ENABLED(USB_ETHER))
+ if (IS_ENABLED(CONFIG_USB_ETHER))
usb_ether_init();
return 0;
diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c
index 82458c3af42..c1a3160b9e2 100644
--- a/board/qca/ap152/ap152.c
+++ b/board/qca/ap152/ap152.c
@@ -66,7 +66,7 @@ int board_early_init_f(void)
void __iomem *rst_regs = map_physmem(AR71XX_RESET_BASE,
AR71XX_RESET_SIZE, MAP_NOCACHE);
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
/* CPU:775, DDR:650, AHB:258 */
qca956x_pll_init();
qca956x_ddr_init();
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 71efeaf3131..511beedf0df 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index c27eb3f17d9..425f8b68f5a 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -37,7 +37,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
@@ -75,7 +75,7 @@ int board_init(void)
void reset_cpu(void)
{
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
i2c_reg_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x20, 0x80);
#else
/* only CA57 ? */
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 1477750f921..1a216f30a4e 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -35,7 +35,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index c99ffdd75e8..099c99fd5f6 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -47,13 +47,13 @@ out:
#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION)
static bool board_is_rockpi_4b(void)
{
- return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) &&
+ return IS_ENABLED(CONFIG_TARGET_EVB_RK3399) &&
of_machine_is_compatible("radxa,rockpi4b");
}
static bool board_is_rockpi_4c(void)
{
- return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) &&
+ return IS_ENABLED(CONFIG_TARGET_EVB_RK3399) &&
of_machine_is_compatible("radxa,rockpi4c");
}
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 16ce5cb8925..07ec059437b 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -180,7 +180,7 @@ int board_early_init_f(void)
}
#endif
-#if CONFIG_IS_ENABLED(POWER_LEGACY) || CONFIG_IS_ENABLED(DM_PMIC)
+#if IS_ENABLED(CONFIG_POWER_LEGACY) || IS_ENABLED(CONFIG_DM_PMIC)
int power_init_board(void)
{
set_ps_hold_ctrl();
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 1608d60dd8d..04e7a053c7b 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -51,7 +51,7 @@ int exynos_init(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
static void trats_low_power_mode(void)
{
struct exynos4_clock *clk =
@@ -113,7 +113,7 @@ static void trats_low_power_mode(void)
int exynos_power_init(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
int chrg, ret;
struct power_battery *pb;
struct pmic *p_fg, *p_chrg, *p_muic, *p_bat;
@@ -292,7 +292,7 @@ int board_usb_init(int index, enum usb_init_type init)
int g_dnl_board_usb_cable_connected(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
struct pmic *muic = pmic_get("MAX8997_MUIC");
if (!muic)
return 0;
@@ -404,7 +404,7 @@ int exynos_early_init_f(void)
int lcd_power(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
int ret = 0;
struct pmic *p = pmic_get("MAX8997_PMIC");
if (!p)
@@ -428,7 +428,7 @@ int lcd_power(void)
int mipi_power(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
int ret = 0;
struct pmic *p = pmic_get("MAX8997_PMIC");
if (!p)
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 93c9714d33f..384ed44eecf 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -130,7 +130,7 @@ int exynos_init(void)
int exynos_power_init(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
int chrg;
struct power_battery *pb;
struct pmic *p_chrg, *p_muic, *p_fg, *p_bat;
@@ -193,7 +193,7 @@ int exynos_power_init(void)
#ifdef CONFIG_USB_GADGET
static int s5pc210_phy_control(int on)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
int ret = 0;
unsigned int val;
struct pmic *p, *p_pmic, *p_muic;
@@ -270,7 +270,7 @@ int board_usb_init(int index, enum usb_init_type init)
int g_dnl_board_usb_cable_connected(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
+#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */
struct pmic *muic = pmic_get("MAX77693_MUIC");
if (!muic)
return 0;
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 2e44bdf0df3..bd878e0b0e6 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -73,7 +73,7 @@ struct efi_capsule_update_info update_info = {
u8 num_image_type_guids = ARRAY_SIZE(fw_images);
#endif /* EFI_HAVE_CAPSULE_SUPPORT */
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if !IS_ENABLED(CONFIG_OF_PLATDATA)
/*
* Add a simple GPIO device (don't use with of-platdata as it interferes with
* the auto-generated devices)
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 8fa9197a6df..77d569f02d2 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -93,7 +93,7 @@ int board_init(void)
gpmc_init();
-#if CONFIG_IS_ENABLED(NAND_CS_INIT)
+#if IS_ENABLED(CONFIG_NAND_CS_INIT)
board_nand_cs_init();
#endif
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index 4e36a6f3199..779791b5f53 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -14,7 +14,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/io.h>
-#if !CONFIG_IS_ENABLED(TARGET_GIEDI) && !CONFIG_IS_ENABLED(TARGET_DENEB)
+#if !IS_ENABLED(CONFIG_TARGET_GIEDI) && !IS_ENABLED(CONFIG_TARGET_DENEB)
#include <asm/arch/cpu.h>
#endif
#include <asm/arch/sys_proto.h>
@@ -148,7 +148,7 @@ int factoryset_read_eeprom(int i2c_addr)
int i, pages = 0, size = 0;
unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH];
unsigned char *cp, *cp1;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus, *dev;
int ret;
#endif
@@ -158,7 +158,7 @@ int factoryset_read_eeprom(int i2c_addr)
factory_dat.usb_product_id = CONFIG_USB_GADGET_PRODUCT_NUM;
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = uclass_get_device_by_seq(UCLASS_I2C, EEPROM_I2C_BUS, &bus);
if (ret)
goto err;
@@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr)
*/
debug("Read eeprom page :\n");
for (i = 0; i < pages; i++) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, (OFF_PG + i) * EEPR_PG_SZ,
eeprom_buf + (i * EEPR_PG_SZ), EEPR_PG_SZ);
if (ret)
@@ -215,7 +215,7 @@ int factoryset_read_eeprom(int i2c_addr)
}
if (size % EEPR_PG_SZ) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, (OFF_PG + pages) * EEPR_PG_SZ,
eeprom_buf + (pages * EEPR_PG_SZ),
size % EEPR_PG_SZ);
@@ -247,7 +247,7 @@ int factoryset_read_eeprom(int i2c_addr)
cp1 += 3;
}
-#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB)
+#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB)
/* get mac address for WLAN */
ret = get_factory_record_val(cp, size, (uchar *)"WLAN1", (uchar *)"mac",
buf, MAX_STRING_LENGTH);
@@ -355,7 +355,7 @@ static int factoryset_mac_env_set(void)
eth_env_set_enetaddr("ethaddr", mac_addr);
-#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB)
+#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB)
eth_env_set_enetaddr("eth1addr", mac_addr);
/* wlan mac */
diff --git a/board/siemens/common/factoryset.h b/board/siemens/common/factoryset.h
index 8fa6c3b3d3b..0870aa6f712 100644
--- a/board/siemens/common/factoryset.h
+++ b/board/siemens/common/factoryset.h
@@ -11,7 +11,7 @@
struct factorysetcontainer {
uchar mac[6];
-#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB)
+#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB)
uchar mac_wlan[6];
#endif
int usb_vendor_id;
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 8874659013f..19469229971 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -370,7 +370,7 @@ U_BOOT_CMD(
#endif /* #if defined(CONFIG_DRIVER_TI_CPSW) */
#endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */
-#if CONFIG_IS_ENABLED(NAND_CS_INIT)
+#if IS_ENABLED(CONFIG_NAND_CS_INIT)
#define ETAMIN_NAND_GPMC_CONFIG1 0x00000800
#define ETAMIN_NAND_GPMC_CONFIG2 0x001e1e00
#define ETAMIN_NAND_GPMC_CONFIG3 0x001e1e00
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
index 8f4b0eae495..2eef1e328f2 100644
--- a/board/siemens/iot2050/board.c
+++ b/board/siemens/iot2050/board.c
@@ -250,7 +250,7 @@ void spl_board_init(void)
{
}
-#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if IS_ENABLED(CONFIG_LED) && IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
/*
* Indicate any error or (accidental?) entering of CLI via the red status LED.
*/
diff --git a/board/somlabs/visionsom-6ull/visionsom-6ull.c b/board/somlabs/visionsom-6ull/visionsom-6ull.c
index 38d14f6bc26..0b5cfce85ba 100644
--- a/board/somlabs/visionsom-6ull/visionsom-6ull.c
+++ b/board/somlabs/visionsom-6ull/visionsom-6ull.c
@@ -104,7 +104,7 @@ int board_init(void)
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
#endif
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index 079ba15ddb1..ab3c6b8f236 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -115,7 +115,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
snprintf(buf, DFU_ALT_BUF_LEN,
"ram 0=%s", CONFIG_DFU_ALT_RAM0);
- if (CONFIG_IS_ENABLED(MMC)) {
+ if (IS_ENABLED(CONFIG_MMC)) {
if (!uclass_get_device(UCLASS_MMC, 0, &dev))
board_get_alt_info_mmc(dev, buf);
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index cd3a7dc51a2..d8b07b669e3 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -30,7 +30,7 @@ int dram_init_banksize(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c
index 747ec7e445a..7c6d1a1716f 100644
--- a/board/st/stm32mp1/spl.c
+++ b/board/st/stm32mp1/spl.c
@@ -13,13 +13,13 @@ static u32 opp_voltage_mv __section(".data");
void board_vddcore_init(u32 voltage_mv)
{
- if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER))
+ if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER))
opp_voltage_mv = voltage_mv;
}
int board_early_init_f(void)
{
- if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER))
+ if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER))
stpmic1_init(opp_voltage_mv);
return 0;
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 5e89192ec03..0ffcca419f2 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -272,7 +272,7 @@ static int setup_led(enum led_state_t cmd)
struct udevice *dev;
int ret;
- if (!CONFIG_IS_ENABLED(LED))
+ if (!IS_ENABLED(CONFIG_LED))
return 0;
ret = get_led(&dev, "u-boot,boot-led");
@@ -292,7 +292,7 @@ static void __maybe_unused led_error_blink(u32 nb_blink)
if (!nb_blink)
return;
- if (CONFIG_IS_ENABLED(LED)) {
+ if (IS_ENABLED(CONFIG_LED)) {
ret = get_led(&led, "u-boot,error-led");
if (!ret) {
/* make u-boot,error-led blinking */
@@ -616,7 +616,7 @@ error:
static bool board_is_stm32mp15x_dk2(void)
{
- if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15X) &&
+ if (IS_ENABLED(CONFIG_TARGET_ST_STM32MP15X) &&
of_machine_is_compatible("st,stm32mp157c-dk2"))
return true;
@@ -625,7 +625,7 @@ static bool board_is_stm32mp15x_dk2(void)
static bool board_is_stm32mp15x_ev1(void)
{
- if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15X) &&
+ if (IS_ENABLED(CONFIG_TARGET_ST_STM32MP15X) &&
(of_machine_is_compatible("st,stm32mp157a-ev1") ||
of_machine_is_compatible("st,stm32mp157c-ev1") ||
of_machine_is_compatible("st,stm32mp157d-ev1") ||
@@ -822,9 +822,9 @@ enum env_location env_get_location(enum env_operation op, int prio)
switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
case BOOT_FLASH_SD:
case BOOT_FLASH_EMMC:
- if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC))
return ENVL_MMC;
- else if (CONFIG_IS_ENABLED(ENV_IS_IN_EXT4))
+ else if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4))
return ENVL_EXT4;
else
return ENVL_NOWHERE;
@@ -837,7 +837,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
return ENVL_NOWHERE;
case BOOT_FLASH_NOR:
- if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
else
return ENVL_NOWHERE;
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index 57ca9f659c1..50ded2c76c2 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -37,7 +37,7 @@ U_BOOT_DRVINFO(stv09911_serials) = {
};
#endif
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
void show_boot_progress(int progress)
{
printf("%i\n", progress);
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 827e545032e..b919908d6e8 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -247,7 +247,7 @@ int board_init(void)
}
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
/*
* Temporary workaround for enabling I2C clocks until proper sunxi DM
* clk, reset and pinctrl drivers land.
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 4308c7e440a..1f83721625a 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -871,7 +871,7 @@ int board_prep_linux(struct bootm_headers *images)
if (env_common.core_mask.val == ALL_CPU_MASK)
return 0;
- if (!CONFIG_IS_ENABLED(OF_LIBFDT) || !images->ft_len) {
+ if (!IS_ENABLED(CONFIG_OF_LIBFDT) || !images->ft_len) {
pr_err("WARN: core_mask setup will work properly only with external DTB!\n");
return 0;
}
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 839a692ce85..1d612a059a8 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -40,7 +40,7 @@ DECLARE_GLOBAL_DATA_PTR;
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static const struct ddr_data ddr3_sl50_data = {
.datardsratio0 = MT41K256M16HA125E_RD_DQS,
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index 7db34abcb1e..9b5ed89f0cc 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -60,7 +60,7 @@ int dram_init(void)
return 0;
}
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 3
int power_init_board(void)
{
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index ecb9fa02de5..ca7037a735b 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -96,7 +96,7 @@ struct serial_device *default_serial_console(void)
}
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
static const struct ddr_data ddr2_data = {
.datardsratio0 = MT47H128M16RT25E_RD_DQS,
.datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE,
@@ -901,7 +901,7 @@ int board_late_init(void)
#endif
/* CPSW plat */
-#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_NET) && !IS_ENABLED(CONFIG_OF_CONTROL)
struct cpsw_slave_data slave_data[] = {
{
.slave_reg_ofs = CPSW_SLAVE0_OFFSET,
@@ -982,7 +982,7 @@ int board_fit_config_name_match(const char *name)
}
#endif
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct omap_hsmmc_plat am335x_mmc0_plat = {
.base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
.cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 87e552a4701..454cbb8988d 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -54,7 +54,7 @@ void do_board_detect(void)
}
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
const struct dpll_params dpll_mpu[NUM_CRYSTAL_FREQ][NUM_OPPS] = {
{ /* 19.2 MHz */
@@ -681,7 +681,7 @@ int board_init(void)
}
#ifdef CONFIG_BOARD_LATE_INIT
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
static int device_okay(const char *path)
{
int node;
@@ -708,7 +708,7 @@ int board_late_init(void)
env_set("boot_fit", "1");
#endif
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
if (device_okay("/ocp/omap_dwc3 at 48380000"))
enable_usb_clocks(0);
if (device_okay("/ocp/omap_dwc3 at 483c0000"))
@@ -722,7 +722,7 @@ int board_late_init(void)
}
#endif
-#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if !IS_ENABLED(CONFIG_DM_USB_GADGET)
#ifdef CONFIG_USB_DWC3
static struct dwc3_device usb_otg_ss1 = {
.maximum_speed = USB_SPEED_HIGH,
@@ -825,7 +825,7 @@ int board_usb_cleanup(int index, enum usb_init_type init)
return 0;
}
#endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
-#endif /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 9ea507a8e96..4d9f0882ff9 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -729,7 +729,7 @@ out:
return;
}
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
static int device_okay(const char *path)
{
int node;
@@ -788,7 +788,7 @@ int board_late_init(void)
board_ti_set_ethaddr(2);
#endif
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
if (device_okay("/ocp/omap_dwc3_1 at 48880000"))
enable_usb_clocks(0);
if (device_okay("/ocp/omap_dwc3_2 at 488c0000"))
@@ -1172,7 +1172,7 @@ int board_fit_config_name_match(const char *name)
}
#endif
-#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
+#if IS_ENABLED(CONFIG_FASTBOOT) && !IS_ENABLED(CONFIG_ENV_IS_NOWHERE)
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
{
if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER)
diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index c88139ac7ac..e282ad80ca0 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -69,7 +69,7 @@ int board_fit_config_name_match(const char *name)
#endif
#if defined(CONFIG_SPL_BUILD)
-#if CONFIG_IS_ENABLED(USB_STORAGE)
+#if IS_ENABLED(CONFIG_USB_STORAGE)
static int fixup_usb_boot(const void *fdt_blob)
{
int ret = 0;
@@ -142,7 +142,7 @@ void spl_perform_fixups(struct spl_image_info *spl_image)
fixup_memory_node(spl_image);
#endif
-#if CONFIG_IS_ENABLED(USB_STORAGE)
+#if IS_ENABLED(CONFIG_USB_STORAGE)
fixup_usb_boot(spl_image->fdt_addr);
#endif
}
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 9a53884c98e..e3822a9b3d4 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -22,7 +22,7 @@
#include "board_detect.h"
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/**
* ti_i2c_eeprom_init - Initialize an i2c bus and probe for a device
* @i2c_bus: i2c bus number to initialize
@@ -90,7 +90,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
uint8_t offset_test;
bool one_byte_addressing = true;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
struct udevice *bus;
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index a8a216d034a..b5053734198 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -652,7 +652,7 @@ int dram_init_banksize(void)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
static int device_okay(const char *path)
{
int node;
@@ -704,7 +704,7 @@ int board_late_init(void)
if (board_is_dra71x_evm())
palmas_i2c_write_u8(LP873X_I2C_SLAVE_ADDR, 0x9, 0x7);
#endif
-#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL)
if (device_okay("/ocp/omap_dwc3_1 at 48880000"))
enable_usb_clocks(0);
if (device_okay("/ocp/omap_dwc3_2 at 488c0000"))
@@ -1049,7 +1049,7 @@ int board_fit_config_name_match(const char *name)
}
#endif
-#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
+#if IS_ENABLED(CONFIG_FASTBOOT) && !IS_ENABLED(CONFIG_ENV_IS_NOWHERE)
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
{
if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d4e672a7acd..7cf38ec3f78 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -104,7 +104,7 @@ int board_fit_config_name_match(const char *name)
}
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO) && CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_DM_GPIO) && IS_ENABLED(CONFIG_OF_LIBFDT)
/* Returns 1, if onboard mux is set to hyperflash */
static void __maybe_unused detect_enable_hyperflash(void *blob)
{
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 5229afad63b..2e9940d2184 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -259,7 +259,7 @@ int board_fit_config_name_match(const char *name)
#if defined(CONFIG_DTB_RESELECT)
static int k2g_alt_board_detect(void)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int rc;
rc = i2c_set_bus_num(1);
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 408198843fd..efd1781c1fd 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -149,7 +149,7 @@ int board_early_init_f(void)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static void board_gpio_init(void)
{
/* TODO */
diff --git a/board/toradex/verdin-imx8mp/spl.c b/board/toradex/verdin-imx8mp/spl.c
index 1838b464a0d..fc2a67f7f1e 100644
--- a/board/toradex/verdin-imx8mp/spl.c
+++ b/board/toradex/verdin-imx8mp/spl.c
@@ -82,7 +82,7 @@ struct i2c_pads_info i2c_pad_info1 = {
},
};
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index f2de039b6b4..95e700fa925 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -71,7 +71,7 @@ int board_early_init_f(void)
wdr4300_pinmux_config();
#endif
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT)
ar934x_pll_init(560, 480, 240);
ar934x_ddr_init(560, 480, 240);
#endif
diff --git a/board/tq/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c
index 1c2228c77ad..3b1185a3ce3 100644
--- a/board/tq/tqma6/tqma6.c
+++ b/board/tq/tqma6/tqma6.c
@@ -171,7 +171,7 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
#endif
#endif
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
static struct i2c_pads_info tqma6_i2c3_pads = {
/* I2C3: on board LM75, M24C64, */
.scl = {
@@ -216,7 +216,7 @@ int board_init(void)
#ifndef CONFIG_DM_SPI
tqma6_iomuxc_spi();
#endif
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
tqma6_setup_i2c();
#endif
@@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void)
};
}
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
/* setup board specific PMIC */
int power_init_board(void)
{
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 5e40583ab43..681d0a4b227 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -100,7 +100,7 @@ static struct i2c_pads_info i2c_pad_info1 = {
};
#endif
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
int power_init_board(void)
{
struct pmic *p;
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index da995dd0f58..03703a895ea 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -54,7 +54,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define REV_DETECTION IMX_GPIO_NR(2, 28)
/* Speed defined in Kconfig is only applicable when not using DM_I2C. */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
#define I2C1_SPEED_NON_DM 0
#define I2C2_SPEED_NON_DM 0
#else
@@ -259,7 +259,7 @@ static void do_enable_hdmi(struct display_info_t const *dev)
static int detect_i2c(struct display_info_t const *dev)
{
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus, *udev;
int rc;
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index d071ebfb9cc..2b7eb355fb9 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -456,7 +456,7 @@ int board_late_init_xilinx(void)
ret |= env_set_by_index("uuid", id, uuid);
}
- if (!CONFIG_IS_ENABLED(NET))
+ if (!IS_ENABLED(CONFIG_NET))
continue;
for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) {
@@ -571,7 +571,7 @@ error:
bool __maybe_unused __weak board_detection(void)
{
- if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM)) {
+ if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM)) {
int ret;
ret = xilinx_read_eeprom();
diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c
index 167252c240c..46794f32375 100644
--- a/board/xilinx/common/fru_ops.c
+++ b/board/xilinx/common/fru_ops.c
@@ -257,7 +257,7 @@ static int fru_parse_multirec(unsigned long addr)
struct fru_multirec_mac *mac = (void *)addr + hdr_len;
u32 type = FRU_DUT_MACID;
- if (CONFIG_IS_ENABLED(FRU_SC))
+ if (IS_ENABLED(CONFIG_FRU_SC))
type = FRU_SC_MACID;
if (mac->ver == type) {
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 81e1b69905e..cd62188eddd 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -42,7 +42,7 @@ int board_init(void)
fpga_add(fpga_xilinx, &versalpl);
#endif
- if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
+ if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM))
xilinx_read_eeprom();
return 0;
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 9a59445b442..067da76eb18 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -37,7 +37,7 @@ int board_init(void)
if (IS_ENABLED(CONFIG_SPL_BUILD))
printf("Silicon version:\t%d\n", zynq_get_silicon_version());
- if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
+ if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM))
xilinx_read_eeprom();
return 0;
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 39da96bcfb0..dee0b21b00f 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -45,7 +45,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
+#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
static xilinx_desc zynqmppl = {
xilinx_zynqmp, csu_dma, 1, &zynqmp_op, 0, &zynqmp_op, NULL,
ZYNQMP_FPGA_FLAGS
@@ -140,7 +140,7 @@ static void print_secure_boot(void)
int board_init(void)
{
-#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
+#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
struct udevice *soc;
char name[SOC_MAX_STR_SIZE];
int ret;
@@ -165,16 +165,16 @@ int board_init(void)
printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());
/* the CSU disables the JTAG interface when secure boot is enabled */
- if (CONFIG_IS_ENABLED(ZYNQMP_RESTORE_JTAG))
+ if (IS_ENABLED(CONFIG_ZYNQMP_RESTORE_JTAG))
restore_jtag();
#else
- if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
+ if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM))
xilinx_read_eeprom();
#endif
printf("EL Level:\tEL%d\n", current_el());
-#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
+#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL)
ret = soc_get(&soc);
if (!ret) {
ret = soc_get_machine(soc, name, sizeof(name));
@@ -278,7 +278,7 @@ int dram_init(void)
}
#endif
-#if !CONFIG_IS_ENABLED(SYSRESET)
+#if !IS_ENABLED(CONFIG_SYSRESET)
void reset_cpu(void)
{
}
diff --git a/boot/bootm.c b/boot/bootm.c
index 2eec60ec7b5..9c397bcfeee 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -126,7 +126,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
/* get image parameters */
switch (genimg_get_format(os_hdr)) {
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY:
images.os.type = image_get_type(os_hdr);
images.os.comp = image_get_comp(os_hdr);
@@ -137,7 +137,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
images.os.arch = image_get_arch(os_hdr);
break;
#endif
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
if (fit_image_get_type(images.fit_hdr_os,
images.fit_noffset_os,
@@ -209,7 +209,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
/* Kernel entry point is the setup.bin */
} else if (images.legacy_hdr_valid) {
images.ep = image_get_ep(&images.legacy_hdr_os_copy);
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
} else if (images.fit_uname_os) {
int ret;
@@ -293,7 +293,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
return 1;
}
-#if CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_OF_LIBFDT)
/* find flattened device tree */
ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images,
&images.ft_addr, &images.ft_len);
@@ -317,7 +317,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
set_working_fdt_addr(map_to_sysmem(images.ft_addr));
#endif
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
if (IS_ENABLED(CONFIG_FPGA)) {
/* find bitstreams */
ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT,
@@ -733,7 +733,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
}
}
#endif
-#if CONFIG_IS_ENABLED(OF_LIBFDT) && defined(CONFIG_LMB)
+#if IS_ENABLED(CONFIG_OF_LIBFDT) && defined(CONFIG_LMB)
if (!ret && (states & BOOTM_STATE_FDT)) {
boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr);
ret = boot_relocate_fdt(&images->lmb, &images->ft_addr,
@@ -809,7 +809,7 @@ err:
return ret;
}
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
/**
* image_get_kernel - verify legacy format kernel image
* @img_addr: in RAM address of the legacy format image to be verified
@@ -878,14 +878,14 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[], struct bootm_headers *images,
ulong *os_data, ulong *os_len)
{
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
struct legacy_img_hdr *hdr;
#endif
ulong img_addr;
const void *buf;
const char *fit_uname_config = NULL;
const char *fit_uname_kernel = NULL;
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
int os_noffset;
#endif
@@ -902,7 +902,7 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
*os_data = *os_len = 0;
buf = map_sysmem(img_addr, 0);
switch (genimg_get_format(buf)) {
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY:
printf("## Booting kernel from Legacy Image at %08lx ...\n",
img_addr);
@@ -946,7 +946,7 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
bootstage_mark(BOOTSTAGE_ID_DECOMP_IMAGE);
break;
#endif
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
os_noffset = fit_image_load(images, img_addr,
&fit_uname_kernel, &fit_uname_config,
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 99ff0e6c02d..aac2c2ef09a 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -57,7 +57,7 @@ static void copy_args(char *dest, int argc, char *const argv[], char delim)
static void __maybe_unused fit_unsupported_reset(const char *msg)
{
- if (CONFIG_IS_ENABLED(FIT_VERBOSE)) {
+ if (IS_ENABLED(CONFIG_FIT_VERBOSE)) {
printf("! FIT images not supported for '%s' - must reset board to recover!\n",
msg);
}
diff --git a/boot/bootstd-uclass.c b/boot/bootstd-uclass.c
index 81555d341e3..8eab75ca7e1 100644
--- a/boot/bootstd-uclass.c
+++ b/boot/bootstd-uclass.c
@@ -183,7 +183,7 @@ U_BOOT_DRIVER(bootstd_drv) = {
UCLASS_DRIVER(bootstd) = {
.id = UCLASS_BOOTSTD,
.name = "bootstd",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/boot/image-board.c b/boot/image-board.c
index 25b60ec30b3..97bc39e539f 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -224,12 +224,12 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr,
kernel_addr = image_load_addr;
debug("* kernel: default image load address = 0x%08lx\n",
image_load_addr);
- } else if (CONFIG_IS_ENABLED(FIT) &&
+ } else if (IS_ENABLED(CONFIG_FIT) &&
fit_parse_conf(img_addr, image_load_addr, &kernel_addr,
fit_uname_config)) {
debug("* kernel: config '%s' from image at 0x%08lx\n",
*fit_uname_config, kernel_addr);
- } else if (CONFIG_IS_ENABLED(FIT) &&
+ } else if (IS_ENABLED(CONFIG_FIT) &&
fit_parse_subimage(img_addr, image_load_addr, &kernel_addr,
fit_uname_kernel)) {
debug("* kernel: subimage '%s' from image at 0x%08lx\n",
@@ -272,14 +272,14 @@ ulong genimg_get_kernel_addr(char * const img_addr)
*/
int genimg_get_format(const void *img_addr)
{
- if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) {
+ if (IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)) {
const struct legacy_img_hdr *hdr;
hdr = (const struct legacy_img_hdr *)img_addr;
if (image_check_magic(hdr))
return IMAGE_FORMAT_LEGACY;
}
- if (CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)) {
+ if (IS_ENABLED(CONFIG_FIT) || IS_ENABLED(CONFIG_OF_LIBFDT)) {
if (!fdt_check_header(img_addr))
return IMAGE_FORMAT_FIT;
}
@@ -303,7 +303,7 @@ int genimg_get_format(const void *img_addr)
*/
int genimg_has_config(struct bootm_headers *images)
{
- if (CONFIG_IS_ENABLED(FIT) && images->fit_uname_cfg)
+ if (IS_ENABLED(CONFIG_FIT) && images->fit_uname_cfg)
return 1;
return 0;
@@ -331,7 +331,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
ulong rd_addr;
char *buf;
- if (CONFIG_IS_ENABLED(FIT)) {
+ if (IS_ENABLED(CONFIG_FIT)) {
fit_uname_config = images->fit_uname_cfg;
fit_uname_ramdisk = NULL;
@@ -366,7 +366,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
rd_addr = hextoul(select, NULL);
debug("* ramdisk: cmdline image address = 0x%08lx\n", rd_addr);
}
- if (CONFIG_IS_ENABLED(FIT) && !select) {
+ if (IS_ENABLED(CONFIG_FIT) && !select) {
/* use FIT configuration provided in first bootm
* command argument. If the property is not defined,
* quit silently (with -ENOPKG)
@@ -388,7 +388,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
buf = map_sysmem(rd_addr, 0);
switch (genimg_get_format(buf)) {
case IMAGE_FORMAT_LEGACY:
- if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) {
+ if (IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)) {
const struct legacy_img_hdr *rd_hdr;
printf("## Loading init Ramdisk from Legacy Image at %08lx ...\n",
@@ -407,7 +407,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
}
break;
case IMAGE_FORMAT_FIT:
- if (CONFIG_IS_ENABLED(FIT)) {
+ if (IS_ENABLED(CONFIG_FIT)) {
rd_noffset = fit_image_load(images, rd_addr,
&fit_uname_ramdisk,
&fit_uname_config,
@@ -649,7 +649,7 @@ error:
int boot_get_setup(struct bootm_headers *images, u8 arch,
ulong *setup_start, ulong *setup_len)
{
- if (!CONFIG_IS_ENABLED(FIT))
+ if (!IS_ENABLED(CONFIG_FIT))
return -ENOENT;
return boot_get_setup_fit(images, arch, setup_start, setup_len);
@@ -929,7 +929,7 @@ int image_setup_linux(struct bootm_headers *images)
/* This function cannot be called without lmb support */
if (!IS_ENABLED(CONFIG_LMB))
return -EFAULT;
- if (CONFIG_IS_ENABLED(OF_LIBFDT))
+ if (IS_ENABLED(CONFIG_OF_LIBFDT))
boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
if (IS_ENABLED(CONFIG_SYS_BOOT_GET_CMDLINE)) {
@@ -941,13 +941,13 @@ int image_setup_linux(struct bootm_headers *images)
}
}
- if (CONFIG_IS_ENABLED(OF_LIBFDT)) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT)) {
ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
if (ret)
return ret;
}
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && of_size) {
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && of_size) {
ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb);
if (ret)
return ret;
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 714d05d1a53..9d4e4a142b5 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -36,7 +36,7 @@ static void fdt_error(const char *msg)
puts(" - must RESET the board to recover.\n");
}
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
static const struct legacy_img_hdr *image_get_fdt(ulong fdt_addr)
{
const struct legacy_img_hdr *fdt_hdr = map_sysmem(fdt_addr, 0);
@@ -297,7 +297,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch,
const char *buf;
ulong fdt_addr;
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
const char *fit_uname_config = images->fit_uname_cfg;
const char *fit_uname_fdt = NULL;
ulong default_addr;
@@ -332,7 +332,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch,
debug("* fdt: cmdline image address = 0x%08lx\n",
fdt_addr);
}
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
} else {
/* use FIT configuration provided in first bootm
* command argument
@@ -356,7 +356,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch,
*/
buf = map_sysmem(fdt_addr, 0);
switch (genimg_get_format(buf)) {
-#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
+#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY: {
const struct legacy_img_hdr *fdt_hdr;
ulong load, load_end;
@@ -408,7 +408,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch,
* (libfdt based) and raw FDT blob (also libfdt
* based).
*/
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
/* check FDT blob vs FIT blob */
if (!fit_check_format(buf, IMAGE_SIZE_INVAL)) {
ulong load, len;
@@ -665,7 +665,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
goto err;
}
}
- if (!of_live_active() && CONFIG_IS_ENABLED(EVENT)) {
+ if (!of_live_active() && IS_ENABLED(CONFIG_EVENT)) {
struct event_ft_fixup fixup;
fixup.tree = oftree_from_fdt(blob);
diff --git a/boot/image-fit.c b/boot/image-fit.c
index 3cc556b727f..07046340efa 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -380,7 +380,7 @@ void fit_print_contents(const void *fit)
const char *p;
time_t timestamp;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
+ if (!IS_ENABLED(CONFIG_FIT_PRINT))
return;
/* Indent string is defined in header image.h */
@@ -485,7 +485,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
int ndepth;
int ret;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
+ if (!IS_ENABLED(CONFIG_FIT_PRINT))
return;
/* Mandatory properties */
@@ -1664,7 +1664,7 @@ int fit_check_format(const void *fit, ulong size)
return -ENOEXEC;
}
- if (CONFIG_IS_ENABLED(FIT_FULL_CHECK)) {
+ if (IS_ENABLED(CONFIG_FIT_FULL_CHECK)) {
/*
* If we are not given the size, make do wtih calculating it.
* This is not as secure, so we should consider a flag to
@@ -1683,7 +1683,7 @@ int fit_check_format(const void *fit, ulong size)
* the same name as a valid node but with a unit address
* attached. Protect against this by disallowing unit addresses.
*/
- if (!ret && CONFIG_IS_ENABLED(FIT_SIGNATURE)) {
+ if (!ret && IS_ENABLED(CONFIG_FIT_SIGNATURE)) {
ret = fdt_check_no_at(fit, 0);
if (ret) {
@@ -2082,7 +2082,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
ret = fit_check_format(fit, IMAGE_SIZE_INVAL);
if (ret) {
printf("Bad FIT %s image format! (err=%d)\n", prop_name, ret);
- if (CONFIG_IS_ENABLED(FIT_SIGNATURE) && ret == -EADDRNOTAVAIL)
+ if (IS_ENABLED(CONFIG_FIT_SIGNATURE) && ret == -EADDRNOTAVAIL)
printf("Signature checking prevents use of unit addresses (@) in nodes\n");
bootstage_error(bootstage_id + BOOTSTAGE_SUB_FORMAT);
return ret;
diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c
index b504ab42a54..0ff6e1d2fc8 100644
--- a/boot/image-pre-load.c
+++ b/boot/image-pre-load.c
@@ -366,7 +366,7 @@ int image_pre_load(ulong addr)
image_load_offset = 0;
- if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD_SIG))
+ if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD_SIG))
ret = image_pre_load_sig(addr);
return ret;
diff --git a/boot/image.c b/boot/image.c
index 958dbf85347..cf4e51daac5 100644
--- a/boot/image.c
+++ b/boot/image.c
@@ -20,7 +20,7 @@
#include <status_led.h>
#endif
-#if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_FIT) || IS_ENABLED(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
#include <fdt_support.h>
#endif
@@ -464,11 +464,11 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
ret = -ENOSPC;
break;
case IH_COMP_GZIP:
- if (!tools_build() && CONFIG_IS_ENABLED(GZIP))
+ if (!tools_build() && IS_ENABLED(CONFIG_GZIP))
ret = gunzip(load_buf, unc_len, image_buf, &image_len);
break;
case IH_COMP_BZIP2:
- if (!tools_build() && CONFIG_IS_ENABLED(BZIP2)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_BZIP2)) {
uint size = unc_len;
/*
@@ -482,7 +482,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
}
break;
case IH_COMP_LZMA:
- if (!tools_build() && CONFIG_IS_ENABLED(LZMA)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_LZMA)) {
SizeT lzma_len = unc_len;
ret = lzmaBuffToBuffDecompress(load_buf, &lzma_len,
@@ -491,7 +491,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
}
break;
case IH_COMP_LZO:
- if (!tools_build() && CONFIG_IS_ENABLED(LZO)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_LZO)) {
size_t size = unc_len;
ret = lzop_decompress(image_buf, image_len, load_buf, &size);
@@ -499,7 +499,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
}
break;
case IH_COMP_LZ4:
- if (!tools_build() && CONFIG_IS_ENABLED(LZ4)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_LZ4)) {
size_t size = unc_len;
ret = ulz4fn(image_buf, image_len, load_buf, &size);
@@ -507,7 +507,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
}
break;
case IH_COMP_ZSTD:
- if (!tools_build() && CONFIG_IS_ENABLED(ZSTD)) {
+ if (!tools_build() && IS_ENABLED(CONFIG_ZSTD)) {
struct abuf in, out;
abuf_init_set(&in, image_buf, image_len);
diff --git a/boot/vbe_simple.c b/boot/vbe_simple.c
index 59676d8613f..43123fcabc8 100644
--- a/boot/vbe_simple.c
+++ b/boot/vbe_simple.c
@@ -211,7 +211,7 @@ static int bootmeth_vbe_simple_bind(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id generic_simple_vbe_simple_ids[] = {
{ .compatible = "fwupd,vbe-simple" },
{ }
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index bf002f84475..1d230bb26a6 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -124,7 +124,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size);
if (IS_ENABLED(CONFIG_VIDEO))
show_video_info();
-#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
+#if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
bdinfo_print_num_l("multi_dtb_fit", (ulong)gd->multi_dtb_fit);
#endif
if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) {
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 2a7d42925d6..dd9eafb00de 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -162,7 +162,7 @@ static efi_status_t efi_env_set_load_options(efi_handle_t handle,
return ret;
}
-#if !CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#if !IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)
/**
* copy_fdt() - Copy the device tree to a new location available to EFI
@@ -250,7 +250,7 @@ static void *get_config_table(const efi_guid_t *guid)
return NULL;
}
-#endif /* !CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) */
+#endif /* !IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) */
/**
* efi_install_fdt() - install device tree
@@ -275,7 +275,7 @@ efi_status_t efi_install_fdt(void *fdt)
* The EBBR spec requires that we have either an FDT or an ACPI table
* but not both.
*/
-#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)
if (fdt) {
log_warning("WARNING: Can't have ACPI table and device tree - ignoring DT.\n");
return EFI_SUCCESS;
diff --git a/cmd/clk.c b/cmd/clk.c
index a483fd89812..b0658693a99 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -98,7 +98,7 @@ static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc,
return ret;
}
-#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_CLK)
static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -132,7 +132,7 @@ static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc,
static struct cmd_tbl cmd_clk_sub[] = {
U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""),
-#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_CLK)
U_BOOT_CMD_MKENT(setfreq, 3, 1, do_clk_setfreq, "", ""),
#endif
};
diff --git a/cmd/date.c b/cmd/date.c
index 58505e6e1d3..305b15bfd7d 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -49,7 +49,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
}
-#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
old_bus = i2c_get_bus_num();
i2c_set_bus_num(CFG_SYS_RTC_BUS_NUM);
#else
@@ -122,7 +122,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
}
/* switch back to original I2C bus */
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
i2c_set_bus_num(old_bus);
#elif !defined(CONFIG_DM_RTC)
I2C_SET_BUS(old_bus);
diff --git a/cmd/disk.c b/cmd/disk.c
index 3d7bc2f6018..4498f2afe34 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -24,7 +24,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
#endif
struct blk_desc *dev_desc;
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
const void *fit_hdr = NULL;
#endif
@@ -84,7 +84,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
cnt = image_get_image_size(hdr);
break;
#endif
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *) addr;
puts("Fit image detected...\n");
@@ -110,7 +110,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
}
bootstage_mark(BOOTSTAGE_ID_IDE_READ);
-#if CONFIG_IS_ENABLED(FIT)
+#if IS_ENABLED(CONFIG_FIT)
/* This cannot be done earlier,
* we need complete FIT image in RAM first */
if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
diff --git a/cmd/dm.c b/cmd/dm.c
index 3263547cbec..507e4767a51 100644
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -35,7 +35,7 @@ static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc,
return 0;
}
-#if CONFIG_IS_ENABLED(DM_STATS)
+#if IS_ENABLED(CONFIG_DM_STATS)
static int do_dm_dump_mem(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -76,7 +76,7 @@ static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
return 0;
}
-#if CONFIG_IS_ENABLED(DM_STATS)
+#if IS_ENABLED(CONFIG_DM_STATS)
#define DM_MEM_HELP "dm mem Provide a summary of memory usage\n"
#define DM_MEM U_BOOT_SUBCMD_MKENT(mem, 1, 1, do_dm_dump_mem),
#else
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 0b6ca8c505f..dc5e84d767e 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -34,7 +34,7 @@
#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)
#define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1))
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static int eeprom_i2c_bus;
#endif
@@ -46,9 +46,9 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)
void eeprom_init(int bus)
{
/* I2C EEPROM */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
eeprom_i2c_bus = bus;
-#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
if (bus >= 0)
i2c_set_bus_num(bus);
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -112,7 +112,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,
{
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(eeprom_i2c_bus, addr[0],
@@ -149,7 +149,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer,
int rcode = 0;
uchar addr[3];
-#if !CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS)
+#if !IS_ENABLED(CONFIG_DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS)
eeprom_init(CONFIG_SYS_I2C_EEPROM_BUS);
#endif
diff --git a/cmd/i2c.c b/cmd/i2c.c
index dd803ee2271..dcca7d8f162 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -98,7 +98,7 @@ static uint i2c_mm_last_alen;
* pairs. The following macros take care of this */
#if defined(CFG_SYS_I2C_NOPROBES)
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
static struct
{
uchar bus;
@@ -114,7 +114,7 @@ static uchar i2c_no_probes[] = CFG_SYS_I2C_NOPROBES;
#define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */
#define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a))
#define NO_PROBE_ADDR(i) i2c_no_probes[(i)]
-#endif /* CONFIG_IS_ENABLED(SYS_I2C_LEGACY) */
+#endif /* IS_ENABLED(CONFIG_SYS_I2C_LEGACY) */
#endif
#define DISP_LINE_LEN 16
@@ -124,13 +124,13 @@ static uchar i2c_no_probes[] = CFG_SYS_I2C_NOPROBES;
* For legacy code, this is not stored, so we need to use a suitable
* default.
*/
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
#define DEFAULT_ADDR_LEN (-1)
#else
#define DEFAULT_ADDR_LEN 1
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static struct udevice *i2c_cur_bus;
static int cmd_i2c_set_bus_num(unsigned int busnum)
@@ -250,7 +250,7 @@ static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc,
int alen;
u_char *memaddr;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -281,7 +281,7 @@ static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc,
*/
memaddr = (u_char *)hextoul(argv[4], NULL);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -304,7 +304,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
int alen;
u_char *memaddr;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
struct dm_i2c_chip *i2c_chip;
#endif
@@ -336,7 +336,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
*/
length = hextoul(argv[4], NULL);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -354,7 +354,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
* a page boundary. No write delay upon completion, take this
* into account if linking commands.
*/
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
i2c_chip->flags &= ~DM_I2C_CHIP_WR_ADDRESS;
ret = dm_i2c_write(dev, devaddr, memaddr, length);
#else
@@ -368,7 +368,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
* write transactions of one byte each
*/
while (length-- > 0) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
i2c_chip->flags |= DM_I2C_CHIP_WR_ADDRESS;
ret = dm_i2c_write(dev, devaddr++, memaddr++, 1);
#else
@@ -387,7 +387,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
return 0;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static int do_i2c_flags(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -473,7 +473,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc,
int j;
uint nbytes, linebytes;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -515,7 +515,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc,
length = hextoul(argv[3], NULL);
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -536,7 +536,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc,
linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, addr, linebuf, linebytes);
#else
ret = i2c_read(chip, addr, alen, linebuf, linebytes);
@@ -594,7 +594,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc,
uchar byte;
int count;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -614,7 +614,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc,
if (alen > 3)
return CMD_RET_USAGE;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -635,7 +635,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc,
count = 1;
while (count-- > 0) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_write(dev, addr++, &byte, 1);
#else
ret = i2c_write(chip, addr++, alen, &byte, 1);
@@ -683,7 +683,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
ulong crc;
ulong err;
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -703,7 +703,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
if (alen > 3)
return CMD_RET_USAGE;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -723,7 +723,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
crc = 0;
err = 0;
while (count-- > 0) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, addr, &byte, 1);
#else
ret = i2c_read(chip, addr, alen, &byte, 1);
@@ -767,7 +767,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
int size = 1;
int nbytes;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -804,7 +804,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
return CMD_RET_USAGE;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -818,7 +818,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
*/
do {
printf("%08lx:", addr);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, addr, (uchar *)&data, size);
#else
ret = i2c_read(chip, addr, alen, (uchar *)&data, size);
@@ -865,7 +865,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
* good enough to not time out
*/
bootretry_reset_cmd_timeout();
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_write(dev, addr, (uchar *)&data,
size);
#else
@@ -917,7 +917,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
unsigned int bus = GET_BUS_NUM;
#endif /* NOPROBES */
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus, *dev;
if (i2c_get_cur_bus(&bus))
@@ -943,7 +943,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
if (skip)
continue;
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_probe(bus, j, 0, &dev);
#else
ret = i2c_probe(j);
@@ -992,7 +992,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc,
u_char bytes[16];
int delay;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -1011,7 +1011,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc,
alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
if (alen > 3)
return CMD_RET_USAGE;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret && alen != -1)
ret = i2c_set_chip_offset_len(dev, alen);
@@ -1037,7 +1037,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc,
* Run the loop...
*/
while (1) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, addr, bytes, length);
#else
ret = i2c_read(chip, addr, alen, bytes, length);
@@ -1118,7 +1118,7 @@ static int do_sdram(struct cmd_tbl *cmdtp, int flag, int argc,
u_char data[128];
u_char cksum;
int j, ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -1174,7 +1174,7 @@ static int do_sdram(struct cmd_tbl *cmdtp, int flag, int argc,
*/
chip = hextoul(argv[1], NULL);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret)
ret = dm_i2c_read(dev, 0, data, sizeof(data));
@@ -1617,7 +1617,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
uint chip;
struct edid1_info edid;
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
#endif
@@ -1627,7 +1627,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
chip = hextoul(argv[1], NULL);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_cur_bus_chip(chip, &dev);
if (!ret)
ret = dm_i2c_read(dev, 0, (uchar *)&edid, sizeof(edid));
@@ -1648,7 +1648,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
#endif /* CONFIG_I2C_EDID */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
static void show_bus(struct udevice *bus)
{
struct udevice *dev;
@@ -1678,13 +1678,13 @@ static void show_bus(struct udevice *bus)
*
* Returns zero always.
*/
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
if (argc == 1) {
/* show all busses */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus;
struct uclass *uc;
int ret;
@@ -1719,7 +1719,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
/* show specific bus */
i = dectoul(argv[1], NULL);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus;
int ret;
@@ -1764,7 +1764,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -1773,7 +1773,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc == 1) {
/* querying current setting */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus;
if (!i2c_get_cur_bus(&bus))
@@ -1786,14 +1786,14 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Current bus is %d\n", bus_no);
} else {
bus_no = dectoul(argv[1], NULL);
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
if (bus_no >= CFG_SYS_NUM_I2C_BUSES) {
printf("Invalid bus %d\n", bus_no);
return -1;
}
#endif
printf("Setting bus to %d\n", bus_no);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = cmd_i2c_set_bus_num(bus_no);
#else
ret = i2c_set_bus_num(bus_no);
@@ -1804,7 +1804,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
return ret ? CMD_RET_FAILURE : 0;
}
-#endif /* CONFIG_IS_ENABLED(SYS_I2C_LEGACY) */
+#endif /* IS_ENABLED(CONFIG_SYS_I2C_LEGACY) */
/**
* do_i2c_bus_speed() - Handle the "i2c speed" command-line command
@@ -1821,14 +1821,14 @@ static int do_i2c_bus_speed(struct cmd_tbl *cmdtp, int flag, int argc,
{
int speed, ret=0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus;
if (i2c_get_cur_bus(&bus))
return 1;
#endif
if (argc == 1) {
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
speed = dm_i2c_get_bus_speed(bus);
#else
speed = i2c_get_bus_speed();
@@ -1838,7 +1838,7 @@ static int do_i2c_bus_speed(struct cmd_tbl *cmdtp, int flag, int argc,
} else {
speed = dectoul(argv[1], NULL);
printf("Setting bus speed to %d Hz\n", speed);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_set_bus_speed(bus, speed);
#else
ret = i2c_set_bus_speed(speed);
@@ -1894,7 +1894,7 @@ static int do_i2c_nm(struct cmd_tbl *cmdtp, int flag, int argc,
static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *bus;
if (i2c_get_cur_bus(&bus))
@@ -1903,18 +1903,18 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Error: Not supported by the driver\n");
return CMD_RET_FAILURE;
}
-#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
#endif
return 0;
}
static struct cmd_tbl cmd_i2c_sub[] = {
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_show_bus, "", ""),
#endif
U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""),
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""),
#endif
#if defined(CONFIG_I2C_EDID)
@@ -1928,7 +1928,7 @@ static struct cmd_tbl cmd_i2c_sub[] = {
U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""),
U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, "", ""),
U_BOOT_CMD_MKENT(write, 6, 0, do_i2c_write, "", ""),
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
U_BOOT_CMD_MKENT(flags, 2, 1, do_i2c_flags, "", ""),
U_BOOT_CMD_MKENT(olen, 2, 1, do_i2c_olen, "", ""),
#endif
@@ -1985,12 +1985,12 @@ static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
/***************************************************/
#ifdef CONFIG_SYS_LONGHELP
static char i2c_help_text[] =
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
"bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
"i2c " /* That's the prefix for the crc32 command below. */
#endif
"crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C)
"i2c dev [dev] - show or set current I2C bus\n"
#endif
#if defined(CONFIG_I2C_EDID)
@@ -2005,7 +2005,7 @@ static char i2c_help_text[] =
"i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
"i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n"
" to I2C; the -s option selects bulk write in a single transaction\n"
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
"i2c flags chip [flags] - set or get chip flags\n"
"i2c olen chip [offset_length] - set or get chip offset length\n"
#endif
diff --git a/cmd/mmc.c b/cmd/mmc.c
index c79d9407986..0f5bcebca16 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -37,7 +37,7 @@ static void print_mmcinfo(struct mmc *mmc)
}
printf("Bus Speed: %d\n", mmc->clock);
-#if CONFIG_IS_ENABLED(MMC_VERBOSE)
+#if IS_ENABLED(CONFIG_MMC_VERBOSE)
printf("Mode: %s\n", mmc_mode_name(mmc->selected_mode));
mmc_dump_capabilities("card capabilities", mmc->card_caps);
mmc_dump_capabilities("host capabilities", mmc->host_caps);
@@ -58,7 +58,7 @@ static void print_mmcinfo(struct mmc *mmc)
printf("Bus Width: %d-bit%s\n", mmc->bus_width,
mmc->ddr_mode ? " DDR" : "");
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
puts("Erase Group Size: ");
print_size(((u64)mmc->erase_grp_size) << 9, "\n");
#endif
@@ -70,7 +70,7 @@ static void print_mmcinfo(struct mmc *mmc)
u8 wp;
int ret;
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
puts("HC WP Group Size: ");
print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n");
#endif
@@ -187,7 +187,7 @@ static int do_mmcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-#if CONFIG_IS_ENABLED(CMD_MMC_RPMB)
+#if IS_ENABLED(CONFIG_CMD_MMC_RPMB)
static int confirm_key_prog(void)
{
puts("Warning: Programming authentication key can be done only once !\n"
@@ -371,7 +371,7 @@ static int do_mmc_read(struct cmd_tbl *cmdtp, int flag,
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
}
-#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE)
+#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE)
static lbaint_t mmc_sparse_write(struct sparse_storage *info, lbaint_t blk,
lbaint_t blkcnt, const void *buffer)
{
@@ -436,7 +436,7 @@ static int do_mmc_sparse_write(struct cmd_tbl *cmdtp, int flag,
}
#endif
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
static int do_mmc_write(struct cmd_tbl *cmdtp, int flag,
int argc, char *const argv[])
{
@@ -603,7 +603,7 @@ static int do_mmc_list(struct cmd_tbl *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
static void parse_hwpart_user_enh_size(struct mmc *mmc,
struct mmc_hwpart_conf *pconf,
char *argv)
@@ -1076,18 +1076,18 @@ static struct cmd_tbl cmd_mmc[] = {
U_BOOT_CMD_MKENT(info, 1, 0, do_mmcinfo, "", ""),
U_BOOT_CMD_MKENT(read, 4, 1, do_mmc_read, "", ""),
U_BOOT_CMD_MKENT(wp, 2, 0, do_mmc_boot_wp, "", ""),
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
U_BOOT_CMD_MKENT(write, 4, 0, do_mmc_write, "", ""),
U_BOOT_CMD_MKENT(erase, 3, 0, do_mmc_erase, "", ""),
#endif
-#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE)
+#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE)
U_BOOT_CMD_MKENT(swrite, 3, 0, do_mmc_sparse_write, "", ""),
#endif
U_BOOT_CMD_MKENT(rescan, 2, 1, do_mmc_rescan, "", ""),
U_BOOT_CMD_MKENT(part, 1, 1, do_mmc_part, "", ""),
U_BOOT_CMD_MKENT(dev, 4, 0, do_mmc_dev, "", ""),
U_BOOT_CMD_MKENT(list, 1, 1, do_mmc_list, "", ""),
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
U_BOOT_CMD_MKENT(hwpartition, 28, 0, do_mmc_hwpartition, "", ""),
#endif
#ifdef CONFIG_SUPPORT_EMMC_BOOT
@@ -1096,7 +1096,7 @@ static struct cmd_tbl cmd_mmc[] = {
U_BOOT_CMD_MKENT(partconf, 5, 0, do_mmc_partconf, "", ""),
U_BOOT_CMD_MKENT(rst-function, 3, 0, do_mmc_rst_func, "", ""),
#endif
-#if CONFIG_IS_ENABLED(CMD_MMC_RPMB)
+#if IS_ENABLED(CONFIG_CMD_MMC_RPMB)
U_BOOT_CMD_MKENT(rpmb, CONFIG_SYS_MAXARGS, 1, do_mmcrpmb, "", ""),
#endif
U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, "", ""),
@@ -1138,7 +1138,7 @@ U_BOOT_CMD(
"info - display info of the current MMC device\n"
"mmc read addr blk# cnt\n"
"mmc write addr blk# cnt\n"
-#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE)
+#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE)
"mmc swrite addr blk#\n"
#endif
"mmc erase blk# cnt\n"
@@ -1154,7 +1154,7 @@ U_BOOT_CMD(
" PART - [0|1]\n"
" : 0 - first boot partition, 1 - second boot partition\n"
" if not assigned, write protect all boot partitions\n"
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
"mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning\n"
" arguments (sizes in 512-byte blocks):\n"
" USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>\n"
@@ -1178,7 +1178,7 @@ U_BOOT_CMD(
" - Change the RST_n_FUNCTION field of the specified device\n"
" WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.\n"
#endif
-#if CONFIG_IS_ENABLED(CMD_MMC_RPMB)
+#if IS_ENABLED(CONFIG_CMD_MMC_RPMB)
"mmc rpmb read addr blk# cnt [address of auth-key] - block size is 256 bytes\n"
"mmc rpmb write addr blk# cnt <address of auth-key> - block size is 256 bytes\n"
"mmc rpmb key <address of auth-key> - program the RPMB authentication key.\n"
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 1efbe2e607c..1336e1634f5 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -177,7 +177,7 @@ static ulong get_load_addr(void)
/********************************************************************
* eMMC services
********************************************************************/
-#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_MMC_WRITE)
static int mmc_burn_image(size_t image_size)
{
struct mmc *mmc;
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 277293679df..2913e538605 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -59,7 +59,7 @@ DECLARE_GLOBAL_DATA_PTR;
#endif
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
#if !defined(ENV_IS_IN_DEVICE) && \
!defined(CONFIG_ENV_IS_NOWHERE)
# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 707167fcd59..30361cf6d3f 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -18,7 +18,7 @@
#include <reiserfs.h>
#include <part.h>
-#if !CONFIG_IS_ENABLED(DOS_PARTITION)
+#if !IS_ENABLED(CONFIG_DOS_PARTITION)
#error DOS partition support must be selected
#endif
diff --git a/cmd/sb.c b/cmd/sb.c
index 0d55818e3c6..904ddb50a80 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -14,7 +14,7 @@
static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
if (gd->spl_handoff)
printf("SPL handoff magic %lx\n", gd->spl_handoff->arch.magic);
else
diff --git a/cmd/sf.c b/cmd/sf.c
index 73a890b8ff5..1ac5d7ece86 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -92,7 +92,7 @@ static int do_spi_flash_probe(int argc, char *const argv[])
unsigned int mode = CONFIG_SF_DEFAULT_MODE;
char *endp;
bool use_dt = true;
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
struct udevice *new, *bus_dev;
int ret;
#else
@@ -127,7 +127,7 @@ static int do_spi_flash_probe(int argc, char *const argv[])
use_dt = false;
}
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
/* Remove the old device, otherwise probe will just be a nop */
ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new);
if (!ret) {
diff --git a/cmd/spi.c b/cmd/spi.c
index f30018f33be..df932afa9be 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -38,7 +38,7 @@ static int do_spi_xfer(int bus, int cs)
struct spi_slave *slave;
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
char name[30], *str;
struct udevice *dev;
@@ -63,7 +63,7 @@ static int do_spi_xfer(int bus, int cs)
goto done;
ret = spi_xfer(slave, bitlen, dout, din,
SPI_XFER_BEGIN | SPI_XFER_END);
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
/* We don't get an error code in this case */
if (ret)
ret = -EIO;
@@ -79,7 +79,7 @@ static int do_spi_xfer(int bus, int cs)
}
done:
spi_release_bus(slave);
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
spi_free_slave(slave);
#endif
diff --git a/cmd/zfs.c b/cmd/zfs.c
index 6ef1b56ab10..53c57386024 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -24,7 +24,7 @@
#include <usb.h>
#endif
-#if !CONFIG_IS_ENABLED(DOS_PARTITION) && !CONFIG_IS_ENABLED(EFI_PARTITION)
+#if !IS_ENABLED(CONFIG_DOS_PARTITION) && !IS_ENABLED(CONFIG_EFI_PARTITION)
#error DOS or EFI partition support must be selected
#endif
diff --git a/common/bloblist.c b/common/bloblist.c
index 0d63b6e8817..3f4f0009129 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -459,7 +459,7 @@ int bloblist_init(void)
}
}
if (ret) {
- if (CONFIG_IS_ENABLED(BLOBLIST_ALLOC)) {
+ if (IS_ENABLED(CONFIG_BLOBLIST_ALLOC)) {
void *ptr = memalign(BLOBLIST_ALIGN, size);
if (!ptr)
diff --git a/common/board_f.c b/common/board_f.c
index bedcedaa32f..57fe9486a57 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -171,7 +171,7 @@ static int print_resetinfo(void)
}
#endif
-#if defined(CONFIG_DISPLAY_CPUINFO) && CONFIG_IS_ENABLED(CPU)
+#if defined(CONFIG_DISPLAY_CPUINFO) && IS_ENABLED(CONFIG_CPU)
static int print_cpuinfo(void)
{
struct udevice *dev;
@@ -269,7 +269,7 @@ __weak int dram_init_banksize(void)
return 0;
}
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
static int init_func_i2c(void)
{
puts("I2C: ");
@@ -307,7 +307,7 @@ static int setup_mon_len(void)
static int setup_spl_handoff(void)
{
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF,
sizeof(struct spl_handoff));
debug("Found SPL hand-off info %p\n", gd->spl_handoff);
@@ -729,7 +729,7 @@ static int fix_fdt(void)
/* ARM calls relocate_code from its crt0.S */
#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
- !CONFIG_IS_ENABLED(X86_64)
+ !IS_ENABLED(CONFIG_X86_64)
static int jump_to_copy(void)
{
@@ -888,7 +888,7 @@ static const init_fnc_t init_sequence_f[] = {
INIT_FUNC_WATCHDOG_INIT
misc_init_f,
INIT_FUNC_WATCHDOG_RESET
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
init_func_i2c,
#endif
#if defined(CONFIG_VID) && !defined(CONFIG_SPL)
@@ -967,7 +967,7 @@ static const init_fnc_t init_sequence_f[] = {
*/
cyclic_unregister_all,
#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
- !CONFIG_IS_ENABLED(X86_64)
+ !IS_ENABLED(CONFIG_X86_64)
jump_to_copy,
#endif
NULL,
@@ -982,7 +982,7 @@ void board_init_f(ulong boot_flags)
hang();
#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
- !defined(CONFIG_EFI_APP) && !CONFIG_IS_ENABLED(X86_64) && \
+ !defined(CONFIG_EFI_APP) && !IS_ENABLED(CONFIG_X86_64) && \
!defined(CONFIG_ARC)
/* NOTREACHED - jump_to_copy() does not return */
hang();
@@ -1008,7 +1008,7 @@ void board_init_f(ulong boot_flags)
* all archs will move to this when generic relocation is implemented.
*/
static const init_fnc_t init_sequence_f_r[] = {
-#if !CONFIG_IS_ENABLED(X86_64)
+#if !IS_ENABLED(CONFIG_X86_64)
init_cache_f_r,
#endif
diff --git a/common/board_r.c b/common/board_r.c
index 5c2cec13606..9430207aa0f 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -215,7 +215,7 @@ static int initr_malloc(void)
static int initr_of_live(void)
{
- if (CONFIG_IS_ENABLED(OF_LIVE)) {
+ if (IS_ENABLED(CONFIG_OF_LIVE)) {
int ret;
bootstage_start(BOOTSTAGE_ID_ACCUM_OF_LIVE, "of_live");
@@ -307,7 +307,7 @@ static int initr_binman(void)
{
int ret;
- if (!CONFIG_IS_ENABLED(BINMAN_FDT))
+ if (!IS_ENABLED(CONFIG_BINMAN_FDT))
return 0;
ret = binman_init();
@@ -560,7 +560,7 @@ static int dm_announce(void)
dm_get_stats(&device_count, &uclass_count);
printf("Core: %d devices, %d uclasses", device_count,
uclass_count);
- if (CONFIG_IS_ENABLED(OF_REAL))
+ if (IS_ENABLED(CONFIG_OF_REAL))
printf(", devicetree: %s", fdtdec_get_srcname());
printf("\n");
if (IS_ENABLED(CONFIG_OF_HAS_PRIOR_STAGE) &&
@@ -609,7 +609,7 @@ static init_fnc_t init_sequence_r[] = {
*/
#endif
initr_reloc_global_data,
-#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
+#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && IS_ENABLED(CONFIG_EVENT)
event_manual_reloc,
#endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
@@ -656,7 +656,7 @@ static init_fnc_t init_sequence_r[] = {
serial_initialize,
initr_announce,
dm_announce,
-#if CONFIG_IS_ENABLED(WDT)
+#if IS_ENABLED(CONFIG_WDT)
initr_watchdog,
#endif
INIT_FUNC_WATCHDOG_RESET
@@ -802,7 +802,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
* TODO(sjg at chromium.org): Consider doing this for all archs, or
* dropping the new_gd parameter.
*/
- if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP))
+ if (IS_ENABLED(CONFIG_X86_64) && !IS_ENABLED(CONFIG_EFI_APP))
arch_setup_gd(new_gd);
#if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
diff --git a/common/cli.c b/common/cli.c
index 9451e6a1426..d3b9f53d091 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -168,7 +168,7 @@ int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
bool cli_process_fdt(const char **cmdp)
{
/* Allow the fdt to override the boot command */
@@ -236,7 +236,7 @@ err:
*/
hang();
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
void cli_loop(void)
{
diff --git a/common/console.c b/common/console.c
index e4301a49322..1995b8a996e 100644
--- a/common/console.c
+++ b/common/console.c
@@ -46,7 +46,7 @@ static int on_console(const char *name, const char *value, enum env_op op,
case env_op_create:
case env_op_overwrite:
- if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
+ if (IS_ENABLED(CONFIG_CONSOLE_MUX)) {
if (iomux_doenv(console, value))
return 1;
} else {
@@ -72,11 +72,11 @@ U_BOOT_ENV_CALLBACK(console, on_console);
static int on_silent(const char *name, const char *value, enum env_op op,
int flags)
{
- if (!CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_SET))
+ if (!IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_SET))
if (flags & H_INTERACTIVE)
return 0;
- if (!CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_RELOC))
+ if (!IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC))
if ((flags & H_INTERACTIVE) == 0)
return 0;
@@ -154,7 +154,7 @@ static int console_record_tstc(void)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
+#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV)
/*
* if overwrite_console returns 1, the stdin, stderr and stdout
* are switched to the serial port, else the settings in the
@@ -167,7 +167,7 @@ extern int overwrite_console(void);
#define OVERWRITE_CONSOLE 0
#endif /* CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE */
-#endif /* CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */
+#endif /* IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */
static int console_setfile(int file, struct stdio_dev * dev)
{
@@ -233,7 +233,7 @@ static bool console_dev_is_serial(struct stdio_dev *sdev)
return is_serial;
}
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
+#if IS_ENABLED(CONFIG_CONSOLE_MUX)
/** Console I/O multiplexing *******************************************/
/* tstcdev: save the last stdio device with pending characters, with tstc != 0 */
@@ -378,7 +378,7 @@ static void console_flush(int file)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
+#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV)
static inline void console_doenv(int file, struct stdio_dev *dev)
{
iomux_doenv(file, dev->name);
@@ -435,7 +435,7 @@ static inline void console_flush(int file)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
+#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV)
static inline void console_doenv(int file, struct stdio_dev *dev)
{
console_setfile(file, dev);
@@ -503,7 +503,7 @@ int fgetc(int file)
*/
for (;;) {
schedule();
- if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
+ if (IS_ENABLED(CONFIG_CONSOLE_MUX)) {
/*
* Upper layer may have already called tstc() so
* check for that first.
@@ -623,7 +623,7 @@ int tstc(void)
#define PRE_CONSOLE_FLUSHPOINT1_SERIAL 0
#define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL 1
-#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER)
+#if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER)
#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ))
static void pre_console_putc(const char c)
@@ -987,7 +987,7 @@ static bool console_update_silent(void)
int console_announce_r(void)
{
-#if !CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER)
+#if !IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER)
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
display_options_get_banner(false, buf, sizeof(buf));
@@ -1035,7 +1035,7 @@ void stdio_print_current_devices(void)
}
}
-#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
+#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV)
/* Called after the relocation - use desired console functions */
int console_init_r(void)
{
@@ -1068,7 +1068,7 @@ int console_init_r(void)
inputdev = console_search_dev(DEV_FLAGS_INPUT, stdinname);
outputdev = console_search_dev(DEV_FLAGS_OUTPUT, stdoutname);
errdev = console_search_dev(DEV_FLAGS_OUTPUT, stderrname);
- if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
+ if (IS_ENABLED(CONFIG_CONSOLE_MUX)) {
iomux_err = iomux_doenv(stdin, stdinname);
iomux_err += iomux_doenv(stdout, stdoutname);
iomux_err += iomux_doenv(stderr, stderrname);
@@ -1124,7 +1124,7 @@ done:
return 0;
}
-#else /* !CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */
+#else /* !IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */
/* Called after the relocation - use desired console functions */
int console_init_r(void)
@@ -1191,4 +1191,4 @@ int console_init_r(void)
return 0;
}
-#endif /* CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */
+#endif /* IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 41c7230424c..c0f22d7f02a 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -12,7 +12,7 @@
#include <log.h>
#include <asm/global_data.h>
-#if CONFIG_IS_ENABLED(UNIT_TEST)
+#if IS_ENABLED(CONFIG_UNIT_TEST)
#define DEBUG
#endif
@@ -1310,7 +1310,7 @@ Void_t* mALLOc(bytes) size_t bytes;
return malloc_simple(bytes);
#endif
- if (CONFIG_IS_ENABLED(UNIT_TEST) && malloc_testing) {
+ if (IS_ENABLED(CONFIG_UNIT_TEST) && malloc_testing) {
if (--malloc_max_allocs < 0)
return NULL;
}
diff --git a/common/event.c b/common/event.c
index 164c95f8f52..5a035b95894 100644
--- a/common/event.c
+++ b/common/event.c
@@ -21,7 +21,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(EVENT_DEBUG)
+#if IS_ENABLED(CONFIG_EVENT_DEBUG)
const char *const type_name[] = {
"none",
"test",
@@ -48,7 +48,7 @@ _Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size");
static const char *event_type_name(enum event_t type)
{
-#if CONFIG_IS_ENABLED(EVENT_DEBUG)
+#if IS_ENABLED(CONFIG_EVENT_DEBUG)
return type_name[type];
#else
return "(unknown)";
@@ -125,7 +125,7 @@ int event_notify(enum event_t type, void *data, int size)
if (ret)
return log_msg_ret("sta", ret);
- if (CONFIG_IS_ENABLED(EVENT_DYNAMIC)) {
+ if (IS_ENABLED(CONFIG_EVENT_DYNAMIC)) {
ret = notify_dynamic(&event);
if (ret)
return log_msg_ret("dyn", ret);
@@ -169,7 +169,7 @@ int event_manual_reloc(void)
}
#endif
-#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
+#if IS_ENABLED(CONFIG_EVENT_DYNAMIC)
static void spy_free(struct event_spy *spy)
{
list_del(&spy->sibling_node);
diff --git a/common/hash.c b/common/hash.c
index 9a52d6073ce..7d6c65ef171 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -211,7 +211,7 @@ static int __maybe_unused hash_finish_crc32(struct hash_algo *algo, void *ctx,
* Note that algorithm names must be in lower case.
*/
static struct hash_algo hash_algo[] = {
-#if CONFIG_IS_ENABLED(MD5)
+#if IS_ENABLED(CONFIG_MD5)
{
.name = "md5",
.digest_size = MD5_SUM_LEN,
@@ -219,17 +219,17 @@ static struct hash_algo hash_algo[] = {
.hash_func_ws = md5_wd,
},
#endif
-#if CONFIG_IS_ENABLED(SHA1)
+#if IS_ENABLED(CONFIG_SHA1)
{
.name = "sha1",
.digest_size = SHA1_SUM_LEN,
.chunk_size = CHUNKSZ_SHA1,
-#if CONFIG_IS_ENABLED(SHA_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA_HW_ACCEL)
.hash_func_ws = hw_sha1,
#else
.hash_func_ws = sha1_csum_wd,
#endif
-#if CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL)
.hash_init = hw_sha_init,
.hash_update = hw_sha_update,
.hash_finish = hw_sha_finish,
@@ -240,17 +240,17 @@ static struct hash_algo hash_algo[] = {
#endif
},
#endif
-#if CONFIG_IS_ENABLED(SHA256)
+#if IS_ENABLED(CONFIG_SHA256)
{
.name = "sha256",
.digest_size = SHA256_SUM_LEN,
.chunk_size = CHUNKSZ_SHA256,
-#if CONFIG_IS_ENABLED(SHA_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA_HW_ACCEL)
.hash_func_ws = hw_sha256,
#else
.hash_func_ws = sha256_csum_wd,
#endif
-#if CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL)
.hash_init = hw_sha_init,
.hash_update = hw_sha_update,
.hash_finish = hw_sha_finish,
@@ -261,17 +261,17 @@ static struct hash_algo hash_algo[] = {
#endif
},
#endif
-#if CONFIG_IS_ENABLED(SHA384)
+#if IS_ENABLED(CONFIG_SHA384)
{
.name = "sha384",
.digest_size = SHA384_SUM_LEN,
.chunk_size = CHUNKSZ_SHA384,
-#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL)
.hash_func_ws = hw_sha384,
#else
.hash_func_ws = sha384_csum_wd,
#endif
-#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) && CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) && IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL)
.hash_init = hw_sha_init,
.hash_update = hw_sha_update,
.hash_finish = hw_sha_finish,
@@ -282,17 +282,17 @@ static struct hash_algo hash_algo[] = {
#endif
},
#endif
-#if CONFIG_IS_ENABLED(SHA512)
+#if IS_ENABLED(CONFIG_SHA512)
{
.name = "sha512",
.digest_size = SHA512_SUM_LEN,
.chunk_size = CHUNKSZ_SHA512,
-#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL)
.hash_func_ws = hw_sha512,
#else
.hash_func_ws = sha512_csum_wd,
#endif
-#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) && CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL)
+#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) && IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL)
.hash_init = hw_sha_init,
.hash_update = hw_sha_update,
.hash_finish = hw_sha_finish,
@@ -312,7 +312,7 @@ static struct hash_algo hash_algo[] = {
.hash_update = hash_update_crc16_ccitt,
.hash_finish = hash_finish_crc16_ccitt,
},
-#if CONFIG_IS_ENABLED(CRC32)
+#if IS_ENABLED(CONFIG_CRC32)
{
.name = "crc32",
.digest_size = 4,
@@ -326,9 +326,9 @@ static struct hash_algo hash_algo[] = {
};
/* Try to minimize code size for boards that don't want much hashing */
-#if CONFIG_IS_ENABLED(SHA256) || IS_ENABLED(CONFIG_CMD_SHA1SUM) || \
- CONFIG_IS_ENABLED(CRC32_VERIFY) || IS_ENABLED(CONFIG_CMD_HASH) || \
- CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512)
+#if IS_ENABLED(CONFIG_SHA256) || IS_ENABLED(CONFIG_CMD_SHA1SUM) || \
+ IS_ENABLED(CONFIG_CRC32_VERIFY) || IS_ENABLED(CONFIG_CMD_HASH) || \
+ IS_ENABLED(CONFIG_SHA384) || IS_ENABLED(CONFIG_SHA512)
#define multi_hash() 1
#else
#define multi_hash() 0
diff --git a/common/hwconfig.c b/common/hwconfig.c
index cac0b6348f4..51eac8cd937 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -83,7 +83,7 @@ static const char *__hwconfig(const char *opt, size_t *arglen,
"and before environment is ready\n");
return NULL;
}
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
env_hwconfig = env_get("hwconfig");
#endif
}
diff --git a/common/init/board_init.c b/common/init/board_init.c
index 96ffb79a986..e8bbb6be74c 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -27,7 +27,7 @@ __weak void arch_setup_gd(struct global_data *gd_ptr)
*/
__weak void board_init_f_init_stack_protection_addr(ulong base)
{
-#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)
+#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)
/* set up stack pointer for stack usage if not set yet */
if (!gd->start_addr_sp)
gd->start_addr_sp = base;
@@ -41,7 +41,7 @@ __weak void board_init_f_init_stack_protection_addr(ulong base)
*/
__weak void board_init_f_init_stack_protection(void)
{
-#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)
+#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)
ulong stack_bottom = gd->start_addr_sp -
CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK);
@@ -148,7 +148,7 @@ void board_init_f_init_reserve(ulong base)
arch_setup_gd(gd_ptr);
#endif
- if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE))
+ if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE))
board_init_f_init_stack_protection_addr(base);
/* next alloc will be higher by one GD plus 16-byte alignment */
@@ -164,11 +164,11 @@ void board_init_f_init_reserve(ulong base)
gd->malloc_base = base;
#endif
- if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE))
+ if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE))
board_init_f_init_stack_protection();
}
-#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
diff --git a/common/iomux.c b/common/iomux.c
index c428f7110a7..3600491ab09 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -9,7 +9,7 @@
#include <serial.h>
#include <malloc.h>
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
+#if IS_ENABLED(CONFIG_CONSOLE_MUX)
void iomux_printdevs(const int console)
{
int i;
diff --git a/common/log.c b/common/log.c
index 57b71ed1b36..be4fbea23ad 100644
--- a/common/log.c
+++ b/common/log.c
@@ -60,7 +60,7 @@ const char *log_get_cat_name(enum log_category_t cat)
if (cat >= LOGC_NONE)
return log_cat_name[cat - LOGC_NONE];
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
name = uclass_get_name((enum uclass_id)cat);
#else
name = NULL;
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index 0a004d40e1e..f77fdd62f39 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -64,7 +64,7 @@ void *memalign_simple(size_t align, size_t bytes)
return ptr;
}
-#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
+#if IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE)
void *calloc(size_t nmemb, size_t elem_size)
{
size_t size = nmemb * elem_size;
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 27a5488307d..f2c6ebef023 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -26,7 +26,7 @@
#include <nand.h>
#include <fat.h>
#include <u-boot/crc.h>
-#if CONFIG_IS_ENABLED(BANNER_PRINT)
+#if IS_ENABLED(CONFIG_BANNER_PRINT)
#include <timestamp.h>
#endif
#include <version.h>
@@ -49,7 +49,7 @@ DECLARE_BINMAN_MAGIC_SYM;
u32 *boot_params_ptr = NULL;
-#if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)
+#if IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS)
/* See spl.h for information about this */
binman_sym_declare(ulong, u_boot_any, image_pos);
binman_sym_declare(ulong, u_boot_any, size);
@@ -69,14 +69,14 @@ binman_sym_declare(ulong, u_boot_vpl_any, size);
/* Define board data structure */
static struct bd_info bdata __attribute__ ((section(".data")));
-#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
__weak void show_boot_progress(int val) {}
#endif
-#if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \
+#if defined(CONFIG_SPL_OS_BOOT) || IS_ENABLED(CONFIG_HANDOFF) || \
defined(CONFIG_SPL_ATF)
/* weak, default platform-specific function to initialize dram banks */
__weak int dram_init_banksize(void)
@@ -95,7 +95,7 @@ __weak int dram_init_banksize(void)
* 0 to not start u-boot
* positive if u-boot should start
*/
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
__weak int spl_start_uboot(void)
{
puts(SPL_TPL_PROMPT
@@ -155,7 +155,7 @@ void spl_fixup_fdt(void *fdt_blob)
ulong spl_get_image_pos(void)
{
- if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS))
+ if (!IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS))
return BINMAN_SYM_MISSING;
#ifdef CONFIG_VPL
@@ -169,7 +169,7 @@ ulong spl_get_image_pos(void)
ulong spl_get_image_size(void)
{
- if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS))
+ if (!IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS))
return BINMAN_SYM_MISSING;
#ifdef CONFIG_VPL
@@ -210,7 +210,7 @@ __weak const char *spl_board_loader_name(u32 boot_device)
return NULL;
}
-#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
+#if IS_ENABLED(CONFIG_OPTEE_IMAGE)
__weak void __noreturn jump_to_image_optee(struct spl_image_info *spl_image)
{
spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
@@ -258,7 +258,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
}
#endif
-#if CONFIG_IS_ENABLED(LOAD_FIT_FULL)
+#if IS_ENABLED(CONFIG_LOAD_FIT_FULL)
/* Parse and load full fitImage in SPL */
static int spl_load_fit_image(struct spl_image_info *spl_image,
const struct legacy_img_hdr *header)
@@ -373,7 +373,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
const struct spl_boot_device *bootdev,
const struct legacy_img_hdr *header)
{
-#if CONFIG_IS_ENABLED(LOAD_FIT_FULL)
+#if IS_ENABLED(CONFIG_LOAD_FIT_FULL)
int ret = spl_load_fit_image(spl_image, header);
if (!ret)
@@ -398,7 +398,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
panic("** no mkimage signature but raw image not supported");
#endif
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
#if defined(CMD_BOOTI)
ulong start, size;
@@ -459,7 +459,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
image_entry();
}
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
/**
* Set up the SPL hand-off information
*
@@ -553,25 +553,25 @@ static int spl_common_init(bool setup_malloc)
#endif /* CONFIG_BOOTSTAGE_STASH */
bootstage_mark_name(get_bootstage_id(true),
spl_phase_name(spl_phase()));
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
ret = log_init();
if (ret) {
debug("%s: Failed to set up logging\n", __func__);
return ret;
}
#endif
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
ret = fdtdec_setup();
if (ret) {
debug("fdtdec_setup() returned error %d\n", ret);
return ret;
}
}
- if (CONFIG_IS_ENABLED(DM)) {
+ if (IS_ENABLED(CONFIG_DM)) {
bootstage_start(BOOTSTAGE_ID_ACCUM_DM_SPL,
spl_phase() == PHASE_TPL ? "dm tpl" : "dm_spl");
/* With CONFIG_SPL_OF_PLATDATA, bring in all devices */
- ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA));
+ ret = dm_init_and_scan(!IS_ENABLED(CONFIG_OF_PLATDATA));
bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_SPL);
if (ret) {
debug("dm_init_and_scan() returned error %d\n", ret);
@@ -690,16 +690,16 @@ static int boot_from_devices(struct spl_image_info *spl_image,
struct spl_image_loader *loader;
int bootdev = spl_boot_list[i];
- if (CONFIG_IS_ENABLED(SHOW_ERRORS))
+ if (IS_ENABLED(CONFIG_SHOW_ERRORS))
ret = -ENXIO;
for (loader = drv; loader != drv + n_ents; loader++) {
if (bootdev != loader->boot_device)
continue;
- if (!CONFIG_IS_ENABLED(SILENT_CONSOLE)) {
+ if (!IS_ENABLED(CONFIG_SILENT_CONSOLE)) {
if (loader)
printf("Trying to boot from %s\n",
spl_loader_name(loader));
- else if (CONFIG_IS_ENABLED(SHOW_ERRORS)) {
+ else if (IS_ENABLED(CONFIG_SHOW_ERRORS)) {
printf(SPL_TPL_PROMPT
"Unsupported Boot Device %d\n",
bootdev);
@@ -722,7 +722,7 @@ static int boot_from_devices(struct spl_image_info *spl_image,
#if defined(CONFIG_SPL_FRAMEWORK_BOARD_INIT_F)
void board_init_f(ulong dummy)
{
- if (CONFIG_IS_ENABLED(OF_CONTROL)) {
+ if (IS_ENABLED(CONFIG_OF_CONTROL)) {
int ret;
ret = spl_early_init();
@@ -767,7 +767,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
*/
timer_init();
#endif
- if (CONFIG_IS_ENABLED(BLOBLIST)) {
+ if (IS_ENABLED(CONFIG_BLOBLIST)) {
ret = bloblist_init();
if (ret) {
debug("%s: Failed to set up bloblist: ret=%d\n",
@@ -776,7 +776,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
hang();
}
}
- if (CONFIG_IS_ENABLED(HANDOFF)) {
+ if (IS_ENABLED(CONFIG_HANDOFF)) {
int ret;
ret = setup_spl_handoff();
@@ -786,22 +786,22 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
}
}
-#if CONFIG_IS_ENABLED(BOARD_INIT)
+#if IS_ENABLED(CONFIG_BOARD_INIT)
spl_board_init();
#endif
-#if defined(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT)
+#if defined(CONFIG_SPL_WATCHDOG) && IS_ENABLED(CONFIG_WDT)
initr_watchdog();
#endif
- if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) ||
+ if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || IS_ENABLED(CONFIG_HANDOFF) ||
IS_ENABLED(CONFIG_SPL_ATF))
dram_init_banksize();
bootcount_inc();
/* Dump driver model states to aid analysis */
- if (CONFIG_IS_ENABLED(DM_STATS)) {
+ if (IS_ENABLED(CONFIG_DM_STATS)) {
struct dm_stats mem;
dm_get_mem(&mem);
@@ -818,8 +818,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
ret = boot_from_devices(&spl_image, spl_boot_list,
ARRAY_SIZE(spl_boot_list));
if (ret) {
- if (CONFIG_IS_ENABLED(SHOW_ERRORS) &&
- CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT))
+ if (IS_ENABLED(CONFIG_SHOW_ERRORS) &&
+ IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT))
printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n",
ret);
else
@@ -828,13 +828,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
}
spl_perform_fixups(&spl_image);
- if (CONFIG_IS_ENABLED(HANDOFF)) {
+ if (IS_ENABLED(CONFIG_HANDOFF)) {
ret = write_spl_handoff();
if (ret)
printf(SPL_TPL_PROMPT
"SPL hand-off write failed (err=%d)\n", ret);
}
- if (CONFIG_IS_ENABLED(BLOBLIST)) {
+ if (IS_ENABLED(CONFIG_BLOBLIST)) {
ret = bloblist_finish();
if (ret)
printf("Warning: Failed to finish bloblist (ret=%d)\n",
@@ -845,27 +845,27 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
case IH_OS_U_BOOT:
debug("Jumping to %s...\n", spl_phase_name(spl_next_phase()));
break;
-#if CONFIG_IS_ENABLED(ATF)
+#if IS_ENABLED(CONFIG_ATF)
case IH_OS_ARM_TRUSTED_FIRMWARE:
debug("Jumping to U-Boot via ARM Trusted Firmware\n");
spl_fixup_fdt(spl_image.fdt_addr);
spl_invoke_atf(&spl_image);
break;
#endif
-#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
+#if IS_ENABLED(CONFIG_OPTEE_IMAGE)
case IH_OS_TEE:
debug("Jumping to U-Boot via OP-TEE\n");
spl_board_prepare_for_optee(spl_image.fdt_addr);
jump_to_image_optee(&spl_image);
break;
#endif
-#if CONFIG_IS_ENABLED(OPENSBI)
+#if IS_ENABLED(CONFIG_OPENSBI)
case IH_OS_OPENSBI:
debug("Jumping to U-Boot via RISC-V OpenSBI\n");
spl_invoke_opensbi(&spl_image);
break;
#endif
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
case IH_OS_LINUX:
debug("Jumping to Linux\n");
#if defined(CONFIG_SYS_SPL_ARGS_ADDR)
@@ -906,7 +906,7 @@ void preloader_console_init(void)
gd->have_console = 1;
-#if CONFIG_IS_ENABLED(BANNER_PRINT)
+#if IS_ENABLED(CONFIG_BANNER_PRINT)
puts("\nU-Boot " SPL_TPL_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - "
U_BOOT_TIME " " U_BOOT_TZ ")\n");
#endif
@@ -922,7 +922,7 @@ void preloader_console_init(void)
*/
__weak void spl_relocate_stack_check(void)
{
-#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)
+#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)
ulong init_sp = gd->start_addr_sp;
ulong stack_bottom = init_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK);
u8 *ptr = (u8 *)stack_bottom;
@@ -962,7 +962,7 @@ ulong spl_relocate_stack_gd(void)
gd_t *new_gd;
ulong ptr = CONFIG_SPL_STACK_R_ADDR;
- if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE))
+ if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE))
spl_relocate_stack_check();
#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN)
@@ -979,7 +979,7 @@ ulong spl_relocate_stack_gd(void)
ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16);
new_gd = (gd_t *)ptr;
memcpy(new_gd, (void *)gd, sizeof(gd_t));
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
dm_fixup_for_gd_move(new_gd);
#endif
#if !defined(CONFIG_ARM) && !defined(CONFIG_RISCV)
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 63fa9b720b2..3027178bea0 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -195,7 +195,7 @@ static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry,
atf_entry_t atf_entry = (atf_entry_t)bl31_entry;
void *bl31_params;
- if (CONFIG_IS_ENABLED(ATF_LOAD_IMAGE_V2))
+ if (IS_ENABLED(CONFIG_ATF_LOAD_IMAGE_V2))
bl31_params = bl2_plat_get_bl31_params_v2(bl32_entry,
bl33_entry,
fdt_addr);
@@ -285,7 +285,7 @@ void spl_invoke_atf(struct spl_image_info *spl_image)
* older ATF versions that have insufficiently robust (or
* overzealous) argument validation.
*/
- if (CONFIG_IS_ENABLED(ATF_NO_PLATFORM_PARAM))
+ if (IS_ENABLED(CONFIG_ATF_NO_PLATFORM_PARAM))
platform_param = 0;
/*
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index f117c630bfe..91d1063e490 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -65,7 +65,7 @@ end:
return err < 0;
}
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
int spl_load_image_ext_os(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
struct blk_desc *block_dev, int partition)
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index f8a5b80a3bd..8295361c6ae 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -113,7 +113,7 @@ end:
return (err <= 0);
}
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
int spl_load_image_fat_os(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
struct blk_desc *block_dev, int partition)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 9ae3e5e35d4..fa4ccf6554e 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -96,7 +96,7 @@ static int spl_fit_get_image_name(const struct spl_fit_info *ctx,
}
}
- if (!found && CONFIG_IS_ENABLED(SYSINFO) && !sysinfo_get(&sysinfo)) {
+ if (!found && IS_ENABLED(CONFIG_SYSINFO) && !sysinfo_get(&sysinfo)) {
int rc;
/*
* no string in the property for this index. Check if the
@@ -310,7 +310,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
src = (void *)data; /* cast away const */
}
- if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) {
+ if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) {
printf("## Checking hash(es) for Image %s ... ",
fit_get_name(fit, node, NULL));
if (!fit_image_verify_with_data(fit, node, gd_fdt_blob(), src,
@@ -319,7 +319,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
puts("OK\n");
}
- if (CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS))
+ if (IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS))
board_fit_image_post_process(fit, node, &src, &length);
load_ptr = map_sysmem(load_addr, length);
@@ -397,10 +397,10 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
/* Make the load-address of the FDT available for the SPL framework */
spl_image->fdt_addr = map_sysmem(image_info.load_addr, 0);
- if (CONFIG_IS_ENABLED(FIT_IMAGE_TINY))
+ if (IS_ENABLED(CONFIG_FIT_IMAGE_TINY))
return 0;
-#if CONFIG_IS_ENABLED(LOAD_FIT_APPLY_OVERLAY)
+#if IS_ENABLED(CONFIG_LOAD_FIT_APPLY_OVERLAY)
void *tmpbuffer = NULL;
for (; ; index++) {
@@ -470,7 +470,7 @@ static int spl_fit_record_loadable(const struct spl_fit_info *ctx, int index,
const char *name;
int node;
- if (CONFIG_IS_ENABLED(FIT_IMAGE_TINY))
+ if (IS_ENABLED(CONFIG_FIT_IMAGE_TINY))
return 0;
ret = spl_fit_get_image_name(ctx, "loadables", index, &name);
@@ -503,7 +503,7 @@ static int spl_fit_image_is_fpga(const void *fit, int node)
static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os)
{
- if (!CONFIG_IS_ENABLED(FIT_IMAGE_TINY) || CONFIG_IS_ENABLED(OS_BOOT))
+ if (!IS_ENABLED(CONFIG_FIT_IMAGE_TINY) || IS_ENABLED(CONFIG_OS_BOOT))
return fit_image_get_os(fit, noffset, os);
const char *name = fdt_getprop(fit, noffset, FIT_OS_PROP, NULL);
@@ -585,7 +585,7 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node,
if (!compatible) {
warn_deprecated("'fpga' image without 'compatible' property");
} else {
- if (CONFIG_IS_ENABLED(FPGA_LOAD_SECURE))
+ if (IS_ENABLED(CONFIG_FPGA_LOAD_SECURE))
flags = fpga_compatible2flag(devnum, compatible);
if (strcmp(compatible, "u-boot,fpga-legacy"))
debug("Ignoring compatible = %s property\n",
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index e4135b20487..f1a80fbeb81 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -158,7 +158,7 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
if (mmc_dev < 0)
return mmc_dev;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
err = mmc_init_device(mmc_dev);
#else
err = mmc_initialize(NULL);
@@ -222,7 +222,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
}
#endif
-#if CONFIG_IS_ENABLED(FALCON_BOOT_MMCSD)
+#if IS_ENABLED(CONFIG_FALCON_BOOT_MMCSD)
static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
struct mmc *mmc)
@@ -401,7 +401,7 @@ int __weak spl_mmc_emmc_boot_partition(struct mmc *mmc)
static int spl_mmc_get_mmc_devnum(struct mmc *mmc)
{
struct blk_desc *block_dev;
-#if !CONFIG_IS_ENABLED(BLK)
+#if !IS_ENABLED(CONFIG_BLK)
block_dev = &mmc->block_dev;
#else
block_dev = dev_get_uclass_plat(mmc->dev);
@@ -444,7 +444,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,
case MMCSD_MODE_EMMCBOOT:
part = spl_mmc_emmc_boot_partition(mmc);
- if (CONFIG_IS_ENABLED(MMC_TINY))
+ if (IS_ENABLED(CONFIG_MMC_TINY))
err = mmc_switch_part(mmc, part);
else
err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 73e4d96e843..fe154f09c51 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -146,7 +146,7 @@ static int spl_nand_load_image(struct spl_image_info *spl_image,
header = spl_get_load_buffer(0, sizeof(*header));
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (!spl_start_uboot()) {
/*
* load parameter image
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index b2c901b554b..db3cbeddd60 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -88,7 +88,7 @@ int spl_net_load_image_usb(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
bootdev->boot_device_name = "usb_ether";
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
usb_ether_init();
#endif
return spl_net_load_image(spl_image, bootdev);
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 1ef5e412624..926cfb95d0b 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -35,7 +35,7 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,
*/
spl_image->flags |= SPL_COPY_PAYLOAD_ONLY;
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (!spl_start_uboot()) {
/*
* Load Linux from its location in NOR flash to its defined
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 8139a203273..869809b1f59 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -26,7 +26,7 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
__func__, sector, count, (ulong)buf);
addr = (ulong)CONFIG_SPL_LOAD_FIT_ADDRESS + sector;
- if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD))
+ if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD))
addr += image_load_offset;
memcpy(buf, (void *)addr, count);
@@ -42,7 +42,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS;
- if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) {
+ if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD)) {
unsigned long addr = (unsigned long)header;
ret = image_pre_load(addr);
@@ -53,7 +53,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
header = (struct legacy_img_hdr *)addr;
}
-#if CONFIG_IS_ENABLED(DFU)
+#if IS_ENABLED(CONFIG_DFU)
if (bootdev->boot_device == BOOT_DEVICE_DFU)
spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
#endif
@@ -91,9 +91,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
return ret;
}
-#if CONFIG_IS_ENABLED(RAM_DEVICE)
+#if IS_ENABLED(CONFIG_RAM_DEVICE)
SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image);
#endif
-#if CONFIG_IS_ENABLED(DFU)
+#if IS_ENABLED(CONFIG_DFU)
SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image);
#endif
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 32746ce9f3c..5f7b04980b1 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -66,7 +66,7 @@ static int spl_sata_load_image(struct spl_image_info *spl_image,
if (!stor_dev)
return -ENODEV;
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (spl_start_uboot() ||
spl_load_image_fat_os(spl_image, bootdev, stor_dev,
CONFIG_SYS_SATA_FAT_BOOT_PARTITION))
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 2aff025f76e..0774930ddb4 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -18,7 +18,7 @@
#include <asm/global_data.h>
#include <dm/ofnode.h>
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
/*
* Load the kernel, check for a valid header we can parse, and if found load
* the kernel and then device tree.
@@ -113,12 +113,12 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
payload_offs = ofnode_conf_read_int("u-boot,spl-payload-offset",
payload_offs);
}
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (spl_start_uboot() || spi_load_image_os(spl_image, bootdev, flash, header))
#endif
{
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index bcac25cd021..92c805f2769 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -45,7 +45,7 @@ int spl_ubi_load_image(struct spl_image_info *spl_image,
info.leb_start = CONFIG_SPL_UBI_LEB_START;
info.peb_count = CONFIG_SPL_UBI_MAX_PEBS - info.peb_offset;
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (!spl_start_uboot()) {
volumes[0].vol_id = CONFIG_SPL_UBI_LOAD_KERNEL_ID;
volumes[0].load_addr = (void *)CONFIG_SYS_LOAD_ADDR;
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 479e2dc1826..30484b06398 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -47,7 +47,7 @@ int spl_usb_load(struct spl_image_info *spl_image,
debug("boot mode - FAT\n");
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (spl_start_uboot() ||
spl_load_image_fat_os(spl_image, bootdev, stor_dev, partition))
#endif
diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c
index 77c23ba0597..a91db4ddc20 100644
--- a/common/spl/spl_xip.c
+++ b/common/spl/spl_xip.c
@@ -12,7 +12,7 @@
static int spl_xip(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if IS_ENABLED(CONFIG_OS_BOOT)
if (!spl_start_uboot()) {
spl_image->arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR;
spl_image->name = "Linux";
diff --git a/common/stdio.c b/common/stdio.c
index cbedfdda539..cf897e65d5f 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -41,7 +41,7 @@ int stdio_file_to_flags(const int file)
}
}
-#if CONFIG_IS_ENABLED(SYS_DEVICE_NULLDEV)
+#if IS_ENABLED(CONFIG_SYS_DEVICE_NULLDEV)
static void nulldev_putc(struct stdio_dev *dev, const char c)
{
/* nulldev is empty! */
@@ -337,7 +337,7 @@ int stdio_add_devices(void)
__func__, dev->name, ret);
}
}
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
i2c_init_all();
#endif
if (IS_ENABLED(CONFIG_VIDEO)) {
diff --git a/common/usb.c b/common/usb.c
index ae9253dfc0e..7994b87c758 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -45,7 +45,7 @@
static int asynch_allowed;
char usb_started; /* flag for the started/stopped USB status */
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
static struct usb_device usb_dev[USB_MAX_DEVICE];
static int dev_index;
@@ -188,7 +188,7 @@ int usb_disable_asynch(int disable)
asynch_allowed = !disable;
return old_value;
}
-#endif /* !CONFIG_IS_ENABLED(DM_USB) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB) */
/*-------------------------------------------------------------------
@@ -857,7 +857,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
* the USB device are static allocated [USB_MAX_DEVICE].
*/
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* returns a pointer to the device with the index [index].
* if the device is not assigned (dev->devnum==-1) returns NULL
@@ -914,7 +914,7 @@ __weak int usb_alloc_device(struct usb_device *udev)
{
return 0;
}
-#endif /* !CONFIG_IS_ENABLED(DM_USB) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB) */
static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub)
{
@@ -1185,7 +1185,7 @@ int usb_setup_device(struct usb_device *dev, bool do_read,
return ret;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/*
* By the time we get here, the device has gotten a new device ID
* and is in the default state. We need to identify the thing and
@@ -1234,14 +1234,14 @@ int board_usb_cleanup(int index, enum usb_init_type init)
bool usb_device_has_child_on_port(struct usb_device *parent, int port)
{
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
return false;
#else
return parent->children[port] != NULL;
#endif
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
void usb_find_usb2_hub_address_port(struct usb_device *udev,
uint8_t *hub_address, uint8_t *hub_port)
{
diff --git a/common/usb_hub.c b/common/usb_hub.c
index a36350f846c..2e450efc83e 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -70,7 +70,7 @@ static inline bool usb_hub_is_superspeed(struct usb_device *hdev)
return hdev->descriptor.bDeviceProtocol == 3;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
bool usb_hub_is_root_hub(struct udevice *hub)
{
if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB)
@@ -131,7 +131,7 @@ int usb_get_port_status(struct usb_device *dev, int port, void *data)
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port,
data, sizeof(struct usb_port_status), USB_CNTL_TIMEOUT);
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
if (ret < 0)
return ret;
@@ -193,7 +193,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
* but allow this time to be increased via env variable as some
* devices break the spec and require longer warm-up times
*/
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
env = env_get("usb_pgood_delay");
if (env)
pgood_delay = max(pgood_delay,
@@ -218,7 +218,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
max(100, (int)pgood_delay) + HUB_DEBOUNCE_TIMEOUT);
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
static struct usb_hub_device hub_dev[USB_MAX_HUB];
static int usb_hub_index;
@@ -274,7 +274,7 @@ static int usb_hub_port_reset(struct usb_device *dev, int port,
unsigned short portstatus, portchange;
int delay = HUB_SHORT_RESET_TIME; /* start with short reset delay */
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
debug("%s: resetting '%s' port %d...\n", __func__, dev->dev->name,
port + 1);
#else
@@ -395,7 +395,7 @@ int usb_hub_port_connect_change(struct usb_device *dev, int port)
break;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct udevice *child;
ret = usb_scan_device(dev->dev, port + 1, speed, &child);
@@ -587,7 +587,7 @@ static struct usb_hub_device *usb_get_hub_device(struct usb_device *dev)
{
struct usb_hub_device *hub;
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* "allocate" Hub device */
hub = usb_hub_allocate();
#else
@@ -771,7 +771,7 @@ static int usb_hub_configure(struct usb_device *dev)
(le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_OVERCURRENT) ? \
"" : "no ");
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/*
* Update USB host controller's internal representation of this hub
* after the hub descriptor is fetched.
@@ -913,7 +913,7 @@ int usb_hub_probe(struct usb_device *dev, int ifnum)
return ret;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
int usb_hub_scan(struct udevice *hub)
{
struct usb_device *udev = dev_get_parent_priv(hub);
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 4cbc9acb738..13fc0312346 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -580,7 +580,7 @@ static int probe_usb_keyboard(struct usb_device *dev)
return error;
stdinname = env_get("stdin");
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
+#if IS_ENABLED(CONFIG_CONSOLE_MUX)
if (strstr(stdinname, DEVNAME) != NULL) {
error = iomux_doenv(stdin, stdinname);
if (error)
@@ -602,7 +602,7 @@ static int probe_usb_keyboard(struct usb_device *dev)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* Search for keyboard and register it if found. */
int drv_usb_kbd_init(void)
{
@@ -635,7 +635,7 @@ int drv_usb_kbd_init(void)
/* Deregister the keyboard. */
int usb_kbd_deregister(int force)
{
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+#if IS_ENABLED(CONFIG_SYS_STDIO_DEREGISTER)
struct stdio_dev *dev;
struct usb_device *usb_kbd_dev;
struct usb_kbd_pdata *data;
@@ -644,7 +644,7 @@ int usb_kbd_deregister(int force)
if (dev) {
usb_kbd_dev = (struct usb_device *)dev->priv;
data = usb_kbd_dev->privptr;
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
+#if IS_ENABLED(CONFIG_CONSOLE_MUX)
if (iomux_replace_device(stdin, DEVNAME, force ? "nulldev" : ""))
return 1;
#endif
@@ -665,7 +665,7 @@ int usb_kbd_deregister(int force)
#endif
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int usb_kbd_probe(struct udevice *dev)
{
@@ -687,7 +687,7 @@ static int usb_kbd_remove(struct udevice *dev)
goto err;
}
data = udev->privptr;
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
+#if IS_ENABLED(CONFIG_CONSOLE_MUX)
if (iomux_replace_device(stdin, DEVNAME, "nulldev")) {
ret = -ENOLINK;
goto err;
diff --git a/common/usb_storage.c b/common/usb_storage.c
index ac642757737..227ee39755e 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -71,7 +71,7 @@ static __u32 CBWTag;
static int usb_max_devs; /* number of highest available usb device */
-#if !CONFIG_IS_ENABLED(BLK)
+#if !IS_ENABLED(CONFIG_BLK)
static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV];
#endif
@@ -104,7 +104,7 @@ struct us_data {
unsigned short max_xfer_blk; /* maximum transfer blocks */
};
-#if !CONFIG_IS_ENABLED(BLK)
+#if !IS_ENABLED(CONFIG_BLK)
static struct us_data usb_stor[USB_MAX_STOR_DEV];
#endif
@@ -116,7 +116,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *us,
struct blk_desc *dev_desc);
int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,
struct us_data *ss);
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr,
lbaint_t blkcnt, void *buffer);
static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr,
@@ -141,7 +141,7 @@ static void usb_show_progress(void)
int usb_stor_info(void)
{
int count = 0;
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct udevice *dev;
for (blk_first_device(UCLASS_USB, &dev);
@@ -191,7 +191,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
{
int lun, max_lun;
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct us_data *data;
int ret;
#else
@@ -202,7 +202,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
#endif
debug("\n\nProbing for storage\n");
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
/*
* We store the us_data in the mass storage device's plat. It
* is shared by all LUNs (block devices) attached to this mass storage
@@ -319,7 +319,7 @@ int usb_stor_scan(int mode)
if (mode == 1)
printf(" scanning usb for storage devices... ");
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
unsigned char i;
usb_disable_asynch(1); /* asynch transfer not allowed */
@@ -977,7 +977,7 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
*/
unsigned short blk = 240;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
size_t size;
int ret;
@@ -1140,7 +1140,7 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor,
}
#endif /* CONFIG_USB_BIN_FIXUP */
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr,
lbaint_t blkcnt, void *buffer)
#else
@@ -1155,14 +1155,14 @@ static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr,
struct us_data *ss;
int retry;
struct scsi_cmd *srb = &usb_ccb;
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct blk_desc *block_dev;
#endif
if (blkcnt == 0)
return 0;
/* Setup device */
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
block_dev = dev_get_uclass_plat(dev);
udev = dev_get_parent_priv(dev_get_parent(dev));
debug("\nusb_read: udev %d\n", block_dev->devnum);
@@ -1223,7 +1223,7 @@ retry_it:
return blkcnt;
}
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr,
lbaint_t blkcnt, const void *buffer)
#else
@@ -1238,7 +1238,7 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr,
struct us_data *ss;
int retry;
struct scsi_cmd *srb = &usb_ccb;
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct blk_desc *block_dev;
#endif
@@ -1246,7 +1246,7 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr,
return 0;
/* Setup device */
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
block_dev = dev_get_uclass_plat(dev);
udev = dev_get_parent_priv(dev_get_parent(dev));
debug("\nusb_read: udev %d\n", block_dev->devnum);
@@ -1520,7 +1520,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
return 1;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int usb_mass_storage_probe(struct udevice *dev)
{
@@ -1544,7 +1544,7 @@ U_BOOT_DRIVER(usb_mass_storage) = {
.id = UCLASS_MASS_STORAGE,
.of_match = usb_mass_storage_ids,
.probe = usb_mass_storage_probe,
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
.plat_auto = sizeof(struct us_data),
#endif
};
@@ -1565,7 +1565,7 @@ static const struct usb_device_id mass_storage_id_table[] = {
U_BOOT_USB_DEVICE(usb_mass_storage, mass_storage_id_table);
#endif
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static const struct blk_ops usb_storage_ops = {
.read = usb_stor_read,
.write = usb_stor_write,
diff --git a/common/xyzModem.c b/common/xyzModem.c
index fb319f71190..fb719fb6617 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -177,7 +177,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim)
}
-#if defined(DEBUG) && !CONFIG_IS_ENABLED(USE_TINY_PRINTF)
+#if defined(DEBUG) && !IS_ENABLED(CONFIG_USE_TINY_PRINTF)
/*
* Note: this debug setup works by storing the strings in a fixed buffer
*/
@@ -417,7 +417,7 @@ ulong
xyzModem_get_initial_timeout (void)
{
/* timeout is in seconds, non-positive timeout value is infinity */
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
const char *timeout_str = env_get("loadxy_timeout");
if (timeout_str)
return 1000 * simple_strtol(timeout_str, NULL, 10);
diff --git a/disk/disk-uclass.c b/disk/disk-uclass.c
index d32747e2242..d8590b85604 100644
--- a/disk/disk-uclass.c
+++ b/disk/disk-uclass.c
@@ -27,7 +27,7 @@ int part_create_block_devices(struct udevice *blk_dev)
struct udevice *dev;
int ret;
- if (!CONFIG_IS_ENABLED(PARTITIONS) || !blk_enabled())
+ if (!IS_ENABLED(CONFIG_PARTITIONS) || !blk_enabled())
return 0;
if (device_get_uclass_id(blk_dev) != UCLASS_BLK)
diff --git a/disk/part.c b/disk/part.c
index d449635254e..058be6386d2 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -242,11 +242,11 @@ void part_init(struct blk_desc *dev_desc)
static void print_part_header(const char *type, struct blk_desc *dev_desc)
{
-#if CONFIG_IS_ENABLED(MAC_PARTITION) || \
- CONFIG_IS_ENABLED(DOS_PARTITION) || \
- CONFIG_IS_ENABLED(ISO_PARTITION) || \
- CONFIG_IS_ENABLED(AMIGA_PARTITION) || \
- CONFIG_IS_ENABLED(EFI_PARTITION)
+#if IS_ENABLED(CONFIG_MAC_PARTITION) || \
+ IS_ENABLED(CONFIG_DOS_PARTITION) || \
+ IS_ENABLED(CONFIG_ISO_PARTITION) || \
+ IS_ENABLED(CONFIG_AMIGA_PARTITION) || \
+ IS_ENABLED(CONFIG_EFI_PARTITION)
puts ("\nPartition Map for ");
switch (dev_desc->uclass_id) {
case UCLASS_IDE:
@@ -311,7 +311,7 @@ int part_get_info(struct blk_desc *dev_desc, int part,
struct part_driver *drv;
if (blk_enabled()) {
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
/* The common case is no UUID support */
info->uuid[0] = 0;
#endif
@@ -348,7 +348,7 @@ int part_get_info_whole_disk(struct blk_desc *dev_desc,
info->bootable = 0;
strcpy((char *)info->type, BOOT_PART_TYPE);
strcpy((char *)info->name, "Whole Disk");
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
info->uuid[0] = 0;
#endif
#ifdef CONFIG_PARTITION_TYPE_GUID
diff --git a/disk/part_amiga.h b/disk/part_amiga.h
index 42f5eb0f941..1e07ddc6412 100644
--- a/disk/part_amiga.h
+++ b/disk/part_amiga.h
@@ -9,7 +9,7 @@
#define _DISK_PART_AMIGA_H
#include <common.h>
-#if CONFIG_IS_ENABLED(ISO_PARTITION)
+#if IS_ENABLED(CONFIG_ISO_PARTITION)
/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
have 2048 byte blocks */
#define DEFAULT_SECTOR_SIZE 2048
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 56e61884def..0fb390dfb52 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -231,7 +231,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
return -1;
}
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
if (!ext_part_sector)
disksig = get_unaligned_le32(&buffer[DOS_PART_DISKSIG_OFFSET]);
#endif
@@ -256,7 +256,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
/* sprintf(info->type, "%d, pt->sys_ind); */
strcpy((char *)info->type, "U-Boot");
info->bootable = get_bootable(pt);
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
sprintf(info->uuid, "%08x-%02x", disksig, part_num);
#endif
info->sys_ind = pt->sys_ind;
@@ -292,7 +292,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
info->blksz = DOS_PART_DEFAULT_SECTOR;
info->bootable = 0;
strcpy((char *)info->type, "U-Boot");
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
info->uuid[0] = 0;
#endif
return 0;
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 80a44dc9f07..98990894524 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -29,7 +29,7 @@
#include <u-boot/crc.h>
/* GUID for basic data partitons */
-#if CONFIG_IS_ENABLED(EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_PARTITION)
static const efi_guid_t partition_basic_data_guid = PARTITION_BASIC_DATA_GUID;
#endif
@@ -186,7 +186,7 @@ static void prepare_backup_gpt_header(gpt_header *gpt_h)
gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
}
-#if CONFIG_IS_ENABLED(EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_PARTITION)
/*
* Public Functions (include/part.h)
*/
@@ -289,7 +289,7 @@ int part_get_info_efi(struct blk_desc *dev_desc, int part,
print_efiname(&gpt_pte[part - 1]));
strcpy((char *)info->type, "U-Boot");
info->bootable = get_bootable(&gpt_pte[part - 1]);
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
uuid_bin_to_str(gpt_pte[part - 1].unique_partition_guid.b, info->uuid,
UUID_STR_FORMAT_GUID);
#endif
@@ -416,7 +416,7 @@ int gpt_fill_pte(struct blk_desc *dev_desc,
le64_to_cpu(gpt_h->last_usable_lba);
int i, k;
size_t efiname_len, dosname_len;
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
char *str_uuid;
unsigned char *bin_uuid;
#endif
@@ -488,7 +488,7 @@ int gpt_fill_pte(struct blk_desc *dev_desc,
&partition_basic_data_guid, 16);
#endif
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
str_uuid = partitions[i].uuid;
bin_uuid = gpt_e[i].unique_partition_guid.b;
diff --git a/disk/part_mac.h b/disk/part_mac.h
index 5f396c94089..a750447ffe1 100644
--- a/disk/part_mac.h
+++ b/disk/part_mac.h
@@ -72,7 +72,7 @@ typedef struct mac_partition {
__u32 boot_cksum; /* boot code checksum */
uchar processor[16]; /* Type of Processor */
__u16 part_pad[188]; /* reserved */
-#if CONFIG_IS_ENABLED(ISO_PARTITION)
+#if IS_ENABLED(CONFIG_ISO_PARTITION)
uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */
#endif
} mac_partition_t;
diff --git a/doc/develop/driver-model/i2c-howto.rst b/doc/develop/driver-model/i2c-howto.rst
index 27e7440cd46..5b33ba5571a 100644
--- a/doc/develop/driver-model/i2c-howto.rst
+++ b/doc/develop/driver-model/i2c-howto.rst
@@ -25,7 +25,7 @@ forward to convert these, at some point there may come a patch to remove them!
Here is a suggested approach for converting your I2C driver over to driver
model. Please feel free to update this file with your ideas and suggestions.
-- #ifdef out all your own I2C driver code (#if !CONFIG_IS_ENABLED(DM_I2C))
+- #ifdef out all your own I2C driver code (#if !IS_ENABLED(CONFIG_DM_I2C))
- Define CONFIG_DM_I2C for your board, vendor or architecture
- If the board does not already use driver model, you need CONFIG_DM also
- Your board should then build, but will not work fully since there will be
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst
index 579eef5ca9f..d4e9e49aa4f 100644
--- a/doc/develop/driver-model/livetree.rst
+++ b/doc/develop/driver-model/livetree.rst
@@ -74,7 +74,7 @@ tree will be used in SPL and before relocation in U-Boot proper. Just
before relocation a livetree is built, and this is used for U-Boot proper
after relocation.
-Most checks for livetree use CONFIG_IS_ENABLED(OF_LIVE). This means that
+Most checks for livetree use IS_ENABLED(CONFIG_OF_LIVE). This means that
for SPL, the CONFIG_SPL_OF_LIVE option is checked. At present this does
not exist, since SPL does not support livetree.
diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/driver-model/of-plat.rst
index b454f7be85e..aa6621b6cf7 100644
--- a/doc/develop/driver-model/of-plat.rst
+++ b/doc/develop/driver-model/of-plat.rst
@@ -39,7 +39,7 @@ SPL/TPL and should be tested with:
.. code-block:: c
- #if CONFIG_IS_ENABLED(OF_PLATDATA)
+ #if IS_ENABLED(CONFIG_OF_PLATDATA)
A tool called 'dtoc' converts a devicetree file either into a set of
struct declarations, one for each compatible node, and a set of
@@ -202,7 +202,7 @@ For example:
#include <dt-structs.h>
struct mmc_plat {
- #if CONFIG_IS_ENABLED(OF_PLATDATA)
+ #if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Put this first since driver model will copy the data here */
struct dtd_mmc dtplat;
#endif
@@ -215,7 +215,7 @@ For example:
static int mmc_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
/* Decode the devicetree data */
struct mmc_plat *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
@@ -231,7 +231,7 @@ For example:
{
struct mmc_plat *plat = dev_get_plat(dev);
- #if CONFIG_IS_ENABLED(OF_PLATDATA)
+ #if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Decode the of-platdata from the C structures */
struct dtd_mmc *dtplat = &plat->dtplat;
@@ -863,7 +863,7 @@ The dt-structs.h file includes the generated file
`(include/generated/dt-structs.h`) if CONFIG_SPL_OF_PLATDATA is enabled.
Otherwise (such as in U-Boot proper) these structs are not available. This
prevents them being used inadvertently. All usage must be bracketed with
-`#if CONFIG_IS_ENABLED(OF_PLATDATA)`.
+`#if IS_ENABLED(CONFIG_OF_PLATDATA)`.
The dt-plat.c file contains the device declarations and is is built in
spl/dt-plat.c.
diff --git a/doc/develop/spl.rst b/doc/develop/spl.rst
index aec7b562faa..73f5aa9b42c 100644
--- a/doc/develop/spl.rst
+++ b/doc/develop/spl.rst
@@ -69,10 +69,10 @@ CONFIG_SPL_WATCHDOG (drivers/watchdog/libwatchdog.o)
Adding SPL-specific code
------------------------
-To check whether a feature is enabled, use CONFIG_IS_ENABLED()::
+To check whether a feature is enabled, use IS_ENABLED()::
- if (CONFIG_IS_ENABLED(CLK))
- ...
+ if (IS_ENABLED(CONFIG_CLK))
+ ...
This checks CONFIG_CLK for the main build, CONFIG_SPL_CLK for the SPL build,
CONFIG_TPL_CLK for the TPL build, etc.
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index 37023512f0d..770ce494b09 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -585,7 +585,7 @@ static int meson_saradc_init(struct meson_saradc_priv *priv)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&priv->core_clk);
if (ret)
return ret;
@@ -605,7 +605,7 @@ static int meson_saradc_init(struct meson_saradc_priv *priv)
udelay(5);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&priv->adc_clk);
if (ret)
return ret;
@@ -667,7 +667,7 @@ static int meson_saradc_probe(struct udevice *dev)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_name(dev, "core", &priv->core_clk);
if (ret)
return ret;
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 167b5a395f5..bd71a313837 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -957,7 +957,7 @@ U_BOOT_DRIVER(dwc_ahsata_blk) = {
.ops = &dwc_ahsata_blk_ops,
};
-#if CONFIG_IS_ENABLED(DWC_AHSATA_AHCI)
+#if IS_ENABLED(CONFIG_DWC_AHSATA_AHCI)
struct ahci_ops dwc_ahsata_ahci_ops = {
.port_status = dwc_ahsata_port_status,
.reset = dwc_ahsata_bus_reset,
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index c69fc4d5182..d05ce1c016d 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -766,7 +766,7 @@ int blk_unbind_all(int uclass_id)
static int blk_post_probe(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(PARTITIONS) && blk_enabled()) {
+ if (IS_ENABLED(CONFIG_PARTITIONS) && blk_enabled()) {
struct blk_desc *desc = dev_get_uclass_plat(dev);
part_init(desc);
diff --git a/drivers/block/host-uclass.c b/drivers/block/host-uclass.c
index 6460d968c23..8c0ed4e9cad 100644
--- a/drivers/block/host-uclass.c
+++ b/drivers/block/host-uclass.c
@@ -169,7 +169,7 @@ void host_set_cur_dev(struct udevice *dev)
UCLASS_DRIVER(host) = {
.id = UCLASS_HOST,
.name = "host",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
.priv_auto = sizeof(struct host_priv),
diff --git a/drivers/block/host_dev.c b/drivers/block/host_dev.c
index 5885fc358a5..b47c1e7d5ec 100644
--- a/drivers/block/host_dev.c
+++ b/drivers/block/host_dev.c
@@ -113,7 +113,7 @@ static int host_sb_bind(struct udevice *dev)
snprintf(desc->product, BLK_PRD_SIZE, "hostfile");
snprintf(desc->revision, BLK_REV_SIZE, "1.0");
- if (CONFIG_IS_ENABLED(BOOTSTD)) {
+ if (IS_ENABLED(CONFIG_BOOTSTD)) {
ret = bootdev_bind(dev, "host_bootdev", "bootdev", &bdev);
if (ret)
return log_msg_ret("bd", ret);
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 2f9635524cf..13470cc5e52 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -35,7 +35,7 @@ struct clk *dev_get_clk_ptr(struct udevice *dev)
return (struct clk *)dev_get_uclass_priv(dev);
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int clk_get_by_phandle(struct udevice *dev, const struct phandle_1_arg *cells,
struct clk *clk)
{
@@ -50,7 +50,7 @@ int clk_get_by_phandle(struct udevice *dev, const struct phandle_1_arg *cells,
}
#endif
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int clk_of_xlate_default(struct clk *clk,
struct ofnode_phandle_args *args)
{
@@ -190,7 +190,7 @@ static struct clk *clk_set_default_get_by_id(struct clk *clk)
{
struct clk *c = clk;
- if (CONFIG_IS_ENABLED(CLK_CCF)) {
+ if (IS_ENABLED(CONFIG_CLK_CCF)) {
int ret = clk_get_by_id(clk->id, &c);
if (ret) {
@@ -549,7 +549,7 @@ static void clk_get_priv(struct clk *clk, struct clk **clkp)
*clkp = clk;
/* get private clock struct associated to the provided clock */
- if (CONFIG_IS_ENABLED(CLK_CCF)) {
+ if (IS_ENABLED(CONFIG_CLK_CCF)) {
/* Take id 0 as a non-valid clk, such as dummy */
if (clk->id)
clk_get_by_id(clk->id, clkp);
@@ -611,7 +611,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
if (ret)
return ret;
- if (CONFIG_IS_ENABLED(CLK_CCF))
+ if (IS_ENABLED(CONFIG_CLK_CCF))
ret = device_reparent(clk->dev, parent->dev);
return ret;
@@ -628,7 +628,7 @@ int clk_enable(struct clk *clk)
return 0;
ops = clk_dev_ops(clk->dev);
- if (CONFIG_IS_ENABLED(CLK_CCF)) {
+ if (IS_ENABLED(CONFIG_CLK_CCF)) {
/* Take id 0 as a non-valid clk, such as dummy */
if (clk->id && !clk_get_by_id(clk->id, &clkp)) {
if (clkp->enable_count) {
@@ -688,7 +688,7 @@ int clk_disable(struct clk *clk)
return 0;
ops = clk_dev_ops(clk->dev);
- if (CONFIG_IS_ENABLED(CLK_CCF)) {
+ if (IS_ENABLED(CONFIG_CLK_CCF)) {
if (clk->id && !clk_get_by_id(clk->id, &clkp)) {
if (clkp->flags & CLK_IS_CRITICAL)
return 0;
diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c
index 6c1139e5c51..dfccd75cb68 100644
--- a/drivers/clk/clk_fixed_factor.c
+++ b/drivers/clk/clk_fixed_factor.c
@@ -43,7 +43,7 @@ const struct clk_ops clk_fixed_factor_ops = {
static int clk_fixed_factor_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
int err;
struct clk_fixed_factor *ff = to_clk_fixed_factor(dev);
diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c
index b5e78c70559..eae7e690e03 100644
--- a/drivers/clk/clk_fixed_rate.c
+++ b/drivers/clk/clk_fixed_rate.c
@@ -36,7 +36,7 @@ void clk_fixed_rate_ofdata_to_plat_(struct udevice *dev,
struct clk_fixed_rate *plat)
{
struct clk *clk = &plat->clk;
- if (CONFIG_IS_ENABLED(OF_REAL))
+ if (IS_ENABLED(CONFIG_OF_REAL))
plat->fixed_rate = dev_read_u32_default(dev, "clock-frequency",
0);
@@ -64,7 +64,7 @@ static int clk_fixed_rate_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(CLK_CCF)
+#if IS_ENABLED(CONFIG_CLK_CCF)
struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
ulong rate)
{
diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c
index 636914db8ca..fdaa48e98a2 100644
--- a/drivers/clk/clk_sandbox.c
+++ b/drivers/clk/clk_sandbox.c
@@ -177,7 +177,7 @@ int clk_fixed_rate_of_to_plat(struct udevice *dev)
{
struct clk_fixed_rate *cplat;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct sandbox_clk_fixed_rate_plat *plat = dev_get_plat(dev);
cplat = &plat->fixed;
diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c
index d172fed24c9..363bbca656d 100644
--- a/drivers/clk/clk_scmi.c
+++ b/drivers/clk/clk_scmi.c
@@ -158,7 +158,7 @@ static int scmi_clk_probe(struct udevice *dev)
if (ret)
return ret;
- if (!CONFIG_IS_ENABLED(CLK_CCF))
+ if (!IS_ENABLED(CONFIG_CLK_CCF))
return 0;
/* register CCF children: CLK UCLASS, no probed again */
diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index 663b9a1bc7e..2cbd87ce25c 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -97,7 +97,7 @@ static const char *imx8mm_usb_core_sels[] = {"clock-osc-24m", "sys_pll1_100m", "
static const char *imx8mm_usb_phy_sels[] = {"clock-osc-24m", "sys_pll1_100m", "sys_pll1_40m", "sys_pll2_100m",
"sys_pll2_200m", "clk_ext2", "clk_ext3", "audio_pll2_out", };
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
static const char *imx8mm_ecspi1_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m",
"sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", };
@@ -339,7 +339,7 @@ static int imx8mm_clk_probe(struct udevice *dev)
imx_clk_gate4("pwm4_root_clk", "pwm4", base + 0x42b0, 0));
#endif
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
clk_dm(IMX8MM_CLK_ECSPI1,
imx8m_clk_composite("ecspi1", imx8mm_ecspi1_sels, base + 0xb280));
clk_dm(IMX8MM_CLK_ECSPI2,
diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index 35e0d935d39..fd8bd486f67 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -57,7 +57,7 @@ static const char *imx8mn_usdhc1_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sy
static const char *imx8mn_usdhc2_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sys_pll1_800m", "sys_pll2_500m",
"sys_pll3_out", "sys_pll1_266m", "audio_pll2_out", "sys_pll1_100m", };
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
static const char *imx8mn_ecspi1_sels[] = {"osc_24m", "sys_pll2_200m", "sys_pll1_40m",
"sys_pll1_160m", "sys_pll1_800m", "sys_pll3_out",
"sys_pll2_250m", "audio_pll2_out", };
@@ -332,7 +332,7 @@ static int imx8mn_clk_probe(struct udevice *dev)
base + 0x40a0, 0));
#endif
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
clk_dm(IMX8MN_CLK_ECSPI1,
imx8m_clk_composite("ecspi1", imx8mn_ecspi1_sels, base + 0xb280));
clk_dm(IMX8MN_CLK_ECSPI2,
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index 259ea335959..12b88a5a6aa 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -639,7 +639,7 @@ static int mt7622_ethsys_bind(struct udevice *dev)
{
int ret = 0;
-#if CONFIG_IS_ENABLED(RESET_MEDIATEK)
+#if IS_ENABLED(CONFIG_RESET_MEDIATEK)
ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
if (ret)
debug("Warning: failed to bind reset controller\n");
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c
index 0c7411ee814..36957c1265b 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -802,7 +802,7 @@ static int mt7623_ethsys_hifsys_bind(struct udevice *dev)
{
int ret = 0;
-#if CONFIG_IS_ENABLED(RESET_MEDIATEK)
+#if IS_ENABLED(CONFIG_RESET_MEDIATEK)
ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
if (ret)
debug("Warning: failed to bind reset controller\n");
diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index 31b6fa02251..5ecf9a14ce2 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -632,7 +632,7 @@ static int mt7629_ethsys_bind(struct udevice *dev)
{
int ret = 0;
-#if CONFIG_IS_ENABLED(RESET_MEDIATEK)
+#if IS_ENABLED(CONFIG_RESET_MEDIATEK)
ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
if (ret)
debug("Warning: failed to bind reset controller\n");
diff --git a/drivers/clk/mediatek/clk-mt7981.c b/drivers/clk/mediatek/clk-mt7981.c
index 7fcb81419cd..98d5921f8ae 100644
--- a/drivers/clk/mediatek/clk-mt7981.c
+++ b/drivers/clk/mediatek/clk-mt7981.c
@@ -658,7 +658,7 @@ static int mt7981_ethsys_bind(struct udevice *dev)
{
int ret = 0;
- if (CONFIG_IS_ENABLED(RESET_MEDIATEK)) {
+ if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) {
ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
if (ret)
debug("Warning: failed to bind reset controller\n");
diff --git a/drivers/clk/mediatek/clk-mt7986.c b/drivers/clk/mediatek/clk-mt7986.c
index b3fa63fc0ab..e44d3634496 100644
--- a/drivers/clk/mediatek/clk-mt7986.c
+++ b/drivers/clk/mediatek/clk-mt7986.c
@@ -647,7 +647,7 @@ static int mt7986_ethsys_bind(struct udevice *dev)
{
int ret = 0;
- if (CONFIG_IS_ENABLED(RESET_MEDIATEK)) {
+ if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) {
ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
if (ret)
debug("Warning: failed to bind reset controller\n");
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index 33a7348b9fc..0b42d81130b 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -1370,7 +1370,7 @@ static ulong px30_clk_set_rate(struct clk *clk, ulong rate)
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int px30_gmac_set_parent(struct clk *clk, struct clk *parent)
{
struct px30_clk_priv *priv = dev_get_priv(clk->dev);
@@ -1427,7 +1427,7 @@ static int px30_clk_enable(struct clk *clk)
static struct clk_ops px30_clk_ops = {
.get_rate = px30_clk_get_rate,
.set_rate = px30_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.set_parent = px30_clk_set_parent,
#endif
.enable = px30_clk_enable,
@@ -1504,7 +1504,7 @@ static int px30_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct px30_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 12);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 026858459e3..92f386cd59d 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -357,7 +357,7 @@ static int rk3036_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3036_cru, cru_softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 9);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3066.c b/drivers/clk/rockchip/clk_rk3066.c
index 2c12f6e0441..52324a88703 100644
--- a/drivers/clk/rockchip/clk_rk3066.c
+++ b/drivers/clk/rockchip/clk_rk3066.c
@@ -30,7 +30,7 @@
#include <linux/stringify.h>
struct rk3066_clk_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3066a_cru dtd;
#endif
};
@@ -636,7 +636,7 @@ static struct clk_ops rk3066_clk_ops = {
static int rk3066_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3066_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
@@ -653,7 +653,7 @@ static int rk3066_clk_probe(struct udevice *dev)
if (IS_ERR(priv->grf))
return PTR_ERR(priv->grf);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3066_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -689,7 +689,7 @@ static int rk3066_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
- if (CONFIG_IS_ENABLED(RESET_ROCKCHIP)) {
+ if (IS_ENABLED(CONFIG_RESET_ROCKCHIP)) {
reg_offset = offsetof(struct rk3066_cru, cru_softrst_con[0]);
ret = rockchip_reset_bind(dev, reg_offset, 9);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index 038cb55965e..d5284f40ff6 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -33,7 +33,7 @@ enum rk3188_clk_type {
};
struct rk3188_clk_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3188_cru dtd;
#endif
};
@@ -540,7 +540,7 @@ static struct clk_ops rk3188_clk_ops = {
static int rk3188_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3188_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
@@ -560,7 +560,7 @@ static int rk3188_clk_probe(struct udevice *dev)
priv->has_bwadj = (type == RK3188A_CRU) ? 1 : 0;
#ifdef CONFIG_SPL_BUILD
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3188_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -596,7 +596,7 @@ static int rk3188_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3188_cru, cru_softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 9);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index dbef606d887..48c4824f3ca 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -514,7 +514,7 @@ static int rk322x_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk322x_cru, cru_softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 9);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 3b29992c3e5..13629ee1c0f 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -33,7 +33,7 @@
DECLARE_GLOBAL_DATA_PTR;
struct rk3288_clk_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3288_cru dtd;
#endif
};
@@ -950,14 +950,14 @@ static int __maybe_unused rk3288_clk_set_parent(struct clk *clk, struct clk *par
static struct clk_ops rk3288_clk_ops = {
.get_rate = rk3288_clk_get_rate,
.set_rate = rk3288_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.set_parent = rk3288_clk_set_parent,
#endif
};
static int rk3288_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3288_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
@@ -975,7 +975,7 @@ static int rk3288_clk_probe(struct udevice *dev)
if (IS_ERR(priv->grf))
return PTR_ERR(priv->grf);
#ifdef CONFIG_SPL_BUILD
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3288_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -1022,7 +1022,7 @@ static int rk3288_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rockchip_cru, cru_softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 12);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index 2876643e6be..952436a754d 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -939,7 +939,7 @@ static ulong rk3308_clk_set_rate(struct clk *clk, ulong rate)
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int __maybe_unused rk3308_mac_set_parent(struct clk *clk, struct clk *parent)
{
struct rk3308_clk_priv *priv = dev_get_priv(clk->dev);
@@ -976,7 +976,7 @@ static int __maybe_unused rk3308_clk_set_parent(struct clk *clk, struct clk *par
static struct clk_ops rk3308_clk_ops = {
.get_rate = rk3308_clk_get_rate,
.set_rate = rk3308_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.set_parent = rk3308_clk_set_parent,
#endif
};
@@ -1050,7 +1050,7 @@ static int rk3308_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3308_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 12);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index b825ff4cf83..8b486473b0a 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -827,7 +827,7 @@ static int rk3328_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3328_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 12);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index ea8d120738f..b4ef477267c 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -25,7 +25,7 @@
#include <linux/delay.h>
#include <linux/stringify.h>
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3368_clk_plat {
struct dtd_rockchip_rk3368_cru dtd;
};
@@ -158,7 +158,7 @@ static void rkclk_init(struct rk3368_cru *cru)
}
#endif
-#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC)
+#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC)
static ulong rk3368_mmc_get_clk(struct rk3368_cru *cru, uint clk_id)
{
u32 div, con, con_id, rate;
@@ -470,7 +470,7 @@ static ulong rk3368_clk_get_rate(struct clk *clk)
case SCLK_SPI0 ... SCLK_SPI2:
rate = rk3368_spi_get_clk(priv->cru, clk->id);
break;
-#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC)
+#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC)
case HCLK_SDMMC:
case HCLK_EMMC:
rate = rk3368_mmc_get_clk(priv->cru, clk->id);
@@ -501,7 +501,7 @@ static ulong rk3368_clk_set_rate(struct clk *clk, ulong rate)
ret = rk3368_ddr_set_clk(priv->cru, rate);
break;
#endif
-#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC)
+#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC)
case HCLK_SDMMC:
case HCLK_EMMC:
ret = rk3368_mmc_set_clk(clk, rate);
@@ -574,7 +574,7 @@ static int __maybe_unused rk3368_clk_set_parent(struct clk *clk, struct clk *par
static struct clk_ops rk3368_clk_ops = {
.get_rate = rk3368_clk_get_rate,
.set_rate = rk3368_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.set_parent = rk3368_clk_set_parent,
#endif
};
@@ -582,7 +582,7 @@ static struct clk_ops rk3368_clk_ops = {
static int rk3368_clk_probe(struct udevice *dev)
{
struct rk3368_clk_priv __maybe_unused *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3368_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -596,7 +596,7 @@ static int rk3368_clk_probe(struct udevice *dev)
static int rk3368_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3368_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
@@ -625,7 +625,7 @@ static int rk3368_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3368_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 15);
if (ret)
@@ -645,7 +645,7 @@ U_BOOT_DRIVER(rockchip_rk3368_cru) = {
.id = UCLASS_CLK,
.of_match = rk3368_clk_ids,
.priv_auto = sizeof(struct rk3368_clk_priv),
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rk3368_clk_plat),
#endif
.of_to_plat = rk3368_clk_of_to_plat,
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index eaeac451df4..a26e9046db8 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -27,7 +27,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3399_clk_plat {
struct dtd_rockchip_rk3399_cru dtd;
};
@@ -1309,7 +1309,7 @@ static int rk3399_clk_disable(struct clk *clk)
static struct clk_ops rk3399_clk_ops = {
.get_rate = rk3399_clk_get_rate,
.set_rate = rk3399_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.set_parent = rk3399_clk_set_parent,
#endif
.enable = rk3399_clk_enable,
@@ -1399,7 +1399,7 @@ static int rk3399_clk_probe(struct udevice *dev)
struct rk3399_clk_priv *priv = dev_get_priv(dev);
bool init_clocks = false;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3399_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -1407,7 +1407,7 @@ static int rk3399_clk_probe(struct udevice *dev)
#if defined(CONFIG_SPL_BUILD)
init_clocks = true;
-#elif CONFIG_IS_ENABLED(HANDOFF)
+#elif IS_ENABLED(CONFIG_HANDOFF)
if (!(gd->flags & GD_FLG_RELOC)) {
if (!(gd->spl_handoff))
init_clocks = true;
@@ -1422,7 +1422,7 @@ static int rk3399_clk_probe(struct udevice *dev)
static int rk3399_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3399_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
@@ -1451,7 +1451,7 @@ static int rk3399_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rockchip_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 21);
if (ret)
@@ -1475,7 +1475,7 @@ U_BOOT_DRIVER(clk_rk3399) = {
.ops = &rk3399_clk_ops,
.bind = rk3399_clk_bind,
.probe = rk3399_clk_probe,
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rk3399_clk_plat),
#endif
};
@@ -1617,11 +1617,11 @@ static void pmuclk_init(struct rk3399_pmucru *pmucru)
static int rk3399_pmuclk_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA) || !defined(CONFIG_SPL_BUILD)
+#if IS_ENABLED(CONFIG_OF_PLATDATA) || !defined(CONFIG_SPL_BUILD)
struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
#endif
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3399_pmuclk_plat *plat = dev_get_plat(dev);
priv->pmucru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
@@ -1635,7 +1635,7 @@ static int rk3399_pmuclk_probe(struct udevice *dev)
static int rk3399_pmuclk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
priv->pmucru = dev_read_addr_ptr(dev);
@@ -1646,7 +1646,7 @@ static int rk3399_pmuclk_of_to_plat(struct udevice *dev)
static int rk3399_pmuclk_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
int ret;
ret = offsetof(struct rk3399_pmucru, pmucru_softrst_con[0]);
@@ -1671,7 +1671,7 @@ U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = {
.ops = &rk3399_pmuclk_ops,
.probe = rk3399_pmuclk_probe,
.bind = rk3399_pmuclk_bind,
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rk3399_pmuclk_plat),
#endif
};
diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c
index d5e45e7602c..82720672a60 100644
--- a/drivers/clk/rockchip/clk_rk3568.c
+++ b/drivers/clk/rockchip/clk_rk3568.c
@@ -19,7 +19,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3568_clk_plat {
struct dtd_rockchip_rk3568_cru dtd;
};
@@ -491,7 +491,7 @@ static int rk3568_pmuclk_ofdata_to_platdata(struct udevice *dev)
static int rk3568_pmuclk_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
int ret = 0;
ret = offsetof(struct rk3568_pmucru, pmu_softrst_con[0]);
@@ -517,7 +517,7 @@ U_BOOT_DRIVER(rockchip_rk3568_pmucru) = {
.ops = &rk3568_pmuclk_ops,
.bind = rk3568_pmuclk_bind,
.probe = rk3568_pmuclk_probe,
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rk3568_pmuclk_plat),
#endif
@@ -2936,7 +2936,7 @@ static int rk3568_clk_bind(struct udevice *dev)
glb_srsr_snd);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rk3568_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 30);
if (ret)
@@ -2960,7 +2960,7 @@ U_BOOT_DRIVER(rockchip_rk3568_cru) = {
.ops = &rk3568_clk_ops,
.bind = rk3568_clk_bind,
.probe = rk3568_clk_probe,
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rk3568_clk_plat),
#endif
};
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 555155b16da..fdefa72c768 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -702,7 +702,7 @@ static int rv1108_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rv1108_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 13);
if (ret)
diff --git a/drivers/clk/rockchip/clk_rv1126.c b/drivers/clk/rockchip/clk_rv1126.c
index 3ed29364deb..bef68ce91cd 100644
--- a/drivers/clk/rockchip/clk_rv1126.c
+++ b/drivers/clk/rockchip/clk_rv1126.c
@@ -499,7 +499,7 @@ static int rv1126_pmuclk_of_to_plat(struct udevice *dev)
static int rv1126_pmuclk_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
int ret;
ret = offsetof(struct rv1126_pmucru, pmu_softrst_con[0]);
@@ -1622,7 +1622,7 @@ static ulong rv1126_clk_set_rate(struct clk *clk, ulong rate)
return ret;
};
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)
static int rv1126_gmac_src_set_parent(struct clk *clk, struct clk *parent)
{
struct rv1126_clk_priv *priv = dev_get_priv(clk->dev);
@@ -1705,7 +1705,7 @@ static int rv1126_clk_set_parent(struct clk *clk, struct clk *parent)
static struct clk_ops rv1126_clk_ops = {
.get_rate = rv1126_clk_get_rate,
.set_rate = rv1126_clk_set_rate,
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)
.set_parent = rv1126_clk_set_parent,
#endif
};
@@ -1863,7 +1863,7 @@ static int rv1126_clk_bind(struct udevice *dev)
dev_set_priv(sys_child, priv);
}
-#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
+#if IS_ENABLED(CONFIG_RESET_ROCKCHIP)
ret = offsetof(struct rv1126_cru, softrst_con[0]);
ret = rockchip_reset_bind(dev, ret, 15);
if (ret)
diff --git a/drivers/core/device.c b/drivers/core/device.c
index d9ce546c0c4..1190ccda694 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -47,7 +47,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
bool auto_seq = true;
void *ptr;
- if (CONFIG_IS_ENABLED(OF_PLATDATA_NO_BIND))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_NO_BIND))
return -ENOSYS;
if (devp)
@@ -68,7 +68,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
INIT_LIST_HEAD(&dev->sibling_node);
INIT_LIST_HEAD(&dev->child_head);
INIT_LIST_HEAD(&dev->uclass_node);
-#if CONFIG_IS_ENABLED(DEVRES)
+#if IS_ENABLED(CONFIG_DEVRES)
INIT_LIST_HEAD(&dev->devres_head);
#endif
dev_set_plat(dev, plat);
@@ -80,14 +80,14 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
dev->uclass = uc;
dev->seq_ = -1;
- if (CONFIG_IS_ENABLED(DM_SEQ_ALIAS) &&
+ if (IS_ENABLED(CONFIG_DM_SEQ_ALIAS) &&
(uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS)) {
/*
* Some devices, such as a SPI bus, I2C bus and serial ports
* are numbered using aliases.
*/
- if (CONFIG_IS_ENABLED(OF_CONTROL) &&
- !CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (IS_ENABLED(CONFIG_OF_CONTROL) &&
+ !IS_ENABLED(CONFIG_OF_PLATDATA)) {
if (uc->uc_drv->name && ofnode_valid(node)) {
if (!dev_read_alias_seq(dev, &dev->seq_)) {
auto_seq = false;
@@ -107,7 +107,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
* For of-platdata, we try use the existing data, but if
* plat_auto is larger, we must allocate a new space
*/
- if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA)) {
if (of_plat_size)
dev_or_flags(dev, DM_FLAG_OF_PLATDATA);
if (of_plat_size < drv->plat_auto)
@@ -125,7 +125,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
* For of-platdata, copy the old plat into the new
* space
*/
- if (CONFIG_IS_ENABLED(OF_PLATDATA) && plat)
+ if (IS_ENABLED(CONFIG_OF_PLATDATA) && plat)
memcpy(ptr, plat, of_plat_size);
dev_set_plat(dev, ptr);
}
@@ -192,7 +192,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
fail_uclass_post_bind:
/* There is no child unbind() method, so no clean-up required */
fail_child_post_bind:
- if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
+ if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) {
if (drv->unbind && drv->unbind(dev)) {
dm_warn("unbind() method failed on dev '%s' on error path\n",
dev->name);
@@ -200,14 +200,14 @@ fail_child_post_bind:
}
fail_bind:
- if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
+ if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) {
if (uclass_unbind_device(dev)) {
dm_warn("Failed to unbind dev '%s' on error path\n",
dev->name);
}
}
fail_uclass_bind:
- if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
+ if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) {
list_del(&dev->sibling_node);
if (dev_get_flags(dev) & DM_FLAG_ALLOC_PARENT_PDATA) {
free(dev_get_parent_plat(dev));
@@ -215,14 +215,14 @@ fail_uclass_bind:
}
}
fail_alloc3:
- if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
+ if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) {
if (dev_get_flags(dev) & DM_FLAG_ALLOC_UCLASS_PDATA) {
free(dev_get_uclass_plat(dev));
dev_set_uclass_plat(dev, NULL);
}
}
fail_alloc2:
- if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
+ if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) {
if (dev_get_flags(dev) & DM_FLAG_ALLOC_PDATA) {
free(dev_get_plat(dev));
dev_set_plat(dev, NULL);
@@ -266,7 +266,7 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
if (pre_reloc_only && !(drv->flags & DM_FLAG_PRE_RELOC))
return -EPERM;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
plat_size = info->plat_size;
#endif
ret = device_bind_common(parent, drv, info->name, (void *)info->plat, 0,
@@ -400,7 +400,7 @@ int device_of_to_plat(struct udevice *dev)
* This is not needed if binding is disabled, since data is allocated
* at build time.
*/
- if (!CONFIG_IS_ENABLED(OF_PLATDATA_NO_BIND)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA_NO_BIND)) {
/* Ensure all parents have ofdata */
if (dev->parent) {
ret = device_of_to_plat(dev->parent);
@@ -425,7 +425,7 @@ int device_of_to_plat(struct udevice *dev)
assert(drv);
if (drv->of_to_plat &&
- (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_ofnode(dev))) {
+ (IS_ENABLED(CONFIG_OF_PLATDATA) || dev_has_ofnode(dev))) {
ret = drv->of_to_plat(dev);
if (ret)
goto fail;
@@ -458,7 +458,7 @@ static int device_get_dma_constraints(struct udevice *dev)
u64 size = 0;
int ret;
- if (!CONFIG_IS_ENABLED(DM_DMA) || !parent || !dev_has_ofnode(parent))
+ if (!IS_ENABLED(CONFIG_DM_DMA) || !parent || !dev_has_ofnode(parent))
return 0;
/*
@@ -517,7 +517,7 @@ int device_probe(struct udevice *dev)
dev_or_flags(dev, DM_FLAG_ACTIVATED);
- if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent &&
+ if (IS_ENABLED(CONFIG_POWER_DOMAIN) && dev->parent &&
(device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) &&
!(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF)) {
ret = dev_power_domain_on(dev);
@@ -547,7 +547,7 @@ int device_probe(struct udevice *dev)
dev->name, ret, errno_str(ret));
}
- if (CONFIG_IS_ENABLED(IOMMU) && dev->parent &&
+ if (IS_ENABLED(CONFIG_IOMMU) && dev->parent &&
(device_get_uclass_id(dev) != UCLASS_IOMMU)) {
ret = dev_iommu_enable(dev);
if (ret)
@@ -754,7 +754,7 @@ static int device_get_device_tail(struct udevice *dev, int ret,
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/**
* device_find_by_ofnode() - Return device associated with given ofnode
*
@@ -907,12 +907,12 @@ int device_get_global_by_ofnode(ofnode ofnode, struct udevice **devp)
return device_get_device_tail(dev, dev ? 0 : -ENOENT, devp);
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int device_get_by_ofplat_idx(uint idx, struct udevice **devp)
{
struct udevice *dev;
- if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) {
struct udevice *base = ll_entry_start(struct udevice, udevice);
dev = base + idx;
@@ -1176,7 +1176,7 @@ void dev_set_uclass_plat(struct udevice *dev, void *uclass_plat)
dev->uclass_plat_ = uclass_plat;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
bool device_is_compatible(const struct udevice *dev, const char *compat)
{
return ofnode_device_is_compatible(dev_ofnode(dev), compat);
@@ -1239,7 +1239,7 @@ int dev_enable_by_path(const char *path)
}
#endif
-#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_RT)
static struct udevice_rt *dev_get_rt(const struct udevice *dev)
{
struct udevice *base = ll_entry_start(struct udevice, udevice);
diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 3e77832a3a0..beff069c808 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -39,7 +39,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag,
u32 flags = dev_get_flags(dev);
/* print the first 20 characters to not break the tree-format. */
- printf(CONFIG_IS_ENABLED(USE_TINY_PRINTF) ? " %s %d [ %c ] %s " :
+ printf(IS_ENABLED(CONFIG_USE_TINY_PRINTF) ? " %s %d [ %c ] %s " :
" %-10.10s %3d [ %c ] %-20.20s ", dev->uclass->uc_drv->name,
dev_get_uclass_index(dev, NULL),
flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 91bcd1a2c21..c7664645f04 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -20,12 +20,12 @@ DECLARE_GLOBAL_DATA_PTR;
fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int offset = dev_of_offset(dev);
int parent = dev_of_offset(dev->parent);
fdt_addr_t addr;
- if (CONFIG_IS_ENABLED(OF_TRANSLATE)) {
+ if (IS_ENABLED(CONFIG_OF_TRANSLATE)) {
const fdt32_t *reg;
int len = 0;
int na, ns;
@@ -69,7 +69,7 @@ fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index)
addr = fdtdec_get_addr_size_auto_parent(gd->fdt_blob, parent,
offset, "reg", index,
NULL, false);
- if (CONFIG_IS_ENABLED(SIMPLE_BUS) && addr != FDT_ADDR_T_NONE) {
+ if (IS_ENABLED(CONFIG_SIMPLE_BUS) && addr != FDT_ADDR_T_NONE) {
if (device_get_uclass_id(dev->parent) ==
UCLASS_SIMPLE_BUS)
addr = simple_bus_translate(dev->parent, addr);
@@ -103,7 +103,7 @@ void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index)
fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
fdt_size_t *size)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/*
* Only get the size in this first call. We'll get the addr in the
* next call to the exisiting dev_get_xxx function which handles
@@ -124,7 +124,7 @@ fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int index;
index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev),
@@ -141,7 +141,7 @@ fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name)
fdt_addr_t devfdt_get_addr_size_name(const struct udevice *dev,
const char *name, fdt_size_t *size)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int index;
index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev),
@@ -205,7 +205,7 @@ fdt_addr_t devfdt_get_addr_pci(const struct udevice *dev)
ulong addr;
addr = devfdt_get_addr(dev);
- if (CONFIG_IS_ENABLED(PCI) && addr == FDT_ADDR_T_NONE) {
+ if (IS_ENABLED(CONFIG_PCI) && addr == FDT_ADDR_T_NONE) {
struct fdt_pci_addr pci_addr;
u32 bar;
int ret;
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 8034a8f48d9..7b9f1f3c659 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -73,13 +73,13 @@ static int bind_drivers_pass(struct udevice *parent, bool pre_reloc_only)
struct udevice *dev;
int ret;
- if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA)) {
int parent_idx = driver_info_parent_id(entry);
if (drt->dev)
continue;
- if (CONFIG_IS_ENABLED(OF_PLATDATA_PARENT) &&
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_PARENT) &&
parent_idx != -1) {
struct driver_rt *parent_drt;
@@ -94,7 +94,7 @@ static int bind_drivers_pass(struct udevice *parent, bool pre_reloc_only)
}
ret = device_bind_by_name(par, pre_reloc_only, entry, &dev);
if (!ret) {
- if (CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA))
drt->dev = dev;
} else if (ret != -EPERM) {
dm_warn("No match for driver '%s'\n", entry->name);
@@ -154,7 +154,7 @@ int device_bind_driver_to_node(struct udevice *parent, const char *drv_name,
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/**
* driver_check_compatible() - Check if a driver matches a compatible string
*
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 4d56b1a7675..069c38b191c 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -22,7 +22,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(OFNODE_MULTI_TREE)
+#if IS_ENABLED(CONFIG_OFNODE_MULTI_TREE)
static void *oftree_list[CONFIG_OFNODE_MULTI_TREE_MAX];
static int oftree_count;
@@ -99,7 +99,7 @@ void *ofnode_to_fdt(ofnode node)
if (of_live_active())
return NULL;
#endif
- if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && ofnode_valid(node))
+ if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && ofnode_valid(node))
return ofnode_lookup_fdt(node);
/* Use the control FDT by default */
@@ -120,7 +120,7 @@ int ofnode_to_offset(ofnode node)
if (of_live_active())
return -1;
#endif
- if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && node.of_offset >= 0)
+ if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && node.of_offset >= 0)
return OFTREE_OFFSET(node.of_offset);
return node.of_offset;
@@ -130,7 +130,7 @@ oftree oftree_from_fdt(void *fdt)
{
oftree tree;
- if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE))
+ if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE))
return oftree_ensure(fdt);
tree.fdt = fdt;
@@ -151,7 +151,7 @@ ofnode noffset_to_ofnode(ofnode other_node, int of_offset)
if (of_live_active())
node.np = NULL;
- else if (!CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) || of_offset < 0 ||
+ else if (!IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) || of_offset < 0 ||
!ofnode_valid(other_node))
node.of_offset = of_offset;
else
@@ -187,7 +187,7 @@ static ofnode ofnode_from_tree_offset(oftree tree, int offset)
{
ofnode node;
- if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && offset >= 0) {
+ if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && offset >= 0) {
int tree_id = oftree_find(tree.fdt);
if (tree_id == -1)
@@ -495,7 +495,7 @@ int ofnode_read_u32_array(ofnode node, const char *propname,
}
}
-#if !CONFIG_IS_ENABLED(DM_INLINE_OFNODE)
+#if !IS_ENABLED(CONFIG_DM_INLINE_OFNODE)
bool ofnode_is_enabled(ofnode node)
{
if (ofnode_is_np(node)) {
@@ -1064,7 +1064,7 @@ fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property,
ns = of_n_size_cells(np);
*sizep = of_read_number(prop + na, ns);
- if (CONFIG_IS_ENABLED(OF_TRANSLATE) && ns > 0)
+ if (IS_ENABLED(CONFIG_OF_TRANSLATE) && ns > 0)
return of_translate_address(np, prop);
else
return of_read_number(prop, na);
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 3e5fea87d84..42cd9a936db 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -314,7 +314,7 @@ int dev_read_alias_seq(const struct udevice *dev, int *devnump)
ret = 0;
}
} else {
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
ret = fdtdec_get_alias_seq(gd->fdt_blob, uc_name,
ofnode_to_offset(node), devnump);
#endif
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index e33bb9d798d..ae4d5264438 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -78,7 +78,7 @@ static struct regmap *regmap_alloc(int count)
return map;
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,
struct regmap **mapp)
{
diff --git a/drivers/core/root.c b/drivers/core/root.c
index c4fb48548bb..e3013cedbe9 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -134,7 +134,7 @@ static int dm_setup_inst(void)
{
DM_ROOT_NON_CONST = DM_DEVICE_GET(root);
- if (CONFIG_IS_ENABLED(OF_PLATDATA_RT)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_RT)) {
struct udevice_rt *urt;
void *start, *end;
int each_size;
@@ -174,7 +174,7 @@ int dm_init(bool of_live)
dm_warn("Virtual root driver already exists!\n");
return -EINVAL;
}
- if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) {
gd->uclass_root = &uclass_head;
} else {
gd->uclass_root = &DM_UCLASS_ROOT_S_NON_CONST;
@@ -187,7 +187,7 @@ int dm_init(bool of_live)
fix_devices();
}
- if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) {
ret = dm_setup_inst();
if (ret) {
log_debug("dm_setup_inst() failed: %d\n", ret);
@@ -198,7 +198,7 @@ int dm_init(bool of_live)
&DM_ROOT_NON_CONST);
if (ret)
return ret;
- if (CONFIG_IS_ENABLED(OF_CONTROL))
+ if (IS_ENABLED(CONFIG_OF_CONTROL))
dev_set_ofnode(DM_ROOT_NON_CONST, ofnode_root());
ret = device_probe(DM_ROOT_NON_CONST);
if (ret)
@@ -221,7 +221,7 @@ int dm_uninit(void)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int dm_remove_devices_flags(uint flags)
{
device_remove(dm_root(), flags);
@@ -234,7 +234,7 @@ int dm_scan_plat(bool pre_reloc_only)
{
int ret;
- if (CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT)) {
struct driver_rt *dyn;
int n_ents;
@@ -254,7 +254,7 @@ int dm_scan_plat(bool pre_reloc_only)
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/**
* dm_scan_fdt_node() - Scan the device tree and bind drivers for a node
*
@@ -352,7 +352,7 @@ __weak int dm_scan_other(bool pre_reloc_only)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_INST) && IS_ENABLED(CONFIG_READ_ONLY)
void *dm_priv_to_rw(void *priv)
{
long offset = priv - (void *)__priv_data_start;
@@ -405,7 +405,7 @@ static int dm_scan(bool pre_reloc_only)
return ret;
}
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
ret = dm_extended_scan(pre_reloc_only);
if (ret) {
debug("dm_extended_scan() failed: %d\n", ret);
@@ -424,19 +424,19 @@ int dm_init_and_scan(bool pre_reloc_only)
{
int ret;
- ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE));
+ ret = dm_init(IS_ENABLED(CONFIG_OF_LIVE));
if (ret) {
debug("dm_init() failed: %d\n", ret);
return ret;
}
- if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA_INST)) {
ret = dm_scan(pre_reloc_only);
if (ret) {
log_debug("dm_scan() failed: %d\n", ret);
return ret;
}
}
- if (CONFIG_IS_ENABLED(DM_EVENT)) {
+ if (IS_ENABLED(CONFIG_DM_EVENT)) {
ret = event_notify_null(EVT_DM_POST_INIT);
if (ret)
return log_msg_ret("ev", ret);
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index 6022e7514e0..607e5e49ed0 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -25,13 +25,13 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
static int simple_bus_post_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
return 0;
#else
struct simple_bus_plat *plat = dev_get_uclass_plat(dev);
int ret;
- if (CONFIG_IS_ENABLED(SIMPLE_BUS_CORRECT_RANGE)) {
+ if (IS_ENABLED(CONFIG_SIMPLE_BUS_CORRECT_RANGE)) {
uint64_t caddr, paddr, len;
/* only read range index 0 */
@@ -65,7 +65,7 @@ UCLASS_DRIVER(simple_bus) = {
.per_device_plat_auto = sizeof(struct simple_bus_plat),
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id generic_simple_bus_ids[] = {
{ .compatible = "simple-bus" },
{ .compatible = "simple-mfd" },
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 25fdb66eaa0..35759ce4f5a 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -55,7 +55,7 @@ static int syscon_pre_probe(struct udevice *dev)
* a 'reg' member, and this holds a single address and size. Drivers
* using OF_PLATDATA will need to ensure that this is true.
*/
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct syscon_base_plat *plat = dev_get_plat(dev);
return regmap_init_mem_plat(dev, plat->reg, ARRAY_SIZE(plat->reg),
@@ -186,7 +186,7 @@ static const struct udevice_id generic_syscon_ids[] = {
U_BOOT_DRIVER(generic_syscon) = {
.name = "syscon",
.id = UCLASS_SYSCON,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.of_match = generic_syscon_ids,
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 1762a0796db..94a1cb1d00f 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -152,7 +152,7 @@ int uclass_get(enum uclass_id id, struct uclass **ucp)
*ucp = NULL;
uc = uclass_find(id);
if (!uc) {
- if (CONFIG_IS_ENABLED(OF_PLATDATA_INST))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_INST))
return -ENOENT;
return uclass_add(id, ucp);
}
@@ -311,7 +311,7 @@ int uclass_find_next_free_seq(struct uclass *uc)
int max = -1;
/* If using aliases, start with the highest alias value */
- if (CONFIG_IS_ENABLED(DM_SEQ_ALIAS) &&
+ if (IS_ENABLED(CONFIG_DM_SEQ_ALIAS) &&
(uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS))
max = dev_read_alias_highest_id(uc->uc_drv->name);
@@ -410,7 +410,7 @@ done:
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
const char *name, struct udevice **devp)
{
@@ -535,7 +535,7 @@ int uclass_get_device_by_ofnode(enum uclass_id id, ofnode node,
return uclass_get_device_tail(dev, ret, devp);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
int uclass_get_device_by_phandle_id(enum uclass_id id, uint phandle_id,
struct udevice **devp)
{
@@ -713,7 +713,7 @@ err:
return ret;
}
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int uclass_pre_unbind_device(struct udevice *dev)
{
struct uclass *uc;
@@ -785,7 +785,7 @@ int uclass_post_probe_device(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int uclass_pre_remove_device(struct udevice *dev)
{
struct uclass *uc;
diff --git a/drivers/core/util.c b/drivers/core/util.c
index aa60fdd15bc..5891753cd13 100644
--- a/drivers/core/util.c
+++ b/drivers/core/util.c
@@ -22,7 +22,7 @@ int list_count_items(struct list_head *head)
return count;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int pci_get_devfn(struct udevice *dev)
{
struct fdt_pci_addr addr;
diff --git a/drivers/crypto/aspeed/aspeed_hace.c b/drivers/crypto/aspeed/aspeed_hace.c
index 6b6c8fa6588..e907ea95eb1 100644
--- a/drivers/crypto/aspeed/aspeed_hace.c
+++ b/drivers/crypto/aspeed/aspeed_hace.c
@@ -288,7 +288,7 @@ static int aspeed_hace_digest_wd(struct udevice *dev, enum HASH_ALGO algo,
if (rc)
return rc;
- if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) {
+ if (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) {
cur = ibuf;
end = ibuf + ilen;
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index ceb66dd6270..78530d7eecd 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -38,7 +38,7 @@ uint32_t sec_offset[CONFIG_SYS_FSL_MAX_NUM_OF_SEC] = {
#endif
};
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
struct udevice *caam_dev;
#else
#define SEC_ADDR(idx) \
@@ -114,7 +114,7 @@ static void jr_initregs(uint8_t sec_idx, struct caam_regs *caam)
static int jr_init(uint8_t sec_idx, struct caam_regs *caam)
{
struct jobring *jr = &caam->jr[sec_idx];
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
ofnode scu_node = ofnode_by_compatible(ofnode_null(), "fsl,imx8-mu");
#endif
memset(jr, 0, sizeof(struct jobring));
@@ -141,7 +141,7 @@ static int jr_init(uint8_t sec_idx, struct caam_regs *caam)
memset(jr->input_ring, 0, JR_SIZE * sizeof(caam_dma_addr_t));
memset(jr->output_ring, 0, jr->op_size);
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
if (!ofnode_valid(scu_node))
#endif
start_jr(caam);
@@ -322,7 +322,7 @@ static void desc_done(uint32_t status, void *arg)
static inline int run_descriptor_jr_idx(uint32_t *desc, uint8_t sec_idx)
{
struct caam_regs *caam;
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
caam = dev_get_priv(caam_dev);
#else
caam = &caam_st;
@@ -418,7 +418,7 @@ static int jr_hw_reset(struct jr_regs *regs)
static inline int jr_reset_sec(uint8_t sec_idx)
{
struct caam_regs *caam;
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
caam = dev_get_priv(caam_dev);
#else
caam = &caam_st;
@@ -440,7 +440,7 @@ int jr_reset(void)
int sec_reset(void)
{
struct caam_regs *caam;
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
caam = dev_get_priv(caam_dev);
#else
caam = &caam_st;
@@ -677,7 +677,7 @@ int sec_init_idx(uint8_t sec_idx)
{
int ret = 0;
struct caam_regs *caam;
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
if (!caam_dev) {
printf("caam_jr: caam not found\n");
return -1;
@@ -689,7 +689,7 @@ int sec_init_idx(uint8_t sec_idx)
caam_st.jrid = 0;
caam = &caam_st;
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
ofnode scu_node = ofnode_by_compatible(ofnode_null(), "fsl,imx8-mu");
if (ofnode_valid(scu_node))
@@ -758,7 +758,7 @@ int sec_init_idx(uint8_t sec_idx)
liodn_s = (liodnr & JRSLIODN_MASK) >> JRSLIODN_SHIFT;
#endif
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
init:
#endif
ret = jr_init(sec_idx, caam);
@@ -766,7 +766,7 @@ init:
printf("SEC%u: initialization failed\n", sec_idx);
return -1;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
if (ofnode_valid(scu_node)) {
if (IS_ENABLED(CONFIG_DM_RNG)) {
ret = device_bind_driver(NULL, "caam-rng", "caam-rng", NULL);
@@ -808,10 +808,10 @@ int sec_init(void)
return sec_init_idx(0);
}
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
static int jr_power_on(ofnode node)
{
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
struct udevice __maybe_unused jr_dev;
struct power_domain pd;
diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c
index d8065d68ea4..62670fc0648 100644
--- a/drivers/crypto/hash/hash_sw.c
+++ b/drivers/crypto/hash/hash_sw.c
@@ -244,7 +244,7 @@ static int sw_hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo,
if (rc)
return rc;
- if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) {
+ if (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) {
cur = ibuf;
end = ibuf + ilen;
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 81d081fabb0..ca96cb9f612 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -88,7 +88,7 @@ u8 spd_i2c_addr[CONFIG_SYS_NUM_DDR_CTLRS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
#define DEV_TYPE struct udevice
#else
/* Local udevice */
@@ -108,7 +108,7 @@ static int ddr_i2c_read(DEV_TYPE *dev, unsigned int addr,
{
int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = dm_i2c_read(dev, 0, buf, len);
#else
ret = i2c_read(dev->chip, addr, alen, buf, len);
@@ -122,7 +122,7 @@ static int ddr_i2c_dummy_write(unsigned int chip_addr)
{
uint8_t buf = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
@@ -148,7 +148,7 @@ static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
int ret;
DEV_TYPE *dev;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_chip_for_busnum(CONFIG_SYS_SPD_BUS_NUM, i2c_address,
1, &dev);
if (ret) {
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 7cff8234584..6e710a5689d 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -761,7 +761,7 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
#endif
buf[0] = '\0';
@@ -1410,7 +1410,7 @@ int fsl_use_spd(void)
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if IS_ENABLED(CONFIG_ENV_SUPPORT)
if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
#endif
buf[0] = '\0';
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index 2dae1593706..5c21c58c872 100644
--- a/drivers/dfu/dfu_sf.c
+++ b/drivers/dfu/dfu_sf.c
@@ -67,7 +67,7 @@ static int dfu_flush_medium_sf(struct dfu_entity *dfu)
{
u64 off, length;
- if (!CONFIG_IS_ENABLED(DFU_SF_PART) || !dfu->data.sf.ubi)
+ if (!IS_ENABLED(CONFIG_DFU_SF_PART) || !dfu->data.sf.ubi)
return 0;
/* in case of ubi partition, erase rest of the partition */
@@ -89,7 +89,7 @@ static unsigned int dfu_polltimeout_sf(struct dfu_entity *dfu)
* ubi partition, as sectors which are not used need
* to be erased
*/
- if (CONFIG_IS_ENABLED(DFU_SF_PART) && dfu->data.sf.ubi)
+ if (IS_ENABLED(CONFIG_DFU_SF_PART) && dfu->data.sf.ubi)
return DFU_MANIFEST_POLL_TIMEOUT;
return DFU_DEFAULT_POLL_TIMEOUT;
@@ -102,7 +102,7 @@ static void dfu_free_entity_sf(struct dfu_entity *dfu)
* For the non-DM case we must ensure that the the SPI device is only
* freed once.
*/
- if (!CONFIG_IS_ENABLED(DM_SPI_FLASH)) {
+ if (!IS_ENABLED(CONFIG_DM_SPI_FLASH)) {
struct spi_flash *dev = dfu->data.sf.dev;
if (!dev)
@@ -188,7 +188,7 @@ int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char **argv, int ar
dfu->data.sf.size = hextoul(argv[2], &s);
if (*s)
return -EINVAL;
- } else if (CONFIG_IS_ENABLED(DFU_SF_PART) &&
+ } else if (IS_ENABLED(CONFIG_DFU_SF_PART) &&
(!strcmp(argv[0], "part") || !strcmp(argv[0], "partubi"))) {
char mtd_id[32];
struct mtd_device *mtd_dev;
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index da988f6bb66..9ee2ce03706 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -85,7 +85,7 @@ static int mxs_dma_read_semaphore(int channel)
return tmp;
}
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
void mxs_dma_flush_desc(struct mxs_dma_desc *desc)
{
uint32_t addr;
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 34f72fa5dc8..b067edee2ca 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -29,7 +29,7 @@ static inline struct dma_ops *dma_dev_ops(struct udevice *dev)
return (struct dma_ops *)dev->driver->ops;
}
-# if CONFIG_IS_ENABLED(OF_CONTROL)
+# if IS_ENABLED(CONFIG_OF_CONTROL)
static int dma_of_xlate_default(struct dma *dma,
struct ofnode_phandle_args *args)
{
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index a06c590234f..bbbd2c7a832 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -525,7 +525,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
}
#endif
-#if CONFIG_IS_ENABLED(EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_PARTITION)
if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) {
dev_desc = fastboot_mmc_get_dev(response);
if (!dev_desc)
@@ -552,7 +552,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
}
#endif
-#if CONFIG_IS_ENABLED(DOS_PARTITION)
+#if IS_ENABLED(CONFIG_DOS_PARTITION)
if (strcmp(cmd, CONFIG_FASTBOOT_MBR_NAME) == 0) {
dev_desc = fastboot_mmc_get_dev(response);
if (!dev_desc)
diff --git a/drivers/firmware/firmware-uclass.c b/drivers/firmware/firmware-uclass.c
index e83a147a000..93e6b30c2d3 100644
--- a/drivers/firmware/firmware-uclass.c
+++ b/drivers/firmware/firmware-uclass.c
@@ -9,7 +9,7 @@
UCLASS_DRIVER(firmware) = {
.id = UCLASS_FIRMWARE,
.name = "firmware",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index ef3e9836461..536d0957223 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -41,7 +41,7 @@
#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN_##name
#endif
-#if CONFIG_IS_ENABLED(EFI_LOADER)
+#if IS_ENABLED(CONFIG_EFI_LOADER)
int __efi_runtime_data psci_method;
#else
int psci_method __section(".data");
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 7f6b6bc73a1..6afd47ef182 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -215,7 +215,7 @@ int fpga_fsload(int devnum, const void *buf, size_t size,
}
#endif
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
int fpga_loads(int devnum, const void *buf, size_t size,
struct fpga_secure_info *fpga_sec_info)
{
@@ -353,7 +353,7 @@ int fpga_info(int devnum)
return fpga_dev_info(devnum);
}
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
int fpga_compatible2flag(int devnum, const char *compatible)
{
const fpga_desc * const desc = fpga_get_desc(devnum);
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 8170c3368ef..99e9a9e0cbc 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -172,7 +172,7 @@ int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
}
#endif
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
int xilinx_loads(xilinx_desc *desc, const void *buf, size_t bsize,
struct fpga_secure_info *fpga_sec_info)
{
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index d1491da02c3..bdaca088c5b 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -200,7 +200,7 @@ static int zynqmp_validate_bitstream(xilinx_desc *desc, const void *buf,
return 0;
}
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
static int zynqmp_check_compatible(xilinx_desc *desc, int flags)
{
/*
@@ -235,7 +235,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize,
u32 buf_lo, buf_hi;
u32 bsize_req = (u32)bsize;
u32 ret_payload[PAYLOAD_ARG_CNT];
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
struct fpga_secure_info info = { 0 };
ret = zynqmp_check_compatible(desc, flags);
@@ -251,7 +251,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize,
switch (flags) {
case FPGA_LEGACY:
break; /* Handle the legacy image later in this function */
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
case FPGA_XILINX_ZYNQMP_DDRAUTH:
/* DDR authentication */
info.authflag = ZYNQMP_FPGA_AUTH_DDR;
@@ -299,7 +299,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize,
return ret;
}
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
static int zynqmp_loads(xilinx_desc *desc, const void *buf, size_t bsize,
struct fpga_secure_info *fpga_sec_info)
{
@@ -362,7 +362,7 @@ static int __maybe_unused zynqmp_str2flag(xilinx_desc *desc, const char *str)
{
if (!strncmp(str, "u-boot,fpga-legacy", 18))
return FPGA_LEGACY;
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
if (!strncmp(str, "u-boot,zynqmp-fpga-ddrauth", 26))
return FPGA_XILINX_ZYNQMP_DDRAUTH;
@@ -375,7 +375,7 @@ static int __maybe_unused zynqmp_str2flag(xilinx_desc *desc, const char *str)
struct xilinx_fpga_op zynqmp_op = {
.load = zynqmp_load,
.info = zynqmp_pcap_info,
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
.loads = zynqmp_loads,
.str2flag = zynqmp_str2flag,
#endif
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 1409db5dc11..4738b3e4401 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -211,7 +211,7 @@ int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static bool at91_get_port_output(struct at91_port *at91_port, int offset)
{
u32 mask, val;
@@ -458,7 +458,7 @@ int at91_get_pio_value(unsigned port, unsigned pin)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
/* Common GPIO API */
int gpio_request(unsigned gpio, const char *label)
@@ -500,7 +500,7 @@ int gpio_set_value(unsigned gpio, int value)
}
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct at91_port_priv {
struct at91_port *regs;
@@ -605,7 +605,7 @@ static int at91_gpio_probe(struct udevice *dev)
clk_free(&clk);
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
plat->base_addr = dev_read_addr(dev);
#endif
plat->bank_name = at91_get_bank_name(plat->base_addr);
@@ -617,7 +617,7 @@ static int at91_gpio_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id at91_gpio_ids[] = {
{ .compatible = "atmel,at91rm9200-gpio" },
{ }
@@ -627,7 +627,7 @@ static const struct udevice_id at91_gpio_ids[] = {
U_BOOT_DRIVER(atmel_at91rm9200_gpio) = {
.name = "atmel_at91rm9200_gpio",
.id = UCLASS_GPIO,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = at91_gpio_ids,
.plat_auto = sizeof(struct at91_port_plat),
#endif
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 47ed2979814..4caa38871cd 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -176,7 +176,7 @@ int atmel_pio4_get_pio_input(u32 port, u32 pin)
return (readl(&port_base->pdsr) & mask) ? 1 : 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/**
* struct atmel_pioctrl_data - Atmel PIO controller (pinmux + gpio) data struct
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index 704a6fa7121..8d6c4e0f0d9 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -115,7 +115,7 @@ static int bcm2835_gpio_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int bcm2835_gpio_of_to_plat(struct udevice *dev)
{
struct bcm2835_gpio_plat *plat = dev_get_plat(dev);
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index b310f2dbf65..84a4c12c2f8 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -17,7 +17,7 @@
#include "da8xx_gpio.h"
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
#include <asm/arch/hardware.h>
#include <asm/arch/davinci_misc.h>
@@ -380,7 +380,7 @@ static int _gpio_direction_output(struct davinci_gpio *bank, unsigned int gpio,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
void gpio_info(void)
{
diff --git a/drivers/gpio/da8xx_gpio.h b/drivers/gpio/da8xx_gpio.h
index ca59d6a90b3..80d12944fca 100644
--- a/drivers/gpio/da8xx_gpio.h
+++ b/drivers/gpio/da8xx_gpio.h
@@ -28,7 +28,7 @@ struct davinci_gpio_bank {
#define MAX_NUM_GPIOS 144
#define GPIO_BIT(gp) ((gp) & 0x1F)
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* Information about a GPIO bank */
struct davinci_gpio_plat {
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index dbebf3a53eb..221e3707dd0 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -75,7 +75,7 @@ static int gpio_to_device(unsigned int gpio, struct gpio_desc *desc)
return -ENOENT;
}
-#if CONFIG_IS_ENABLED(DM_GPIO_LOOKUP_LABEL)
+#if IS_ENABLED(CONFIG_DM_GPIO_LOOKUP_LABEL)
/**
* dm_gpio_lookup_label() - look for name in gpio device
*
@@ -241,7 +241,7 @@ static int gpio_find_and_xlate(struct gpio_desc *desc,
return gpio_xlate_offs_flags(desc->dev, desc, args);
}
-#if CONFIG_IS_ENABLED(GPIO_HOG)
+#if IS_ENABLED(CONFIG_GPIO_HOG)
struct gpio_hog_priv {
struct gpio_desc gpiod;
@@ -369,7 +369,7 @@ int dm_gpio_request(struct gpio_desc *desc, const char *label)
static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...)
{
-#if !defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(USE_TINY_PRINTF)
+#if !defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -418,7 +418,7 @@ int gpio_request(unsigned gpio, const char *label)
*/
int gpio_requestf(unsigned gpio, const char *fmt, ...)
{
-#if !defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(USE_TINY_PRINTF)
+#if !defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -897,7 +897,7 @@ int gpio_get_status(struct udevice *dev, int offset, char *buf, int buffsize)
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
int gpio_get_acpi(const struct gpio_desc *desc, struct acpi_gpio *gpio)
{
const struct dm_gpio_ops *ops;
@@ -1130,7 +1130,7 @@ err:
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int _gpio_request_by_name_nodev(ofnode node, const char *list_name,
int index, struct gpio_desc *desc,
int flags, bool add_index)
@@ -1245,7 +1245,7 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name)
}
#endif /* OF_PLATDATA */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int gpio_request_by_phandle(struct udevice *dev,
const struct phandle_2_arg *cells,
struct gpio_desc *desc, int flags)
@@ -1467,7 +1467,7 @@ static int gpio_post_bind(struct udevice *dev)
}
#endif
- if (CONFIG_IS_ENABLED(GPIO_HOG)) {
+ if (IS_ENABLED(CONFIG_GPIO_HOG)) {
struct udevice *child;
ofnode node;
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 175e460aff5..cf275a962b6 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -218,7 +218,7 @@ U_BOOT_DRIVER(imx_rgpio2p) = {
.bind = imx_rgpio2p_bind,
};
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct imx_rgpio2p_plat imx_plat[] = {
{ 0, (struct gpio_regs *)RGPIO2P_GPIO1_BASE_ADDR },
{ 1, (struct gpio_regs *)RGPIO2P_GPIO2_BASE_ADDR },
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c
index 4a3ec6d6350..a0dd0322b68 100644
--- a/drivers/gpio/intel_gpio.c
+++ b/drivers/gpio/intel_gpio.c
@@ -147,7 +147,7 @@ static int intel_gpio_set_flags(struct udevice *dev, unsigned int offset,
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
static int intel_gpio_get_acpi(const struct gpio_desc *desc,
struct acpi_gpio *gpio)
{
@@ -199,12 +199,12 @@ static const struct dm_gpio_ops gpio_intel_ops = {
.get_function = intel_gpio_get_function,
.xlate = intel_gpio_xlate,
.set_flags = intel_gpio_set_flags,
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
.get_acpi = intel_gpio_get_acpi,
#endif
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id intel_intel_gpio_ids[] = {
{ .compatible = "intel,gpio" },
{ }
diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c
index fd26a36a0f9..1151b497018 100644
--- a/drivers/gpio/mpc83xx_spisel_boot.c
+++ b/drivers/gpio/mpc83xx_spisel_boot.c
@@ -60,7 +60,7 @@ static int mpc83xx_spisel_boot_get_function(struct udevice *dev, uint gpio)
return GPIOF_OUTPUT;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int mpc83xx_spisel_boot_of_to_plat(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
@@ -139,7 +139,7 @@ U_BOOT_DRIVER(spisel_boot_mpc83xx) = {
.name = "spisel_boot_mpc83xx",
.id = UCLASS_GPIO,
.ops = &mpc83xx_spisel_boot_ops,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_to_plat = mpc83xx_spisel_boot_of_to_plat,
.plat_auto = sizeof(struct mpc8xxx_gpio_plat),
.of_match = mpc83xx_spisel_boot_ids,
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c
index f7ffd8926ad..aea33111003 100644
--- a/drivers/gpio/mpc8xxx_gpio.c
+++ b/drivers/gpio/mpc8xxx_gpio.c
@@ -172,7 +172,7 @@ static int mpc8xxx_gpio_get_function(struct udevice *dev, uint gpio)
return dir ? GPIOF_OUTPUT : GPIOF_INPUT;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int mpc8xxx_gpio_of_to_plat(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
@@ -263,7 +263,7 @@ U_BOOT_DRIVER(gpio_mpc8xxx) = {
.name = "gpio_mpc8xxx",
.id = UCLASS_GPIO,
.ops = &gpio_mpc8xxx_ops,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_to_plat = mpc8xxx_gpio_of_to_plat,
.plat_auto = sizeof(struct mpc8xxx_gpio_plat),
.of_match = mpc8xxx_gpio_ids,
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index f706a6dfa4f..81f877c6c39 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -100,7 +100,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
}
static const struct dm_gpio_ops mvebu_gpio_ops = {
-#if CONFIG_IS_ENABLED(PINCTRL_ARMADA_38X)
+#if IS_ENABLED(CONFIG_PINCTRL_ARMADA_38X)
.request = pinctrl_gpio_request,
.rfree = pinctrl_gpio_free,
#endif
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 1dec4e35e0a..09f046fbd20 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -24,7 +24,7 @@ enum mxc_gpio_direction {
#define GPIO_PER_BANK 32
struct mxc_gpio_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Put this first since driver model will copy the data here */
struct dtd_gpio_mxc dtplat;
#endif
@@ -36,7 +36,7 @@ struct mxc_bank_info {
struct gpio_regs *regs;
};
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
#define GPIO_TO_PORT(n) ((n) / 32)
/* GPIO port description */
@@ -168,7 +168,7 @@ int gpio_direction_output(unsigned gpio, int value)
}
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
#include <fdtdec.h>
static int mxc_gpio_is_output(struct gpio_regs *regs, int offset)
{
@@ -286,7 +286,7 @@ static int mxc_gpio_probe(struct udevice *dev)
int banknum;
char name[18], *str;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_gpio_mxc *dtplat = &plat->dtplat;
plat->regs = map_sysmem(dtplat->reg[0], dtplat->reg[1]);
@@ -310,7 +310,7 @@ static int mxc_gpio_probe(struct udevice *dev)
static int mxc_gpio_of_to_plat(struct udevice *dev)
{
struct mxc_gpio_plat *plat = dev_get_plat(dev);
- if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA)) {
fdt_addr_t addr;
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
@@ -347,7 +347,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
DM_DRIVER_ALIAS(gpio_mxc, fsl_imx6q_gpio)
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static const struct mxc_gpio_plat mxc_plat[] = {
{ 0, (struct gpio_regs *)GPIO1_BASE_ADDR },
{ 1, (struct gpio_regs *)GPIO2_BASE_ADDR },
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 1356f89ac2f..5160d547487 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -55,7 +55,7 @@ void mxs_gpio_init(void)
}
}
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
int gpio_get_value(unsigned gpio)
{
uint32_t bank = PAD_BANK(gpio);
@@ -152,7 +152,7 @@ DECLARE_GLOBAL_DATA_PTR;
*/
struct mxs_gpio_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_gpio dtplat;
#endif
unsigned int bank;
@@ -241,7 +241,7 @@ static int mxs_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[16], *str;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_gpio *dtplat = &plat->dtplat;
priv->bank = (unsigned int)dtplat->reg[0];
uc_priv->gpio_count = dtplat->gpio_ranges[3];
@@ -262,7 +262,7 @@ static int mxs_gpio_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int mxs_of_to_plat(struct udevice *dev)
{
struct mxs_gpio_plat *plat = dev_get_plat(dev);
@@ -301,7 +301,7 @@ U_BOOT_DRIVER(fsl_imx23_gpio) = {
.probe = mxs_gpio_probe,
.priv_auto = sizeof(struct mxs_gpio_priv),
.plat_auto = sizeof(struct mxs_gpio_plat),
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = mxs_gpio_ids,
.of_to_plat = mxs_of_to_plat,
#endif
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index 50c4f75ddf5..0de6232aab7 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define OMAP_GPIO_DIR_OUT 0
#define OMAP_GPIO_DIR_IN 1
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
#define GPIO_PER_BANK 32
@@ -118,7 +118,7 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio)
return (__raw_readl(reg) & (1 << gpio)) != 0;
}
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
static inline int get_gpio_index(int gpio)
{
return gpio & 0x1f;
@@ -301,7 +301,7 @@ static int omap_gpio_probe(struct udevice *dev)
return 0;
}
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
static int omap_gpio_bind(struct udevice *dev)
{
struct omap_gpio_plat *plat = dev_get_plat(dev);
@@ -336,7 +336,7 @@ static int omap_gpio_bind(struct udevice *dev)
}
#endif
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id omap_gpio_ids[] = {
{ .compatible = "ti,omap3-gpio" },
{ .compatible = "ti,omap4-gpio" },
@@ -361,8 +361,8 @@ static int omap_gpio_of_to_plat(struct udevice *dev)
U_BOOT_DRIVER(gpio_omap) = {
.name = "gpio_omap",
.id = UCLASS_GPIO,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = omap_gpio_ids,
.of_to_plat = of_match_ptr(omap_gpio_of_to_plat),
.plat_auto = sizeof(struct omap_gpio_plat),
@@ -373,7 +373,7 @@ U_BOOT_DRIVER(gpio_omap) = {
.ops = &gpio_omap_ops,
.probe = omap_gpio_probe,
.priv_auto = sizeof(struct gpio_bank),
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 305f9a6ff62..94de1143be5 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -255,7 +255,7 @@ static int sb_gpio_get_flags(struct udevice *dev, uint offset, ulong *flagsp)
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
static int sb_gpio_get_acpi(const struct gpio_desc *desc,
struct acpi_gpio *gpio)
{
@@ -321,14 +321,14 @@ static const struct dm_gpio_ops gpio_sandbox_ops = {
.xlate = sb_gpio_xlate,
.set_flags = sb_gpio_set_flags,
.get_flags = sb_gpio_get_flags,
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
.get_acpi = sb_gpio_get_acpi,
#endif
};
static int sandbox_gpio_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
uc_priv->gpio_count =
@@ -378,7 +378,7 @@ U_BOOT_DRIVER(sandbox_gpio) = {
DM_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias)
-#if CONFIG_IS_ENABLED(PINCTRL)
+#if IS_ENABLED(CONFIG_PINCTRL)
/* pincontrol: used only to check GPIO pin configuration (pinmux command) */
@@ -545,7 +545,7 @@ static int sb_pinctrl_get_pin_muxing(struct udevice *dev,
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
static int sb_pinctrl_get_name(const struct udevice *dev, char *out_name)
{
return acpi_copy_name(out_name, "PINC");
@@ -567,7 +567,7 @@ static struct pinctrl_ops sandbox_pinctrl_gpio_ops = {
.get_pin_muxing = sb_pinctrl_get_pin_muxing,
};
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
struct acpi_ops pinctrl_sandbox_acpi_ops = {
.get_name = sb_pinctrl_get_name,
};
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index 1e85db179a6..a3a8e381ad0 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -18,7 +18,7 @@
#include <asm/gpio.h>
#include <dt-bindings/gpio/gpio.h>
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
static int sunxi_gpio_output(u32 pin, u32 val)
{
u32 dat;
@@ -108,7 +108,7 @@ int sunxi_name_to_gpio(const char *name)
}
#endif /* DM_GPIO */
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* TODO(sjg at chromium.org): Remove this function and use device tree */
int sunxi_name_to_gpio(const char *name)
{
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index e54de42abc3..ecb4b91d6c4 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -335,7 +335,7 @@ int dw_i2c_gen_speed_config(const struct udevice *dev, int speed_hz,
ulong rate;
int ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
rate = clk_get_rate(&priv->clk);
if (IS_ERR_VALUE(rate))
return log_msg_ret("clk", -EINVAL);
@@ -587,7 +587,7 @@ static int __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr)
writel(IC_RX_TL, &i2c_base->ic_rx_tl);
writel(IC_TX_TL, &i2c_base->ic_tx_tl);
writel(IC_STOP_DET, &i2c_base->ic_intr_mask);
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
_dw_i2c_set_bus_speed(NULL, i2c_base, speed, IC_CLK);
writel(slaveaddr, &i2c_base->ic_sar);
#endif
@@ -600,7 +600,7 @@ static int __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* The legacy I2C functions. These need to get removed once
* all users of this driver are converted to DM.
@@ -707,7 +707,7 @@ static int designware_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
struct dw_i2c *i2c = dev_get_priv(bus);
ulong rate;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
rate = clk_get_rate(&i2c->clk);
if (IS_ERR_VALUE(rate))
return log_ret(-EINVAL);
@@ -752,7 +752,7 @@ int designware_i2c_of_to_plat(struct udevice *bus)
reset_deassert_bulk(&priv->resets);
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(bus, 0, &priv->clk);
if (ret)
return ret;
@@ -790,7 +790,7 @@ int designware_i2c_remove(struct udevice *dev)
{
struct dw_i2c *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&priv->clk);
clk_free(&priv->clk);
#endif
diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h
index 049976e8a23..26ad6192773 100644
--- a/drivers/i2c/designware_i2c.h
+++ b/drivers/i2c/designware_i2c.h
@@ -202,7 +202,7 @@ struct dw_i2c {
u32 scl_fall_time_ns;
u32 sda_hold_time_ns;
bool has_spk_cnt;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
struct dw_i2c_speed_config config;
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index d312f35f044..1ce7f87d1a6 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define CFG_FSL_I2C_BASE_ADDR CONFIG_SYS_IMMR
#endif
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static const struct fsl_i2c_base *i2c_base[4] = {
(struct fsl_i2c_base *)(CFG_FSL_I2C_BASE_ADDR + CONFIG_SYS_FSL_I2C_OFFSET),
#ifdef CONFIG_SYS_FSL_I2C2_OFFSET
@@ -209,7 +209,7 @@ static uint set_i2c_bus_speed(const struct fsl_i2c_base *base,
return speed;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static uint get_i2c_clock(int bus)
{
if (bus)
@@ -496,7 +496,7 @@ static uint __i2c_set_bus_speed(const struct fsl_i2c_base *base,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static void fsl_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
{
__i2c_init(i2c_base[adap->hwadapnr], speed, slaveadd,
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c
index 1107cf309fc..c00ae23099b 100644
--- a/drivers/i2c/i2c-emul-uclass.c
+++ b/drivers/i2c/i2c-emul-uclass.c
@@ -46,7 +46,7 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp)
struct udevice *emul;
int ret;
- if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA)) {
ret = uclass_find_device_by_phandle(UCLASS_I2C_EMUL, dev,
"sandbox,emul", &emul);
} else {
@@ -79,7 +79,7 @@ UCLASS_DRIVER(i2c_emul) = {
UCLASS_DRIVER(i2c_emul_parent) = {
.id = UCLASS_I2C_EMUL_PARENT,
.name = "i2c_emul_parent",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index 8d9a89ed890..630a22365b2 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -16,7 +16,7 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
#include <asm/gpio.h>
#endif
#include <linux/delay.h>
@@ -501,7 +501,7 @@ uint i2c_get_chip_addr_offset_mask(struct udevice *dev)
return chip->chip_addr_offset_mask;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static void i2c_gpio_set_pin(struct gpio_desc *pin, int bit)
{
if (bit)
@@ -627,7 +627,7 @@ int i2c_deblock(struct udevice *bus)
return ops->deblock(bus);
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip)
{
int addr;
@@ -649,7 +649,7 @@ int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip)
static int i2c_pre_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev);
unsigned int max = 0;
ofnode node;
@@ -672,7 +672,7 @@ static int i2c_pre_probe(struct udevice *dev)
static int i2c_post_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev);
i2c->speed_hz = dev_read_u32_default(dev, "clock-frequency",
@@ -686,7 +686,7 @@ static int i2c_post_probe(struct udevice *dev)
static int i2c_child_post_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct dm_i2c_chip *plat = dev_get_parent_plat(dev);
if (!dev_has_ofnode(dev))
@@ -703,7 +703,7 @@ static int i2c_post_bind(struct udevice *dev)
debug("%s: %s, seq=%d\n", __func__, dev->name, dev_seq(dev));
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
ret = dm_scan_fdt_dev(dev);
#endif
return ret;
@@ -728,7 +728,7 @@ UCLASS_DRIVER(i2c_generic) = {
static const struct udevice_id generic_chip_i2c_ids[] = {
{ .compatible = "i2c-chip", .data = I2C_DEVICE_GENERIC },
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
{ .compatible = "hid-over-i2c", .data = I2C_DEVICE_HID_OVER_I2C },
#endif
{ }
@@ -738,7 +738,7 @@ U_BOOT_DRIVER(i2c_generic_chip_drv) = {
.name = "i2c_generic_chip_drv",
.id = UCLASS_I2C_GENERIC,
.of_match = generic_chip_i2c_ids,
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
.of_to_plat = acpi_i2c_of_to_plat,
.priv_auto = sizeof(struct acpi_i2c_priv),
#endif
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 496f4feec56..c7a87cfaaf4 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -41,7 +41,7 @@
#define LPC32XX_I2C_STAT_NAI 0x00000004
#define LPC32XX_I2C_STAT_TDI 0x00000001
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static struct lpc32xx_i2c_base *lpc32xx_i2c[] = {
(struct lpc32xx_i2c_base *)I2C1_BASE,
(struct lpc32xx_i2c_base *)I2C2_BASE,
@@ -223,7 +223,7 @@ static int __i2c_write(struct lpc32xx_i2c_base *base, u8 dev, uint addr,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static void lpc32xx_i2c_init(struct i2c_adapter *adap,
int requested_speed, int slaveadd)
{
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 0034dfbf6da..2be7dae0d6e 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -141,7 +141,7 @@ static int pca954x_of_to_plat(struct udevice *dev)
static int pca954x_probe(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(DM_GPIO)) {
+ if (IS_ENABLED(CONFIG_DM_GPIO)) {
struct pca954x_priv *priv = dev_get_priv(dev);
int err;
@@ -162,7 +162,7 @@ static int pca954x_probe(struct udevice *dev)
static int pca954x_remove(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(DM_GPIO)) {
+ if (IS_ENABLED(CONFIG_DM_GPIO)) {
struct pca954x_priv *priv = dev_get_priv(dev);
if (dm_gpio_is_valid(&priv->gpio_mux_reset))
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 5bc9cd7b295..26e43da1c5a 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -370,7 +370,7 @@ static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static struct mv_i2c *base_glob;
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index 93bbc6916e5..e68cd1896db 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -16,7 +16,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/compat.h>
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
#include <clk.h>
#include <dm.h>
#include <reset.h>
@@ -29,7 +29,7 @@ DECLARE_GLOBAL_DATA_PTR;
* settings
*/
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
#if defined(CONFIG_ARCH_ORION5X)
#include <asm/arch/orion5x.h>
#elif (defined(CONFIG_ARCH_KIRKWOOD) || defined(CONFIG_ARCH_MVEBU))
@@ -45,7 +45,7 @@ DECLARE_GLOBAL_DATA_PTR;
* On SUNXI, we get CFG_SYS_TCLK from this include, so we want to
* always have it.
*/
-#if CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_ARCH_SUNXI)
+#if IS_ENABLED(CONFIG_DM_I2C) && defined(CONFIG_ARCH_SUNXI)
#include <asm/arch/i2c.h>
#endif
@@ -85,7 +85,7 @@ struct mvtwsi_registers {
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct mvtwsi_i2c_dev {
/* TWSI Register base for the device */
struct mvtwsi_registers *base;
@@ -186,7 +186,7 @@ inline uint calc_tick(uint speed)
return (1000000000u / speed) + 100;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* twsi_get_base() - Get controller register base for specified adapter
@@ -483,7 +483,7 @@ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi,
writel(baud, &twsi->baudrate);
/* Wait for controller for one tick */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ndelay(calc_tick(highest_speed));
#else
ndelay(10000);
@@ -518,7 +518,7 @@ static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed,
writel(slaveadd, &twsi->slave_address);
writel(0, &twsi->xtnd_slave_addr);
/* Assert STOP, but don't care for the result */
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
(void) twsi_stop(twsi, calc_tick(*actual_speed));
#else
(void) twsi_stop(twsi, 10000);
@@ -685,7 +685,7 @@ static int __twsi_i2c_write(struct mvtwsi_registers *twsi, uchar chip,
return status != 0 ? status : stop_status;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static void twsi_i2c_init(struct i2c_adapter *adap, int speed,
int slaveadd)
{
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 86b9fb57c83..cee2157c80d 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -129,7 +129,7 @@ static uint8_t i2c_imx_get_clk(struct mxc_i2c_bus *i2c_bus, unsigned int rate)
#endif
/* Divider value calculation */
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
i2c_clk_rate = clk_get_rate(&i2c_bus->per_clk);
#else
i2c_clk_rate = mxc_get_clock(MXC_I2C_CLK);
@@ -368,7 +368,7 @@ static struct mxc_i2c_bus mxc_i2c_buses[] = {
#endif
};
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
{
if (i2c_bus && i2c_bus->idle_bus_fn)
@@ -620,7 +620,7 @@ int __enable_i2c_clk(unsigned char enable, unsigned int i2c_num)
int enable_i2c_clk(unsigned char enable, unsigned int i2c_num)
__attribute__((weak, alias("__enable_i2c_clk")));
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* Read data from I2C device
*
@@ -891,7 +891,7 @@ static int mxc_i2c_probe(struct udevice *bus)
i2c_bus->bus = bus;
/* Enable clk */
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(bus, 0, &i2c_bus->per_clk);
if (ret) {
printf("Failed to get i2c clk\n");
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index c656cf8b7a1..e862b8ba9a9 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -836,7 +836,7 @@ wr_exit:
return i2c_error;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* The legacy I2C functions. These need to get removed once
* all users of this driver are converted to DM.
@@ -1034,7 +1034,7 @@ static int omap_i2c_probe(struct udevice *bus)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int omap_i2c_of_to_plat(struct udevice *bus)
{
struct omap_i2c_plat *plat = dev_get_plat(bus);
@@ -1063,7 +1063,7 @@ static const struct dm_i2c_ops omap_i2c_ops = {
U_BOOT_DRIVER(i2c_omap) = {
.name = "i2c_omap",
.id = UCLASS_I2C,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = omap_i2c_ids,
.of_to_plat = omap_i2c_of_to_plat,
.plat_auto = sizeof(struct omap_i2c_plat),
@@ -1071,7 +1071,7 @@ U_BOOT_DRIVER(i2c_omap) = {
.probe = omap_i2c_probe,
.priv_auto = sizeof(struct omap_i2c),
.ops = &omap_i2c_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/i2c/sun6i_p2wi.c b/drivers/i2c/sun6i_p2wi.c
index d221323295d..08704a2b6e4 100644
--- a/drivers/i2c/sun6i_p2wi.c
+++ b/drivers/i2c/sun6i_p2wi.c
@@ -148,7 +148,7 @@ void p2wi_init(void)
}
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct sun6i_p2wi_priv {
struct sunxi_p2wi_reg *base;
};
@@ -230,4 +230,4 @@ U_BOOT_DRIVER(sun6i_p2wi) = {
.priv_auto = sizeof(struct sun6i_p2wi_priv),
.ops = &sun6i_p2wi_ops,
};
-#endif /* CONFIG_IS_ENABLED(DM_I2C) */
+#endif /* IS_ENABLED(CONFIG_DM_I2C) */
diff --git a/drivers/i2c/sun8i_rsb.c b/drivers/i2c/sun8i_rsb.c
index 47fa05b6d1c..186e99c89a2 100644
--- a/drivers/i2c/sun8i_rsb.c
+++ b/drivers/i2c/sun8i_rsb.c
@@ -183,7 +183,7 @@ int rsb_init(void)
}
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct sun8i_rsb_priv {
struct sunxi_rsb_reg *base;
};
@@ -283,4 +283,4 @@ U_BOOT_DRIVER(sun8i_rsb) = {
.priv_auto = sizeof(struct sun8i_rsb_priv),
.ops = &sun8i_rsb_ops,
};
-#endif /* CONFIG_IS_ENABLED(DM_I2C) */
+#endif /* IS_ENABLED(CONFIG_DM_I2C) */
diff --git a/drivers/input/input.c b/drivers/input/input.c
index a4341e8c7ce..939ac463639 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -669,7 +669,7 @@ int input_stdio_register(struct stdio_dev *dev)
int error;
error = stdio_register(dev);
-#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_ENV_SUPPORT)
/* check if this is the standard input device */
if (!error && strcmp(env_get("stdin"), dev->name) == 0) {
/* reassign the console */
diff --git a/drivers/iommu/iommu-uclass.c b/drivers/iommu/iommu-uclass.c
index 72f123df55a..0c19a8e1daf 100644
--- a/drivers/iommu/iommu-uclass.c
+++ b/drivers/iommu/iommu-uclass.c
@@ -12,9 +12,9 @@
#include <phys2bus.h>
#include <asm/io.h>
-#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA))
+#if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA))
-#if CONFIG_IS_ENABLED(PCI)
+#if IS_ENABLED(CONFIG_PCI)
static int dev_pci_iommu_enable(struct udevice *dev)
{
struct udevice *parent = dev->parent;
@@ -100,7 +100,7 @@ int dev_iommu_enable(struct udevice *dev)
dev->iommu = dev_iommu;
}
- if (CONFIG_IS_ENABLED(PCI) && count < 0 &&
+ if (IS_ENABLED(CONFIG_PCI) && count < 0 &&
device_is_on_pci_bus(dev))
return dev_pci_iommu_enable(dev);
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index 621d1752176..7bc84e6c925 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -1670,7 +1670,7 @@ UCLASS_DRIVER(cros_ec) = {
.id = UCLASS_CROS_EC,
.name = "cros-ec",
.per_device_auto = sizeof(struct cros_ec_dev),
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
.flags = DM_UC_FLAG_ALLOC_PRIV_DMA,
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index ccf5c7a8037..b8e32f1a662 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -258,7 +258,7 @@ static int fs_loader_of_to_plat(struct udevice *dev)
static int fs_loader_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_BLK)
int ret;
struct device_plat *plat = dev_get_plat(dev);
diff --git a/drivers/misc/gsc.c b/drivers/misc/gsc.c
index 65c9c2c6ce3..805026ff0c7 100644
--- a/drivers/misc/gsc.c
+++ b/drivers/misc/gsc.c
@@ -77,7 +77,7 @@ enum {
GSC_SC_RST_CAUSE_MAX = 10,
};
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct gsc_priv {
int gscver;
diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c
index 7b79ed2df46..8f2ebcb55ed 100644
--- a/drivers/misc/irq-uclass.c
+++ b/drivers/misc/irq-uclass.c
@@ -63,7 +63,7 @@ int irq_read_and_clear(struct irq *irq)
return ops->read_and_clear(irq);
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int irq_get_by_phandle(struct udevice *dev, const struct phandle_2_arg *cells,
struct irq *irq)
{
@@ -179,7 +179,7 @@ int irq_first_device_type(enum irq_dev_t type, struct udevice **devp)
return 0;
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
int irq_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq)
{
struct irq_ops *ops;
diff --git a/drivers/misc/irq_sandbox.c b/drivers/misc/irq_sandbox.c
index 8b5573fcadd..728e2a1aba9 100644
--- a/drivers/misc/irq_sandbox.c
+++ b/drivers/misc/irq_sandbox.c
@@ -83,7 +83,7 @@ static const struct irq_ops sandbox_irq_ops = {
.restore_polarities = sandbox_restore_polarities,
.read_and_clear = sandbox_irq_read_and_clear,
.of_xlate = sandbox_irq_of_xlate,
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
.get_acpi = sandbox_get_acpi,
#endif
};
diff --git a/drivers/misc/misc-uclass.c b/drivers/misc/misc-uclass.c
index cfe9d562fa0..d92d25cb635 100644
--- a/drivers/misc/misc-uclass.c
+++ b/drivers/misc/misc-uclass.c
@@ -70,7 +70,7 @@ int misc_set_enabled(struct udevice *dev, bool val)
UCLASS_DRIVER(misc) = {
.id = UCLASS_MISC,
.name = "misc",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index f24857a1515..631baca2255 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -172,7 +172,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid)
{
struct p2sb_child_plat *pplat;
- if (!CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA))
return -ENOSYS;
pplat = dev_get_parent_plat(dev);
@@ -183,7 +183,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid)
static int p2sb_child_post_bind(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
int ret;
u32 pid;
@@ -199,7 +199,7 @@ static int p2sb_child_post_bind(struct udevice *dev)
static int p2sb_post_bind(struct udevice *dev)
{
- if (spl_phase() > PHASE_TPL && !CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (spl_phase() > PHASE_TPL && !IS_ENABLED(CONFIG_OF_PLATDATA))
return dm_scan_fdt_dev(dev);
return 0;
diff --git a/drivers/misc/test_drv.c b/drivers/misc/test_drv.c
index 927618256f0..b653c551b30 100644
--- a/drivers/misc/test_drv.c
+++ b/drivers/misc/test_drv.c
@@ -22,7 +22,7 @@ struct udevice *testbus_get_clear_removed(void)
static int testbus_drv_probe(struct udevice *dev)
{
- if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA)) {
int ret;
ret = dm_scan_fdt_dev(dev);
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index 05ca3612809..bf6b76e45ce 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -36,7 +36,7 @@ struct davinci_mmc_priv {
#endif
/* Set davinci clock prescalar value based on the required clock in HZ */
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static void dmmc_set_clock(struct mmc *mmc, uint clock)
{
struct davinci_mmc *host = mmc->priv;
@@ -143,7 +143,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
* Sends a command out on the bus. Takes the device pointer,
* a command pointer, and an optional data pointer.
*/
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int dmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
{
struct davinci_mmc *host = mmc->priv;
@@ -337,7 +337,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *
}
/* Initialize Davinci MMC controller */
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int dmmc_init(struct mmc *mmc)
{
struct davinci_mmc *host = mmc->priv;
@@ -378,7 +378,7 @@ static int davinci_dm_mmc_init(struct udevice *dev)
}
/* Set buswidth or clock as indicated by the MMC framework */
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int dmmc_set_ios(struct mmc *mmc)
{
struct davinci_mmc *host = mmc->priv;
@@ -399,7 +399,7 @@ static int davinci_mmc_set_ios(struct udevice *dev)
/* Set clock speed */
if (mmc->clock) {
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
dmmc_set_clock(mmc, mmc->clock);
#else
davinci_mmc_set_clock(dev, mmc->clock);
@@ -408,7 +408,7 @@ static int davinci_mmc_set_ios(struct udevice *dev)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static const struct mmc_ops dmmc_ops = {
.send_cmd = dmmc_send_cmd,
.set_ios = dmmc_set_ios,
@@ -419,7 +419,7 @@ static const struct mmc_ops dmmc_ops = {
static int davinci_mmc_getcd(struct udevice *dev)
{
int value = -1;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct davinci_mmc_priv *priv = dev_get_priv(dev);
value = dm_gpio_get_value(&priv->cd_gpio);
#endif
@@ -433,7 +433,7 @@ static int davinci_mmc_getcd(struct udevice *dev)
static int davinci_mmc_getwp(struct udevice *dev)
{
int value = -1;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct davinci_mmc_priv *priv = dev_get_priv(dev);
value = dm_gpio_get_value(&priv->wp_gpio);
@@ -453,7 +453,7 @@ static const struct dm_mmc_ops davinci_mmc_ops = {
};
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/* Called from board_mmc_init during startup. Can be called multiple times
* depending on the number of slots available on board and controller
*/
@@ -483,7 +483,7 @@ static int davinci_mmc_probe(struct udevice *dev)
priv->reg_base = plat->reg_base;
priv->input_clk = clk_get(DAVINCI_MMCSD_CLKID);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* These GPIOs are optional */
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
@@ -500,7 +500,7 @@ static int davinci_mmc_bind(struct udevice *dev)
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int davinci_mmc_of_to_plat(struct udevice *dev)
{
struct davinci_mmc_plat *plat = dev_get_plat(dev);
@@ -525,7 +525,7 @@ static const struct udevice_id davinci_mmc_ids[] = {
U_BOOT_DRIVER(ti_da830_mmc) = {
.name = "davinci_mmc",
.id = UCLASS_MMC,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = davinci_mmc_ids,
.plat_auto = sizeof(struct davinci_mmc_plat),
.of_to_plat = davinci_mmc_of_to_plat,
@@ -536,7 +536,7 @@ U_BOOT_DRIVER(ti_da830_mmc) = {
.probe = davinci_mmc_probe,
.ops = &davinci_mmc_ops,
.priv_auto = sizeof(struct davinci_mmc_priv),
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 5085a3b491d..09263ca748d 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -505,7 +505,7 @@ static int dwmci_set_ios(struct mmc *mmc)
return ret;
}
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (mmc->vqmmc_supply) {
int ret;
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 7215f61f468..be9e85504d8 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -103,7 +103,7 @@ struct fsl_esdhc_priv {
unsigned int sdhc_clk;
bool is_sdhc_per_clk;
unsigned int clock;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
struct mmc *mmc;
#endif
struct udevice *dev;
@@ -853,7 +853,7 @@ __weak int esdhc_status_fixup(void *blob, const char *compat)
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
static int fsl_esdhc_get_cd(struct udevice *dev);
static void esdhc_disable_for_no_card(void *blob)
{
@@ -894,7 +894,7 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd)
}
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int esdhc_getcd(struct mmc *mmc)
{
struct fsl_esdhc_priv *priv = mmc->priv;
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index da888885474..a64d46b6aef 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -109,7 +109,7 @@ struct fsl_esdhc {
};
struct fsl_esdhc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/* Put this first since driver model will copy the data here */
struct dtd_fsl_esdhc dtplat;
#endif
@@ -150,7 +150,7 @@ struct fsl_esdhc_priv {
struct clk per_clk;
unsigned int clock;
unsigned int mode;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
struct mmc *mmc;
#endif
struct udevice *dev;
@@ -166,7 +166,7 @@ struct fsl_esdhc_priv {
u32 signal_voltage_switch_extra_delay_ms;
struct udevice *vqmmc_dev;
struct udevice *vmmc_dev;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc cd_gpio;
struct gpio_desc wp_gpio;
#endif
@@ -326,7 +326,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
printf("Cannot write to locked SD card.\n");
return -EINVAL;
} else {
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (dm_gpio_is_valid(&priv->wp_gpio) &&
dm_gpio_get_value(&priv->wp_gpio)) {
printf("Cannot write to locked SD card.\n");
@@ -761,7 +761,7 @@ static int esdhc_set_voltage(struct mmc *mmc)
case MMC_SIGNAL_VOLTAGE_330:
if (priv->vs18_enable)
return -ENOTSUPP;
- if (CONFIG_IS_ENABLED(DM_REGULATOR) &&
+ if (IS_ENABLED(CONFIG_DM_REGULATOR) &&
!IS_ERR_OR_NULL(priv->vqmmc_dev)) {
ret = regulator_set_value(priv->vqmmc_dev,
3300000);
@@ -779,7 +779,7 @@ static int esdhc_set_voltage(struct mmc *mmc)
return -EAGAIN;
case MMC_SIGNAL_VOLTAGE_180:
- if (CONFIG_IS_ENABLED(DM_REGULATOR) &&
+ if (IS_ENABLED(CONFIG_DM_REGULATOR) &&
!IS_ERR_OR_NULL(priv->vqmmc_dev)) {
ret = regulator_set_value(priv->vqmmc_dev,
1800000);
@@ -1045,10 +1045,10 @@ static int esdhc_getcd_common(struct fsl_esdhc_priv *priv)
if (IS_ENABLED(CONFIG_ESDHC_DETECT_QUIRK))
return 1;
- if (CONFIG_IS_ENABLED(DM_MMC)) {
+ if (IS_ENABLED(CONFIG_DM_MMC)) {
if (priv->broken_cd)
return 1;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (dm_gpio_is_valid(&priv->cd_gpio))
return dm_gpio_get_value(&priv->cd_gpio);
#endif
@@ -1103,7 +1103,7 @@ static int esdhc_reset(struct fsl_esdhc *regs)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int esdhc_getcd(struct mmc *mmc)
{
struct fsl_esdhc_priv *priv = mmc->priv;
@@ -1188,7 +1188,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
esdhc_write32(®s->irqstaten, SDHCI_IRQ_EN_BITS);
cfg = &plat->cfg;
- if (!CONFIG_IS_ENABLED(DM_MMC))
+ if (!IS_ENABLED(CONFIG_DM_MMC))
memset(cfg, '\0', sizeof(*cfg));
caps = esdhc_read32(®s->hostcapblt);
@@ -1216,7 +1216,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
cfg->name = "FSL_SDHC";
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
cfg->ops = &esdhc_ops;
#endif
@@ -1262,20 +1262,20 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
* UHS doesn't have explicit ESDHC flags, so if it's
* not supported, disable it in config.
*/
- if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT))
+ if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT))
cfg->host_caps |= UHS_CAPS;
- if (CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)) {
if (priv->flags & ESDHC_FLAG_HS200)
cfg->host_caps |= MMC_CAP(MMC_HS_200);
}
- if (CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)) {
if (priv->flags & ESDHC_FLAG_HS400)
cfg->host_caps |= MMC_CAP(MMC_HS_400);
}
- if (CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)) {
if (priv->flags & ESDHC_FLAG_HS400_ES)
cfg->host_caps |= MMC_CAP(MMC_HS_400_ES);
}
@@ -1283,7 +1283,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int fsl_esdhc_initialize(struct bd_info *bis, struct fsl_esdhc_cfg *cfg)
{
struct fsl_esdhc_plat *plat;
@@ -1357,7 +1357,7 @@ int fsl_esdhc_mmc_init(struct bd_info *bis)
}
#endif
-#if CONFIG_IS_ENABLED(OF_LIBFDT)
+#if IS_ENABLED(CONFIG_OF_LIBFDT)
__weak int esdhc_status_fixup(void *blob, const char *compat)
{
if (IS_ENABLED(CONFIG_FSL_ESDHC_PIN_MUX) && !hwconfig("esdhc")) {
@@ -1380,7 +1380,7 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd)
}
#endif
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
#include <asm/arch/clock.h>
__weak void init_clk_usdhc(u32 index)
{
@@ -1397,7 +1397,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
fdt_addr_t addr;
unsigned int val;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
addr = dev_read_addr(dev);
@@ -1427,7 +1427,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
priv->wp_enable = 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,
GPIOD_IS_IN);
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio,
@@ -1436,7 +1436,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
priv->vs18_enable = 0;
- if (!CONFIG_IS_ENABLED(DM_REGULATOR))
+ if (!IS_ENABLED(CONFIG_DM_REGULATOR))
return 0;
/*
@@ -1470,7 +1470,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
struct mmc *mmc;
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_esdhc *dtplat = &plat->dtplat;
priv->esdhc_regs = map_sysmem(dtplat->reg[0], dtplat->reg[1]);
@@ -1480,7 +1480,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
else
plat->cfg.host_caps &= ~MMC_CAP_NONREMOVABLE;
- if (CONFIG_IS_ENABLED(DM_GPIO) && !dtplat->non_removable) {
+ if (IS_ENABLED(CONFIG_DM_GPIO) && !dtplat->non_removable) {
struct udevice *gpiodev;
ret = device_get_by_ofplat_idx(dtplat->cd_gpios->idx, &gpiodev);
@@ -1519,7 +1519,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
* work as expected.
*/
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
/* Assigned clock already set clock */
ret = clk_get_by_name(dev, "per", &priv->per_clk);
if (ret) {
@@ -1549,7 +1549,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
return ret;
}
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
ret = mmc_of_parse(dev, &plat->cfg);
if (ret)
return ret;
@@ -1620,7 +1620,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = {
#ifdef MMC_SUPPORTS_TUNING
.execute_tuning = fsl_esdhc_execute_tuning,
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
.set_enhanced_strobe = fsl_esdhc_set_enhanced_strobe,
#endif
.wait_dat0 = fsl_esdhc_wait_dat0,
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index cabb747fbbd..56b7c6b5d8a 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -33,7 +33,7 @@
#define CFG_CMD_TIMEOUT (CONFIG_SYS_HZ >> 2) /* 250 ms */
#define CFG_RST_TIMEOUT CONFIG_SYS_HZ /* 1 sec reset timeout */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct ftsdc010 {
fdt32_t bus_width;
bool cap_mmc_highspeed;
@@ -46,7 +46,7 @@ struct ftsdc010 {
#endif
struct ftsdc010_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct ftsdc010 dtplat;
#endif
struct mmc_config cfg;
@@ -393,7 +393,7 @@ static int ftsdc010_mmc_of_to_plat(struct udevice *dev)
struct ftsdc_priv *priv = dev_get_priv(dev);
struct ftsdc010_chip *chip = &priv->chip;
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
chip->name = dev->name;
chip->ioaddr = dev_read_addr_ptr(dev);
chip->buswidth = dev_read_u32_default(dev, "bus-width", 4);
@@ -424,7 +424,7 @@ static int ftsdc010_mmc_probe(struct udevice *dev)
struct ftsdc010_chip *chip = &priv->chip;
struct udevice *pwr_dev __maybe_unused;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
int ret;
struct ftsdc010 *dtplat = &plat->dtplat;
chip->name = dev->name;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index 61e48ee0f62..0f53ad16133 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -138,7 +138,7 @@ static int jz_mmc_clock_rate(void)
return 24000000;
}
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
static inline void jz_mmc_write_data(struct jz_mmc_priv *priv, struct mmc_data *data)
{
int sz = DIV_ROUND_UP(data->blocks * data->blocksize, 4);
@@ -366,7 +366,7 @@ static int jz_mmc_core_init(struct mmc *mmc)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int jz_mmc_legacy_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data)
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 01d9b0201f2..9bcede2d154 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -128,7 +128,7 @@ int mmc_execute_tuning(struct mmc *mmc, uint opcode)
}
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
static int dm_mmc_set_enhanced_strobe(struct udevice *dev)
{
struct dm_mmc_ops *ops = mmc_get_ops(dev);
@@ -284,7 +284,7 @@ struct mmc *mmc_get_mmc_dev(const struct udevice *dev)
return upriv->mmc;
}
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct mmc *find_mmc_device(int dev_num)
{
struct udevice *dev, *mmc_dev;
@@ -494,9 +494,9 @@ static int mmc_blk_probe(struct udevice *dev)
if (ret) {
debug("Probing %s failed (err=%d)\n", dev->name, ret);
- if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) ||
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) ||
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT))
+ if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) ||
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) ||
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT))
mmc_deinit(mmc);
return ret;
@@ -505,9 +505,9 @@ static int mmc_blk_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
static int mmc_blk_remove(struct udevice *dev)
{
struct udevice *mmc_dev = dev_get_parent(dev);
@@ -520,7 +520,7 @@ static int mmc_blk_remove(struct udevice *dev)
static const struct blk_ops mmc_blk_ops = {
.read = mmc_bread,
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
.write = mmc_bwrite,
.erase = mmc_berase,
#endif
@@ -532,9 +532,9 @@ U_BOOT_DRIVER(mmc_blk) = {
.id = UCLASS_BLK,
.ops = &mmc_blk_ops,
.probe = mmc_blk_probe,
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
.remove = mmc_blk_remove,
.flags = DM_FLAG_OS_PREPARE,
#endif
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index fd4aa946e2a..55a566402ce 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -30,7 +30,7 @@
static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage);
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int mmc_wait_dat0(struct mmc *mmc, int state, int timeout_us)
{
@@ -135,7 +135,7 @@ void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd)
}
#endif
-#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG
+#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG
const char *mmc_mode_name(enum bus_mode mode)
{
static const char *const names[] = {
@@ -197,7 +197,7 @@ static int mmc_select_mode(struct mmc *mmc, enum bus_mode mode)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
{
int ret;
@@ -439,7 +439,7 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start,
return blkcnt;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt)
{
if (mmc->cfg->ops->get_b_max)
@@ -449,14 +449,14 @@ static int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt)
}
#endif
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, void *dst)
#else
ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
void *dst)
#endif
{
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#endif
int dev_num = block_dev->devnum;
@@ -471,7 +471,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
if (!mmc)
return 0;
- if (CONFIG_IS_ENABLED(MMC_TINY))
+ if (IS_ENABLED(CONFIG_MMC_TINY))
err = mmc_switch_part(mmc, block_dev->hwpart);
else
err = blk_dselect_hwpart(block_dev, block_dev->hwpart);
@@ -529,7 +529,7 @@ static int mmc_go_idle(struct mmc *mmc)
return 0;
}
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
static int mmc_switch_voltage(struct mmc *mmc, int signal_voltage)
{
struct mmc_cmd cmd;
@@ -656,7 +656,7 @@ static int sd_send_op_cond(struct mmc *mmc, bool uhs_en)
mmc->ocr = cmd.response[0];
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
if (uhs_en && !(mmc_host_is_spi(mmc)) && (cmd.response[0] & 0x41000000)
== 0x41000000) {
err = mmc_switch_voltage(mmc, MMC_SIGNAL_VOLTAGE_180);
@@ -893,7 +893,7 @@ int mmc_boot_wp_single_partition(struct mmc *mmc, int partition)
return ret;
}
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if !IS_ENABLED(CONFIG_MMC_TINY)
static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode,
bool hsdowngrade)
{
@@ -908,17 +908,17 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode,
case MMC_DDR_52:
speed_bits = EXT_CSD_TIMING_HS;
break;
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)
case MMC_HS_200:
speed_bits = EXT_CSD_TIMING_HS200;
break;
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
case MMC_HS_400:
speed_bits = EXT_CSD_TIMING_HS400;
break;
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
case MMC_HS_400_ES:
speed_bits = EXT_CSD_TIMING_HS400;
break;
@@ -935,8 +935,8 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode,
if (err)
return err;
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
/*
* In case the eMMC is in HS200/HS400 mode and we are downgrading
* to HS mode, the card clock are still running much faster than
@@ -987,14 +987,14 @@ static int mmc_get_capabilities(struct mmc *mmc)
cardtype = ext_csd[EXT_CSD_CARD_TYPE];
mmc->cardtype = cardtype;
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)
if (cardtype & (EXT_CSD_CARD_TYPE_HS200_1_2V |
EXT_CSD_CARD_TYPE_HS200_1_8V)) {
mmc->card_caps |= MMC_MODE_HS200;
}
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
if (cardtype & (EXT_CSD_CARD_TYPE_HS400_1_2V |
EXT_CSD_CARD_TYPE_HS400_1_8V)) {
mmc->card_caps |= MMC_MODE_HS400;
@@ -1008,7 +1008,7 @@ static int mmc_get_capabilities(struct mmc *mmc)
if (cardtype & EXT_CSD_CARD_TYPE_26)
mmc->card_caps |= MMC_MODE_HS;
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
if (ext_csd[EXT_CSD_STROBE_SUPPORT] &&
(mmc->card_caps & MMC_MODE_HS400)) {
mmc->card_caps |= MMC_MODE_HS400_ES;
@@ -1071,7 +1071,7 @@ int mmc_switch_part(struct mmc *mmc, unsigned int part_num)
return ret;
}
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
int mmc_hwpart_config(struct mmc *mmc,
const struct mmc_hwpart_conf *conf,
enum mmc_hwpart_conf_mode mode)
@@ -1203,7 +1203,7 @@ int mmc_hwpart_config(struct mmc *mmc,
ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1;
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
/* update erase group size to be high-capacity */
mmc->erase_grp_size =
ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024;
@@ -1269,7 +1269,7 @@ int mmc_hwpart_config(struct mmc *mmc,
}
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int mmc_getcd(struct mmc *mmc)
{
int cd;
@@ -1287,7 +1287,7 @@ int mmc_getcd(struct mmc *mmc)
}
#endif
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if !IS_ENABLED(CONFIG_MMC_TINY)
static int sd_switch(struct mmc *mmc, int mode, int group, u8 value, u8 *resp)
{
struct mmc_cmd cmd;
@@ -1316,7 +1316,7 @@ static int sd_get_capabilities(struct mmc *mmc)
ALLOC_CACHE_ALIGN_BUFFER(__be32, switch_status, 16);
struct mmc_data data;
int timeout;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
u32 sd3_bus_mode;
#endif
@@ -1393,7 +1393,7 @@ static int sd_get_capabilities(struct mmc *mmc)
if (__be32_to_cpu(switch_status[3]) & SD_HIGHSPEED_SUPPORTED)
mmc->card_caps |= MMC_CAP(SD_HS);
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
/* Version before 3.0 don't support UHS modes */
if (mmc->version < SD_VERSION_3)
return 0;
@@ -1432,7 +1432,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
case SD_HS:
speed = HIGH_SPEED_BUS_SPEED;
break;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
case UHS_SDR12:
speed = UHS_SDR12_BUS_SPEED;
break;
@@ -1493,7 +1493,7 @@ static int sd_select_bus_width(struct mmc *mmc, int w)
}
#endif
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
static int sd_read_ssr(struct mmc *mmc)
{
static const unsigned int sd_au_size[] = {
@@ -1595,7 +1595,7 @@ static inline int bus_width(uint cap)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
#ifdef MMC_SUPPORTS_TUNING
static int mmc_execute_tuning(struct mmc *mmc, uint opcode)
{
@@ -1649,7 +1649,7 @@ static int mmc_set_bus_width(struct mmc *mmc, uint width)
return mmc_set_ios(mmc);
}
-#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG)
+#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG)
/*
* helper function to display the capabilities in a human
* friendly manner. The capabilities include bus width and
@@ -1682,7 +1682,7 @@ struct mode_width_tuning {
#endif
};
-#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE)
+#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE)
int mmc_voltage_to_mv(enum mmc_voltage voltage)
{
switch (voltage) {
@@ -1715,9 +1715,9 @@ static inline int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage)
}
#endif
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if !IS_ENABLED(CONFIG_MMC_TINY)
static const struct mode_width_tuning sd_modes_by_pref[] = {
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
#ifdef MMC_SUPPORTS_TUNING
{
.mode = UHS_SDR104,
@@ -1742,7 +1742,7 @@ static const struct mode_width_tuning sd_modes_by_pref[] = {
.mode = SD_HS,
.widths = MMC_MODE_4BIT | MMC_MODE_1BIT,
},
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
{
.mode = UHS_SDR12,
.widths = MMC_MODE_4BIT | MMC_MODE_1BIT,
@@ -1765,7 +1765,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
int err;
uint widths[] = {MMC_MODE_4BIT, MMC_MODE_1BIT};
const struct mode_width_tuning *mwt;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
bool uhs_en = (mmc->ocr & OCR_S18R) ? true : false;
#else
bool uhs_en = false;
@@ -1781,7 +1781,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
mmc_set_bus_width(mmc, 1);
mmc_select_mode(mmc, MMC_LEGACY);
mmc_set_clock(mmc, mmc->tran_speed, MMC_CLK_ENABLE);
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
err = sd_read_ssr(mmc);
if (err)
pr_warn("unable to read ssr\n");
@@ -1833,7 +1833,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
}
#endif
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
err = sd_read_ssr(mmc);
if (err)
pr_warn("unable to read ssr\n");
@@ -1888,7 +1888,7 @@ static int mmc_read_and_compare_ext_csd(struct mmc *mmc)
return -EBADMSG;
}
-#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE)
+#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE)
static int mmc_set_lowest_voltage(struct mmc *mmc, enum bus_mode mode,
uint32_t allowed_mask)
{
@@ -1938,20 +1938,20 @@ static inline int mmc_set_lowest_voltage(struct mmc *mmc, enum bus_mode mode,
#endif
static const struct mode_width_tuning mmc_modes_by_pref[] = {
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
{
.mode = MMC_HS_400_ES,
.widths = MMC_MODE_8BIT,
},
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
{
.mode = MMC_HS_400,
.widths = MMC_MODE_8BIT,
.tuning = MMC_CMD_SEND_TUNING_BLOCK_HS200
},
#endif
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)
{
.mode = MMC_HS_200,
.widths = MMC_MODE_8BIT | MMC_MODE_4BIT,
@@ -1994,7 +1994,7 @@ static const struct ext_csd_bus_width {
{MMC_MODE_1BIT, false, EXT_CSD_BUS_WIDTH_1},
};
-#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
static int mmc_select_hs400(struct mmc *mmc)
{
int err;
@@ -2047,8 +2047,8 @@ static int mmc_select_hs400(struct mmc *mmc)
}
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int mmc_set_enhanced_strobe(struct mmc *mmc)
{
return -ENOTSUPP;
@@ -2124,9 +2124,9 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
return -ENOTSUPP;
}
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
/*
* In case the eMMC is in HS200/HS400 mode, downgrade to HS mode
* before doing anything else, since a transition from either of
@@ -2233,7 +2233,7 @@ error:
}
#endif
-#if CONFIG_IS_ENABLED(MMC_TINY)
+#if IS_ENABLED(CONFIG_MMC_TINY)
DEFINE_CACHE_ALIGN_BUFFER(u8, ext_csd_bkup, MMC_MAX_BLOCK_LEN);
#endif
@@ -2255,7 +2255,7 @@ static int mmc_startup_v4(struct mmc *mmc)
MMC_VERSION_5_1
};
-#if CONFIG_IS_ENABLED(MMC_TINY)
+#if IS_ENABLED(CONFIG_MMC_TINY)
u8 *ext_csd = ext_csd_bkup;
if (IS_SD(mmc) || mmc->version < MMC_VERSION_4)
@@ -2394,7 +2394,7 @@ static int mmc_startup_v4(struct mmc *mmc)
}
if (ext_csd[EXT_CSD_ERASE_GROUP_DEF] & 0x01) {
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
/* Read out group size from ext_csd */
mmc->erase_grp_size =
ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024;
@@ -2413,7 +2413,7 @@ static int mmc_startup_v4(struct mmc *mmc)
mmc->capacity_user = capacity;
}
}
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
else {
/* Calculate the group size from the csd value. */
int erase_gsz, erase_gmul;
@@ -2424,7 +2424,7 @@ static int mmc_startup_v4(struct mmc *mmc)
* (erase_gmul + 1);
}
#endif
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
mmc->hc_wp_grp_size = 1024
* ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
* ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
@@ -2435,7 +2435,7 @@ static int mmc_startup_v4(struct mmc *mmc)
return 0;
error:
if (mmc->ext_csd) {
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if !IS_ENABLED(CONFIG_MMC_TINY)
free(mmc->ext_csd);
#endif
mmc->ext_csd = NULL;
@@ -2542,7 +2542,7 @@ static int mmc_startup(struct mmc *mmc)
mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
if (IS_SD(mmc))
mmc->write_bl_len = mmc->read_bl_len;
@@ -2570,7 +2570,7 @@ static int mmc_startup(struct mmc *mmc)
if (mmc->read_bl_len > MMC_MAX_BLOCK_LEN)
mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
#endif
@@ -2597,7 +2597,7 @@ static int mmc_startup(struct mmc *mmc)
/*
* For SD, its erase group is always one sector
*/
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
mmc->erase_grp_size = 1;
#endif
mmc->part_config = MMCPART_NOAVAILABLE;
@@ -2610,7 +2610,7 @@ static int mmc_startup(struct mmc *mmc)
if (err)
return err;
-#if CONFIG_IS_ENABLED(MMC_TINY)
+#if IS_ENABLED(CONFIG_MMC_TINY)
mmc_set_clock(mmc, mmc->legacy_speed, false);
mmc_select_mode(mmc, MMC_LEGACY);
mmc_set_bus_width(mmc, 1);
@@ -2635,7 +2635,7 @@ static int mmc_startup(struct mmc *mmc)
/* Fix the block length for DDR mode */
if (mmc->ddr_mode) {
mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
#endif
}
@@ -2650,7 +2650,7 @@ static int mmc_startup(struct mmc *mmc)
bdesc->lba = lldiv(mmc->capacity, mmc->read_bl_len);
#if !defined(CONFIG_SPL_BUILD) || \
(defined(CONFIG_SPL_LIBCOMMON_SUPPORT) && \
- !CONFIG_IS_ENABLED(USE_TINY_PRINTF))
+ !IS_ENABLED(CONFIG_USE_TINY_PRINTF))
sprintf(bdesc->vendor, "Man %06x Snr %04x%04x",
mmc->cid[0] >> 24, (mmc->cid[2] & 0xffff),
(mmc->cid[3] >> 16) & 0xffff);
@@ -2696,7 +2696,7 @@ static int mmc_send_if_cond(struct mmc *mmc)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/* board-specific MMC power initializations. */
__weak void board_mmc_power_init(void)
{
@@ -2705,8 +2705,8 @@ __weak void board_mmc_power_init(void)
static int mmc_power_init(struct mmc *mmc)
{
-#if CONFIG_IS_ENABLED(DM_MMC)
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_MMC)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
int ret;
ret = device_get_supply_regulator(mmc->dev, "vmmc-supply",
@@ -2752,7 +2752,7 @@ static void mmc_set_initial_state(struct mmc *mmc)
static int mmc_power_on(struct mmc *mmc)
{
-#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_REGULATOR)
if (mmc->vmmc_supply) {
int ret = regulator_set_enable(mmc->vmmc_supply, true);
@@ -2768,7 +2768,7 @@ static int mmc_power_on(struct mmc *mmc)
static int mmc_power_off(struct mmc *mmc)
{
mmc_set_clock(mmc, 0, MMC_CLK_DISABLE);
-#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_REGULATOR)
if (mmc->vmmc_supply) {
int ret = regulator_set_enable(mmc->vmmc_supply, false);
@@ -2834,7 +2834,7 @@ int mmc_get_op_cond(struct mmc *mmc, bool quiet)
if (err)
return err;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
/*
* Re-initialization is needed to clear old configuration for
* mmc rescan.
@@ -2916,7 +2916,7 @@ int mmc_start_init(struct mmc *mmc)
}
}
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
mmc_deferred_probe(mmc);
#endif
#if !defined(CONFIG_MMC_BROKEN_CD)
@@ -2924,7 +2924,7 @@ int mmc_start_init(struct mmc *mmc)
#else
no_card = 0;
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/* we pretend there's no card when init is NULL */
no_card = no_card || (mmc->cfg->ops->init == NULL);
#endif
@@ -2965,7 +2965,7 @@ int mmc_init(struct mmc *mmc)
{
int err = 0;
__maybe_unused ulong start;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev);
upriv->mmc = mmc;
@@ -2986,9 +2986,9 @@ int mmc_init(struct mmc *mmc)
return err;
}
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
int mmc_deinit(struct mmc *mmc)
{
u32 caps_filtered;
@@ -3035,7 +3035,7 @@ void mmc_set_preinit(struct mmc *mmc, int preinit)
mmc->preinit = preinit;
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
static int mmc_probe(struct bd_info *bis)
{
int ret, i;
@@ -3082,8 +3082,8 @@ int mmc_initialize(struct bd_info *bis)
return 0;
initialized = 1;
-#if !CONFIG_IS_ENABLED(BLK)
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if !IS_ENABLED(CONFIG_BLK)
+#if !IS_ENABLED(CONFIG_MMC_TINY)
mmc_list_init();
#endif
#endif
@@ -3099,7 +3099,7 @@ int mmc_initialize(struct bd_info *bis)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
int mmc_init_device(int num)
{
struct udevice *dev;
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index a101ee43fde..517e2eaf3c4 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -14,7 +14,7 @@
static struct list_head mmc_devices;
static int cur_dev_num = -1;
-#if CONFIG_IS_ENABLED(MMC_TINY)
+#if IS_ENABLED(CONFIG_MMC_TINY)
static struct mmc mmc_static;
struct mmc *find_mmc_device(int dev_num)
{
@@ -127,7 +127,7 @@ void print_mmc_devices(char separator)
void print_mmc_devices(char separator) { }
#endif
-#if CONFIG_IS_ENABLED(MMC_TINY)
+#if IS_ENABLED(CONFIG_MMC_TINY)
static struct mmc mmc_static = {
.dsr_imp = 0,
.dsr = 0xffffffff,
@@ -175,7 +175,7 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv)
cfg->f_max == 0 || cfg->b_max == 0)
return NULL;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
if (cfg->ops == NULL || cfg->ops->send_cmd == NULL)
return NULL;
#endif
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
index b32123758ea..dc13575e6d6 100644
--- a/drivers/mmc/mmc_private.h
+++ b/drivers/mmc/mmc_private.h
@@ -17,7 +17,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout);
int mmc_set_blocklen(struct mmc *mmc, int len);
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt,
void *dst);
#else
@@ -25,9 +25,9 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
void *dst);
#endif
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt,
const void *src);
ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt);
@@ -41,7 +41,7 @@ ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt);
/* declare dummies to reduce code size. */
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static inline unsigned long mmc_berase(struct udevice *dev,
lbaint_t start, lbaint_t blkcnt)
{
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
index 5b7aeeb0121..fb259df3385 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -66,13 +66,13 @@ err_out:
return err;
}
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt)
#else
ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt)
#endif
{
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#endif
int dev_num = block_dev->devnum;
@@ -184,7 +184,7 @@ static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start,
return blkcnt;
}
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt,
const void *src)
#else
@@ -192,7 +192,7 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
const void *src)
#endif
{
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#endif
int dev_num = block_dev->devnum;
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index b206b0a0858..738716fcdc7 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -386,7 +386,7 @@ struct msdc_host {
bool cd_active_high;
/* card detection / write protection GPIOs */
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc gpio_wp;
struct gpio_desc gpio_cd;
#endif
@@ -986,7 +986,7 @@ static int msdc_ops_get_cd(struct udevice *dev)
return !val ^ host->cd_active_high;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (!host->gpio_cd.dev)
return 1;
@@ -998,7 +998,7 @@ static int msdc_ops_get_cd(struct udevice *dev)
static int msdc_ops_get_wp(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct msdc_host *host = dev_get_priv(dev);
if (!host->gpio_wp.dev)
@@ -1716,7 +1716,7 @@ static int msdc_of_to_plat(struct udevice *dev)
clk_get_by_name(dev, "source_cg", &host->src_clk_cg); /* optional */
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
gpio_request_by_name(dev, "wp-gpios", 0, &host->gpio_wp, GPIOD_IS_IN);
gpio_request_by_name(dev, "cd-gpios", 0, &host->gpio_cd, GPIOD_IS_IN);
#endif
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 35a8e21058e..161cd31528b 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -37,7 +37,7 @@
#define MXSMMC_MAX_TIMEOUT 10000
#define MXSMMC_SMALL_TRANSFER 512
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
struct mxsmmc_priv {
int id;
int (*mmc_is_wp)(int);
@@ -47,13 +47,13 @@ struct mxsmmc_priv {
uint32_t buswidth;
struct mxs_ssp_regs *regs;
};
-#else /* CONFIG_IS_ENABLED(DM_MMC) */
+#else /* IS_ENABLED(CONFIG_DM_MMC) */
#include <dm/device.h>
#include <dm/read.h>
#include <dt-structs.h>
struct mxsmmc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_mmc dtplat;
#endif
struct mmc_config cfg;
@@ -74,7 +74,7 @@ struct mxsmmc_priv {
};
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data);
@@ -213,7 +213,7 @@ int mxsmmc_initialize(struct bd_info *bis, int id, int (*wp)(int),
}
return 0;
}
-#endif /* CONFIG_IS_ENABLED(DM_MMC) */
+#endif /* IS_ENABLED(CONFIG_DM_MMC) */
static int mxsmmc_send_cmd_pio(struct mxsmmc_priv *priv, struct mmc_data *data)
{
@@ -280,7 +280,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
priv->desc->cmd.data |= MXS_DMA_DESC_IRQ | MXS_DMA_DESC_DEC_SEM |
(data_count << MXS_DMA_DESC_BYTES_OFFSET);
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id;
#else
dmach = priv->dma_channel;
@@ -296,7 +296,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/*
* Sends a command out on the bus. Takes the mmc pointer,
* a command pointer, and an optional data pointer.
@@ -319,7 +319,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
int timeout;
uint32_t ctrl0;
int ret;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int devnum = mmc->block_dev.devnum;
#else
int devnum = mmc_get_blk_desc(mmc)->devnum;
@@ -342,7 +342,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
printf("MMC%d: Bus busy timeout!\n", devnum);
return -ETIMEDOUT;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/* See if card is present */
if (!mxsmmc_cd(priv)) {
printf("MMC%d: No card detected!\n", devnum);
@@ -381,7 +381,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
/* READ or WRITE */
if (data->flags & MMC_DATA_READ) {
ctrl0 |= SSP_CTRL0_READ;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
} else if (priv->mmc_is_wp &&
priv->mmc_is_wp(devnum)) {
printf("MMC%d: Can not write a locked card!\n", devnum);
@@ -483,7 +483,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
/* Base numbers of i.MX2[38] clk for ssp0 IP block */
#define MXS_SSP_IMX23_CLKID_SSP0 33
#define MXS_SSP_IMX28_CLKID_SSP0 46
@@ -575,7 +575,7 @@ static int mxsmmc_probe(struct udevice *dev)
debug("%s: probe\n", __func__);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_mmc *dtplat = &plat->dtplat;
struct phandle_1_arg *p1a = &dtplat->clocks[0];
@@ -650,7 +650,7 @@ static int mxsmmc_probe(struct udevice *dev)
return 0;
};
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
static int mxsmmc_bind(struct udevice *dev)
{
struct mxsmmc_plat *plat = dev_get_plat(dev);
@@ -665,7 +665,7 @@ static const struct dm_mmc_ops mxsmmc_ops = {
.set_ios = mxsmmc_set_ios,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int mxsmmc_of_to_plat(struct udevice *bus)
{
struct mxsmmc_plat *plat = dev_get_plat(bus);
@@ -709,12 +709,12 @@ static const struct udevice_id mxsmmc_ids[] = {
U_BOOT_DRIVER(fsl_imx23_mmc) = {
.name = "fsl_imx23_mmc",
.id = UCLASS_MMC,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = mxsmmc_ids,
.of_to_plat = mxsmmc_of_to_plat,
#endif
.ops = &mxsmmc_ops,
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
.bind = mxsmmc_bind,
#endif
.probe = mxsmmc_probe,
diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c
index 4ee62df9d40..17889448650 100644
--- a/drivers/mmc/octeontx_hsmmc.c
+++ b/drivers/mmc/octeontx_hsmmc.c
@@ -2541,7 +2541,7 @@ static int octeontx_mmc_set_ios(struct udevice *dev)
slot->last_clock = mmc->clock;
}
- if (CONFIG_IS_ENABLED(MMC_VERBOSE)) {
+ if (IS_ENABLED(CONFIG_MMC_VERBOSE)) {
debug("%s(%s): Setting bus mode to %s\n", __func__, dev->name,
mmc_mode_name(mmc->selected_mode));
} else {
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index a2595d19e7f..3ca150fc2d5 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -82,14 +82,14 @@ struct omap_hsmmc_pinctrl_state {
struct omap_hsmmc_data {
struct hsmmc *base_addr;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
struct mmc_config cfg;
#endif
uint bus_width;
uint clock;
ushort last_cmd;
#ifdef OMAP_HSMMC_USE_GPIO
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
struct gpio_desc cd_gpio; /* Change Detect GPIO */
struct gpio_desc wp_gpio; /* Write Protect GPIO */
#else
@@ -97,7 +97,7 @@ struct omap_hsmmc_data {
int wp_gpio;
#endif
#endif
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
enum bus_mode mode;
#endif
u8 controller_flags;
@@ -170,7 +170,7 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit);
static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc)
{
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
return dev_get_priv(mmc->dev);
#else
return (struct omap_hsmmc_data *)mmc->priv;
@@ -180,7 +180,7 @@ static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc)
#if defined(CONFIG_OMAP34XX) || defined(CONFIG_IODELAY_RECALIBRATION)
static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
{
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
struct omap_hsmmc_plat *plat = dev_get_plat(mmc->dev);
return &plat->cfg;
#else
@@ -189,12 +189,12 @@ static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
}
#endif
-#if defined(OMAP_HSMMC_USE_GPIO) && !CONFIG_IS_ENABLED(DM_MMC)
+#if defined(OMAP_HSMMC_USE_GPIO) && !IS_ENABLED(CONFIG_DM_MMC)
static int omap_mmc_setup_gpio_in(int gpio, const char *label)
{
int ret;
-#if !CONFIG_IS_ENABLED(DM_GPIO)
+#if !IS_ENABLED(CONFIG_DM_GPIO)
if (!gpio_is_valid(gpio))
return -1;
#endif
@@ -272,7 +272,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
#endif
#if (defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)) &&\
- !CONFIG_IS_ENABLED(DM_REGULATOR)
+ !IS_ENABLED(CONFIG_DM_REGULATOR)
/* PBIAS config needed for MMC1 only */
if (mmc_get_blk_desc(mmc)->devnum == 0)
vmmc_pbias_config(LDO_VOLT_3V3);
@@ -309,7 +309,7 @@ void mmc_init_stream(struct hsmmc *mmc_base)
writel(readl(&mmc_base->con) & ~INIT_INITSTREAM, &mmc_base->con);
}
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
#ifdef CONFIG_IODELAY_RECALIBRATION
static void omap_hsmmc_io_recalibrate(struct mmc *mmc)
{
@@ -466,8 +466,8 @@ static int omap_hsmmc_wait_dat0(struct udevice *dev, int state, int timeout_us)
return ret;
}
-#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE)
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
static int omap_hsmmc_set_io_regulator(struct mmc *mmc, int mV)
{
int ret = 0;
@@ -540,7 +540,7 @@ static int omap_hsmmc_set_signal_voltage(struct mmc *mmc)
omap_hsmmc_conf_bus_power(mmc, mmc->signal_voltage);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
return omap_hsmmc_set_io_regulator(mmc, mv);
#elif (defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)) && \
defined(CONFIG_PALMAS_POWER)
@@ -839,7 +839,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
priv->controller_flags |= OMAP_HSMMC_USE_ADMA;
#endif
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
reg_val = omap_hsmmc_set_capabilities(mmc);
omap_hsmmc_conf_bus_power(mmc, (reg_val & VS33_3V3SUP) ?
MMC_SIGNAL_VOLTAGE_330 : MMC_SIGNAL_VOLTAGE_180);
@@ -873,7 +873,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
mmc_enable_irq(mmc, NULL);
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
mmc_init_stream(mmc_base);
#endif
@@ -1037,7 +1037,7 @@ static void omap_hsmmc_dma_cleanup(struct mmc *mmc)
#define omap_hsmmc_dma_cleanup
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data)
{
@@ -1272,7 +1272,7 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size)
return 0;
}
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
unsigned int size)
{
@@ -1414,7 +1414,7 @@ static void omap_hsmmc_set_bus_width(struct mmc *mmc)
priv->bus_width = mmc->bus_width;
}
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
static int omap_hsmmc_set_ios(struct mmc *mmc)
{
struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc);
@@ -1439,11 +1439,11 @@ static int omap_hsmmc_set_ios(struct udevice *dev)
else
omap_hsmmc_start_clock(mmc_base);
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
if (priv->mode != mmc->selected_mode)
omap_hsmmc_set_timing(mmc);
-#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE)
+#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE)
if (priv->signal_voltage != mmc->signal_voltage)
ret = omap_hsmmc_set_signal_voltage(mmc);
#endif
@@ -1452,11 +1452,11 @@ static int omap_hsmmc_set_ios(struct udevice *dev)
}
#ifdef OMAP_HSMMC_USE_GPIO
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
static int omap_hsmmc_getcd(struct udevice *dev)
{
int value = -1;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct omap_hsmmc_data *priv = dev_get_priv(dev);
value = dm_gpio_get_value(&priv->cd_gpio);
#endif
@@ -1470,7 +1470,7 @@ static int omap_hsmmc_getcd(struct udevice *dev)
static int omap_hsmmc_getwp(struct udevice *dev)
{
int value = 0;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct omap_hsmmc_data *priv = dev_get_priv(dev);
value = dm_gpio_get_value(&priv->wp_gpio);
#endif
@@ -1510,7 +1510,7 @@ static int omap_hsmmc_getwp(struct mmc *mmc)
#endif
#endif
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
static const struct dm_mmc_ops omap_hsmmc_ops = {
.send_cmd = omap_hsmmc_send_cmd,
.set_ios = omap_hsmmc_set_ios,
@@ -1535,7 +1535,7 @@ static const struct mmc_ops omap_hsmmc_ops = {
};
#endif
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
int wp_gpio)
{
@@ -1891,7 +1891,7 @@ static int omap_hsmmc_get_pinctrl_state(struct mmc *mmc)
}
#endif
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
#ifdef CONFIG_OMAP54XX
__weak const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
{
@@ -1978,12 +1978,12 @@ static int omap_hsmmc_probe(struct udevice *dev)
if (mmc == NULL)
return -1;
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
device_get_supply_regulator(dev, "pbias-supply",
&priv->pbias_supply);
#endif
#if defined(OMAP_HSMMC_USE_GPIO)
-#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_DM_GPIO)
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
#endif
@@ -2009,7 +2009,7 @@ static int omap_hsmmc_probe(struct udevice *dev)
return omap_hsmmc_init_setup(mmc);
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct omap_mmc_of_data dra7_mmc_of_data = {
.controller_flags = OMAP_HSMMC_REQUIRE_IODELAY,
@@ -2028,7 +2028,7 @@ static const struct udevice_id omap_hsmmc_ids[] = {
U_BOOT_DRIVER(omap_hsmmc) = {
.name = "omap_hsmmc",
.id = UCLASS_MMC,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = omap_hsmmc_ids,
.of_to_plat = omap_hsmmc_of_to_plat,
.plat_auto = sizeof(struct omap_hsmmc_plat),
@@ -2039,7 +2039,7 @@ U_BOOT_DRIVER(omap_hsmmc) = {
.ops = &omap_hsmmc_ops,
.probe = omap_hsmmc_probe,
.priv_auto = sizeof(struct omap_hsmmc_data),
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c
index 9fb70440293..18b36fa8317 100644
--- a/drivers/mmc/pci_mmc.c
+++ b/drivers/mmc/pci_mmc.c
@@ -67,7 +67,7 @@ static int pci_mmc_probe(struct udevice *dev)
static int pci_mmc_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(DM_GPIO)) {
+ if (IS_ENABLED(CONFIG_DM_GPIO)) {
struct pci_mmc_priv *priv = dev_get_priv(dev);
int ret;
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 9ad92648a34..e13dd265cfe 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -23,9 +23,9 @@
#include <asm/unaligned.h>
#include "tmio-common.h"
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
/* SCC registers */
#define RENESAS_SDHI_SCC_DTCNTL 0x800
@@ -655,9 +655,9 @@ static int renesas_sdhi_set_ios(struct udevice *dev)
mdelay(10);
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
struct mmc *mmc = mmc_get_mmc_dev(dev);
if ((priv->caps & TMIO_SD_CAP_RCAR_UHS) &&
(mmc->selected_mode != UHS_SDR104) &&
@@ -670,7 +670,7 @@ static int renesas_sdhi_set_ios(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
static int renesas_sdhi_wait_dat0(struct udevice *dev, int state,
int timeout_us)
{
@@ -784,9 +784,9 @@ static int renesas_sdhi_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
struct tmio_sd_priv *priv = dev_get_priv(dev);
renesas_sdhi_check_scc_error(dev);
@@ -820,12 +820,12 @@ static const struct dm_mmc_ops renesas_sdhi_ops = {
.send_cmd = renesas_sdhi_send_cmd,
.set_ios = renesas_sdhi_set_ios,
.get_cd = tmio_sd_get_cd,
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
.execute_tuning = renesas_sdhi_execute_tuning,
#endif
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
.wait_dat0 = renesas_sdhi_wait_dat0,
#endif
.get_b_max = renesas_sdhi_get_b_max,
@@ -866,9 +866,9 @@ static void renesas_sdhi_filter_caps(struct udevice *dev)
if (priv->caps & TMIO_SD_CAP_DMA_INTERNAL)
priv->idma_bus_width = TMIO_SD_DMA_MODE_BUS_WIDTH;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
struct tmio_sd_plat *plat = dev_get_plat(dev);
/* HS400 is not supported on H3 ES1.x and M3W ES1.0, ES1.1 */
@@ -1003,9 +1003,9 @@ static int renesas_sdhi_probe(struct udevice *dev)
renesas_sdhi_filter_caps(dev);
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
- CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \
+ IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS))
renesas_sdhi_reset_tuning(priv);
#endif
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 573bf16c875..4d0959445cd 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -20,7 +20,7 @@
#include <linux/err.h>
struct rockchip_mmc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3288_dw_mshc dtplat;
#endif
struct mmc_config cfg;
@@ -55,7 +55,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
host->name = dev->name;
@@ -109,7 +109,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
struct dwmci_host *host = &priv->host;
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3288_dw_mshc *dtplat = &plat->dtplat;
host->name = dev->name;
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index 9608770d4ec..f0aa3aab8c7 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -271,7 +271,7 @@ static void rk3399_sdhci_set_control_reg(struct sdhci_host *host)
* the device impossible to use. Set the correct value here to
* let reinitialization attempts succeed.
*/
- if (CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT))
+ if (IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT))
rk3399_sdhci_set_enhanced_strobe(host);
};
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 0ba7940a4db..4fb4a419b75 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -96,7 +96,7 @@ static int sandbox_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
case SD_CMD_ERASE_WR_BLK_END:
erase_end = cmd->cmdarg;
break;
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
case MMC_CMD_ERASE: {
struct mmc *mmc = mmc_get_mmc_dev(dev);
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index a80ad8329a3..0a430a866c9 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -70,7 +70,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host, struct mmc_data *data)
}
}
-#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
+#if (defined(CONFIG_MMC_SDHCI_SDMA) || IS_ENABLED(CONFIG_MMC_SDHCI_ADMA))
static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
int *is_aligned, int trans_bytes)
{
@@ -108,7 +108,7 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
dma_addr = dev_phys_to_bus(mmc_to_dev(host->mmc), host->start_addr);
sdhci_writel(host, dma_addr, SDHCI_DMA_ADDRESS);
}
-#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
+#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA)
else if (host->flags & (USE_ADMA | USE_ADMA64)) {
sdhci_prepare_adma_table(host->adma_desc_table, data,
host->start_addr);
@@ -177,7 +177,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
}
} while (!(stat & SDHCI_INT_DATA_END));
-#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
+#if (defined(CONFIG_MMC_SDHCI_SDMA) || IS_ENABLED(CONFIG_MMC_SDHCI_ADMA))
dma_unmap_single(host->start_addr, data->blocks * data->blocksize,
mmc_get_dma_dir(data));
#endif
@@ -535,7 +535,7 @@ static void sdhci_set_voltage(struct sdhci_host *host)
switch (mmc->signal_voltage) {
case MMC_SIGNAL_VOLTAGE_330:
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (mmc->vqmmc_supply) {
if (regulator_set_enable_if_allowed(mmc->vqmmc_supply, false)) {
pr_err("failed to disable vqmmc-supply\n");
@@ -571,7 +571,7 @@ static void sdhci_set_voltage(struct sdhci_host *host)
break;
case MMC_SIGNAL_VOLTAGE_180:
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (mmc->vqmmc_supply) {
if (regulator_set_enable_if_allowed(mmc->vqmmc_supply, false)) {
pr_err("failed to disable vqmmc-supply\n");
@@ -691,7 +691,7 @@ static int sdhci_set_ios(struct mmc *mmc)
static int sdhci_init(struct mmc *mmc)
{
struct sdhci_host *host = mmc->priv;
-#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_GPIO)
struct udevice *dev = mmc->dev;
gpio_request_by_name(dev, "cd-gpios", 0,
@@ -767,7 +767,7 @@ static int sdhci_get_cd(struct udevice *dev)
if (mmc->cfg->host_caps & MMC_CAP_NEEDS_POLL)
return 1;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
value = dm_gpio_get_value(&host->cd_gpio);
if (value >= 0) {
if (mmc->cfg->host_caps & MMC_CAP_CD_ACTIVE_HIGH)
@@ -803,7 +803,7 @@ static int sdhci_wait_dat0(struct udevice *dev, int state,
return -ETIMEDOUT;
}
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
static int sdhci_set_enhanced_strobe(struct udevice *dev)
{
struct mmc *mmc = mmc_get_mmc_dev(dev);
@@ -825,7 +825,7 @@ const struct dm_mmc_ops sdhci_ops = {
.execute_tuning = sdhci_execute_tuning,
#endif
.wait_dat0 = sdhci_wait_dat0,
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
.set_enhanced_strobe = sdhci_set_enhanced_strobe,
#endif
};
@@ -841,7 +841,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
u32 f_max, u32 f_min)
{
u32 caps, caps_1 = 0;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
u64 dt_caps, dt_caps_mask;
dt_caps_mask = dev_read_u64_default(host->mmc->dev,
@@ -864,7 +864,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
__func__);
}
#endif
-#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
+#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA)
if (!(caps & SDHCI_CAN_DO_ADMA2)) {
printf("%s: Your controller doesn't support SDMA!!\n",
__func__);
@@ -892,7 +892,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
/* Check whether the clock multiplier is supported or not */
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
caps_1 = ~upper_32_bits(dt_caps_mask) &
sdhci_readl(host, SDHCI_CAPABILITIES_1);
caps_1 |= upper_32_bits(dt_caps);
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index be3d8bfb3d7..37725eabc57 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -89,7 +89,7 @@ static int socfpga_dwmmc_get_clk_rate(struct udevice *dev)
{
struct dwmci_socfpga_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
int ret;
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index b68594de373..a852b2d162f 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -37,7 +37,7 @@ struct stm32_sdmmc2_plat {
struct gpio_desc cd_gpio;
u32 clk_reg_msk;
u32 pwr_reg_msk;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
bool vqmmc_enabled;
#endif
};
@@ -577,7 +577,7 @@ static void stm32_sdmmc2_pwron(struct stm32_sdmmc2_plat *plat)
/* during the first 74 SDMMC_CK cycles the SDMMC is still disabled. */
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (plat->mmc.vqmmc_supply && !plat->vqmmc_enabled) {
if (regulator_set_enable_if_allowed(plat->mmc.vqmmc_supply, true))
dev_dbg(plat->mmc.dev, "failed to enable vqmmc-supply\n");
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 23bc7da917a..95ad19bc08f 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -439,7 +439,7 @@ out:
/* non-DM code here is used by the (ARM) SPL only */
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
/* support 4 mmc hosts */
struct sunxi_mmc_priv mmc_host[4];
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index b1556bba5d9..3bb7712bf80 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -136,7 +136,7 @@ struct tmio_sd_priv {
#ifdef CONFIG_DM_REGULATOR
struct udevice *vqmmc_dev;
#endif
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
#if IS_ENABLED(CONFIG_RENESAS_SDHI)
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 75003a0113e..45a88c1b061 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -35,7 +35,7 @@ static const struct udevice_id uniphier_sd_match[] = {
static ulong uniphier_sd_clk_get_rate(struct tmio_sd_priv *priv)
{
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
return clk_get_rate(&priv->clk);
#elif CONFIG_SPL_BUILD
return 100000000;
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index aa78d41a55e..e9d842cf79b 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -768,7 +768,7 @@ int __get_mtd_device(struct mtd_info *mtd)
}
EXPORT_SYMBOL_GPL(__get_mtd_device);
-#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL)
static bool mtd_device_matches_name(struct mtd_info *mtd, const char *name)
{
struct udevice *dev = NULL;
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 4886392a1cf..74c88af0f68 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -881,7 +881,7 @@ int add_mtd_partitions(struct mtd_info *master,
return 0;
}
-#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL)
int add_mtd_partitions_of(struct mtd_info *master)
{
ofnode parts, child;
@@ -947,7 +947,7 @@ int add_mtd_partitions_of(struct mtd_info *master)
return 0;
}
-#endif /* CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL) */
#ifndef __UBOOT__
static DEFINE_SPINLOCK(part_parser_lock);
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index e4e144bd7c8..e07f1c4ab16 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -787,7 +787,7 @@ static void davinci_nand_init(struct nand_chip *nand)
nand->dev_ready = nand_davinci_dev_ready;
}
-#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
static int davinci_nand_probe(struct udevice *dev)
{
struct nand_chip *nand = dev_get_priv(dev);
diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index 7853c3f74e2..78b08fac815 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
@@ -745,7 +745,7 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr, struct udevice *dev)
/* If nand_scan_ident() has not selected ecc.mode, do it now */
if (nand->ecc.mode == 0
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
&& !ofnode_read_string(nand->flash_node, "nand-ecc-mode")
#endif
) {
diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c
index 65eab4c8088..3fdbd42468f 100644
--- a/drivers/mtd/nand/raw/mxs_nand.c
+++ b/drivers/mtd/nand/raw/mxs_nand.c
@@ -62,7 +62,7 @@ struct nand_ecclayout fake_ecc_layout;
/*
* Cache management functions
*/
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
static void mxs_nand_flush_data_buf(struct mxs_nand_info *info)
{
uint32_t addr = (uintptr_t)info->data_buf;
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
index eacd99c4e27..eb7856b3f62 100644
--- a/drivers/mtd/nand/raw/nand.c
+++ b/drivers/mtd/nand/raw/nand.c
@@ -19,7 +19,7 @@ int nand_curr_device = -1;
static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
-#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if !IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE];
static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] = CFG_SYS_NAND_BASE_LIST;
#endif
@@ -76,7 +76,7 @@ int nand_register(int devnum, struct mtd_info *mtd)
return 0;
}
-#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if !IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
static void nand_init_chip(int i)
{
struct nand_chip *nand = &nand_chip[i];
@@ -155,7 +155,7 @@ void nand_init(void)
return;
initialized = 1;
-#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
board_nand_init();
#else
int i;
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 9eba360d55f..0ad647f6500 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4482,7 +4482,7 @@ ident_done:
}
EXPORT_SYMBOL(nand_detect);
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode node)
{
@@ -4548,7 +4548,7 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod
{
return 0;
}
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
/**
* nand_scan_ident - [NAND Interface] Scan for the NAND device
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index 56a2c39e4f6..8c24a3baea3 100644
--- a/drivers/mtd/nand/raw/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
@@ -199,7 +199,7 @@ void elm_init(void)
}
#endif
-#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
static int elm_probe(struct udevice *dev)
{
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 1a5ed0de31a..f36f11ed76f 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -1207,7 +1207,7 @@ int gpmc_nand_init(struct nand_chip *nand)
/* First NAND chip for SPL use only */
static __maybe_unused struct nand_chip *nand_chip;
-#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
static int gpmc_nand_probe(struct udevice *dev)
{
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index df1f75390c4..0860090e77c 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -55,7 +55,7 @@ struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs,
struct udevice *bus;
char *str;
-#if defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(USE_TINY_PRINTF)
+#if defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_USE_TINY_PRINTF)
str = "spi_flash";
#else
char name[30];
@@ -90,7 +90,7 @@ static int spi_flash_post_bind(struct udevice *dev)
{
int ret;
- if (CONFIG_IS_ENABLED(BOOTDEV_SPI_FLASH) && test_sf_bootdev_enabled()) {
+ if (IS_ENABLED(CONFIG_BOOTDEV_SPI_FLASH) && test_sf_bootdev_enabled()) {
ret = bootdev_setup_for_dev(dev, "sf_bootdev");
if (ret)
return log_msg_ret("bd", ret);
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index d3ef69ec74f..83e25c424f6 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -17,7 +17,7 @@
#define SPI_NOR_MAX_ADDR_WIDTH 4
struct flash_info {
-#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY)
+#if !IS_ENABLED(CONFIG_SPI_FLASH_TINY)
char *name;
#endif
@@ -80,7 +80,7 @@ extern const struct flash_info spi_nor_ids[];
int spi_flash_cmd_get_sw_write_prot(struct spi_flash *flash);
-#if CONFIG_IS_ENABLED(SPI_FLASH_MTD)
+#if IS_ENABLED(CONFIG_SPI_FLASH_MTD)
int spi_flash_mtd_register(struct spi_flash *flash);
void spi_flash_mtd_unregister(struct spi_flash *flash);
#else
diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index 071b25ac67f..5804caf4436 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -9,7 +9,7 @@
#include <linux/mtd/mtd.h>
#include <spi_flash.h>
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
int spi_flash_mtd_register(struct spi_flash *flash)
{
@@ -21,7 +21,7 @@ void spi_flash_mtd_unregister(struct spi_flash *flash)
del_mtd_device(&flash->mtd);
}
-#else /* !CONFIG_IS_ENABLED(DM_SPI_FLASH) */
+#else /* !IS_ENABLED(CONFIG_DM_SPI_FLASH) */
static struct mtd_info sf_mtd_info;
static bool sf_mtd_registered;
@@ -160,4 +160,4 @@ void spi_flash_mtd_unregister(struct spi_flash *flash)
sf_mtd_info.name);
}
-#endif /* !CONFIG_IS_ENABLED(DM_SPI_FLASH) */
+#endif /* !IS_ENABLED(CONFIG_DM_SPI_FLASH) */
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index e192f97efdc..73b3b6f19c9 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -101,7 +101,7 @@ static int spi_flash_probe_slave(struct spi_flash *flash)
if (ret)
goto err_read_id;
- if (CONFIG_IS_ENABLED(SPI_DIRMAP)) {
+ if (IS_ENABLED(CONFIG_SPI_DIRMAP)) {
ret = spi_nor_create_read_dirmap(flash);
if (ret)
return ret;
@@ -111,7 +111,7 @@ static int spi_flash_probe_slave(struct spi_flash *flash)
return ret;
}
- if (CONFIG_IS_ENABLED(SPI_FLASH_MTD))
+ if (IS_ENABLED(CONFIG_SPI_FLASH_MTD))
ret = spi_flash_mtd_register(flash);
err_read_id:
@@ -119,7 +119,7 @@ err_read_id:
return ret;
}
-#if !CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if !IS_ENABLED(CONFIG_DM_SPI_FLASH)
struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs,
unsigned int max_hz, unsigned int spi_mode)
{
@@ -149,12 +149,12 @@ struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs,
void spi_flash_free(struct spi_flash *flash)
{
- if (CONFIG_IS_ENABLED(SPI_DIRMAP)) {
+ if (IS_ENABLED(CONFIG_SPI_DIRMAP)) {
spi_mem_dirmap_destroy(flash->dirmap.wdesc);
spi_mem_dirmap_destroy(flash->dirmap.rdesc);
}
- if (CONFIG_IS_ENABLED(SPI_FLASH_MTD))
+ if (IS_ENABLED(CONFIG_SPI_FLASH_MTD))
spi_flash_mtd_unregister(flash);
spi_free_slave(flash->spi);
@@ -224,7 +224,7 @@ static int spi_flash_std_remove(struct udevice *dev)
struct spi_flash *flash = dev_get_uclass_priv(dev);
int ret;
- if (CONFIG_IS_ENABLED(SPI_DIRMAP)) {
+ if (IS_ENABLED(CONFIG_SPI_DIRMAP)) {
spi_mem_dirmap_destroy(flash->dirmap.wdesc);
spi_mem_dirmap_destroy(flash->dirmap.rdesc);
}
@@ -233,7 +233,7 @@ static int spi_flash_std_remove(struct udevice *dev)
if (ret)
return ret;
- if (CONFIG_IS_ENABLED(SPI_FLASH_MTD))
+ if (IS_ENABLED(CONFIG_SPI_FLASH_MTD))
spi_flash_mtd_unregister(flash);
return 0;
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 3f97acdb18c..2718bd1c419 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -371,7 +371,7 @@ static ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len,
while (remaining) {
op.data.nbytes = remaining < UINT_MAX ? remaining : UINT_MAX;
- if (CONFIG_IS_ENABLED(SPI_DIRMAP) && nor->dirmap.rdesc) {
+ if (IS_ENABLED(CONFIG_SPI_DIRMAP) && nor->dirmap.rdesc) {
/*
* Record current operation information which may be used
* when the address or data length exceeds address mapping.
@@ -417,7 +417,7 @@ static ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
spi_nor_setup_op(nor, &op, nor->write_proto);
- if (CONFIG_IS_ENABLED(SPI_DIRMAP) && nor->dirmap.wdesc) {
+ if (IS_ENABLED(CONFIG_SPI_DIRMAP) && nor->dirmap.wdesc) {
memcpy(&nor->dirmap.wdesc->info.op_tmpl, &op,
sizeof(struct spi_mem_op));
op.data.nbytes = spi_mem_dirmap_write(nor->dirmap.wdesc, op.addr.val,
@@ -1942,7 +1942,7 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor)
return 0;
}
-#if CONFIG_IS_ENABLED(SPI_FLASH_SFDP_SUPPORT)
+#if IS_ENABLED(CONFIG_SPI_FLASH_SFDP_SUPPORT)
/**
* spansion_no_read_cr_quad_enable() - set QE bit in Configuration Register.
* @nor: pointer to a 'struct spi_nor'
@@ -1998,7 +1998,7 @@ spi_nor_set_pp_settings(struct spi_nor_pp_command *pp,
pp->proto = proto;
}
-#if CONFIG_IS_ENABLED(SPI_FLASH_SFDP_SUPPORT)
+#if IS_ENABLED(CONFIG_SPI_FLASH_SFDP_SUPPORT)
/*
* Serial Flash Discoverable Parameters (SFDP) parsing.
*/
@@ -2707,7 +2707,7 @@ static int spi_nor_init_params(struct spi_nor *nor,
params->hwcaps.mask |= SNOR_HWCAPS_READ_FAST;
/* Mask out Fast Read if not requested at DT instantiation. */
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
if (!ofnode_read_bool(dev_ofnode(nor->spi->dev),
"m25p,fast-read"))
params->hwcaps.mask &= ~SNOR_HWCAPS_READ_FAST;
@@ -3821,7 +3821,7 @@ static int spi_nor_soft_reset(struct spi_nor *nor)
ext = nor->cmd_ext_type;
if (nor->cmd_ext_type == SPI_NOR_EXT_NONE) {
nor->cmd_ext_type = SPI_NOR_EXT_REPEAT;
-#if CONFIG_IS_ENABLED(SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT)
+#if IS_ENABLED(CONFIG_SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT)
nor->cmd_ext_type = SPI_NOR_EXT_INVERT;
#endif /* SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT */
}
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
index 3f8b7967893..3ec97a22487 100644
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
@@ -13,7 +13,7 @@
#include "sf_internal.h"
/* Exclude chip names for SPL to save space */
-#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY)
+#if !IS_ENABLED(CONFIG_SPI_FLASH_TINY)
#define INFO_NAME(_name) .name = _name,
#else
#define INFO_NAME(_name)
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index 68152ce3b4b..df4fc32d656 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -60,7 +60,7 @@ static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len)
* spi_slave does not have a struct udevice member without DM,
* so use the bus and cs instead.
*/
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
dev_dbg(nor->spi->dev, "error %d reading %x\n", ret,
code);
#else
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index e09ca3313dd..0d150ac5392 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -82,7 +82,7 @@ static int dw_mdio_write(struct mii_dev *bus, int addr, int devad, int reg,
return ret;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static int __dw_mdio_reset(struct udevice *dev)
{
struct dw_eth_dev *priv = dev_get_priv(dev);
@@ -137,7 +137,7 @@ int designware_eth_mdio_write(struct udevice *mdio_dev, int addr, int devad, int
return dw_mdio_write(pdata->mii_bus, addr, devad, reg, val);
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
int designware_eth_mdio_reset(struct udevice *mdio_dev)
{
struct mdio_perdev_priv *mdio_pdata = dev_get_uclass_priv(mdio_dev);
@@ -150,7 +150,7 @@ int designware_eth_mdio_reset(struct udevice *mdio_dev)
static const struct mdio_ops designware_eth_mdio_ops = {
.read = designware_eth_mdio_read,
.write = designware_eth_mdio_write,
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
.reset = designware_eth_mdio_reset,
#endif
};
@@ -184,7 +184,7 @@ static int dw_mdio_init(const char *name, void *priv)
bus->read = dw_mdio_read;
bus->write = dw_mdio_write;
snprintf(bus->name, sizeof(bus->name), "%s", name);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
bus->reset = dw_mdio_reset;
#endif
@@ -805,11 +805,11 @@ const struct eth_ops designware_eth_ops = {
int designware_eth_of_to_plat(struct udevice *dev)
{
struct dw_eth_pdata *dw_pdata = dev_get_plat(dev);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct dw_eth_dev *priv = dev_get_priv(dev);
#endif
struct eth_pdata *pdata = &dw_pdata->eth_pdata;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
int reset_flags = GPIOD_IS_OUT;
#endif
int ret = 0;
@@ -821,7 +821,7 @@ int designware_eth_of_to_plat(struct udevice *dev)
pdata->max_speed = dev_read_u32_default(dev, "max-speed", 0);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (dev_read_bool(dev, "snps,reset-active-low"))
reset_flags |= GPIOD_ACTIVE_LOW;
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index 9da4e902cb0..a1e29310d85 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -10,7 +10,7 @@
#include <asm/cache.h>
#include <net.h>
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
#include <asm-generic/gpio.h>
#endif
@@ -233,7 +233,7 @@ struct dw_eth_dev {
struct eth_mac_regs *mac_regs_p;
struct eth_dma_regs *dma_regs_p;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc reset_gpio;
#endif
#ifdef CONFIG_CLK
diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c
index 27b77444a0c..a9460988f08 100644
--- a/drivers/net/eth-phy-uclass.c
+++ b/drivers/net/eth-phy-uclass.c
@@ -131,7 +131,7 @@ static int eth_phy_of_to_plat(struct udevice *dev)
struct eth_phy_device_priv *uc_priv = dev_get_uclass_priv(dev);
int ret;
- if (!CONFIG_IS_ENABLED(DM_GPIO))
+ if (!IS_ENABLED(CONFIG_DM_GPIO))
return 0;
/* search "reset-gpios" in phy node */
@@ -152,7 +152,7 @@ void eth_phy_reset(struct udevice *dev, int value)
struct eth_phy_device_priv *uc_priv = dev_get_uclass_priv(dev);
u32 delay;
- if (!CONFIG_IS_ENABLED(DM_GPIO))
+ if (!IS_ENABLED(CONFIG_DM_GPIO))
return;
if (!dm_gpio_is_valid(&uc_priv->reset_gpio))
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 5cc35958c49..a759d9cdd33 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -139,7 +139,7 @@ static int fec_get_clk_rate(void *udev, int idx)
int ret;
if (IS_ENABLED(CONFIG_IMX8) ||
- CONFIG_IS_ENABLED(CLK_CCF)) {
+ IS_ENABLED(CONFIG_CLK_CCF)) {
dev = udev;
if (!dev) {
ret = uclass_get_device_by_seq(UCLASS_ETH, idx, &dev);
@@ -1101,7 +1101,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* FEC GPIO reset */
static void fec_gpio_reset(struct fec_priv *priv)
{
@@ -1145,7 +1145,7 @@ static int fecmxc_probe(struct udevice *dev)
}
priv->clk_rate = clk_get_rate(&priv->ipg_clk);
- } else if (CONFIG_IS_ENABLED(CLK_CCF)) {
+ } else if (IS_ENABLED(CONFIG_CLK_CCF)) {
ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk);
if (ret < 0) {
debug("Can't get FEC ipg clk: %d\n", ret);
@@ -1202,7 +1202,7 @@ static int fecmxc_probe(struct udevice *dev)
}
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
fec_gpio_reset(priv);
#endif
/* Reset chip. */
@@ -1316,7 +1316,7 @@ static int fecmxc_of_to_plat(struct udevice *dev)
device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply);
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
ret = gpio_request_by_name(dev, "phy-reset-gpios", 0,
&priv->phy_reset_gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
if (ret < 0)
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h
index 77bfc1cbf45..97012c15fa8 100644
--- a/drivers/net/fec_mxc.h
+++ b/drivers/net/fec_mxc.h
@@ -258,7 +258,7 @@ struct fec_priv {
#ifdef CONFIG_DM_REGULATOR
struct udevice *phy_supply;
#endif
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc phy_reset_gpio;
uint32_t reset_delay;
uint32_t reset_post_delay;
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 7dfa8219094..21167815f88 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -384,7 +384,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name)
addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
struct udevice *new;
/* speed and mode will be read from DT */
@@ -493,7 +493,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name)
void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
struct udevice *new;
/* speed and mode will be read from DT */
@@ -545,7 +545,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name)
if (rc)
return rc;
addr = (void *)new_addr;
- } else if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) {
+ } else if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) {
/*
* Using a (signed) FIT wrapper is mandatory if we are
* doing verified boot.
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 24933473fa0..61df9706f9b 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -280,7 +280,7 @@ struct mvneta_port {
int init;
struct phy_device *phydev;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc phy_reset_gpio;
struct gpio_desc sfp_tx_disable_gpio;
#endif
@@ -1567,7 +1567,7 @@ static int mvneta_recv(struct udevice *dev, int flags, uchar **packetp)
static int mvneta_probe(struct udevice *dev)
{
struct mvneta_port *pp = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct ofnode_phandle_args sfp_args;
#endif
void *bd_space;
@@ -1620,7 +1620,7 @@ static int mvneta_probe(struct udevice *dev)
else
pp->dma_base = 0;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (!dev_read_phandle_with_args(dev, "sfp", NULL, 0, 0, &sfp_args) &&
ofnode_is_enabled(sfp_args.node))
gpio_request_by_name_nodev(sfp_args.node, "tx-disable-gpio", 0,
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 1bad50d344c..951640eb59d 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -965,7 +965,7 @@ struct mvpp2_port {
int phyaddr;
struct udevice *mdio_dev;
struct mii_dev *bus;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc phy_reset_gpio;
struct gpio_desc phy_tx_disable_gpio;
#endif
@@ -4829,7 +4829,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
return -EINVAL;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
gpio_request_by_name(dev, "phy-reset-gpios", 0,
&port->phy_reset_gpio, GPIOD_IS_OUT);
gpio_request_by_name(dev, "marvell,sfp-tx-disable-gpio", 0,
@@ -4846,7 +4846,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* Port GPIO initialization */
static void mvpp2_gpio_init(struct mvpp2_port *port)
{
@@ -4879,7 +4879,7 @@ static int mvpp2_port_probe(struct udevice *dev,
}
mvpp2_port_power_up(port);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
mvpp2_gpio_init(port);
#endif
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c9c07a5a8ff..902658bc79f 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -307,7 +307,7 @@ static unsigned char rxdata[RX_BUF_LEN];
*/
#if RTL8169_DESC_SIZE < ARCH_DMA_MINALIGN
#if !defined(CONFIG_SYS_NONCACHED_MEMORY) && \
- !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_X86)
+ !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && !defined(CONFIG_X86)
#warning cache-line size is larger than descriptor size
#endif
#endif
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 8f162ca58fb..ae506dd5953 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -38,7 +38,7 @@
#endif
#if defined(CFG_SH_ETHER_CACHE_WRITEBACK) && \
- !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+ !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
#define flush_cache_wback(addr, len) \
flush_dcache_range((unsigned long)addr, \
(unsigned long)(addr + ALIGN(len, CFG_SH_ETHER_ALIGNE_SIZE)))
@@ -659,7 +659,7 @@ static int sh_ether_probe(struct udevice *udev)
priv->iobase = pdata->iobase;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(udev, 0, &priv->clk);
if (ret < 0)
return ret;
@@ -698,7 +698,7 @@ static int sh_ether_probe(struct udevice *udev)
eth->port_info[eth->port].iobase =
(void __iomem *)(uintptr_t)(BASE_IO_ADDR + 0x800 * eth->port);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&priv->clk);
if (ret)
goto err_mdio_register;
@@ -717,7 +717,7 @@ static int sh_ether_probe(struct udevice *udev)
return 0;
err_phy_config:
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&priv->clk);
#endif
err_mdio_register:
@@ -731,7 +731,7 @@ static int sh_ether_remove(struct udevice *udev)
struct sh_eth_dev *eth = &priv->shdev;
struct sh_eth_info *port_info = ð->port_info[eth->port];
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&priv->clk);
#endif
free(port_info->phydev);
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5c5ad8b84a9..73de23a25ac 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -466,7 +466,7 @@ static int smc911x_of_to_plat(struct udevice *dev)
if (!ret)
priv->use_32_bit_io = (io_width == 4);
else
- priv->use_32_bit_io = CONFIG_IS_ENABLED(SMC911X_32_BIT);
+ priv->use_32_bit_io = IS_ENABLED(CONFIG_SMC911X_32_BIT);
return 0;
}
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index e800a326b81..ca8f4a1027c 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -169,7 +169,7 @@ struct emac_eth_dev {
struct clk ephy_clk;
struct reset_ctl tx_rst;
struct reset_ctl ephy_rst;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc reset_gpio;
#endif
};
@@ -633,7 +633,7 @@ err_tx_clk:
return ret;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static int sun8i_mdio_reset(struct mii_dev *bus)
{
struct udevice *dev = bus->priv;
@@ -680,7 +680,7 @@ static int sun8i_mdio_init(const char *name, struct udevice *priv)
bus->write = sun8i_mdio_write;
snprintf(bus->name, sizeof(bus->name), name);
bus->priv = (void *)priv;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
bus->reset = sun8i_mdio_reset;
#endif
@@ -795,7 +795,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
const fdt32_t *reg;
int node = dev_of_offset(dev);
int offset = 0;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
int reset_flags = GPIOD_IS_OUT;
#endif
int ret;
@@ -880,7 +880,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
printf("%s: Invalid RX delay value %d\n", __func__,
sun8i_pdata->rx_delay_ps);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
"snps,reset-active-low"))
reset_flags |= GPIOD_ACTIVE_LOW;
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 3a8cc9c52a5..da471c82ecc 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -1090,7 +1090,7 @@ static int cpsw_eth_probe(struct udevice *dev)
return _cpsw_register(priv);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static void cpsw_eth_of_parse_slave(struct cpsw_platform_data *data,
int slave_index, ofnode subnode)
{
@@ -1271,7 +1271,7 @@ int cpsw_get_slave_phy_addr(struct udevice *dev, int slave)
U_BOOT_DRIVER(eth_cpsw) = {
.name = "eth_cpsw",
.id = UCLASS_ETH,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = cpsw_eth_ids,
.of_to_plat = cpsw_eth_of_to_plat,
.plat_auto = sizeof(struct eth_pdata),
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index af028f9ceca..438e0aec6b5 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -66,7 +66,7 @@ int pch_ioctl(struct udevice *dev, ulong req, void *data, int size)
UCLASS_DRIVER(pch) = {
.id = UCLASS_PCH,
.name = "pch",
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 47b6e6e5bcf..4eb4f967446 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -309,7 +309,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void),
goto err;
#endif
} else {
-#if defined(CONFIG_X86) && (CONFIG_IS_ENABLED(X86_32BIT_INIT) || CONFIG_TPL)
+#if defined(CONFIG_X86) && (IS_ENABLED(CONFIG_X86_32BIT_INIT) || CONFIG_TPL)
bios_set_interrupt_handler(0x15, int15_handler);
bios_run_on_x86(dev, (unsigned long)ram, vesa_mode,
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index a0b82c78321..8dc4bc1512a 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -482,7 +482,7 @@ static int pcie_dw_mvebu_probe(struct udevice *dev)
struct pcie_dw_mvebu *pcie = dev_get_priv(dev);
struct udevice *ctlr = pci_get_controller(dev);
struct pci_controller *hose = dev_get_uclass_priv(ctlr);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc reset_gpio;
gpio_request_by_name(dev, "marvell,reset-gpio", 0, &reset_gpio,
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index da48466480c..a3da13ac2b4 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -543,7 +543,7 @@ int imx6_pcie_toggle_power(struct udevice *vpcie)
gpio_free(CFG_PCIE_IMX_POWER_GPIO);
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (vpcie) {
regulator_set_enable(vpcie, false);
mdelay(20);
@@ -722,7 +722,7 @@ static int imx_pcie_dm_probe(struct udevice *dev)
{
struct imx_pcie_priv *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
device_get_supply_regulator(dev, "vpcie-supply", &priv->vpcie);
#endif
diff --git a/drivers/phy/meson-axg-mipi-dphy.c b/drivers/phy/meson-axg-mipi-dphy.c
index cf2a1cd14c7..9fa6ee52a88 100644
--- a/drivers/phy/meson-axg-mipi-dphy.c
+++ b/drivers/phy/meson-axg-mipi-dphy.c
@@ -174,7 +174,7 @@
struct phy_meson_axg_mipi_dphy_priv {
struct regmap *regmap;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
struct reset_ctl reset;
@@ -362,7 +362,7 @@ int meson_axg_mipi_dphy_probe(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(dev, 0, &priv->clk);
if (ret < 0)
return ret;
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index 2fbba7fdae0..c308760ad62 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -54,10 +54,10 @@
struct phy_meson_g12a_usb2_priv {
struct regmap *regmap;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *phy_supply;
#endif
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
struct reset_ctl reset;
@@ -66,7 +66,7 @@ struct phy_meson_g12a_usb2_priv {
static int phy_meson_g12a_usb2_power_on(struct phy *phy)
{
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *dev = phy->dev;
struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
@@ -82,7 +82,7 @@ static int phy_meson_g12a_usb2_power_on(struct phy *phy)
static int phy_meson_g12a_usb2_power_off(struct phy *phy)
{
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *dev = phy->dev;
struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
@@ -180,7 +180,7 @@ int meson_g12a_usb2_phy_probe(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(dev, 0, &priv->clk);
if (ret < 0)
return ret;
@@ -193,7 +193,7 @@ int meson_g12a_usb2_phy_probe(struct udevice *dev)
}
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply);
if (ret && ret != -ENOENT) {
pr_err("Failed to get PHY regulator\n");
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 8f72b5a6a74..e5639cf5dd6 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -62,7 +62,7 @@
struct phy_g12a_usb3_pcie_priv {
struct regmap *regmap;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
struct reset_ctl_bulk resets;
@@ -389,7 +389,7 @@ int meson_g12a_usb3_pcie_phy_probe(struct udevice *dev)
else if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(dev, 0, &priv->clk);
if (ret < 0)
return ret;
diff --git a/drivers/phy/meson-gxbb-usb2.c b/drivers/phy/meson-gxbb-usb2.c
index 7a2e3d2739e..8e2a2cfb8c0 100644
--- a/drivers/phy/meson-gxbb-usb2.c
+++ b/drivers/phy/meson-gxbb-usb2.c
@@ -81,7 +81,7 @@
struct phy_meson_gxbb_usb2_priv {
struct regmap *regmap;
struct reset_ctl_bulk resets;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *phy_supply;
#endif
};
@@ -92,7 +92,7 @@ static int phy_meson_gxbb_usb2_power_on(struct phy *phy)
struct phy_meson_gxbb_usb2_priv *priv = dev_get_priv(dev);
uint val;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->phy_supply) {
int ret = regulator_set_enable(priv->phy_supply, true);
@@ -142,7 +142,7 @@ static int phy_meson_gxbb_usb2_power_on(struct phy *phy)
static int phy_meson_gxbb_usb2_power_off(struct phy *phy)
{
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *dev = phy->dev;
struct phy_meson_gxbb_usb2_priv *priv = dev_get_priv(dev);
@@ -192,7 +192,7 @@ static int meson_gxbb_usb2_phy_probe(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply);
if (ret && ret != -ENOENT) {
pr_err("Failed to get PHY regulator\n");
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 9fb376cec44..a2f8fcbd658 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -101,10 +101,10 @@
struct phy_meson_gxl_usb2_priv {
struct regmap *regmap;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *phy_supply;
#endif
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
#endif
};
@@ -167,7 +167,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy)
phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->phy_supply) {
int ret = regulator_set_enable(priv->phy_supply, true);
if (ret)
@@ -189,7 +189,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy)
val |= U2P_R0_POWER_ON_RESET;
regmap_write(priv->regmap, U2P_R0, val);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->phy_supply) {
int ret = regulator_set_enable(priv->phy_supply, false);
if (ret) {
@@ -216,7 +216,7 @@ int meson_gxl_usb2_phy_probe(struct udevice *dev)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(dev, 0, &priv->clk);
if (ret < 0)
return ret;
@@ -229,7 +229,7 @@ int meson_gxl_usb2_phy_probe(struct udevice *dev)
}
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply);
if (ret && ret != -ENOENT) {
pr_err("Failed to get PHY regulator\n");
diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c
index d0904f4f075..48b685fb814 100644
--- a/drivers/phy/nop-phy.c
+++ b/drivers/phy/nop-phy.c
@@ -14,12 +14,12 @@
struct nop_phy_priv {
struct clk_bulk bulk;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc reset_gpio;
#endif
};
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
static int nop_phy_reset(struct phy *phy)
{
struct nop_phy_priv *priv = dev_get_priv(phy->dev);
@@ -37,18 +37,18 @@ static int nop_phy_init(struct phy *phy)
struct nop_phy_priv *priv = dev_get_priv(phy->dev);
int ret = 0;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = clk_enable_bulk(&priv->bulk);
if (ret)
return ret;
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
/* Take phy out of reset */
if (dm_gpio_is_valid(&priv->reset_gpio)) {
ret = dm_gpio_set_value(&priv->reset_gpio, false);
if (ret) {
- if (CONFIG_IS_ENABLED(CLK))
+ if (IS_ENABLED(CONFIG_CLK))
clk_disable_bulk(&priv->bulk);
return ret;
}
@@ -62,14 +62,14 @@ static int nop_phy_probe(struct udevice *dev)
struct nop_phy_priv *priv = dev_get_priv(dev);
int ret = 0;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = clk_get_bulk(dev, &priv->bulk);
if (ret < 0) {
dev_err(dev, "Failed to get clk: %d\n", ret);
return ret;
}
}
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
ret = gpio_request_by_name(dev, "reset-gpios", 0,
&priv->reset_gpio,
GPIOD_IS_OUT);
@@ -88,7 +88,7 @@ static const struct udevice_id nop_phy_ids[] = {
static struct phy_ops nop_phy_ops = {
.init = nop_phy_init,
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
.reset = nop_phy_reset,
#endif
};
diff --git a/drivers/phy/phy-imx8mq-usb.c b/drivers/phy/phy-imx8mq-usb.c
index 69f01de5553..b604179905d 100644
--- a/drivers/phy/phy-imx8mq-usb.c
+++ b/drivers/phy/phy-imx8mq-usb.c
@@ -76,7 +76,7 @@ enum imx8mpq_phy_type {
};
struct imx8mq_usb_phy {
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk phy_clk;
#endif
void __iomem *base;
@@ -174,7 +174,7 @@ static int imx8mq_usb_phy_power_on(struct phy *usb_phy)
struct imx8mq_usb_phy *imx_phy = dev_get_priv(dev);
u32 value;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
int ret;
ret = clk_enable(&imx_phy->phy_clk);
if (ret) {
@@ -202,7 +202,7 @@ static int imx8mq_usb_phy_power_off(struct phy *usb_phy)
value |= PHY_CTRL6_RXTERM_OVERRIDE_SEL;
writel(value, imx_phy->base + PHY_CTRL6);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&imx_phy->phy_clk);
#endif
@@ -231,7 +231,7 @@ int imx8mq_usb_phy_probe(struct udevice *dev)
if (!priv->base)
return -EINVAL;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
int ret;
/* Assigned clock already set clock */
diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c
index 181a6ff2702..60a0f91aac3 100644
--- a/drivers/pinctrl/intel/pinctrl_apl.c
+++ b/drivers/pinctrl/intel/pinctrl_apl.c
@@ -130,7 +130,7 @@ static int apl_pinctrl_of_to_plat(struct udevice *dev)
const struct pad_community *comm = NULL;
int i;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct apl_gpio_plat *plat = dev_get_plat(dev);
int ret;
@@ -155,7 +155,7 @@ static int apl_pinctrl_of_to_plat(struct udevice *dev)
return intel_pinctrl_of_to_plat(dev, comm, 2);
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id apl_gpio_ids[] = {
{ .compatible = "intel,apl-pinctrl"},
{ }
@@ -168,7 +168,7 @@ U_BOOT_DRIVER(intel_apl_pinctrl) = {
.of_match = of_match_ptr(apl_gpio_ids),
.probe = intel_pinctrl_probe,
.ops = &intel_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.of_to_plat = apl_pinctrl_of_to_plat,
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 47e2d67426f..d45d7c03bf9 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -15,7 +15,7 @@
#include "pinctrl-mtk-common.h"
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
/**
* struct mtk_drive_desc - the structure that holds the information
* of the driving current
@@ -219,7 +219,7 @@ static int mtk_hw_get_value(struct udevice *dev, int pin, int field,
return 0;
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static int mtk_get_pin_io_type(struct udevice *dev, int pin,
struct mtk_io_type_desc *io_type)
{
@@ -323,7 +323,7 @@ static int mtk_pinmux_group_set(struct udevice *dev,
return 0;
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param mtk_conf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
{ "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
@@ -648,7 +648,7 @@ const struct pinctrl_ops mtk_pinctrl_ops = {
.get_functions_count = mtk_get_functions_count,
.get_function_name = mtk_get_function_name,
.pinmux_group_set = mtk_pinmux_group_set,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(mtk_conf_params),
.pinconf_params = mtk_conf_params,
.pinconf_set = mtk_pinconf_set,
@@ -657,7 +657,7 @@ const struct pinctrl_ops mtk_pinctrl_ops = {
.set_state = pinctrl_generic_set_state,
};
-#if CONFIG_IS_ENABLED(DM_GPIO) || \
+#if IS_ENABLED(CONFIG_DM_GPIO) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO))
static int mtk_gpio_get(struct udevice *dev, unsigned int off)
{
@@ -790,7 +790,7 @@ int mtk_pinctrl_common_probe(struct udevice *dev,
priv->base[i] = (void __iomem *)addr;
}
-#if CONFIG_IS_ENABLED(DM_GPIO) || \
+#if IS_ENABLED(CONFIG_DM_GPIO) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO))
ret = mtk_gpiochip_register(dev);
#endif
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
index 0d9596fa72c..2a8ffb8f2b4 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
@@ -197,7 +197,7 @@ struct mtk_function_desc {
*/
struct mtk_io_type_desc {
const char *name;
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
/* Specific pinconfig operations */
int (*bias_set)(struct udevice *dev, u32 pin, bool disable,
bool pullup, u32 val);
@@ -244,7 +244,7 @@ void mtk_i_rmw(struct udevice *dev, u8 i, u32 reg, u32 mask, u32 set);
int mtk_pinctrl_common_probe(struct udevice *dev,
struct mtk_pinctrl_soc *soc);
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
int mtk_pinconf_bias_set_pu_pd(struct udevice *dev, u32 pin, bool disable,
bool pullup, u32 val);
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7620.c b/drivers/pinctrl/mtmips/pinctrl-mt7620.c
index 72ce8731a1d..861aa4b1b21 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7620.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7620.c
@@ -31,7 +31,7 @@
#define GM4_MASK 3
#define GM8_MASK 7
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
static const struct mtmips_pmx_func sutif_grp[] = {
FUNC("i2c", 2),
FUNC("uartl", 1),
@@ -146,17 +146,17 @@ static const char *mt7620_get_group_name(struct udevice *dev,
{
return mt7620_pinmux_data[selector].name;
}
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
static int mt7620_pinctrl_probe(struct udevice *dev)
{
struct mtmips_pinctrl_priv *priv = dev_get_priv(dev);
int ret = 0;
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
ret = mtmips_pinctrl_probe(priv, ARRAY_SIZE(mt7620_pinmux_data),
mt7620_pinmux_data);
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
return ret;
}
@@ -173,13 +173,13 @@ static int mt7620_pinctrl_of_to_plat(struct udevice *dev)
}
static const struct pinctrl_ops mt7620_pinctrl_ops = {
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
.get_groups_count = mt7620_get_groups_count,
.get_group_name = mt7620_get_group_name,
.get_functions_count = mtmips_get_functions_count,
.get_function_name = mtmips_get_function_name,
.pinmux_group_set = mtmips_pinmux_group_set,
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
.set_state = pinctrl_generic_set_state,
};
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7621.c b/drivers/pinctrl/mtmips/pinctrl-mt7621.c
index 3e98a01bad4..61eb82eab55 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7621.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7621.c
@@ -52,7 +52,7 @@ struct mt7621_pinctrl_priv {
struct mtmips_pinctrl_priv mp;
};
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
static const struct mtmips_pmx_func esw_int_grp[] = {
FUNC("gpio", 1),
FUNC("esw int", 0),
@@ -170,9 +170,9 @@ static const char *mt7621_get_group_name(struct udevice *dev,
{
return mt7621_pmx_data[selector].name;
}
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param mt7621_conf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
{ "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
@@ -254,10 +254,10 @@ static int mt7621_pinctrl_probe(struct udevice *dev)
struct mt7621_pinctrl_priv *priv = dev_get_priv(dev);
int ret = 0;
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
ret = mtmips_pinctrl_probe(&priv->mp, ARRAY_SIZE(mt7621_pmx_data),
mt7621_pmx_data);
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
return ret;
}
@@ -275,18 +275,18 @@ static int mt7621_pinctrl_of_to_plat(struct udevice *dev)
}
static const struct pinctrl_ops mt7621_pinctrl_ops = {
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
.get_groups_count = mt7621_get_groups_count,
.get_group_name = mt7621_get_group_name,
.get_functions_count = mtmips_get_functions_count,
.get_function_name = mtmips_get_function_name,
.pinmux_group_set = mtmips_pinmux_group_set,
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
-#if CONFIG_IS_ENABLED(PINCONF)
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(mt7621_conf_params),
.pinconf_params = mt7621_conf_params,
.pinconf_group_set = mt7621_pinconf_group_set,
-#endif /* CONFIG_IS_ENABLED(PINCONF) */
+#endif /* IS_ENABLED(CONFIG_PINCONF) */
.set_state = pinctrl_generic_set_state,
};
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
index 79c63c7caec..65aa4cc211c 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
@@ -88,7 +88,7 @@ struct mt7628_pinctrl_priv {
void __iomem *pcbase;
};
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
static const struct mtmips_pmx_func ephy4_1_pad_grp[] = {
FUNC("digital", 0xf),
FUNC("analog", 0),
@@ -377,9 +377,9 @@ static const char *mt7628_get_group_name(struct udevice *dev,
{
return mt7628_pinmux_data[selector].name;
}
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param mt7628_conf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
{ "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
@@ -527,10 +527,10 @@ static int mt7628_pinctrl_probe(struct udevice *dev)
struct mt7628_pinctrl_priv *priv = dev_get_priv(dev);
int ret = 0;
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
ret = mtmips_pinctrl_probe(&priv->mp, ARRAY_SIZE(mt7628_pinmux_data),
mt7628_pinmux_data);
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
return ret;
}
@@ -553,20 +553,20 @@ static int mt7628_pinctrl_of_to_plat(struct udevice *dev)
}
static const struct pinctrl_ops mt7628_pinctrl_ops = {
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
.get_groups_count = mt7628_get_groups_count,
.get_group_name = mt7628_get_group_name,
.get_functions_count = mtmips_get_functions_count,
.get_function_name = mtmips_get_function_name,
.pinmux_group_set = mtmips_pinmux_group_set,
-#endif /* CONFIG_IS_ENABLED(PINMUX) */
-#if CONFIG_IS_ENABLED(PINCONF)
+#endif /* IS_ENABLED(CONFIG_PINMUX) */
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(mt7628_conf_params),
.pinconf_params = mt7628_conf_params,
.get_pins_count = mt7628_get_pins_count,
.get_pin_name = mt7628_get_pin_name,
.pinconf_set = mt7628_pinconf_set,
-#endif /* CONFIG_IS_ENABLED(PINCONF) */
+#endif /* IS_ENABLED(CONFIG_PINCONF) */
.set_state = pinctrl_generic_set_state,
};
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 1ad8bfbd880..35f2adb75be 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1328,7 +1328,7 @@ static int npcm7xx_pinmux_set(struct udevice *dev,
return 0;
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
#define PIN_CONFIG_PERSIST_STATE (PIN_CONFIG_END + 1)
#define PIN_CONFIG_POLARITY_STATE (PIN_CONFIG_END + 2)
@@ -1604,7 +1604,7 @@ static struct pinctrl_ops npcm7xx_pinctrl_ops = {
.get_function_name = npcm7xx_get_function_name,
.pinmux_set = npcm7xx_pinmux_set,
.pinmux_group_set = npcm7xx_pinmux_set,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(npcm7xx_conf_params),
.pinconf_params = npcm7xx_conf_params,
.pinconf_set = npcm7xx_pinconf_set,
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
index 0ec47e9577e..999ee910ee0 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
@@ -733,7 +733,7 @@ static const char *npcm8xx_get_function_name(struct udevice *dev,
return npcm8xx_groups[selector].name;
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
#define PIN_CONFIG_PERSIST_STATE (PIN_CONFIG_END + 1)
#define PIN_CONFIG_POLARITY_STATE (PIN_CONFIG_END + 2)
#define PIN_CONFIG_EVENT_CLEAR (PIN_CONFIG_END + 3)
@@ -973,7 +973,7 @@ static struct pinctrl_ops npcm8xx_pinctrl_ops = {
.get_function_name = npcm8xx_get_function_name,
.pinmux_set = npcm8xx_pinmux_set,
.pinmux_group_set = npcm8xx_pinmux_group_set,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(npcm8xx_conf_params),
.pinconf_params = npcm8xx_conf_params,
.pinconf_set = npcm8xx_pinconf_set,
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index eb90e28d4b2..9beae7340e7 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -186,7 +186,7 @@ U_BOOT_DRIVER(fsl_imx23_pinctrl) = {
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(mxs_pinctrl_match),
.probe = mxs_pinctrl_probe,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.priv_auto = sizeof(struct mxs_pinctrl_priv),
diff --git a/drivers/pinctrl/pinctrl-generic.c b/drivers/pinctrl/pinctrl-generic.c
index 8909b57810a..8e5df55b0c5 100644
--- a/drivers/pinctrl/pinctrl-generic.c
+++ b/drivers/pinctrl/pinctrl-generic.c
@@ -70,7 +70,7 @@ static int pinctrl_group_name_to_selector(struct udevice *dev,
return -ENOSYS;
}
-#if CONFIG_IS_ENABLED(PINMUX)
+#if IS_ENABLED(CONFIG_PINMUX)
/**
* pinmux_func_name_to_selector() - return the function selector for a function
*
@@ -146,7 +146,7 @@ static int pinmux_enable_setting(struct udevice *dev, bool is_group,
}
#endif
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
/**
* pinconf_prop_name_to_param() - return parameter ID for a property name
*
diff --git a/drivers/pinctrl/pinctrl-qe-io.c b/drivers/pinctrl/pinctrl-qe-io.c
index dc0be7ce3bd..a73682d0de3 100644
--- a/drivers/pinctrl/pinctrl-qe-io.c
+++ b/drivers/pinctrl/pinctrl-qe-io.c
@@ -248,7 +248,7 @@ U_BOOT_DRIVER(par_io_pinctrl) = {
.of_to_plat = qe_io_of_to_plat,
.plat_auto = sizeof(struct qe_io_plat),
.ops = &par_io_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 509e2a80e9a..0c4bb9580f4 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -282,7 +282,7 @@ U_BOOT_DRIVER(stmfx_gpio) = {
.ops = &stmfx_gpio_ops,
};
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param stmfx_pinctrl_conf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
{ "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 0 },
@@ -432,7 +432,7 @@ const struct pinctrl_ops stmfx_pinctrl_ops = {
.get_pin_name = stmfx_pinctrl_get_pin_name,
.set_state = pinctrl_generic_set_state,
.get_pin_muxing = stmfx_pinctrl_get_pin_muxing,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_set = stmfx_pinctrl_conf_set,
.pinconf_num_params = ARRAY_SIZE(stmfx_pinctrl_conf_params),
.pinconf_params = stmfx_pinctrl_conf_params,
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 8837726cc16..e8c833fa2e0 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -147,10 +147,10 @@ static int pinconfig_post_bind(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(PINCTRL_FULL)
+#if IS_ENABLED(CONFIG_PINCTRL_FULL)
UCLASS_DRIVER(pinconfig) = {
.id = UCLASS_PINCONFIG,
-#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
+#if IS_ENABLED(CONFIG_PINCONF_RECURSIVE)
.post_bind = pinconfig_post_bind,
#endif
.name = "pinconfig",
@@ -306,7 +306,7 @@ int pinctrl_select_state(struct udevice *dev, const char *statename)
* Try full-implemented pinctrl first.
* If it fails or is not implemented, try simple one.
*/
- if (CONFIG_IS_ENABLED(PINCTRL_FULL))
+ if (IS_ENABLED(CONFIG_PINCTRL_FULL))
return pinctrl_select_state_full(dev, statename);
return pinctrl_select_state_simple(dev);
@@ -402,7 +402,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
* should be bound so that peripheral devices can easily search in
* parent devices during later DT-parsing.
*/
- if (CONFIG_IS_ENABLED(PINCTRL_FULL))
+ if (IS_ENABLED(CONFIG_PINCTRL_FULL))
return pinconfig_post_bind(dev);
return 0;
@@ -410,7 +410,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
UCLASS_DRIVER(pinctrl) = {
.id = UCLASS_PINCTRL,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = pinctrl_post_bind,
#endif
.flags = DM_UC_FLAG_SEQ_ALIAS,
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index b755fa42b4f..5f0dd167566 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -431,7 +431,7 @@ static int stm32_pinctrl_bind(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(PINCTRL_FULL)
+#if IS_ENABLED(CONFIG_PINCTRL_FULL)
static int stm32_pinctrl_set_state(struct udevice *dev, struct udevice *config)
{
return stm32_pinctrl_config(dev_ofnode(config));
@@ -472,7 +472,7 @@ static int stm32_pinctrl_set_state_simple(struct udevice *dev,
#endif /* PINCTRL_FULL */
static struct pinctrl_ops stm32_pinctrl_ops = {
-#if CONFIG_IS_ENABLED(PINCTRL_FULL)
+#if IS_ENABLED(CONFIG_PINCTRL_FULL)
.set_state = stm32_pinctrl_set_state,
#else /* PINCTRL_FULL */
.set_state_simple = stm32_pinctrl_set_state_simple,
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 490d34e56b8..facebca9ae4 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -647,7 +647,7 @@ static int sh_pfc_pinctrl_group_set(struct udevice *dev, unsigned group_selector
done:
return ret;
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param sh_pfc_pinconf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
{ "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
@@ -844,7 +844,7 @@ static struct pinctrl_ops sh_pfc_pinctrl_ops = {
.get_functions_count = sh_pfc_pinctrl_get_functions_count,
.get_function_name = sh_pfc_pinctrl_get_function_name,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(sh_pfc_pinconf_params),
.pinconf_params = sh_pfc_pinconf_params,
.pinconf_set = sh_pfc_pinconf_pin_set,
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index 2c35491b24d..7483f4e1540 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -354,7 +354,7 @@ U_BOOT_DRIVER(pinctrl_px30) = {
.of_match = px30_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index afcd34396e2..9a3953b9695 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -103,7 +103,7 @@ U_BOOT_DRIVER(pinctrl_rockchip) = {
.of_match = rk3036_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3066.c b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
index 598b63223e3..0f21538725b 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3066.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
@@ -104,7 +104,7 @@ U_BOOT_DRIVER(rockchip_rk3066a_pinctrl) = {
.id = UCLASS_PINCTRL,
.ops = &rockchip_pinctrl_ops,
.probe = rockchip_pinctrl_probe,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.of_match = rk3066_pinctrl_ids,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index 355c45eb7f8..190a44c83a4 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -196,7 +196,7 @@ U_BOOT_DRIVER(pinctrl_rk3128) = {
.of_match = rk3128_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 9a982cbfad9..c0026764ac0 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -126,7 +126,7 @@ U_BOOT_DRIVER(rockchip_rk3188_pinctrl) = {
.of_match = rk3188_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index 351406da2d4..2ed4badd43e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -283,7 +283,7 @@ U_BOOT_DRIVER(pinctrl_rk3228) = {
.of_match = rk3228_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index a976b7aeeb2..acd16b0dece 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -239,7 +239,7 @@ U_BOOT_DRIVER(rockchip_rk3288_pinctrl) = {
.of_match = rk3288_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index f9ac6347eaf..d9e425c4990 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -450,7 +450,7 @@ U_BOOT_DRIVER(pinctrl_rk3308) = {
.of_match = rk3308_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 65a75007677..c6435677a8f 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -314,7 +314,7 @@ U_BOOT_DRIVER(rockchip_rk3328_pinctrl) = {
.of_match = rk3328_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index ba867a89174..a49a356e942 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -177,7 +177,7 @@ U_BOOT_DRIVER(rockchip_rk3368_pinctrl) = {
.of_match = rk3368_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index ae785573baf..320990a6fb1 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -308,7 +308,7 @@ U_BOOT_DRIVER(pinctrl_rk3399) = {
.of_match = rk3399_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 5b70b503d2b..3dcd9e9efc3 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -291,7 +291,7 @@ U_BOOT_DRIVER(pinctrl_rv1108) = {
.of_match = rv1108_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1126.c b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
index eefb8b17768..b131b3d8a60 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1126.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
@@ -409,7 +409,7 @@ U_BOOT_DRIVER(pinctrl_rv1126) = {
.of_match = rv1126_pinctrl_ids,
.priv_auto = sizeof(struct rockchip_pinctrl_priv),
.ops = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if !IS_ENABLED(CONFIG_OF_PLATDATA)
.bind = dm_scan_fdt_dev,
#endif
.probe = rockchip_pinctrl_probe,
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index bdca3f2f715..d5ab66e90ee 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -143,7 +143,7 @@ static int uniphier_pinconf_input_enable(struct udevice *dev,
return uniphier_pinconf_input_enable_legacy(dev, pin, enable);
}
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
static const struct pinconf_param uniphier_pinconf_params[] = {
{ "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
@@ -333,7 +333,7 @@ static int uniphier_pinconf_group_set(struct udevice *dev,
return 0;
}
-#endif /* CONFIG_IS_ENABLED(PINCONF) */
+#endif /* IS_ENABLED(CONFIG_PINCONF) */
static void uniphier_pinmux_set_one(struct udevice *dev, unsigned pin,
int muxval)
@@ -410,7 +410,7 @@ const struct pinctrl_ops uniphier_pinctrl_ops = {
.get_functions_count = uniphier_pinmux_get_functions_count,
.get_function_name = uniphier_pinmux_get_function_name,
.pinmux_group_set = uniphier_pinmux_group_set,
-#if CONFIG_IS_ENABLED(PINCONF)
+#if IS_ENABLED(CONFIG_PINCONF)
.pinconf_num_params = ARRAY_SIZE(uniphier_pinconf_params),
.pinconf_params = uniphier_pinconf_params,
.pinconf_set = uniphier_pinconf_set,
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index 7ba2266092f..429042973b2 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -179,7 +179,7 @@ U_BOOT_DRIVER(uniphier_pro4_pinctrl) = {
.probe = uniphier_pro4_pinctrl_probe,
.priv_auto = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
index 9ce2e2c270e..bbcc52cf053 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
@@ -165,7 +165,7 @@ U_BOOT_DRIVER(uniphier_pro5_pinctrl) = {
.probe = uniphier_pro5_pinctrl_probe,
.priv_auto = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/power/axp305.c b/drivers/power/axp305.c
index 049ef07f746..2a2c0ca8276 100644
--- a/drivers/power/axp305.c
+++ b/drivers/power/axp305.c
@@ -69,7 +69,7 @@ int axp_init(void)
return ret;
}
-#if !CONFIG_IS_ENABLED(ARM_PSCI_FW) && !IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF)
+#if !IS_ENABLED(CONFIG_ARM_PSCI_FW) && !IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF)
int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP305_SHUTDOWN, AXP305_POWEROFF);
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index f6286c70c1d..a341a37cda7 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -126,7 +126,7 @@ int power_domain_off(struct power_domain *power_domain)
return ops->off ? ops->off(power_domain) : 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int dev_power_domain_ctrl(struct udevice *dev, bool on)
{
struct power_domain pd;
diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c
index 6d62f6cae40..f3c26cd9561 100644
--- a/drivers/power/exynos-tmu.c
+++ b/drivers/power/exynos-tmu.c
@@ -181,7 +181,7 @@ enum tmu_status_t tmu_monitor(int *temp)
*/
static int get_tmu_fdt_values(struct tmu_info *info, const void *blob)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
fdt_addr_t addr;
int node;
int error = 0;
diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c
index 0959445364e..6435ed20d8f 100644
--- a/drivers/power/palmas.c
+++ b/drivers/power/palmas.c
@@ -176,7 +176,7 @@ int twl603x_enable_bb_charge(u8 bb_fields)
return err;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
int palmas_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
struct udevice *dev;
diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c
index 3aa3cce945e..2642caf3f44 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -116,7 +116,7 @@ static int as3722_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+#if IS_ENABLED(CONFIG_PMIC_CHILDREN)
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "sd", .driver = "as3722_stepdown"},
{ .prefix = "ldo", .driver = "as3722_ldo"},
@@ -170,7 +170,7 @@ U_BOOT_DRIVER(pmic_as3722) = {
.name = "as3722_pmic",
.id = UCLASS_PMIC,
.of_match = as3722_ids,
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+#if IS_ENABLED(CONFIG_PMIC_CHILDREN)
.bind = as3722_bind,
#endif
.probe = as3722_probe,
diff --git a/drivers/power/pmic/axp.c b/drivers/power/pmic/axp.c
index 025dac24f28..6293a9aa7cb 100644
--- a/drivers/power/pmic/axp.c
+++ b/drivers/power/pmic/axp.c
@@ -7,7 +7,7 @@
#include <power/pmic.h>
#include <sysreset.h>
-#if CONFIG_IS_ENABLED(SYSRESET)
+#if IS_ENABLED(CONFIG_SYSRESET)
static int axp_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
int ret;
@@ -71,7 +71,7 @@ static int axp_pmic_bind(struct udevice *dev)
if (ofnode_valid(regulators_node))
pmic_bind_children(dev, regulators_node, axp_pmic_child_info);
- if (CONFIG_IS_ENABLED(SYSRESET)) {
+ if (IS_ENABLED(CONFIG_SYSRESET)) {
ret = device_bind_driver_to_node(dev, "axp_sysreset", "axp_sysreset",
dev_ofnode(dev), NULL);
if (ret)
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index fdbbd6f5593..ee447917446 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -63,7 +63,7 @@ static int bd71837_bind(struct udevice *dev)
debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
- if (CONFIG_IS_ENABLED(PMIC_CHILDREN)) {
+ if (IS_ENABLED(CONFIG_PMIC_CHILDREN)) {
children = pmic_bind_children(dev, regulators_node, pmic_children_info);
if (!children)
debug("%s: %s - no child found\n", __func__, dev->name);
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index a186edc08da..6b9befba18c 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -88,7 +88,7 @@ static int pca9450_probe(struct udevice *dev)
struct pca9450_priv *priv = dev_get_priv(dev);
int ret = 0;
- if (CONFIG_IS_ENABLED(DM_GPIO) && CONFIG_IS_ENABLED(DM_REGULATOR_PCA9450)) {
+ if (IS_ENABLED(CONFIG_DM_GPIO) && IS_ENABLED(CONFIG_DM_REGULATOR_PCA9450)) {
priv->sd_vsel_gpio = devm_gpiod_get_optional(dev, "sd-vsel",
GPIOD_IS_OUT |
GPIOD_IS_OUT_ACTIVE);
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 0e2f5e1f411..fa6fc2afb10 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -18,7 +18,7 @@
#include <power/pmic.h>
#include <linux/ctype.h>
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+#if IS_ENABLED(CONFIG_PMIC_CHILDREN)
int pmic_bind_children(struct udevice *pmic, ofnode parent,
const struct pmic_child_info *child_info)
{
diff --git a/drivers/power/pmic/pmic_tps62362.c b/drivers/power/pmic/pmic_tps62362.c
index 59190d6f672..16aedc022e9 100644
--- a/drivers/power/pmic/pmic_tps62362.c
+++ b/drivers/power/pmic/pmic_tps62362.c
@@ -10,7 +10,7 @@
#include <power/pmic.h>
#include <power/tps62362.h>
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *tps62362_dev __section(".data") = NULL;
#endif
@@ -26,7 +26,7 @@ int tps62362_voltage_update(unsigned char reg, unsigned char volt_sel)
if (reg > TPS62362_NUM_REGS)
return 1;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_write(TPS62362_I2C_ADDR, reg, 1, &volt_sel, 1);
#else
if (!tps62362_dev)
@@ -35,7 +35,7 @@ int tps62362_voltage_update(unsigned char reg, unsigned char volt_sel)
#endif
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int power_tps62362_init(unsigned char bus)
{
static const char name[] = "TPS62362";
diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c
index ccbf2235933..82e224a1d9f 100644
--- a/drivers/power/pmic/pmic_tps65217.c
+++ b/drivers/power/pmic/pmic_tps65217.c
@@ -12,7 +12,7 @@
#include <power/pmic.h>
#include <power/tps65217.h>
-#if !CONFIG_IS_ENABLED(DM_PMIC)
+#if !IS_ENABLED(CONFIG_DM_PMIC)
struct udevice *tps65217_dev __section(".data") = NULL;
/**
@@ -23,7 +23,7 @@ struct udevice *tps65217_dev __section(".data") = NULL;
*/
int tps65217_reg_read(uchar src_reg, uchar *src_val)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_read(TPS65217_CHIP_PM, src_reg, 1, src_val, 1);
#else
return dm_i2c_read(tps65217_dev, src_reg, src_val, 1);
@@ -57,7 +57,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
* mask
*/
if (mask != TPS65217_MASK_ALL_BITS) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_read(TPS65217_CHIP_PM, dest_reg, 1, &read_val, 1);
#else
ret = dm_i2c_read(tps65217_dev, dest_reg, &read_val, 1);
@@ -72,7 +72,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
if (prot_level > 0) {
xor_reg = dest_reg ^ TPS65217_PASSWORD_UNLOCK;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(TPS65217_CHIP_PM, TPS65217_PASSWORD, 1,
&xor_reg, 1);
#else
@@ -82,7 +82,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
if (ret)
return ret;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(TPS65217_CHIP_PM, dest_reg, 1, &dest_val, 1);
#else
ret = dm_i2c_write(tps65217_dev, dest_reg, &dest_val, 1);
@@ -91,7 +91,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
return ret;
if (prot_level == TPS65217_PROT_LEVEL_2) {
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(TPS65217_CHIP_PM, TPS65217_PASSWORD, 1,
&xor_reg, 1);
#else
@@ -101,7 +101,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
if (ret)
return ret;
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_write(TPS65217_CHIP_PM, dest_reg, 1, &dest_val, 1);
#else
ret = dm_i2c_write(tps65217_dev, dest_reg, &dest_val, 1);
@@ -142,7 +142,7 @@ int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
int power_tps65217_init(unsigned char bus)
{
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev = NULL;
int rc;
@@ -153,7 +153,7 @@ int power_tps65217_init(unsigned char bus)
#endif
return 0;
}
-#else /* CONFIG_IS_ENABLED(DM_PMIC) */
+#else /* IS_ENABLED(CONFIG_DM_PMIC) */
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = "tps65217_ldo" },
{ },
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
index 67174901804..e63ef0e4180 100644
--- a/drivers/power/pmic/pmic_tps65218.c
+++ b/drivers/power/pmic/pmic_tps65218.c
@@ -10,7 +10,7 @@
#include <power/pmic.h>
#include <power/tps65218.h>
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int tps65218_reg_read(uchar dest_reg, uchar *dest_val)
{
uchar read_val;
@@ -225,7 +225,7 @@ int tps65218_lock_fseal(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
int power_tps65218_init(unsigned char bus)
{
static const char name[] = "TPS65218_PMIC";
diff --git a/drivers/power/pmic/pmic_tps65910.c b/drivers/power/pmic/pmic_tps65910.c
index e3de7308215..48b826b9833 100644
--- a/drivers/power/pmic/pmic_tps65910.c
+++ b/drivers/power/pmic/pmic_tps65910.c
@@ -12,7 +12,7 @@ struct udevice *tps65910_dev __section(".data") = NULL;
static inline int tps65910_read_reg(int addr, uchar *buf)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_read(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1);
#else
int rc;
@@ -27,7 +27,7 @@ static inline int tps65910_read_reg(int addr, uchar *buf)
static inline int tps65910_write_reg(int addr, uchar *buf)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_write(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1);
#else
return dm_i2c_reg_write(tps65910_dev, addr, *buf);
@@ -36,7 +36,7 @@ static inline int tps65910_write_reg(int addr, uchar *buf)
int power_tps65910_init(unsigned char bus)
{
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev = NULL;
int rc;
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 25ef621f8df..2710b1ca31d 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -129,7 +129,7 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
return 0;
}
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+#if IS_ENABLED(CONFIG_PMIC_CHILDREN)
static int rk8xx_bind(struct udevice *dev)
{
ofnode regulators_node;
@@ -144,7 +144,7 @@ static int rk8xx_bind(struct udevice *dev)
debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
- if (CONFIG_IS_ENABLED(SYSRESET)) {
+ if (IS_ENABLED(CONFIG_SYSRESET)) {
ret = device_bind_driver_to_node(dev, "rk8xx_sysreset",
"rk8xx_sysreset",
dev_ofnode(dev), NULL);
@@ -243,7 +243,7 @@ static int rk8xx_probe(struct udevice *dev)
pmic_reg_read(dev, on_source),
pmic_reg_read(dev, off_source));
printf("\n");
- if (CONFIG_IS_ENABLED(ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON))
+ if (IS_ENABLED(CONFIG_ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON))
rk8xx_off_for_plugin(dev);
return 0;
@@ -269,7 +269,7 @@ U_BOOT_DRIVER(rockchip_rk805) = {
.name = "rockchip_rk805",
.id = UCLASS_PMIC,
.of_match = rk8xx_ids,
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+#if IS_ENABLED(CONFIG_PMIC_CHILDREN)
.bind = rk8xx_bind,
#endif
.priv_auto = sizeof(struct rk8xx_priv),
diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c
index 2c85410b1bf..a5243697d08 100644
--- a/drivers/power/pmic/stpmic1.c
+++ b/drivers/power/pmic/stpmic1.c
@@ -29,7 +29,7 @@ enum pmic_nvm_op {
NVM_WRITE,
};
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
static const struct pmic_child_info stpmic1_children_info[] = {
{ .prefix = "ldo", .driver = "stpmic1_ldo" },
{ .prefix = "buck", .driver = "stpmic1_buck" },
@@ -73,7 +73,7 @@ static int stpmic1_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
static int stpmic1_bind(struct udevice *dev)
{
int ret;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ofnode regulators_node;
int children;
@@ -97,7 +97,7 @@ static int stpmic1_bind(struct udevice *dev)
return ret;
}
- if (CONFIG_IS_ENABLED(SYSRESET))
+ if (IS_ENABLED(CONFIG_SYSRESET))
return device_bind_driver(dev, "stpmic1-sysreset",
"stpmic1-sysreset", NULL);
diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index b67ac2f027b..28ef4cc6e74 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -23,7 +23,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
if (check_reg(p, reg))
return -EINVAL;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
@@ -67,7 +67,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
return -EINVAL;
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
return dm_i2c_write(dev, reg, buf, pmic_i2c_tx_num);
#else
return i2c_write(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num);
@@ -83,7 +83,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
if (check_reg(p, reg))
return -EINVAL;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(p->bus, pmic_i2c_addr,
@@ -131,7 +131,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
int pmic_probe(struct pmic *p)
{
debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name);
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
struct udevice *dev;
int ret;
diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index d3e8949af99..d0b441c0ef3 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -182,7 +182,7 @@ int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
#endif
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
struct udevice *dev;
diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c
index 2b50a56faf8..edf0a204704 100644
--- a/drivers/power/twl6030.c
+++ b/drivers/power/twl6030.c
@@ -270,7 +270,7 @@ void twl6030_usb_device_settings()
twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_MISC2, value);
}
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
struct udevice *dev;
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 4453c247b29..71ca67b108b 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -880,7 +880,7 @@ static int am654_ddrss_power_on(struct am654_ddrss_desc *ddrss)
}
/* VTT enable */
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
device_get_supply_regulator(ddrss->dev, "vtt-supply",
&ddrss->vtt_supply);
ret = regulator_set_value(ddrss->vtt_supply, 3300000);
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index dd5b1917445..af3d61f5641 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -36,7 +36,7 @@ struct dram_info {
};
struct rk3368_sdram_params {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3368_dmc of_plat;
#endif
struct rk3288_sdram_pctl_timing pctl_timing;
@@ -883,7 +883,7 @@ static int rk3368_dmc_of_to_plat(struct udevice *dev)
{
int ret = 0;
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rk3368_sdram_params *plat = dev_get_plat(dev);
ret = regmap_init_mem(dev_ofnode(dev), &plat->map);
@@ -894,7 +894,7 @@ static int rk3368_dmc_of_to_plat(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rk3368_sdram_params *plat = dev_get_plat(dev);
@@ -922,7 +922,7 @@ static int rk3368_dmc_probe(struct udevice *dev)
#endif
struct dram_info *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = conv_of_plat(dev);
if (ret)
return ret;
diff --git a/drivers/ram/rockchip/sdram_rk3066.c b/drivers/ram/rockchip/sdram_rk3066.c
index a2425f22e2c..82bc483495a 100644
--- a/drivers/ram/rockchip/sdram_rk3066.c
+++ b/drivers/ram/rockchip/sdram_rk3066.c
@@ -46,7 +46,7 @@ struct rk3066_dmc_dram_info {
};
struct rk3066_dmc_sdram_params {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3066_dmc of_plat;
#endif
struct rk3288_sdram_channel ch[2];
@@ -789,7 +789,7 @@ static int rk3066_dmc_setup_sdram(struct udevice *dev)
static int rk3066_dmc_conv_of_plat(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rk3066_dmc_sdram_params *plat = dev_get_plat(dev);
struct dtd_rockchip_rk3066_dmc *of_plat = &plat->of_plat;
int ret;
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 272b1b2dce1..707c8d16af3 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -45,7 +45,7 @@ struct dram_info {
};
struct rk3188_sdram_params {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3188_dmc of_plat;
#endif
struct rk3288_sdram_channel ch[2];
@@ -819,7 +819,7 @@ static int rk3188_dmc_of_to_plat(struct udevice *dev)
struct rk3188_sdram_params *params = dev_get_plat(dev);
int ret;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
/* rk3188 supports only one-channel */
@@ -853,7 +853,7 @@ static int rk3188_dmc_of_to_plat(struct udevice *dev)
}
#endif /* CONFIG_SPL_BUILD */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rk3188_sdram_params *plat = dev_get_plat(dev);
@@ -889,7 +889,7 @@ static int rk3188_dmc_probe(struct udevice *dev)
priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
#ifdef CONFIG_SPL_BUILD
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = conv_of_plat(dev);
if (ret)
return ret;
diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
index 1b204fb56e6..a9bc35b560a 100644
--- a/drivers/ram/rockchip/sdram_rk322x.c
+++ b/drivers/ram/rockchip/sdram_rk322x.c
@@ -40,7 +40,7 @@ struct dram_info {
};
struct rk322x_sdram_params {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3228_dmc of_plat;
#endif
struct rk322x_sdram_channel ch[1];
@@ -721,7 +721,7 @@ static int rk322x_dmc_of_to_plat(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
params->num_channels = 1;
@@ -755,7 +755,7 @@ static int rk322x_dmc_of_to_plat(struct udevice *dev)
}
#endif /* CONFIG_TPL_BUILD */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rk322x_sdram_params *plat = dev_get_plat(dev);
@@ -789,7 +789,7 @@ static int rk322x_dmc_probe(struct udevice *dev)
priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
#ifdef CONFIG_TPL_BUILD
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = conv_of_plat(dev);
if (ret)
return ret;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 83778ad1c2c..feae8641b9e 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -48,7 +48,7 @@ struct dram_info {
};
struct rk3288_sdram_params {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3288_dmc of_plat;
#endif
struct rk3288_sdram_channel ch[2];
@@ -976,7 +976,7 @@ static int rk3288_dmc_of_to_plat(struct udevice *dev)
struct rk3288_sdram_params *params = dev_get_plat(dev);
int ret;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
/* Rk3288 supports dual-channel, set default channel num to 2 */
@@ -1015,7 +1015,7 @@ static int rk3288_dmc_of_to_plat(struct udevice *dev)
}
#endif /* CONFIG_SPL_BUILD */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rk3288_sdram_params *plat = dev_get_plat(dev);
@@ -1052,7 +1052,7 @@ static int rk3288_dmc_probe(struct udevice *dev)
priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
#if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = conv_of_plat(dev);
if (ret)
return ret;
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 184c93f7763..796f0482663 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -39,7 +39,7 @@ struct dram_info {
struct rk3328_sdram_channel sdram_ch;
struct rockchip_dmc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3328_dmc dtplat;
#else
struct rk3328_sdram_params sdram_params;
@@ -47,7 +47,7 @@ struct rockchip_dmc_plat {
struct regmap *map;
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
@@ -517,7 +517,7 @@ static int rk3328_dmc_init(struct udevice *dev)
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
int ret;
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct rk3328_sdram_params *params = &plat->sdram_params;
#else
struct dtd_rockchip_rk3328_dmc *dtplat = &plat->dtplat;
@@ -549,7 +549,7 @@ static int rk3328_dmc_init(struct udevice *dev)
static int rk3328_dmc_of_to_plat(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
int ret;
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index b1fea04e84a..09f30e11622 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -97,7 +97,7 @@ struct sdram_rk3399_ops {
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
struct rockchip_dmc_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3399_dmc dtplat;
#else
struct rk3399_sdram_params sdram_params;
@@ -3023,7 +3023,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
int ret;
- if (!CONFIG_IS_ENABLED(OF_REAL))
+ if (!IS_ENABLED(CONFIG_OF_REAL))
return 0;
ret = dev_read_u32_array(dev, "rockchip,sdram-params",
@@ -3041,7 +3041,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
@@ -3076,7 +3076,7 @@ static int rk3399_dmc_init(struct udevice *dev)
struct dram_info *priv = dev_get_priv(dev);
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
int ret;
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct rk3399_sdram_params *params = &plat->sdram_params;
#else
struct dtd_rockchip_rk3399_dmc *dtplat = &plat->dtplat;
@@ -3113,7 +3113,7 @@ static int rk3399_dmc_init(struct udevice *dev)
debug("cru %p, cic %p, grf %p, sgrf %p, pmucru %p, pmu %p\n", priv->cru,
priv->cic, priv->pmugrf, priv->pmusgrf, priv->pmucru, priv->pmu);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = clk_get_by_phandle(dev, dtplat->clocks, &priv->ddr_clk);
#else
ret = clk_get_by_index(dev, 0, &priv->ddr_clk);
diff --git a/drivers/reboot-mode/reboot-mode-gpio.c b/drivers/reboot-mode/reboot-mode-gpio.c
index 305174736ed..71b3acae97f 100644
--- a/drivers/reboot-mode/reboot-mode-gpio.c
+++ b/drivers/reboot-mode/reboot-mode-gpio.c
@@ -45,7 +45,7 @@ static int reboot_mode_probe(struct udevice *dev)
int ret;
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
ret = gpio_get_list_count(dev, "gpios");
if (ret < 0)
return ret;
@@ -61,7 +61,7 @@ static int reboot_mode_probe(struct udevice *dev)
if (!plat_data->gpio_desc)
return -ENOMEM;
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
ret = gpio_request_list_by_name(dev, "gpios", plat_data->gpio_desc,
plat_data->gpio_count, GPIOD_IS_IN);
if (ret < 0)
@@ -104,7 +104,7 @@ static int reboot_mode_remove(struct udevice *dev)
return gpio_free_list(dev, plat_data->gpio_desc, plat_data->gpio_count);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id reboot_mode_ids[] = {
{ .compatible = "reboot-mode-gpio", 0 },
{ }
@@ -120,7 +120,7 @@ U_BOOT_DRIVER(reboot_mode_gpio) = {
.id = UCLASS_REBOOT_MODE,
.probe = reboot_mode_probe,
.remove = reboot_mode_remove,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = reboot_mode_ids,
#endif
.plat_auto = sizeof(struct reboot_mode_gpio_platdata),
diff --git a/drivers/reboot-mode/reboot-mode-rtc.c b/drivers/reboot-mode/reboot-mode-rtc.c
index 972d0cdbcb5..8f5b74ed7f0 100644
--- a/drivers/reboot-mode/reboot-mode-rtc.c
+++ b/drivers/reboot-mode/reboot-mode-rtc.c
@@ -67,7 +67,7 @@ static int reboot_mode_set(struct udevice *dev, u32 buf)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int reboot_mode_ofdata_to_platdata(struct udevice *dev)
{
struct ofnode_phandle_args phandle_args;
@@ -118,7 +118,7 @@ static const struct reboot_mode_ops reboot_mode_rtc_ops = {
U_BOOT_DRIVER(reboot_mode_rtc) = {
.name = "reboot-mode-rtc",
.id = UCLASS_REBOOT_MODE,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = reboot_mode_ids,
.of_to_plat = reboot_mode_ofdata_to_platdata,
#endif
diff --git a/drivers/reboot-mode/reboot-mode-uclass.c b/drivers/reboot-mode/reboot-mode-uclass.c
index 2b38aa26b85..bac932ae0fd 100644
--- a/drivers/reboot-mode/reboot-mode-uclass.c
+++ b/drivers/reboot-mode/reboot-mode-uclass.c
@@ -63,7 +63,7 @@ int dm_reboot_mode_pre_probe(struct udevice *dev)
if (!plat_data)
return -EINVAL;
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
const char *mode_prefix = "mode-";
const int mode_prefix_len = strlen(mode_prefix);
struct ofprop property;
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index 50bcc9030e9..92bdda5548e 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -132,7 +132,7 @@ static int rproc_pre_probe(struct udevice *dev)
/* See if we need to populate via fdt */
if (!dev_get_plat(dev)) {
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
bool tmp;
debug("'%s': using fdt\n", dev->name);
uc_pdata->name = dev_read_string(dev, "remoteproc-name");
diff --git a/drivers/reset/reset-at91.c b/drivers/reset/reset-at91.c
index 165c87acdc4..f598e4d5866 100644
--- a/drivers/reset/reset-at91.c
+++ b/drivers/reset/reset-at91.c
@@ -107,7 +107,7 @@ static int at91_reset_bind(struct udevice *dev)
{
struct udevice *at91_sysreset;
- if (CONFIG_IS_ENABLED(SYSRESET_AT91))
+ if (IS_ENABLED(CONFIG_SYSRESET_AT91))
return device_bind_driver_to_node(dev, "at91_sysreset",
"at91_sysreset",
dev_ofnode(dev),
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 6e3f03e2484..7af7089089f 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -47,7 +47,7 @@ struct socfpga_reset_data {
*/
static bool socfpga_reset_keep_enabled(void)
{
-#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
+#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_ENV_SUPPORT)
const char *env_str;
long val;
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index 2c780ab8edf..e8863281e88 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -63,7 +63,7 @@
#define RTC_STAT_BIT_OSF 0x80 /* Oscillator stop flag */
-#if !CONFIG_IS_ENABLED(DM_RTC)
+#if !IS_ENABLED(CONFIG_DM_RTC)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index bd32ed2dbf9..694b198f49c 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -55,7 +55,7 @@
#define RTC_STAT_BIT_EN32KHZ 0x8 /* Enable 32KHz Output */
-#if !CONFIG_IS_ENABLED(DM_RTC)
+#if !IS_ENABLED(CONFIG_DM_RTC)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index 91a412440b8..870c8545efa 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -17,7 +17,7 @@
#include <rtc.h>
#include <i2c.h>
-#if !CONFIG_IS_ENABLED(DM_RTC)
+#if !IS_ENABLED(CONFIG_DM_RTC)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c
index e0a7bd3662f..da13af3407a 100644
--- a/drivers/rtc/pt7c4338.c
+++ b/drivers/rtc/pt7c4338.c
@@ -49,7 +49,7 @@
#define RTC_PT7C4338_RESET_VAL \
(RTC_CTL_STAT_BIT_RS0 | RTC_CTL_STAT_BIT_RS1 | RTC_CTL_STAT_BIT_OUT)
-#if !CONFIG_IS_ENABLED(DM_RTC)
+#if !IS_ENABLED(CONFIG_DM_RTC)
/****** Helper functions ****************************************/
static u8 rtc_read(u8 reg)
{
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index e5ae6ea4d5f..8053b388e58 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -177,7 +177,7 @@ UCLASS_DRIVER(rtc) = {
.name = "rtc",
.id = UCLASS_RTC,
.flags = DM_UC_FLAG_SEQ_ALIAS,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/rtc/sandbox_rtc.c b/drivers/rtc/sandbox_rtc.c
index 657e5c7be2c..c57bd63c689 100644
--- a/drivers/rtc/sandbox_rtc.c
+++ b/drivers/rtc/sandbox_rtc.c
@@ -68,7 +68,7 @@ static int sandbox_rtc_write8(struct udevice *dev, unsigned int reg, int val)
return dm_i2c_reg_write(dev, reg, val);
}
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
static int sandbox_rtc_get_name(const struct udevice *dev, char *out_name)
{
return acpi_copy_name(out_name, "RTCC");
@@ -81,7 +81,7 @@ struct acpi_ops sandbox_rtc_acpi_ops = {
static int sandbox_rtc_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(PLATDATA)
+#if IS_ENABLED(CONFIG_PLATDATA)
struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev);
/* Set up the emul_idx for i2c_emul_find() */
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 9853f49c94f..6327a590a69 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -18,7 +18,7 @@
#include <linux/delay.h>
#include <asm/io.h>
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
#include <asm/arch/atmel_serial.h>
#endif
#include <asm/arch/clk.h>
@@ -28,7 +28,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
static void atmel_serial_setbrg_internal(atmel_usart3_t *usart, int id,
int baudrate)
{
@@ -264,7 +264,7 @@ static int atmel_serial_probe(struct udevice *dev)
struct atmel_serial_plat *plat = dev_get_plat(dev);
struct atmel_serial_priv *priv = dev_get_priv(dev);
int ret;
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
fdt_addr_t addr_base;
addr_base = dev_read_addr(dev);
@@ -284,7 +284,7 @@ static int atmel_serial_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id atmel_serial_ids[] = {
{
.compatible = "atmel,at91sam9260-dbgu",
@@ -301,13 +301,13 @@ static const struct udevice_id atmel_serial_ids[] = {
U_BOOT_DRIVER(serial_atmel) = {
.name = "serial_atmel",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = atmel_serial_ids,
.plat_auto = sizeof(struct atmel_serial_plat),
#endif
.probe = atmel_serial_probe,
.ops = &atmel_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
.priv_auto = sizeof(struct atmel_serial_priv),
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index eab9537fbae..ab96cebd4ea 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define UART_MCRVAL (UART_MCR_DTR | \
UART_MCR_RTS) /* RTS/DTR */
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
#define serial_out(x, y) outb(x, (ulong)y)
#define serial_in(y) inb((ulong)y)
@@ -90,7 +90,7 @@ static inline int serial_in_shift(void *addr, int shift)
#endif
}
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
#ifndef CFG_SYS_NS16550_CLK
#define CFG_SYS_NS16550_CLK 0
@@ -272,7 +272,7 @@ void ns16550_init(struct ns16550 *com_port, int baud_divisor)
#endif
}
-#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS)
+#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS)
void ns16550_reinit(struct ns16550 *com_port, int baud_divisor)
{
serial_out(CFG_SYS_NS16550_IER, &com_port->ier);
@@ -281,7 +281,7 @@ void ns16550_reinit(struct ns16550 *com_port, int baud_divisor)
serial_out(ns16550_getfcr(com_port), &com_port->fcr);
ns16550_setbrg(com_port, baud_divisor);
}
-#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */
+#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */
void ns16550_putc(struct ns16550 *com_port, char c)
{
@@ -299,7 +299,7 @@ void ns16550_putc(struct ns16550 *com_port, char c)
schedule();
}
-#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS)
+#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS)
char ns16550_getc(struct ns16550 *com_port)
{
while ((serial_in(&com_port->lsr) & UART_LSR_DR) == 0) {
@@ -317,7 +317,7 @@ int ns16550_tstc(struct ns16550 *com_port)
return (serial_in(&com_port->lsr) & UART_LSR_DR) != 0;
}
-#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */
+#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */
#ifdef CONFIG_DEBUG_UART_NS16550
@@ -379,7 +379,7 @@ DEBUG_UART_FUNCS
#endif
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
static int ns16550_serial_putc(struct udevice *dev, const char ch)
{
struct ns16550 *const com_port = dev_get_priv(dev);
@@ -530,14 +530,14 @@ int ns16550_serial_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
enum {
PORT_NS16550 = 0,
PORT_JZ4780,
};
#endif
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
int ns16550_serial_of_to_plat(struct udevice *dev)
{
struct ns16550_plat *plat = dev_get_plat(dev);
@@ -592,7 +592,7 @@ const struct dm_serial_ops ns16550_serial_ops = {
.getinfo = ns16550_serial_getinfo,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/*
* Please consider existing compatible strings before adding a new
* one to keep this table compact. Or you may add a generic "ns16550"
@@ -608,14 +608,14 @@ static const struct udevice_id ns16550_serial_ids[] = {
};
#endif /* OF_REAL */
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
/* TODO(sjg at chromium.org): Integrate this into a macro like CONFIG_IS_ENABLED */
#if !defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_DM_SERIAL)
U_BOOT_DRIVER(ns16550_serial) = {
.name = "ns16550_serial",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = ns16550_serial_ids,
.of_to_plat = ns16550_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_plat),
@@ -623,7 +623,7 @@ U_BOOT_DRIVER(ns16550_serial) = {
.priv_auto = sizeof(struct ns16550),
.probe = ns16550_serial_probe,
.ops = &ns16550_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index f4003811ee7..9311c24aa85 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -85,7 +85,7 @@ static void sandbox_print_color(struct udevice *dev)
struct sandbox_serial_plat *plat = dev_get_plat(dev);
/* With of-platdata we don't real the colour correctly, so disable it */
- if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line &&
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA) && priv->start_of_line &&
plat->colour != -1) {
priv->start_of_line = false;
output_ansi_colour(plat->colour);
@@ -236,7 +236,7 @@ static int sandbox_serial_of_to_plat(struct udevice *dev)
const char *colour;
int i;
- if (CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA))
return 0;
plat->colour = -1;
colour = dev_read_string(dev, "sandbox,text-colour");
@@ -280,7 +280,7 @@ U_BOOT_DRIVER(sandbox_serial) = {
.flags = DM_FLAG_PRE_RELOC,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct sandbox_serial_plat platdata_non_fdt = {
.colour = -1,
};
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 77d3f373721..87d632490aa 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
*/
static const unsigned long baudrate_table[] = CFG_SYS_BAUDRATE_TABLE;
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
static int serial_check_stdout(const void *blob, struct udevice **devp)
{
int node = -1;
@@ -82,13 +82,13 @@ static void serial_find_console_or_panic(void)
int ret;
#endif
- if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (IS_ENABLED(CONFIG_OF_PLATDATA)) {
uclass_first_device(UCLASS_SERIAL, &dev);
if (dev) {
gd->cur_serial_dev = dev;
return;
}
- } else if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
+ } else if (IS_ENABLED(CONFIG_OF_CONTROL) && blob) {
/* Live tree has support for stdout */
if (of_live_active()) {
struct device_node *np = of_get_stdout();
@@ -105,7 +105,7 @@ static void serial_find_console_or_panic(void)
}
}
}
- if (!IS_ENABLED(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(OF_CONTROL) ||
+ if (!IS_ENABLED(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_OF_CONTROL) ||
!blob) {
/*
* Try to use CONFIG_CONS_INDEX if available (it is numbered
@@ -161,7 +161,7 @@ static void serial_find_console_or_panic(void)
/* Called prior to relocation */
int serial_init(void)
{
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
serial_find_console_or_panic();
gd->flags |= GD_FLG_SERIAL_READY;
serial_setbrg();
@@ -218,7 +218,7 @@ static void _serial_puts(struct udevice *dev, const char *str)
{
struct dm_serial_ops *ops = serial_get_ops(dev);
- if (!CONFIG_IS_ENABLED(SERIAL_PUTS) || !ops->puts) {
+ if (!IS_ENABLED(CONFIG_SERIAL_PUTS) || !ops->puts) {
while (*str)
_serial_putc(dev, *str++);
return;
@@ -274,7 +274,7 @@ static int __serial_tstc(struct udevice *dev)
return 1;
}
-#if CONFIG_IS_ENABLED(SERIAL_RX_BUFFER)
+#if IS_ENABLED(CONFIG_SERIAL_RX_BUFFER)
static int _serial_tstc(struct udevice *dev)
{
struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
@@ -302,7 +302,7 @@ static int _serial_getc(struct udevice *dev)
return val;
}
-#else /* CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) */
+#else /* IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) */
static int _serial_getc(struct udevice *dev)
{
@@ -313,7 +313,7 @@ static int _serial_tstc(struct udevice *dev)
{
return __serial_tstc(dev);
}
-#endif /* CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) */
+#endif /* IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) */
void serial_putc(char ch)
{
@@ -407,9 +407,9 @@ void serial_stdio_init(void)
{
}
-#if CONFIG_IS_ENABLED(DM_STDIO)
+#if IS_ENABLED(CONFIG_DM_STDIO)
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
{
_serial_putc(sdev->priv, ch);
@@ -501,11 +501,11 @@ static int on_baudrate(const char *name, const char *value, enum env_op op,
}
U_BOOT_ENV_CALLBACK(baudrate, on_baudrate);
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
static int serial_post_probe(struct udevice *dev)
{
struct dm_serial_ops *ops = serial_get_ops(dev);
-#if CONFIG_IS_ENABLED(DM_STDIO)
+#if IS_ENABLED(CONFIG_DM_STDIO)
struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
struct stdio_dev sdev;
#endif
@@ -540,7 +540,7 @@ static int serial_post_probe(struct udevice *dev)
return ret;
}
-#if CONFIG_IS_ENABLED(DM_STDIO)
+#if IS_ENABLED(CONFIG_DM_STDIO)
if (!(gd->flags & GD_FLG_RELOC))
return 0;
memset(&sdev, '\0', sizeof(sdev));
@@ -554,7 +554,7 @@ static int serial_post_probe(struct udevice *dev)
sdev.getc = serial_stub_getc;
sdev.tstc = serial_stub_tstc;
-#if CONFIG_IS_ENABLED(SERIAL_RX_BUFFER)
+#if IS_ENABLED(CONFIG_SERIAL_RX_BUFFER)
/* Allocate the RX buffer */
upriv->buf = malloc(CONFIG_SERIAL_RX_BUFFER_SIZE);
#endif
@@ -566,7 +566,7 @@ static int serial_post_probe(struct udevice *dev)
static int serial_pre_remove(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+#if IS_ENABLED(CONFIG_SYS_STDIO_DEREGISTER)
struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
if (stdio_deregister_dev(upriv->sdev, true))
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 7585f790d22..6c9423ea63b 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -128,7 +128,7 @@ static const struct dm_serial_ops bcm283x_mu_serial_ops = {
.setbrg = bcm283x_mu_serial_setbrg,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id bcm283x_mu_serial_id[] = {
{.compatible = "brcm,bcm2835-aux-uart"},
{}
@@ -197,7 +197,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = {
.plat_auto = sizeof(struct bcm283x_mu_serial_plat),
.probe = bcm283x_mu_serial_probe,
.ops = &bcm283x_mu_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD)
+#if !IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD)
.flags = DM_FLAG_PRE_RELOC,
#endif
.priv_auto = sizeof(struct bcm283x_mu_priv),
diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c
index 09a9868a38f..0314c9aeaf1 100644
--- a/drivers/serial/serial_bcm283x_pl011.c
+++ b/drivers/serial/serial_bcm283x_pl011.c
@@ -94,7 +94,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = {
.probe = bcm283x_pl011_serial_probe,
.plat_auto = sizeof(struct pl01x_serial_plat),
.ops = &bcm283x_pl011_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD)
+#if !IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD)
.flags = DM_FLAG_PRE_RELOC,
#endif
.priv_auto = sizeof(struct pl01x_priv),
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 51e66abdbc1..1da5f3aa173 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -108,7 +108,7 @@ u32 __weak get_lpuart_clk(void)
return get_board_sys_clk();
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk)
{
struct clk per_clk;
@@ -150,7 +150,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev,
u16 sbr;
int ret;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
@@ -240,7 +240,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
u32 clk;
int ret;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
@@ -309,7 +309,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev,
u32 sbr;
int ret;
- if (CONFIG_IS_ENABLED(CLK)) {
+ if (IS_ENABLED(CONFIG_CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
@@ -478,7 +478,7 @@ static int lpuart_serial_pending(struct udevice *dev, bool input)
static int lpuart_serial_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk per_clk;
int ret;
diff --git a/drivers/serial/serial_mt7620.c b/drivers/serial/serial_mt7620.c
index b00e2f2c366..903ba2dd6ac 100644
--- a/drivers/serial/serial_mt7620.c
+++ b/drivers/serial/serial_mt7620.c
@@ -20,7 +20,7 @@
#include <dm/device_compat.h>
#include <linux/err.h>
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
#include <dt-structs.h>
#endif
@@ -63,7 +63,7 @@ struct mt7620_serial_regs {
UART_FCR_TXSR)
struct mt7620_serial_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_serial_mt7620 dtplat;
#endif
@@ -131,7 +131,7 @@ static int mt7620_serial_probe(struct udevice *dev)
{
struct mt7620_serial_plat *plat = dev_get_plat(dev);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
plat->regs = (void __iomem *)KSEG1ADDR(plat->dtplat.reg[0]);
plat->clock = plat->dtplat.clock_frequency;
#endif
@@ -145,7 +145,7 @@ static int mt7620_serial_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int mt7620_serial_of_to_plat(struct udevice *dev)
{
struct mt7620_serial_plat *plat = dev_get_plat(dev);
@@ -200,7 +200,7 @@ static const struct dm_serial_ops mt7620_serial_ops = {
U_BOOT_DRIVER(serial_mt7620) = {
.name = "serial_mt7620",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = mt7620_serial_ids,
.of_to_plat = mt7620_serial_of_to_plat,
#endif
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index ded7346a13f..a9d1b8280ef 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -173,7 +173,7 @@ static int _mtk_serial_pending(struct mtk_serial_priv *priv, bool input)
return (readl(&priv->regs->lsr) & UART_LSR_THRE) ? 0 : 1;
}
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
static int mtk_serial_setbrg(struct udevice *dev, int baudrate)
{
struct mtk_serial_priv *priv = dev_get_priv(dev);
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 8bcbbf2bbfc..7825c89f3b6 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -192,7 +192,7 @@ static void _mxc_serial_setbrg(struct mxc_uart *base, unsigned long clk,
writel(UCR1_UARTEN, &base->cr1);
}
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#ifndef CFG_MXC_UART_BASE
#error "define CFG_MXC_UART_BASE to use the MXC UART driver"
@@ -274,7 +274,7 @@ __weak struct serial_device *default_serial_console(void)
}
#endif
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
int mxc_serial_setbrg(struct udevice *dev, int baudrate)
{
@@ -338,7 +338,7 @@ static const struct dm_serial_ops mxc_serial_ops = {
.setbrg = mxc_serial_setbrg,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int mxc_serial_of_to_plat(struct udevice *dev)
{
struct mxc_serial_plat *plat = dev_get_plat(dev);
@@ -369,7 +369,7 @@ static const struct udevice_id mxc_serial_ids[] = {
U_BOOT_DRIVER(serial_mxc) = {
.name = "serial_mxc",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = mxc_serial_ids,
.of_to_plat = mxc_serial_of_to_plat,
.plat_auto = sizeof(struct mxc_serial_plat),
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 4014f682040..c955c997eb2 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -11,7 +11,7 @@
#include <asm/global_data.h>
#include <linux/compiler.h>
-#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS)
+#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS)
DECLARE_GLOBAL_DATA_PTR;
@@ -251,4 +251,4 @@ void ns16550_serial_initialize(void)
#endif
}
-#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */
+#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 26310b0b746..3eae2db313e 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -96,9 +96,9 @@ DEBUG_UART_FUNCS
#endif
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int omap_serial_of_to_plat(struct udevice *dev)
{
struct ns16550_plat *plat = dev_get_plat(dev);
@@ -151,11 +151,11 @@ static const struct udevice_id omap_serial_ids[] = {
};
#endif /* OF_REAL */
-#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if IS_ENABLED(CONFIG_SERIAL_PRESENT)
U_BOOT_DRIVER(omap_serial) = {
.name = "omap_serial",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = omap_serial_ids,
.of_to_plat = omap_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_plat),
@@ -163,7 +163,7 @@ U_BOOT_DRIVER(omap_serial) = {
.priv_auto = sizeof(struct ns16550),
.probe = ns16550_serial_probe,
.ops = &ns16550_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index f5468353e10..b3a988cb241 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -27,7 +27,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
static volatile unsigned char *const port[] = CFG_PL01x_PORTS;
static enum pl01x_type pl01x_type __section(".data");
static struct pl01x_regs *base_regs __section(".data");
@@ -185,7 +185,7 @@ static int pl01x_generic_setbrg(struct pl01x_regs *regs, enum pl01x_type type,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
static void pl01x_serial_init_baud(int baudrate)
{
int clock = 0;
@@ -331,7 +331,7 @@ static const struct dm_serial_ops pl01x_serial_ops = {
.setbrg = pl01x_serial_setbrg,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id pl01x_serial_id[] ={
{.compatible = "arm,pl011", .data = TYPE_PL011},
{.compatible = "arm,pl010", .data = TYPE_PL010},
diff --git a/drivers/serial/serial_pl01x_internal.h b/drivers/serial/serial_pl01x_internal.h
index 71c52bb5312..6754d232f06 100644
--- a/drivers/serial/serial_pl01x_internal.h
+++ b/drivers/serial/serial_pl01x_internal.h
@@ -38,7 +38,7 @@ struct pl01x_regs {
u32 pl011_cr; /* 0x30 Control register */
};
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
int pl01x_serial_of_to_plat(struct udevice *dev);
int pl01x_serial_probe(struct udevice *dev);
diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c
index f4e9422ed91..13cd7473639 100644
--- a/drivers/serial/serial_rockchip.c
+++ b/drivers/serial/serial_rockchip.c
@@ -13,19 +13,19 @@
#include <dm/device-internal.h>
struct rockchip_uart_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_uart dtplat;
#endif
struct ns16550_plat plat;
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_uart *dtplat, s_dtplat;
#endif
static int rockchip_serial_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rockchip_uart_plat *plat = dev_get_plat(dev);
/* Create some new platform data for the standard driver */
diff --git a/drivers/serial/serial_sbi.c b/drivers/serial/serial_sbi.c
index b9f35ed36e6..e0372f54f9d 100644
--- a/drivers/serial/serial_sbi.c
+++ b/drivers/serial/serial_sbi.c
@@ -9,7 +9,7 @@ static inline void _debug_uart_init(void)
static inline void _debug_uart_putc(int c)
{
- if (CONFIG_IS_ENABLED(RISCV_SMODE))
+ if (IS_ENABLED(CONFIG_RISCV_SMODE))
sbi_console_putchar(c);
}
diff --git a/drivers/serial/serial_semihosting.c b/drivers/serial/serial_semihosting.c
index cfa1ec3148c..8c9c4f9f355 100644
--- a/drivers/serial/serial_semihosting.c
+++ b/drivers/serial/serial_semihosting.c
@@ -21,7 +21,7 @@ struct smh_serial_priv {
unsigned counter;
};
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
static int smh_serial_getc(struct udevice *dev)
{
char ch = 0;
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 4671217b59a..8f283cf616a 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -145,7 +145,7 @@ static int sh_serial_getc_generic(struct uart_port *port)
return ch;
}
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
static int sh_serial_pending(struct udevice *dev, bool input)
{
@@ -200,7 +200,7 @@ static const struct dm_serial_ops sh_serial_ops = {
.setbrg = sh_serial_setbrg,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id sh_serial_id[] ={
{.compatible = "renesas,sci", .data = PORT_SCI},
{.compatible = "renesas,scif", .data = PORT_SCIF},
@@ -244,7 +244,7 @@ U_BOOT_DRIVER(serial_sh) = {
.plat_auto = sizeof(struct sh_serial_plat),
.probe = sh_serial_probe,
.ops = &sh_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
.priv_auto = sizeof(struct uart_port),
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 2ba92bf9c48..37ceca426d2 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -247,7 +247,7 @@ U_BOOT_DRIVER(serial_stm32) = {
.plat_auto = sizeof(struct stm32x7_serial_plat),
.ops = &stm32_serial_ops,
.probe = stm32_serial_probe,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/serial/serial_xen.c b/drivers/serial/serial_xen.c
index ab318b06462..fd44b6bad54 100644
--- a/drivers/serial/serial_xen.c
+++ b/drivers/serial/serial_xen.c
@@ -160,7 +160,7 @@ static const struct dm_serial_ops xen_serial_ops = {
.pending = xen_serial_pending,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static const struct udevice_id xen_serial_ids[] = {
{ .compatible = "xen,xen" },
{ }
@@ -170,13 +170,13 @@ static const struct udevice_id xen_serial_ids[] = {
U_BOOT_DRIVER(serial_xen) = {
.name = "serial_xen",
.id = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_match = xen_serial_ids,
#endif
.priv_auto = sizeof(struct xen_uart_priv),
.probe = xen_serial_probe,
.ops = &xen_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif
};
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 702e2253581..721b2f8278b 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -13,7 +13,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/hardware.h>
#include <asm/arch/at91_spi.h>
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
#include <asm/gpio.h>
#endif
#include <linux/bitops.h>
@@ -113,7 +113,7 @@ struct atmel_spi_priv {
unsigned int freq; /* Default frequency */
unsigned int mode;
ulong bus_clk_rate;
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct gpio_desc cs_gpios[MAX_CS_COUNT];
#endif
};
@@ -170,7 +170,7 @@ static int atmel_spi_release_bus(struct udevice *dev)
static void atmel_spi_cs_activate(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct udevice *bus = dev_get_parent(dev);
struct atmel_spi_priv *priv = dev_get_priv(bus);
struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
@@ -185,7 +185,7 @@ static void atmel_spi_cs_activate(struct udevice *dev)
static void atmel_spi_cs_deactivate(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct udevice *bus = dev_get_parent(dev);
struct atmel_spi_priv *priv = dev_get_priv(bus);
struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
@@ -353,7 +353,7 @@ static int atmel_spi_probe(struct udevice *bus)
bus_plat->regs = dev_read_addr_ptr(bus);
-#if CONFIG_IS_ENABLED(DM_GPIO)
+#if IS_ENABLED(CONFIG_DM_GPIO)
struct atmel_spi_priv *priv = dev_get_priv(bus);
int i;
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 1a841b5dcef..68844b9d529 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -384,7 +384,7 @@ static int coldfire_spi_probe(struct udevice *bus)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int coldfire_dspi_of_to_plat(struct udevice *bus)
{
fdt_addr_t addr;
@@ -450,7 +450,7 @@ static const struct dm_spi_ops coldfire_spi_ops = {
U_BOOT_DRIVER(coldfire_spi) = {
.name = "spi_coldfire",
.id = UCLASS_SPI,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = coldfire_spi_ids,
.of_to_plat = coldfire_dspi_of_to_plat,
.plat_auto = sizeof(struct coldfire_spi_plat),
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 9ebc4ed48f0..fdbf7e2c1ae 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -391,7 +391,7 @@ static int davinci_spi_probe(struct udevice *bus)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int davinci_ofdata_to_platadata(struct udevice *bus)
{
struct davinci_spi_plat *plat = dev_get_plat(bus);
@@ -418,7 +418,7 @@ static const struct udevice_id davinci_spi_ids[] = {
U_BOOT_DRIVER(davinci_spi) = {
.name = "davinci_spi",
.id = UCLASS_SPI,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = davinci_spi_ids,
.of_to_plat = davinci_ofdata_to_platadata,
.plat_auto = sizeof(struct davinci_spi_plat),
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 1c7d0ca310b..84936459068 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -217,7 +217,7 @@ static int dw_spi_dwc_init(struct udevice *bus, struct dw_spi_priv *priv)
static int request_gpio_cs(struct udevice *bus)
{
-#if CONFIG_IS_ENABLED(DM_GPIO) && !defined(CONFIG_SPL_BUILD)
+#if IS_ENABLED(CONFIG_DM_GPIO) && !defined(CONFIG_SPL_BUILD)
struct dw_spi_priv *priv = dev_get_priv(bus);
int ret;
@@ -481,7 +481,7 @@ static int poll_transfer(struct dw_spi_priv *priv)
*/
__weak void external_cs_manage(struct udevice *dev, bool on)
{
-#if CONFIG_IS_ENABLED(DM_GPIO) && !defined(CONFIG_SPL_BUILD)
+#if IS_ENABLED(CONFIG_DM_GPIO) && !defined(CONFIG_SPL_BUILD)
struct dw_spi_priv *priv = dev_get_priv(dev->parent);
if (!dm_gpio_is_valid(&priv->cs_gpio))
@@ -727,7 +727,7 @@ static int dw_spi_remove(struct udevice *bus)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_disable(&priv->clk);
if (ret)
return ret;
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 5ce9d73570b..bf52e0b086b 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -372,7 +372,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl)
* 10), spi_freq);/* Set eSPI BRG clock source */
}
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
{
return bus == 0 && cs < ESPI_MAX_CS_NUM;
@@ -541,7 +541,7 @@ static const struct dm_spi_ops fsl_espi_ops = {
.set_mode = fsl_espi_set_mode,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int fsl_espi_of_to_plat(struct udevice *bus)
{
fdt_addr_t addr;
@@ -572,7 +572,7 @@ static const struct udevice_id fsl_espi_ids[] = {
U_BOOT_DRIVER(fsl_espi) = {
.name = "fsl_espi",
.id = UCLASS_SPI,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = fsl_espi_ids,
.of_to_plat = fsl_espi_of_to_plat,
#endif
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 9142ffd2387..b57e1c8b26d 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -114,7 +114,7 @@ static bool ich9_can_do_33mhz(struct udevice *dev)
struct ich_spi_priv *priv = dev_get_priv(dev);
u32 fdod, speed;
- if (!CONFIG_IS_ENABLED(PCI) || !priv->pch)
+ if (!IS_ENABLED(CONFIG_PCI) || !priv->pch)
return false;
/* Observe SPI Descriptor Component Section 0 */
dm_pci_write_config32(priv->pch, 0xb0, 0x1000);
@@ -604,7 +604,7 @@ static int ich_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op)
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/**
* ich_spi_get_basics() - Get basic information about the ICH device
*
@@ -672,7 +672,7 @@ static int ich_get_mmap_bus(struct udevice *bus, ulong *map_basep,
uint *map_sizep, uint *offsetp)
{
pci_dev_t spi_bdf;
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
if (device_is_on_pci_bus(bus)) {
struct pci_child_plat *pplat;
@@ -940,7 +940,7 @@ static int ich_spi_of_to_plat(struct udevice *dev)
{
struct ich_spi_plat *plat = dev_get_plat(dev);
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
struct ich_spi_priv *priv = dev_get_priv(dev);
int ret;
diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h
index 8fd150d44a4..9c87c6196bc 100644
--- a/drivers/spi/ich.h
+++ b/drivers/spi/ich.h
@@ -231,7 +231,7 @@ struct ich_spi_priv {
};
struct ich_spi_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_intel_fast_spi dtplat;
#endif
enum ich_version ich_version; /* Controller version, 7 or 9 */
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index 52882e8b263..49565a636f2 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -47,7 +47,7 @@ struct mvebu_spi_plat {
static void spi_cs_activate(struct mvebu_spi_plat *plat, int cs)
{
- if (CONFIG_IS_ENABLED(DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs]))
+ if (IS_ENABLED(CONFIG_DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs]))
dm_gpio_set_value(&plat->cs_gpios[cs], 1);
else
setbits_le32(&plat->spireg->ctrl, MVEBU_SPI_A3700_SPI_EN_0 << cs);
@@ -55,7 +55,7 @@ static void spi_cs_activate(struct mvebu_spi_plat *plat, int cs)
static void spi_cs_deactivate(struct mvebu_spi_plat *plat, int cs)
{
- if (CONFIG_IS_ENABLED(DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs]))
+ if (IS_ENABLED(CONFIG_DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs]))
dm_gpio_set_value(&plat->cs_gpios[cs], 0);
else
clrbits_le32(&plat->spireg->ctrl, MVEBU_SPI_A3700_SPI_EN_0 << cs);
@@ -258,7 +258,7 @@ static int mvebu_spi_probe(struct udevice *bus)
writel(data, ®->cfg);
/* Set up CS GPIOs in device tree, if any */
- if (CONFIG_IS_ENABLED(DM_GPIO) && gpio_get_list_count(bus, "cs-gpios") > 0) {
+ if (IS_ENABLED(CONFIG_DM_GPIO) && gpio_get_list_count(bus, "cs-gpios") > 0) {
int i;
for (i = 0; i < ARRAY_SIZE(plat->cs_gpios); i++) {
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 840660ffe9a..a36429d273b 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -130,7 +130,7 @@ static inline struct mxc_spi_slave *to_mxc_spi_slave(struct spi_slave *slave)
static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs)
{
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
struct udevice *dev = mxcs->dev;
struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
@@ -148,7 +148,7 @@ static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs)
static void mxc_spi_cs_deactivate(struct mxc_spi_slave *mxcs)
{
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
struct udevice *dev = mxcs->dev;
struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
@@ -473,7 +473,7 @@ static int mxc_spi_claim_bus_internal(struct mxc_spi_slave *mxcs, int cs)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
void *din, unsigned long flags)
{
@@ -597,7 +597,7 @@ static int mxc_spi_probe(struct udevice *bus)
if (mxcs->base == FDT_ADDR_T_NONE)
return -ENODEV;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
ret = clk_get_by_index(bus, 0, &clk);
if (ret)
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 773e26bbed7..c7c7f2c5957 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -42,7 +42,7 @@
#define MXS_SSP_IMX28_CLKID_SSP0 46
struct mxs_spi_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_spi dtplat;
#endif
s32 frequency; /* Default clock frequency, -1 for none */
@@ -317,7 +317,7 @@ static int mxs_spi_probe(struct udevice *bus)
debug("%s: probe\n", __func__);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_fsl_imx23_spi *dtplat = &plat->dtplat;
struct phandle_1_arg *p1a = &dtplat->clocks[0];
@@ -440,7 +440,7 @@ static const struct dm_spi_ops mxs_spi_ops = {
*/
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int mxs_of_to_plat(struct udevice *bus)
{
struct mxs_spi_plat *plat = dev_get_plat(bus);
@@ -483,7 +483,7 @@ static const struct udevice_id mxs_spi_ids[] = {
U_BOOT_DRIVER(fsl_imx23_spi) = {
.name = "fsl_imx23_spi",
.id = UCLASS_SPI,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = mxs_spi_ids,
.of_to_plat = mxs_of_to_plat,
#endif
diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index 579d6bac9b1..9785242c1ef 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -542,7 +542,7 @@ static void nxp_fspi_prepare_lut(struct nxp_fspi *f,
fspi_writel(f, FSPI_LCKER_LOCK, f->iobase + FSPI_LCKCR);
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
static int nxp_fspi_clk_prep_enable(struct nxp_fspi *f)
{
int ret;
@@ -865,7 +865,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
int ret, i;
u32 reg;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
/* the default frequency, we will change it later if necessary. */
ret = clk_set_rate(&f->clk, 20000000);
if (ret < 0)
@@ -963,7 +963,7 @@ static int nxp_fspi_claim_bus(struct udevice *dev)
static int nxp_fspi_set_speed(struct udevice *bus, uint speed)
{
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct nxp_fspi *f = dev_get_priv(bus);
int ret;
@@ -989,7 +989,7 @@ static int nxp_fspi_set_mode(struct udevice *bus, uint mode)
static int nxp_fspi_of_to_plat(struct udevice *bus)
{
struct nxp_fspi *f = dev_get_priv(bus);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
int ret;
#endif
@@ -1015,7 +1015,7 @@ static int nxp_fspi_of_to_plat(struct udevice *bus)
f->ahb_addr = map_physmem(ahb_addr, ahb_size, MAP_NOCACHE);
f->memmap_phy_size = ahb_size;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_name(bus, "fspi_en", &f->clk_en);
if (ret) {
dev_err(bus, "failed to get fspi_en clock\n");
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 1cbb5d46fd6..91d3fd19347 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -481,7 +481,7 @@ static const struct dm_spi_ops omap3_spi_ops = {
*/
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static struct omap2_mcspi_platform_config omap2_pdata = {
.regs_offset = 0,
};
@@ -516,7 +516,7 @@ U_BOOT_DRIVER(omap3_spi) = {
.name = "omap3_spi",
.id = UCLASS_SPI,
.flags = DM_FLAG_PRE_RELOC,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = omap3_spi_ids,
.of_to_plat = omap3_spi_of_to_plat,
.plat_auto = sizeof(struct omap3_spi_plat),
diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c
index 828eab3d342..4c3a7483ca6 100644
--- a/drivers/spi/pl022_spi.c
+++ b/drivers/spi/pl022_spi.c
@@ -286,7 +286,7 @@ static const struct dm_spi_ops pl022_spi_ops = {
.cs_info = pl022_cs_info,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int pl022_spi_of_to_plat(struct udevice *bus)
{
struct pl022_spi_pdata *plat = dev_get_plat(bus);
@@ -315,7 +315,7 @@ static const struct udevice_id pl022_spi_ids[] = {
U_BOOT_DRIVER(pl022_spi) = {
.name = "pl022_spi",
.id = UCLASS_SPI,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.of_match = pl022_spi_ids,
.of_to_plat = pl022_spi_of_to_plat,
#endif
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index cb2b8fb64de..9aa00fcacc9 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -412,7 +412,7 @@ static int rpc_spi_probe(struct udevice *dev)
priv->regs = plat->regs;
priv->extr = plat->extr;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_enable(&priv->clk);
#endif
return 0;
@@ -425,7 +425,7 @@ static int rpc_spi_of_to_plat(struct udevice *bus)
plat->regs = dev_read_addr_index(bus, 0);
plat->extr = dev_read_addr_index(bus, 1);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct rpc_spi_priv *priv = dev_get_priv(bus);
int ret;
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 66b20fce9ba..6415c2f68ba 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -41,7 +41,7 @@ struct rockchip_spi_params {
};
struct rockchip_spi_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_rockchip_rk3288_spi of_plat;
#endif
s32 frequency; /* Default clock frequency, -1 for none */
@@ -173,7 +173,7 @@ static void spi_cs_deactivate(struct udevice *dev, uint cs)
priv->last_transaction_us = timer_get_us();
}
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
static int conv_of_plat(struct udevice *dev)
{
struct rockchip_spi_plat *plat = dev_get_plat(dev);
@@ -197,7 +197,7 @@ static int rockchip_spi_of_to_plat(struct udevice *bus)
struct rockchip_spi_priv *priv = dev_get_priv(bus);
int ret;
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
plat->base = dev_read_addr(bus);
ret = clk_get_by_index(bus, 0, &priv->clk);
@@ -257,7 +257,7 @@ static int rockchip_spi_probe(struct udevice *bus)
int ret;
debug("%s: probe\n", __func__);
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = conv_of_plat(bus);
if (ret)
return ret;
diff --git a/drivers/spi/rockchip_sfc.c b/drivers/spi/rockchip_sfc.c
index 851a6482985..0c0c663a9f7 100644
--- a/drivers/spi/rockchip_sfc.c
+++ b/drivers/spi/rockchip_sfc.c
@@ -232,7 +232,7 @@ static int rockchip_sfc_ofdata_to_platdata(struct udevice *bus)
else
sfc->use_dma = true;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
int ret;
ret = clk_get_by_index(bus, 0, &sfc->clk);
@@ -256,7 +256,7 @@ static int rockchip_sfc_probe(struct udevice *bus)
struct rockchip_sfc *sfc = dev_get_plat(bus);
int ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&sfc->hclk);
if (ret)
dev_dbg(sfc->dev, "sfc Enable ahb clock fail %s: %d\n", bus->name, ret);
@@ -278,7 +278,7 @@ static int rockchip_sfc_probe(struct udevice *bus)
return 0;
err_init:
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&sfc->clk);
clk_disable(&sfc->hclk);
#endif
@@ -599,7 +599,7 @@ static int rockchip_sfc_set_speed(struct udevice *bus, uint speed)
if (speed == sfc->speed)
return 0;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
int ret = clk_set_rate(&sfc->clk, speed);
if (ret < 0) {
diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c
index 861423bef3f..54981769d38 100644
--- a/drivers/spi/sh_qspi.c
+++ b/drivers/spi/sh_qspi.c
@@ -70,7 +70,7 @@ struct sh_qspi_regs {
};
struct sh_qspi_slave {
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
struct spi_slave slave;
#endif
struct sh_qspi_regs *regs;
@@ -225,7 +225,7 @@ static int sh_qspi_xfer_common(struct sh_qspi_slave *ss, unsigned int bitlen,
return ret;
}
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
static inline struct sh_qspi_slave *to_sh_qspi(struct spi_slave *slave)
{
return container_of(slave, struct sh_qspi_slave, slave);
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index c929e7c1d0e..ddb7995ebfe 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -177,7 +177,7 @@ int spi_write_then_read(struct spi_slave *slave, const u8 *opcode,
return ret;
}
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static int spi_child_post_bind(struct udevice *dev)
{
struct dm_spi_slave_plat *plat = dev_get_parent_plat(dev);
@@ -191,7 +191,7 @@ static int spi_child_post_bind(struct udevice *dev)
static int spi_post_probe(struct udevice *bus)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0);
@@ -363,7 +363,7 @@ int spi_get_bus_and_cs(int busnum, int cs, struct udevice **busp,
struct spi_slave *slave;
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = uclass_first_device_err(UCLASS_SPI, &bus);
#else
ret = uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus);
@@ -422,7 +422,7 @@ int _spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
bool created = false;
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
ret = uclass_first_device_err(UCLASS_SPI, &bus);
#else
ret = uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus);
@@ -602,7 +602,7 @@ UCLASS_DRIVER(spi) = {
.id = UCLASS_SPI,
.name = "spi",
.flags = DM_UC_FLAG_SEQ_ALIAS,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
.post_probe = spi_post_probe,
@@ -610,7 +610,7 @@ UCLASS_DRIVER(spi) = {
.per_device_auto = sizeof(struct dm_spi_bus),
.per_child_auto = sizeof(struct spi_slave),
.per_child_plat_auto = sizeof(struct dm_spi_slave_plat),
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.child_post_bind = spi_child_post_bind,
#endif
};
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 99acb108823..cb5aa2ccd02 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -417,7 +417,7 @@ static int ti_qspi_probe(struct udevice *bus)
static void *map_syscon_chipselects(struct udevice *bus)
{
-#if CONFIG_IS_ENABLED(SYSCON)
+#if IS_ENABLED(CONFIG_SYSCON)
struct udevice *syscon;
struct regmap *regmap;
const fdt32_t *cell;
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 0ee286cbb34..874c021c9b7 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -133,7 +133,7 @@ U_BOOT_DRIVER(warm_sysreset_sandbox) = {
.ops = &sandbox_warm_sysreset_ops,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
/* This is here in case we don't have a device tree */
U_BOOT_DRVINFO(sysreset_sandbox_non_fdt) = {
.name = "sysreset_sandbox",
diff --git a/drivers/timer/andes_plmt_timer.c b/drivers/timer/andes_plmt_timer.c
index 42dd4b62317..6417fcb9c9a 100644
--- a/drivers/timer/andes_plmt_timer.c
+++ b/drivers/timer/andes_plmt_timer.c
@@ -23,7 +23,7 @@ static u64 notrace andes_plmt_get_count(struct udevice *dev)
return readq((void __iomem *)MTIME_REG(dev_get_priv(dev)));
}
-#if CONFIG_IS_ENABLED(RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
+#if IS_ENABLED(CONFIG_RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
/**
* timer_early_get_rate() - Get the timer rate before driver model
*/
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index 2eff45060ad..0c580e59147 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -36,7 +36,7 @@ struct cadence_ttc_priv {
struct cadence_ttc_regs *regs;
};
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
ulong timer_get_boot_us(void)
{
u64 ticks = 0;
diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index 10f0a9f646e..1ab7c34b7a8 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -28,7 +28,7 @@ struct dw_apb_timer_priv {
};
struct dw_apb_timer_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dtd_snps_dw_apb_timer dtplat;
#endif
};
@@ -51,7 +51,7 @@ static int dw_apb_timer_probe(struct udevice *dev)
struct dw_apb_timer_priv *priv = dev_get_priv(dev);
struct clk clk;
int ret;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct dw_apb_timer_plat *plat = dev_get_plat(dev);
struct dtd_snps_dw_apb_timer *dtplat = &plat->dtplat;
@@ -63,7 +63,7 @@ static int dw_apb_timer_probe(struct udevice *dev)
uc_priv->clock_rate = dtplat->clock_frequency;
#endif
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
ret = reset_get_bulk(dev, &priv->resets);
if (ret)
dev_warn(dev, "Can't get reset: %d\n", ret);
@@ -89,7 +89,7 @@ static int dw_apb_timer_probe(struct udevice *dev)
static int dw_apb_timer_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct dw_apb_timer_priv *priv = dev_get_priv(dev);
priv->regs = dev_read_addr(dev);
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index aa2e4360c1b..da0d8b063df 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -84,7 +84,7 @@ static int omap_timer_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
ulong timer_get_boot_us(void)
{
u64 ticks = 0;
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index 3ec729d2c43..75357766e57 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -40,7 +40,7 @@ static int ostm_probe(struct udevice *dev)
{
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct ostm_priv *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
int ret;
diff --git a/drivers/timer/riscv_timer.c b/drivers/timer/riscv_timer.c
index 3627ed79b81..60a649a605f 100644
--- a/drivers/timer/riscv_timer.c
+++ b/drivers/timer/riscv_timer.c
@@ -31,7 +31,7 @@ static u64 notrace riscv_timer_get_count(struct udevice *dev)
return ((u64)hi << 32) | lo;
}
-#if CONFIG_IS_ENABLED(RISCV_SMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
+#if IS_ENABLED(CONFIG_RISCV_SMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
/**
* timer_early_get_rate() - Get the timer rate before driver model
*/
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 62eacb98689..bc3a5b09183 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -18,7 +18,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct rockchip_timer_plat {
struct dtd_rockchip_rk3368_timer dtd;
};
@@ -41,7 +41,7 @@ static inline int64_t rockchip_timer_get_curr_value(struct rk_timer *timer)
return cntr;
}
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
ulong timer_get_boot_us(void)
{
uint64_t ticks = 0;
@@ -55,7 +55,7 @@ ulong timer_get_boot_us(void)
/* The timer is available */
rate = timer_get_rate(gd->timer);
timer_get_count(gd->timer, &ticks);
- } else if (CONFIG_IS_ENABLED(OF_REAL) && ret == -EAGAIN) {
+ } else if (IS_ENABLED(CONFIG_OF_REAL) && ret == -EAGAIN) {
/* We have been called so early that the DM is not ready,... */
ofnode node = offset_to_ofnode(-1);
struct rk_timer *timer = NULL;
@@ -98,7 +98,7 @@ static u64 rockchip_timer_get_count(struct udevice *dev)
static int rockchip_clk_of_to_plat(struct udevice *dev)
{
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct rockchip_timer_priv *priv = dev_get_priv(dev);
priv->timer = dev_read_addr_ptr(dev);
@@ -135,7 +135,7 @@ static int rockchip_timer_start(struct udevice *dev)
static int rockchip_timer_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct rockchip_timer_priv *priv = dev_get_priv(dev);
struct rockchip_timer_plat *plat = dev_get_plat(dev);
@@ -165,7 +165,7 @@ U_BOOT_DRIVER(rockchip_rk3368_timer) = {
.probe = rockchip_timer_probe,
.ops = &rockchip_timer_ops,
.priv_auto = sizeof(struct rockchip_timer_priv),
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
.plat_auto = sizeof(struct rockchip_timer_plat),
#endif
.of_to_plat = rockchip_clk_of_to_plat,
diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c
index c846bfb9f12..740dc2a2271 100644
--- a/drivers/timer/sandbox_timer.c
+++ b/drivers/timer/sandbox_timer.c
@@ -38,7 +38,7 @@ static int sandbox_timer_probe(struct udevice *dev)
{
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
- if (CONFIG_IS_ENABLED(CPU) &&
+ if (IS_ENABLED(CONFIG_CPU) &&
dev_read_bool(dev, "sandbox,timebase-frequency-fallback"))
return timer_timebase_fallback(dev);
else if (!uc_priv->clock_rate)
diff --git a/drivers/timer/sifive_clint_timer.c b/drivers/timer/sifive_clint_timer.c
index 939b99d937d..fa81e7b42fa 100644
--- a/drivers/timer/sifive_clint_timer.c
+++ b/drivers/timer/sifive_clint_timer.c
@@ -20,7 +20,7 @@ static u64 notrace sifive_clint_get_count(struct udevice *dev)
return readq((void __iomem *)MTIME_REG(dev_get_priv(dev)));
}
-#if CONFIG_IS_ENABLED(RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
+#if IS_ENABLED(CONFIG_RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY)
/**
* timer_early_get_rate() - Get the timer rate before driver model
*/
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index bb719792135..1085ccb7038 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -64,7 +64,7 @@ static int timer_pre_probe(struct udevice *dev)
}
}
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct clk timer_clk;
int err;
@@ -101,7 +101,7 @@ static int timer_post_probe(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(CPU)
+#if IS_ENABLED(CONFIG_CPU)
int timer_timebase_fallback(struct udevice *dev)
{
struct udevice *cpu;
@@ -152,7 +152,7 @@ int notrace dm_timer_init(void)
if (gd->dm_root == NULL)
return -EAGAIN;
- if (CONFIG_IS_ENABLED(OF_REAL)) {
+ if (IS_ENABLED(CONFIG_OF_REAL)) {
/* Check for a chosen timer to be used for tick */
node = ofnode_get_chosen_node("tick-timer");
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 84cb4ee1593..50ab4e86dca 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -54,7 +54,7 @@ static unsigned long native_calibrate_tsc(void)
return 0;
crystal_freq = tsc_info.ecx / 1000;
- if (!CONFIG_IS_ENABLED(X86_TSC_TIMER_NATIVE) && !crystal_freq) {
+ if (!IS_ENABLED(CONFIG_X86_TSC_TIMER_NATIVE) && !crystal_freq) {
switch (gd->arch.x86_model) {
case INTEL_FAM6_SKYLAKE_MOBILE:
case INTEL_FAM6_SKYLAKE_DESKTOP:
@@ -376,7 +376,7 @@ void __udelay(unsigned long usec)
stop = now + (u64)usec * get_tbclk_mhz();
while ((int64_t)(stop - get_ticks()) > 0)
-#if defined(CONFIG_QEMU) && defined(CONFIG_PPL_SMP)
+#if defined(CONFIG_QEMU) && IS_ENABLED(CONFIG_PPL_SMP)
/*
* Add a 'pause' instruction on qemu target,
* to give other VCPUs a chance to run.
@@ -409,7 +409,7 @@ static void tsc_timer_ensure_setup(bool early)
goto done;
/* Reduce code size by dropping other methods */
- if (CONFIG_IS_ENABLED(X86_TSC_TIMER_NATIVE))
+ if (IS_ENABLED(CONFIG_X86_TSC_TIMER_NATIVE))
panic("no timer");
fast_calibrate = cpu_mhz_from_cpuid();
@@ -479,7 +479,7 @@ static const struct timer_ops tsc_timer_ops = {
.get_count = tsc_timer_get_count,
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
static const struct udevice_id tsc_timer_ids[] = {
{ .compatible = "x86,tsc-timer", },
{ }
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index b2286f7e7ed..66195e49519 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -177,7 +177,7 @@ UCLASS_DRIVER(tpm) = {
.id = UCLASS_TPM,
.name = "tpm",
.flags = DM_UC_FLAG_SEQ_ALIAS,
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
.post_probe = tpm_uclass_post_probe,
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index de9cf8f21e0..116d928a3d7 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -228,7 +228,7 @@ static int tpm_tis_spi_probe(struct udevice *dev)
/* Use the TPM v2 stack */
priv->version = TPM_V2;
- if (CONFIG_IS_ENABLED(DM_GPIO)) {
+ if (IS_ENABLED(CONFIG_DM_GPIO)) {
struct gpio_desc reset_gpio;
ret = gpio_request_by_name(dev, "reset-gpios", 0,
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 644a9791b9c..2d2da75d4f7 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -160,7 +160,7 @@ static int cdns3_core_init_role(struct cdns3 *cdns)
}
#endif
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_PERIPHERAL) {
ret = cdns3_gadget_init(cdns);
if (ret) {
@@ -410,7 +410,7 @@ int cdns3_bind(struct udevice *parent)
driver = "cdns-usb3-host";
break;
#endif
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
case USB_DR_MODE_PERIPHERAL:
debug("%s: dr_mode: PERIPHERAL\n", __func__);
driver = "cdns-usb3-peripheral";
@@ -436,7 +436,7 @@ fail:
return 0;
}
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
static int cdns3_gadget_probe(struct udevice *dev)
{
struct cdns3_gadget_priv *priv = dev_get_priv(dev);
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index cff86a51ae0..171baece668 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -91,7 +91,7 @@ enum usb_device_speed usb_get_maximum_speed(ofnode node)
return USB_SPEED_UNKNOWN;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static const char *const usbphy_modes[] = {
[USBPHY_INTERFACE_MODE_UNKNOWN] = "",
[USBPHY_INTERFACE_MODE_UTMI] = "utmi",
diff --git a/drivers/usb/common/usb_urb.c b/drivers/usb/common/usb_urb.c
index be3b6b9f32e..eb05eecaea3 100644
--- a/drivers/usb/common/usb_urb.c
+++ b/drivers/usb/common/usb_urb.c
@@ -13,7 +13,7 @@
#include <time.h>
#include <usb.h>
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct usb_device *usb_dev_get_parent(struct usb_device *udev)
{
struct udevice *parent = udev->dev->parent;
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 49f6a1900b0..889f50515c1 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1010,7 +1010,7 @@ MODULE_AUTHOR("Felipe Balbi <balbi at ti.com>");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver");
-#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_PHY) && IS_ENABLED(CONFIG_DM_USB)
int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys)
{
int ret;
@@ -1040,7 +1040,7 @@ int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys)
}
#endif
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
void dwc3_of_parse(struct dwc3 *dwc)
{
const u8 *tmp;
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 532746dd88d..4265b7922fc 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -760,7 +760,7 @@ struct dwc3 {
/* device lock */
spinlock_t lock;
-#if defined(__UBOOT__) && CONFIG_IS_ENABLED(DM_USB)
+#if defined(__UBOOT__) && IS_ENABLED(CONFIG_DM_USB)
struct udevice *dev;
#else
struct device *dev;
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 78966718d01..5951ce65876 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -65,7 +65,7 @@ static int dwc3_generic_probe(struct udevice *dev,
dwc3->dev = dev;
dwc3->maximum_speed = plat->maximum_speed;
dwc3->dr_mode = plat->dr_mode;
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
dwc3_of_parse(dwc3);
node = dev_ofnode(dev->parent);
@@ -89,7 +89,7 @@ static int dwc3_generic_probe(struct udevice *dev,
if (rc && rc != -ENOTSUPP)
return rc;
- if (CONFIG_IS_ENABLED(DM_GPIO) &&
+ if (IS_ENABLED(CONFIG_DM_GPIO) &&
device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
rc = gpio_request_by_name(dev->parent, "reset-gpios", 0,
&priv->ulpi_reset, GPIOD_ACTIVE_LOW);
@@ -131,7 +131,7 @@ static int dwc3_generic_remove(struct udevice *dev,
{
struct dwc3 *dwc3 = &priv->dwc3;
- if (CONFIG_IS_ENABLED(DM_GPIO) &&
+ if (IS_ENABLED(CONFIG_DM_GPIO) &&
device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
struct gpio_desc *ulpi_reset = &priv->ulpi_reset;
@@ -177,7 +177,7 @@ static int dwc3_generic_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
int dm_usb_gadget_handle_interrupts(struct udevice *dev)
{
struct dwc3_generic_priv *priv = dev_get_priv(dev);
@@ -420,7 +420,7 @@ static int dwc3_glue_bind(struct udevice *parent)
switch (dr_mode) {
case USB_DR_MODE_PERIPHERAL:
case USB_DR_MODE_OTG:
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
debug("%s: dr_mode: OTG or Peripheral\n", __func__);
driver = "dwc3-generic-peripheral";
#endif
@@ -482,7 +482,7 @@ static int dwc3_glue_clk_init(struct udevice *dev,
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable_bulk(&glue->clks);
if (ret) {
clk_release_bulk(&glue->clks);
diff --git a/drivers/usb/dwc3/dwc3-layerscape.c b/drivers/usb/dwc3/dwc3-layerscape.c
index 79cf71f7a85..cce8f17474e 100644
--- a/drivers/usb/dwc3/dwc3-layerscape.c
+++ b/drivers/usb/dwc3/dwc3-layerscape.c
@@ -46,7 +46,7 @@ static int dwc3_layerscape_probe(struct udevice *dev,
dwc3->dev = dev;
dwc3->maximum_speed = plat->maximum_speed;
dwc3->dr_mode = plat->dr_mode;
- if (CONFIG_IS_ENABLED(OF_CONTROL))
+ if (IS_ENABLED(CONFIG_OF_CONTROL))
dwc3_of_parse(dwc3);
rc = dwc3_setup_phy(dev, &priv->phys);
@@ -99,7 +99,7 @@ static int dwc3_layerscape_of_to_plat(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
int dm_usb_gadget_handle_interrupts(struct udevice *dev)
{
struct dwc3_layerscape_priv *priv = dev_get_priv(dev);
@@ -188,7 +188,7 @@ static int dwc3_layerscape_bind(struct udevice *dev)
dr_mode = usb_get_dr_mode(node);
switch (dr_mode) {
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
case USB_DR_MODE_PERIPHERAL:
dev_dbg(dev, "Using peripheral mode\n");
driver = "dwc3-layerscape-peripheral";
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index 90418ddc1da..a3c54638f89 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -116,7 +116,7 @@ struct dwc3_meson_g12a {
enum usb_dr_mode otg_phy_mode;
unsigned int usb2_ports;
unsigned int usb3_ports;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *vbus_supply;
#endif
};
@@ -274,7 +274,7 @@ int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode)
else
debug("%s: switching to Device Mode\n", __func__);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply) {
int ret = regulator_set_enable(priv->vbus_supply,
(mode == USB_DR_MODE_PERIPHERAL));
@@ -343,7 +343,7 @@ static int dwc3_meson_g12a_clk_init(struct dwc3_meson_g12a *priv)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&priv->clk);
if (ret) {
clk_free(&priv->clk);
@@ -377,7 +377,7 @@ static int dwc3_meson_g12a_probe(struct udevice *dev)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "vbus-supply",
&priv->vbus_supply);
if (ret && ret != -ENOENT) {
diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c
index 6c6d463203c..7e155623814 100644
--- a/drivers/usb/dwc3/dwc3-meson-gxl.c
+++ b/drivers/usb/dwc3/dwc3-meson-gxl.c
@@ -116,7 +116,7 @@ struct dwc3_meson_gxl {
enum usb_dr_mode otg_mode;
enum usb_dr_mode otg_phy_mode;
unsigned int usb2_ports;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *vbus_supply;
#endif
};
@@ -215,7 +215,7 @@ int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode)
else
debug("%s: switching to Device Mode\n", __func__);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply) {
int ret = regulator_set_enable(priv->vbus_supply,
(mode == USB_DR_MODE_PERIPHERAL));
@@ -282,7 +282,7 @@ static int dwc3_meson_gxl_clk_init(struct dwc3_meson_gxl *priv)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable(&priv->clk);
if (ret) {
clk_free(&priv->clk);
@@ -316,7 +316,7 @@ static int dwc3_meson_gxl_probe(struct udevice *dev)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "vbus-supply",
&priv->vbus_supply);
if (ret && ret != -ENOENT) {
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index b9258d73575..88285748e14 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -1022,7 +1022,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
if (!driver->bind || !driver->setup || !driver->disconnect)
return -EINVAL;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
ret = usb_setup_ehci_gadget(&controller.ctrl);
#else
ret = usb_lowlevel_init(0, USB_INIT_DEVICE, (void **)&controller.ctrl);
@@ -1057,7 +1057,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
free(controller.items_mem);
free(controller.epts);
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
usb_remove_ehci_gadget(&controller.ctrl);
#else
usb_lowlevel_stop(0);
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 2a309e624e1..2b59f24d5bf 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1158,7 +1158,7 @@ unknown:
/*
* OS descriptors handling
*/
- if (CONFIG_IS_ENABLED(USB_GADGET_OS_DESCRIPTORS) && cdev->use_os_string &&
+ if (IS_ENABLED(CONFIG_USB_GADGET_OS_DESCRIPTORS) && cdev->use_os_string &&
cdev->os_desc_config && (ctrl->bRequestType & USB_TYPE_VENDOR) &&
ctrl->bRequest == cdev->b_vendor_code) {
struct usb_configuration *os_desc_cfg;
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 2bf7ed8d604..6dae5d066d7 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -244,7 +244,7 @@ static int dwc2_gadget_pullup(struct usb_gadget *g, int is_on)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if !IS_ENABLED(CONFIG_DM_USB_GADGET)
/*
Register entry point for the peripheral controller driver.
*/
@@ -317,7 +317,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
udc_disable(dev);
return 0;
}
-#else /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */
+#else /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */
static int dwc2_gadget_start(struct usb_gadget *g,
struct usb_gadget_driver *driver)
@@ -362,7 +362,7 @@ static int dwc2_gadget_stop(struct usb_gadget *g)
return 0;
}
-#endif /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */
/*
* done - retire a request; caller blocked irqs
@@ -815,7 +815,7 @@ static void dwc2_fifo_flush(struct usb_ep *_ep)
static const struct usb_gadget_ops dwc2_udc_ops = {
.pullup = dwc2_gadget_pullup,
/* current versions must always be self-powered */
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
.udc_start = dwc2_gadget_start,
.udc_stop = dwc2_gadget_stop,
#endif
@@ -941,14 +941,14 @@ int dwc2_udc_handle_interrupt(void)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if !IS_ENABLED(CONFIG_DM_USB_GADGET)
int usb_gadget_handle_interrupts(int index)
{
return dwc2_udc_handle_interrupt();
}
-#else /* CONFIG_IS_ENABLED(DM_USB_GADGET) */
+#else /* IS_ENABLED(CONFIG_DM_USB_GADGET) */
struct dwc2_priv_data {
struct clk_bulk clks;
@@ -1117,7 +1117,7 @@ static int dwc2_udc_otg_probe(struct udevice *dev)
return ret;
if (plat->activate_stm_id_vb_detection) {
- if (CONFIG_IS_ENABLED(DM_REGULATOR) &&
+ if (IS_ENABLED(CONFIG_DM_REGULATOR) &&
(!plat->force_b_session_valid ||
plat->force_vbus_detection)) {
ret = device_get_supply_regulator(dev, "usb33d-supply",
@@ -1208,4 +1208,4 @@ int dwc2_udc_B_session_valid(struct udevice *dev)
return readl(&usbotg_reg->gotgctl) & B_SESSION_VALID;
}
-#endif /* CONFIG_IS_ENABLED(DM_USB_GADGET) */
+#endif /* IS_ENABLED(CONFIG_DM_USB_GADGET) */
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 6d97b4bbdc3..8967064224a 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -545,7 +545,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
fastboot_func->in_req->complete = compl_do_reset;
break;
case FASTBOOT_COMMAND_ACMD:
- if (CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT))
+ if (IS_ENABLED(CONFIG_FASTBOOT_UUU_SUPPORT))
fastboot_func->in_req->complete = do_acmd_complete;
break;
}
diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c
index de8861829c7..70491ec7275 100644
--- a/drivers/usb/gadget/udc/udc-uclass.c
+++ b/drivers/usb/gadget/udc/udc-uclass.c
@@ -11,7 +11,7 @@
#include <dm/device-internal.h>
#include <linux/usb/gadget.h>
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
#define MAX_UDC_DEVICES 4
static struct udevice *dev_array[MAX_UDC_DEVICES];
int usb_gadget_initialize(int index)
@@ -37,7 +37,7 @@ int usb_gadget_initialize(int index)
int usb_gadget_release(int index)
{
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int ret;
if (index < 0 || index >= ARRAY_SIZE(dev_array))
return -EINVAL;
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 23060fc369c..19ae2f56a68 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -37,7 +37,7 @@
#define MAX_ENDPOINT 16
struct dwc2_priv {
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
uint8_t aligned_buffer[DWC2_DATA_BUF_SIZE] __aligned(ARCH_DMA_MINALIGN);
uint8_t status_buffer[DWC2_STATUS_BUF_SIZE] __aligned(ARCH_DMA_MINALIGN);
#ifdef CONFIG_DM_REGULATOR
@@ -64,7 +64,7 @@ struct dwc2_priv {
struct reset_ctl_bulk resets;
};
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* We need cacheline-aligned buffers for DMA transfers and dcache support */
DEFINE_ALIGN_BUFFER(uint8_t, aligned_buffer_addr, DWC2_DATA_BUF_SIZE,
ARCH_DMA_MINALIGN);
@@ -181,7 +181,7 @@ static void dwc_otg_core_reset(struct udevice *dev,
mdelay(100);
}
-#if CONFIG_IS_ENABLED(DM_USB) && defined(CONFIG_DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_USB) && defined(CONFIG_DM_REGULATOR)
static int dwc_vbus_supply_init(struct udevice *dev)
{
struct dwc2_priv *priv = dev_get_priv(dev);
@@ -224,7 +224,7 @@ static int dwc_vbus_supply_init(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int dwc_vbus_supply_exit(struct udevice *dev)
{
return 0;
@@ -1133,7 +1133,7 @@ int _submit_int_msg(struct dwc2_priv *priv, struct usb_device *dev,
timeout = get_timer(0) + USB_TIMEOUT_MS(pipe);
for (;;) {
if (get_timer(0) > timeout) {
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
dev_err(dev->dev,
"Timeout poll on interrupt endpoint\n");
#else
@@ -1252,7 +1252,7 @@ static void dwc2_uninit_common(struct dwc2_core_regs *regs)
DWC2_HPRT0_PRTRST);
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int len, struct devrequest *setup)
{
@@ -1298,7 +1298,7 @@ int usb_lowlevel_stop(int index)
}
#endif
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int dwc2_submit_control_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
struct devrequest *setup)
diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c
index 66b3e96b007..05e9260728e 100644
--- a/drivers/usb/host/dwc3-of-simple.c
+++ b/drivers/usb/host/dwc3-of-simple.c
@@ -51,7 +51,7 @@ static int dwc3_of_simple_clk_init(struct udevice *dev,
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_enable_bulk(&simple->clks);
if (ret) {
clk_release_bulk(&simple->clks);
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index fba3595e10f..fad1885f8da 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -16,7 +16,7 @@
#include "ehci.h"
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9839aa17492..30fb7acc329 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -31,7 +31,7 @@
*/
#define HCHALT_TIMEOUT (8 * 1000)
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
static struct ehci_ctrl ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT];
#endif
@@ -112,7 +112,7 @@ static struct descriptor {
static struct ehci_ctrl *ehci_get_ctrl(struct usb_device *udev)
{
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
return dev_get_priv(usb_get_bus(udev->dev));
#else
return udev->controller;
@@ -1028,7 +1028,7 @@ static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops)
}
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
void ehci_set_controller_priv(int index, void *priv, const struct ehci_ops *ops)
{
struct ehci_ctrl *ctrl = &ehcic[index];
@@ -1152,7 +1152,7 @@ static int ehci_common_init(struct ehci_ctrl *ctrl, uint tweaks)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int usb_lowlevel_stop(int index)
{
ehci_shutdown(&ehcic[index]);
@@ -1578,7 +1578,7 @@ static int _ehci_lock_async(struct ehci_ctrl *ctrl, int lock)
return ehci_disable_async(ctrl);
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
void *buffer, int length)
{
@@ -1624,7 +1624,7 @@ int usb_lock_async(struct usb_device *dev, int lock)
}
#endif
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int ehci_submit_control_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
struct devrequest *setup)
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 6093c8fb0b6..358a2ff4e3d 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR;
/*
* USB 2.0 Bridge Address Decoding registers setup
*/
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct ehci_mvebu_priv {
struct ehci_ctrl ehci;
@@ -268,4 +268,4 @@ int ehci_hcd_stop(int index)
return 0;
}
-#endif /* CONFIG_IS_ENABLED(DM_USB) */
+#endif /* IS_ENABLED(CONFIG_DM_USB) */
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 91633f013a5..7eec3d33a5f 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -285,7 +285,7 @@ static void usb_oc_config(struct usbnc_regs *usbnc, int index)
}
#endif
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/**
* board_usb_phy_mode - override usb phy mode
* @port: usb host/otg port
@@ -477,7 +477,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
#endif
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply) {
int ret;
ret = regulator_set_enable(priv->vbus_supply,
@@ -657,7 +657,7 @@ static int ehci_usb_probe(struct udevice *dev)
priv->init_type = type;
priv->phy_type = usb_get_phy_mode(dev_ofnode(dev));
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
ret = clk_get_by_index(dev, 0, &priv->clk);
if (ret < 0)
return ret;
@@ -685,7 +685,7 @@ static int ehci_usb_probe(struct udevice *dev)
priv->init_type = plat->init_type;
}
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "vbus-supply",
&priv->vbus_supply);
if (ret)
@@ -705,7 +705,7 @@ static int ehci_usb_probe(struct udevice *dev)
#endif
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply) {
ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ?
@@ -746,12 +746,12 @@ err_phy:
generic_shutdown_phy(&priv->phy);
err_regulator:
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply)
regulator_set_enable(priv->vbus_supply, false);
#endif
err_clk:
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&priv->clk);
#else
/* Compatibility with DM_USB and !CLK */
@@ -770,12 +770,12 @@ int ehci_usb_remove(struct udevice *dev)
generic_shutdown_phy(&priv->phy);
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply)
regulator_set_enable(priv->vbus_supply, false);
#endif
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_disable(&priv->clk);
#endif
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 147b2fa145d..38a7b877ffc 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -228,7 +228,7 @@ static int ehci_usb_probe(struct udevice *dev)
type == USB_INIT_HOST ? "HOST" : "DEVICE", port->usb_regs,
(uint32_t *)port->phy_regs);
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "vbus-supply",
&priv->vbus_supply);
if (ret)
@@ -262,7 +262,7 @@ static int ehci_usb_remove(struct udevice *dev)
if (ret)
return ret;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
if (priv->vbus_supply) {
ret = regulator_set_enable(priv->vbus_supply, false);
if (ret) {
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index e98ab312618..66a56c3f3b3 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -21,7 +21,7 @@ struct ehci_pci_priv {
struct phy phy;
};
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int ehci_pci_init(struct udevice *dev, struct ehci_hccr **ret_hccr,
struct ehci_hcor **ret_hcor)
{
@@ -124,9 +124,9 @@ int ehci_hcd_stop(int index)
{
return 0;
}
-#endif /* !CONFIG_IS_ENABLED(DM_USB) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB) */
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int ehci_pci_probe(struct udevice *dev)
{
struct ehci_hccr *hccr;
@@ -176,4 +176,4 @@ static struct pci_device_id ehci_pci_supported[] = {
U_BOOT_PCI_DEVICE(ehci_pci, ehci_pci_supported);
-#endif /* CONFIG_IS_ENABLED(DM_USB) */
+#endif /* IS_ENABLED(CONFIG_DM_USB) */
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 648e136447d..798b19f382a 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -156,7 +156,7 @@ int ehci_vf_common_init(struct usb_ehci *ehci, int index)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 33c4a911a09..a8769b77bfd 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -86,7 +86,7 @@ int usb_cpu_init_fail(void)
return usb_cpu_stop();
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int ohci_da8xx_probe(struct udevice *dev)
{
struct ohci_regs *regs = dev_read_addr_ptr(dev);
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 3f4418198cc..a556ebecb67 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -98,7 +98,7 @@
#define invalidate_dcache_iso_td(addr) invalidate_dcache_buffer(addr, 32)
#define invalidate_dcache_hcca(addr) invalidate_dcache_buffer(addr, 256)
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/*
* The various ohci_mdelay(1) calls in the code seem unnecessary. We keep
* them around when building for older boards not yet converted to the dm
@@ -109,7 +109,7 @@
#define ohci_mdelay(x) mdelay(x)
#endif
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* global ohci_t */
static ohci_t gohci;
/* this must be aligned to a 256 byte boundary */
@@ -1667,7 +1667,7 @@ static int _ohci_destroy_int_queue(ohci_t *ohci, struct usb_device *dev,
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* submit routines called from usb.c */
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len)
@@ -1956,7 +1956,7 @@ static int hc_interrupt(ohci_t *ohci)
/*-------------------------------------------------------------------------*/
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/*-------------------------------------------------------------------------*/
@@ -2044,7 +2044,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe,
}
#endif
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int ohci_submit_control_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
struct devrequest *setup)
diff --git a/drivers/usb/host/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c
index a04b2961b96..5cebb410d19 100644
--- a/drivers/usb/host/ohci-lpc32xx.c
+++ b/drivers/usb/host/ohci-lpc32xx.c
@@ -86,7 +86,7 @@ static struct clk_pm_regs *clk_pwr = (struct clk_pm_regs *)CLK_PM_BASE;
static int isp1301_set_value(struct udevice *dev, int reg, u8 value)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
return i2c_write(ISP1301_I2C_ADDR, reg, 1, &value, 1);
#else
return dm_i2c_write(dev, reg, &value, 1);
@@ -95,7 +95,7 @@ static int isp1301_set_value(struct udevice *dev, int reg, u8 value)
static void isp1301_configure(struct udevice *dev)
{
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
i2c_set_bus_num(I2C_2);
#endif
@@ -160,7 +160,7 @@ int usb_cpu_init(void)
u32 ret;
struct udevice *dev = NULL;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_chip_for_busnum(I2C_2, ISP1301_I2C_ADDR, 1, &dev);
if (ret) {
debug("%s: No bus %d\n", __func__, I2C_2);
@@ -216,7 +216,7 @@ int usb_cpu_stop(void)
struct udevice *dev = NULL;
int ret = 0;
-#if CONFIG_IS_ENABLED(DM_I2C)
+#if IS_ENABLED(CONFIG_DM_I2C)
ret = i2c_get_chip_for_busnum(I2C_2, ISP1301_I2C_ADDR, 1, &dev);
if (ret) {
debug("%s: No bus %d\n", __func__, I2C_2);
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 87ef19074b0..976386c7432 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -28,7 +28,7 @@
#define ED_ALIGNMENT 16
#endif
-#if CONFIG_IS_ENABLED(DM_USB) && ARCH_DMA_MINALIGN > 32
+#if IS_ENABLED(CONFIG_DM_USB) && ARCH_DMA_MINALIGN > 32
#define TD_ALIGNMENT ARCH_DMA_MINALIGN
#else
#define TD_ALIGNMENT 32
@@ -399,7 +399,7 @@ typedef struct ohci {
const char *slot_name;
} ohci_t;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
extern struct dm_usb_ops ohci_usb_ops;
int ohci_register(struct udevice *dev, struct ohci_regs *regs);
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 3ccbc16da37..24ec724e193 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -798,7 +798,7 @@ static int r8a66597_usb_probe(struct udevice *dev)
bus_priv->desc_before_addr = true;
- if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
+ if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
ret = device_get_supply_regulator(dev, "vbus-supply",
&priv->vbus_supply);
if (ret) {
@@ -836,7 +836,7 @@ static int r8a66597_usb_remove(struct udevice *dev)
disable_controller(priv);
- if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
+ if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
ret = regulator_set_enable(priv->vbus_supply, false);
if (ret) {
dev_err(dev,
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 1dbd65dfaa3..3e44a7cc642 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -115,7 +115,7 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val)
GFLADJ_30MHZ(val));
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int xhci_dwc3_reset_init(struct udevice *dev,
struct xhci_dwc3_plat *plat)
{
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 72b75306265..160d4b0d339 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -753,7 +753,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
int slot_id = udev->slot_id;
int speed = udev->speed;
int route = 0;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct usb_device *dev = udev;
struct usb_hub_device *hub;
#endif
@@ -769,7 +769,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
/* Only the control endpoint is valid - one endpoint context */
slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(1));
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/* Calculate the route string for this device */
port_num = dev->portnr;
while (!usb_hub_is_root_hub(dev->dev)) {
@@ -812,7 +812,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
BUG();
}
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/* Set up TT fields to support FS/LS devices */
if (speed == USB_SPEED_LOW || speed == USB_SPEED_FULL) {
struct udevice *parent = udev->dev;
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index b1b22b9357c..e4d8328e559 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -223,7 +223,7 @@ static const struct udevice_id ssusb_of_match[] = {
{},
};
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
int dm_usb_gadget_handle_interrupts(struct udevice *dev)
{
struct mtu3 *mtu = dev_get_priv(dev);
@@ -321,7 +321,7 @@ static int mtu3_glue_bind(struct udevice *parent)
dr_mode = usb_get_dr_mode(node);
switch (dr_mode) {
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
case USB_DR_MODE_PERIPHERAL:
case USB_DR_MODE_OTG:
dev_dbg(parent, "%s: dr_mode: peripheral\n", __func__);
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 62c5e8e5fa4..0c70ce0a127 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -23,7 +23,7 @@ struct int_queue {
struct urb urb;
};
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
struct musb_host_data musb_host;
#endif
@@ -247,7 +247,7 @@ int musb_lowlevel_init(struct musb_host_data *host)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
int usb_lowlevel_stop(int index)
{
if (!musb_host.host) {
@@ -305,9 +305,9 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
{
return musb_lowlevel_init(&musb_host);
}
-#endif /* !CONFIG_IS_ENABLED(DM_USB) */
+#endif /* !IS_ENABLED(CONFIG_DM_USB) */
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
static int musb_submit_control_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
struct devrequest *setup)
@@ -370,10 +370,10 @@ struct dm_usb_ops musb_usb_ops = {
.destroy_int_queue = musb_destroy_int_queue,
.reset_root_port = musb_reset_root_port,
};
-#endif /* CONFIG_IS_ENABLED(DM_USB) */
+#endif /* IS_ENABLED(CONFIG_DM_USB) */
#endif /* CONFIG_USB_MUSB_HOST */
-#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if defined(CONFIG_USB_MUSB_GADGET) && !IS_ENABLED(CONFIG_DM_USB_GADGET)
static struct musb *gadget;
int usb_gadget_handle_interrupts(int index)
@@ -431,12 +431,12 @@ struct musb *musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
struct musb **musbp;
switch (plat->mode) {
-#if defined(CONFIG_USB_MUSB_HOST) && !CONFIG_IS_ENABLED(DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) && !IS_ENABLED(CONFIG_DM_USB)
case MUSB_HOST:
musbp = &musb_host.host;
break;
#endif
-#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if defined(CONFIG_USB_MUSB_GADGET) && !IS_ENABLED(CONFIG_DM_USB_GADGET)
case MUSB_PERIPHERAL:
musbp = &gadget;
break;
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 482dfdc6be6..a730c078d5c 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -149,7 +149,7 @@ const struct musb_platform_ops omap2430_ops = {
.disable = omap2430_musb_disable,
};
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct omap2430_musb_plat {
void *base;
@@ -244,7 +244,7 @@ static int omap2430_musb_probe(struct udevice *dev)
return -EIO;
return musb_lowlevel_init(host);
- } else if (CONFIG_IS_ENABLED(DM_USB_GADGET)) {
+ } else if (IS_ENABLED(CONFIG_DM_USB_GADGET)) {
struct musb_host_data *host = dev_get_priv(dev);
host->host = musb_init_controller(&plat->plat,
@@ -297,4 +297,4 @@ U_BOOT_DRIVER(omap2430_musb) = {
.priv_auto = sizeof(struct musb_host_data),
};
-#endif /* CONFIG_IS_ENABLED(DM_USB) */
+#endif /* IS_ENABLED(CONFIG_DM_USB) */
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 91042935b07..5542c9b6fc4 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -22,7 +22,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/* USB 2.0 PHY Control */
#define CM_PHY_PWRDN (1 << 0)
#define CM_PHY_OTG_PWRDN (1 << 1)
@@ -49,7 +49,7 @@ static void ti_musb_set_phy_power(struct udevice *dev, u8 on)
}
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int ti_musb_get_usb_index(int node)
{
@@ -176,7 +176,7 @@ static int ti_musb_host_remove(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int ti_musb_host_of_to_plat(struct udevice *dev)
{
struct ti_musb_plat *plat = dev_get_plat(dev);
@@ -199,7 +199,7 @@ static int ti_musb_host_of_to_plat(struct udevice *dev)
U_BOOT_DRIVER(ti_musb_host) = {
.name = "ti-musb-host",
.id = UCLASS_USB,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_to_plat = ti_musb_host_of_to_plat,
#endif
.probe = ti_musb_host_probe,
@@ -209,12 +209,12 @@ U_BOOT_DRIVER(ti_musb_host) = {
.priv_auto = sizeof(struct musb_host_data),
};
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
struct ti_musb_peripheral {
struct musb *periph;
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int ti_musb_peripheral_of_to_plat(struct udevice *dev)
{
struct ti_musb_plat *plat = dev_get_plat(dev);
@@ -272,7 +272,7 @@ static int ti_musb_peripheral_remove(struct udevice *dev)
U_BOOT_DRIVER(ti_musb_peripheral) = {
.name = "ti-musb-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.of_to_plat = ti_musb_peripheral_of_to_plat,
#endif
.probe = ti_musb_peripheral_probe,
@@ -284,7 +284,7 @@ U_BOOT_DRIVER(ti_musb_peripheral) = {
};
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static int ti_musb_wrapper_bind(struct udevice *parent)
{
ofnode node;
@@ -339,6 +339,6 @@ U_BOOT_DRIVER(ti_musb_wrapper) = {
.of_match = ti_musb_ids,
.bind = ti_musb_wrapper_bind,
};
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
-#endif /* CONFIG_IS_ENABLED(DM_USB) */
+#endif /* IS_ENABLED(CONFIG_DM_USB) */
diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c
index c4fbb182944..5ac674e1e99 100644
--- a/drivers/video/dw_hdmi.c
+++ b/drivers/video/dw_hdmi.c
@@ -815,7 +815,7 @@ static int hdmi_read_edid(struct dw_hdmi *hdmi, int block, u8 *buff)
u32 trytime = 5;
u32 n;
- if (CONFIG_IS_ENABLED(DM_I2C) && hdmi->ddc_bus) {
+ if (IS_ENABLED(CONFIG_DM_I2C) && hdmi->ddc_bus) {
struct udevice *chip;
edid_read_err = i2c_get_chip(hdmi->ddc_bus,
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index e5f28132053..92d97df9323 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -379,7 +379,7 @@ static int meson_dw_hdmi_probe(struct udevice *dev)
struct meson_dw_hdmi *priv = dev_get_priv(dev);
struct reset_ctl_bulk resets;
struct clk_bulk clocks;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *supply;
#endif
int ret;
@@ -406,7 +406,7 @@ static int meson_dw_hdmi_probe(struct udevice *dev)
priv->hdmi.i2c_clk_high = 0x67;
priv->hdmi.i2c_clk_low = 0x78;
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
ret = device_get_supply_regulator(dev, "hdmi-supply", &supply);
if (ret && ret != -ENOENT) {
pr_err("Failed to get HDMI regulator\n");
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 10433949bb8..f8f622fb996 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -65,7 +65,7 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
uint8_t valid_data = 0;
uint32_t vdctrl0;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
int ret;
diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
index af2698ffca8..2bb8e149ee8 100644
--- a/drivers/video/nexell_display.c
+++ b/drivers/video/nexell_display.c
@@ -39,7 +39,7 @@ static char *const dp_dev_str[] = {
[DP_DEVICE_DP1] = "DP1",
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static void nx_display_parse_dp_sync(ofnode node, struct dp_sync_info *sync)
{
sync->h_active_len = ofnode_read_s32_default(node, "h_active_len", 0);
@@ -416,7 +416,7 @@ static struct nx_display_dev *nx_display_setup(void)
}
node = dev_ofnode(dev).of_offset;
- if (CONFIG_IS_ENABLED(OF_CONTROL)) {
+ if (IS_ENABLED(CONFIG_OF_CONTROL)) {
ret = nx_display_parse_dt(dev, dp, plat);
if (ret)
goto err_setup;
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 6aaacff10df..0b773af2ff3 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -233,7 +233,7 @@ void video_set_default_colors(struct udevice *dev, bool invert)
struct video_priv *priv = dev_get_uclass_priv(dev);
int fore, back;
- if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) {
+ if (IS_ENABLED(CONFIG_SYS_WHITE_ON_BLACK)) {
/* White is used when switching to bold, use light gray here */
fore = VID_LIGHT_GRAY;
back = VID_BLACK;
@@ -271,7 +271,7 @@ int video_sync(struct udevice *vid, bool force)
* architectures do not actually implement it. Is there a way to find
* out whether it exists? For now, ARM is safe.
*/
-#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+#if defined(CONFIG_ARM) && !IS_ENABLED(CONFIG_SYS_DCACHE_OFF)
struct video_priv *priv = dev_get_uclass_priv(vid);
if (priv->flush_dcache) {
@@ -455,7 +455,7 @@ static int video_post_probe(struct udevice *dev)
/* Set up colors */
video_set_default_colors(dev, false);
- if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
+ if (!IS_ENABLED(CONFIG_NO_FB_CLEAR))
video_clear(dev);
/*
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 70ba537243f..349f208a0ee 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -54,7 +54,7 @@ UCLASS_DRIVER(w1_eeprom) = {
.name = "w1_eeprom",
.id = UCLASS_W1_EEPROM,
.flags = DM_UC_FLAG_SEQ_ALIAS,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.post_bind = dm_scan_fdt_dev,
#endif
};
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index a4247ecd623..ab8631996c8 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -303,7 +303,7 @@ UCLASS_DRIVER(w1) = {
.flags = DM_UC_FLAG_SEQ_ALIAS,
.per_device_auto = sizeof(struct w1_bus),
.post_probe = w1_post_probe,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
.post_bind = dm_scan_fdt_dev,
#endif
.per_child_plat_auto = sizeof(struct w1_device),
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 447a22d3b36..a54850aa07e 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -77,7 +77,7 @@ static int designware_wdt_stop(struct udevice *dev)
designware_wdt_reset(dev);
writel(0, priv->base + DW_WDT_CR);
- if (CONFIG_IS_ENABLED(DM_RESET) &&
+ if (IS_ENABLED(CONFIG_DM_RESET) &&
ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) {
ret = reset_assert_bulk(&priv->resets);
if (ret)
@@ -115,7 +115,7 @@ static int designware_wdt_probe(struct udevice *dev)
if (!priv->base)
return -EINVAL;
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
struct clk clk;
ret = clk_get_by_index(dev, 0, &clk);
@@ -135,7 +135,7 @@ static int designware_wdt_probe(struct udevice *dev)
priv->clk_khz = CFG_DW_WDT_CLOCK_KHZ;
#endif
- if (CONFIG_IS_ENABLED(DM_RESET) &&
+ if (IS_ENABLED(CONFIG_DM_RESET) &&
ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) {
ret = reset_get_bulk(dev, &priv->resets);
if (ret)
@@ -150,7 +150,7 @@ static int designware_wdt_probe(struct udevice *dev)
return designware_wdt_stop(dev);
err:
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
clk_free(&clk);
#endif
return ret;
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index 894158b304a..5cb31c80209 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -43,7 +43,7 @@ static void imx_watchdog_expire_now(struct watchdog_regs *wdog, bool ext_reset)
}
#if !defined(CONFIG_IMX_WATCHDOG) || \
- (defined(CONFIG_IMX_WATCHDOG) && !CONFIG_IS_ENABLED(WDT))
+ (defined(CONFIG_IMX_WATCHDOG) && !IS_ENABLED(CONFIG_WDT))
void __attribute__((weak)) reset_cpu(void)
{
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
@@ -86,7 +86,7 @@ static void imx_watchdog_init(struct watchdog_regs *wdog, bool ext_reset,
imx_watchdog_reset(wdog);
}
-#if !CONFIG_IS_ENABLED(WDT)
+#if !IS_ENABLED(CONFIG_WDT)
void hw_watchdog_reset(void)
{
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index f0e57b4f728..60f6dd31aaf 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -50,7 +50,7 @@
/* Hardware timeout in seconds */
#define WDT_HW_TIMEOUT 60
-#if !CONFIG_IS_ENABLED(WDT)
+#if !IS_ENABLED(CONFIG_WDT)
static unsigned int wdt_trgr_pattern = 0x1234;
void hw_watchdog_reset(void)
@@ -265,4 +265,4 @@ U_BOOT_DRIVER(omap3_wdt) = {
.probe = omap3_wdt_probe,
.priv_auto = sizeof(struct omap3_wdt_priv),
};
-#endif /* !CONFIG_IS_ENABLED(WDT) */
+#endif /* !IS_ENABLED(CONFIG_WDT) */
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 509896a1b80..585591ec8f9 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -269,7 +269,7 @@ static int wdt_pre_probe(struct udevice *dev)
bool autostart = IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART);
struct wdt_priv *priv;
- if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)) {
timeout = dev_read_u32_default(dev, "timeout-sec", timeout);
reset_period = dev_read_u32_default(dev, "hw_margin_ms",
4 * reset_period) / 4;
diff --git a/env/env.c b/env/env.c
index 0f73ebc08e0..5ab5eed7a62 100644
--- a/env/env.c
+++ b/env/env.c
@@ -209,7 +209,7 @@ int env_load(void)
printf("OK\n");
gd->env_load_prio = prio;
-#if !CONFIG_IS_ENABLED(ENV_APPEND)
+#if !IS_ENABLED(CONFIG_ENV_APPEND)
return 0;
#endif
} else if (ret == -ENOMSG) {
diff --git a/env/mmc.c b/env/mmc.c
index 85761417f28..e6b8e35373f 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -53,7 +53,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define ENV_MMC_HWPART_REDUND 1
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
static inline int mmc_offset_try_partition(const char *str, int copy, s64 *val)
{
struct disk_partition info;
@@ -210,7 +210,7 @@ static const char *init_mmc_for_env(struct mmc *mmc)
if (!mmc)
return "No MMC card found";
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct udevice *dev;
if (blk_get_from_parent(mmc->dev, &dev))
diff --git a/env/sf.c b/env/sf.c
index a425ecc11c8..dc7eaac7504 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR;
static int setup_flash_device(struct spi_flash **env_flash)
{
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
struct udevice *new;
int ret;
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 2da93dae3cf..196518f8d7b 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -108,7 +108,7 @@ int fat_register_device(struct blk_desc *dev_desc, int part_no)
info.name[0] = 0;
info.type[0] = 0;
info.bootable = 0;
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
info.uuid[0] = 0;
#endif
}
@@ -148,7 +148,7 @@ static void get_name(dir_entry *dirent, char *s_name)
static int flush_dirty_fat_buffer(fsdata *mydata);
-#if !CONFIG_IS_ENABLED(FAT_WRITE)
+#if !IS_ENABLED(CONFIG_FAT_WRITE)
/* Stub for read only operation */
int flush_dirty_fat_buffer(fsdata *mydata)
{
@@ -1332,7 +1332,7 @@ int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp)
memset(dent, 0, sizeof(*dent));
strcpy(dent->name, dir->itr.name);
- if (CONFIG_IS_ENABLED(EFI_LOADER)) {
+ if (IS_ENABLED(CONFIG_EFI_LOADER)) {
dent->attr = dir->itr.dent->attr;
fat2rtc(le16_to_cpu(dir->itr.dent->cdate),
le16_to_cpu(dir->itr.dent->ctime), &dent->create_time);
diff --git a/fs/fs.c b/fs/fs.c
index 8324b4a22f2..cb34e8e5939 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -183,7 +183,7 @@ struct fstype_info {
};
static struct fstype_info fstypes[] = {
-#if CONFIG_IS_ENABLED(FS_FAT)
+#if IS_ENABLED(CONFIG_FS_FAT)
{
.fstype = FS_TYPE_FAT,
.name = "fat",
@@ -194,7 +194,7 @@ static struct fstype_info fstypes[] = {
.exists = fat_exists,
.size = fat_size,
.read = fat_read_file,
-#if CONFIG_IS_ENABLED(FAT_WRITE)
+#if IS_ENABLED(CONFIG_FAT_WRITE)
.write = file_fat_write,
.unlink = fat_unlink,
.mkdir = fat_mkdir,
@@ -211,7 +211,7 @@ static struct fstype_info fstypes[] = {
},
#endif
-#if CONFIG_IS_ENABLED(FS_EXT4)
+#if IS_ENABLED(CONFIG_FS_EXT4)
{
.fstype = FS_TYPE_EXT,
.name = "ext4",
@@ -315,7 +315,7 @@ static struct fstype_info fstypes[] = {
},
#endif
#endif
-#if CONFIG_IS_ENABLED(FS_SQUASHFS)
+#if IS_ENABLED(CONFIG_FS_SQUASHFS)
{
.fstype = FS_TYPE_SQUASHFS,
.name = "squashfs",
diff --git a/include/_exports.h b/include/_exports.h
index 1af946fac32..2bfd065fa88 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -26,7 +26,7 @@
EXPORT_FUNC(dummy, void, free_hdlr, void)
#endif
EXPORT_FUNC(malloc, void *, malloc, size_t)
-#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
+#if !IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE)
EXPORT_FUNC(free, void, free, void *)
#endif
EXPORT_FUNC(udelay, void, udelay, unsigned long)
@@ -43,7 +43,7 @@
EXPORT_FUNC(simple_strtol, long, simple_strtol,
const char *, char **, unsigned int)
EXPORT_FUNC(strcmp, int, strcmp, const char *cs, const char *ct)
-#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_CMD_I2C) && !IS_ENABLED(CONFIG_DM_I2C)
EXPORT_FUNC(i2c_write, int, i2c_write, uchar, uint, int , uchar * , int)
EXPORT_FUNC(i2c_read, int, i2c_read, uchar, uint, int , uchar * , int)
#else
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 4141bf4d1da..0e2559a8a85 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -112,7 +112,7 @@ struct global_data {
* not be called.
*/
unsigned long have_console;
-#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER)
+#if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER)
/**
* @precon_buf_idx: pre-console buffer index
*
@@ -217,11 +217,11 @@ struct global_data {
* @uclass_root_s.
*/
struct list_head *uclass_root;
-# if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)
+# if IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT)
/** @dm_driver_rt: Dynamic info about the driver */
struct driver_rt *dm_driver_rt;
# endif
-#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_RT)
/** @dm_udevice_rt: Dynamic info about the udevice */
struct udevice_rt *dm_udevice_rt;
/**
@@ -254,14 +254,14 @@ struct global_data {
* @fdt_src: Source of FDT
*/
enum fdt_source_t fdt_src;
-#if CONFIG_IS_ENABLED(OF_LIVE)
+#if IS_ENABLED(CONFIG_OF_LIVE)
/**
* @of_root: root node of the live tree
*/
struct device_node *of_root;
#endif
-#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
+#if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
/**
* @multi_dtb_fit: pointer to uncompressed multi-dtb FIT image
*/
@@ -287,7 +287,7 @@ struct global_data {
*/
void *trace_buff;
#endif
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
/**
* @cur_i2c_bus: currently used I2C bus
*/
@@ -433,7 +433,7 @@ struct global_data {
*/
bool log_cont;
#endif
-#if CONFIG_IS_ENABLED(BLOBLIST)
+#if IS_ENABLED(CONFIG_BLOBLIST)
/**
* @bloblist: blob list information
*/
@@ -443,7 +443,7 @@ struct global_data {
*/
struct bloblist_hdr *new_bloblist;
#endif
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
/**
* @spl_handoff: SPL hand-off information
*/
@@ -473,7 +473,7 @@ struct global_data {
*/
char *smbios_version;
#endif
-#if CONFIG_IS_ENABLED(EVENT)
+#if IS_ENABLED(CONFIG_EVENT)
/**
* @event_state: Points to the current state of events
*/
@@ -506,7 +506,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#endif
/* These macros help avoid #ifdefs in the code */
-#if CONFIG_IS_ENABLED(OF_LIVE)
+#if IS_ENABLED(CONFIG_OF_LIVE)
#define gd_of_root() gd->of_root
#define gd_of_root_ptr() &gd->of_root
#define gd_set_of_root(_root) gd->of_root = (_root)
@@ -516,7 +516,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_of_root(_root)
#endif
-#if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT)
#define gd_set_dm_driver_rt(dyn) gd->dm_driver_rt = dyn
#define gd_dm_driver_rt() gd->dm_driver_rt
#else
@@ -524,7 +524,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_dm_driver_rt() NULL
#endif
-#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_RT)
#define gd_set_dm_udevice_rt(dyn) gd->dm_udevice_rt = dyn
#define gd_dm_udevice_rt() gd->dm_udevice_rt
#define gd_set_dm_priv_base(dyn) gd->dm_priv_base = dyn
@@ -546,7 +546,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_acpi_start(addr)
#endif
-#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
+#if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
#define gd_multi_dtb_fit() gd->multi_dtb_fit
#define gd_set_multi_dtb_fit(_dtb) gd->multi_dtb_fit = _dtb
#else
@@ -554,7 +554,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_multi_dtb_fit(_dtb)
#endif
-#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
+#if IS_ENABLED(CONFIG_EVENT_DYNAMIC)
#define gd_event_state() ((struct event_state *)&gd->event_state)
#else
#define gd_event_state() NULL
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index dd0bdf2315e..eac16ea5b88 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -381,7 +381,7 @@ struct dm_gpio_ops {
int (*get_flags)(struct udevice *dev, unsigned int offset,
ulong *flagsp);
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
/**
* get_acpi() - Get the ACPI info for a GPIO
*
diff --git a/include/atf_common.h b/include/atf_common.h
index d69892fac6c..8ace8404c34 100644
--- a/include/atf_common.h
+++ b/include/atf_common.h
@@ -127,7 +127,7 @@ struct atf_image_info {
struct param_header h;
uintptr_t image_base; /* physical address of base of image */
uint32_t image_size; /* bytes read from image file */
-#if CONFIG_IS_ENABLED(ATF_LOAD_IMAGE_V2)
+#if IS_ENABLED(CONFIG_ATF_LOAD_IMAGE_V2)
uint32_t image_max_size;
#endif
};
diff --git a/include/binman_sym.h b/include/binman_sym.h
index 528d7e4e90e..973feff7e20 100644
--- a/include/binman_sym.h
+++ b/include/binman_sym.h
@@ -15,7 +15,7 @@
#define BINMAN_SYM_MAGIC_VALUE (0x4d595342UL)
#define BINMAN_SYM_MISSING (-1UL)
-#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
+#if IS_ENABLED(CONFIG_BINMAN_SYMBOLS)
/**
* binman_symname() - Internal function to get a binman symbol name
@@ -114,7 +114,7 @@ extern ulong _binman_sym_magic;
(*(_type *)&binman_symname(_entry_name, _prop_name)) : \
BINMAN_SYM_MISSING)
-#else /* !CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */
+#else /* !IS_ENABLED(CONFIG_BINMAN_SYMBOLS) */
#define binman_sym_declare(_type, _entry_name, _prop_name)
@@ -128,6 +128,6 @@ extern ulong _binman_sym_magic;
#define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING
-#endif /* CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */
+#endif /* IS_ENABLED(CONFIG_BINMAN_SYMBOLS) */
#endif
diff --git a/include/blk.h b/include/blk.h
index 1db203c1bab..9d73f0f693d 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -24,7 +24,7 @@ struct udevice;
static inline bool blk_enabled(void)
{
- return CONFIG_IS_ENABLED(BLK) || IS_ENABLED(CONFIG_SPL_LEGACY_BLOCK);
+ return IS_ENABLED(CONFIG_BLK) || IS_ENABLED(CONFIG_SPL_LEGACY_BLOCK);
}
#define BLK_VEN_SIZE 40
@@ -77,7 +77,7 @@ struct blk_desc {
uint32_t mbr_sig; /* MBR integer signature */
efi_guid_t guid_sig; /* GPT GUID Signature */
};
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
/*
* For now we have a few functions which take struct blk_desc as a
* parameter. This field allows them to look up the associated
@@ -104,7 +104,7 @@ struct blk_desc {
#define PAD_TO_BLOCKSIZE(size, blk_desc) \
(PAD_SIZE(size, blk_desc->blksz))
-#if CONFIG_IS_ENABLED(BLOCK_CACHE)
+#if IS_ENABLED(CONFIG_BLOCK_CACHE)
/**
* blkcache_init() - initialize the block cache list pointers
@@ -200,7 +200,7 @@ static inline void blkcache_free(void) {}
#endif
-#if CONFIG_IS_ENABLED(BLK)
+#if IS_ENABLED(CONFIG_BLK)
struct udevice;
/* Operations on block devices */
diff --git a/include/bootdev.h b/include/bootdev.h
index b92ff4d4f15..264883be847 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -367,7 +367,7 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp,
*/
int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
-#if CONFIG_IS_ENABLED(BOOTSTD)
+#if IS_ENABLED(CONFIG_BOOTSTD)
/**
* bootdev_setup_for_dev() - Bind a new bootdev device (deprecated)
*
diff --git a/include/bootstage.h b/include/bootstage.h
index 685939ccffc..ec4fc0faf11 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -224,7 +224,7 @@ enum bootstage_id {
*/
ulong timer_get_boot_us(void);
-#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
+#if defined(USE_HOSTCC) || !IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS)
#define show_boot_progress(val) do {} while (0)
#else
/**
@@ -237,7 +237,7 @@ void show_boot_progress(int val);
#endif
#if !defined(USE_HOSTCC)
-#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#if IS_ENABLED(CONFIG_BOOTSTAGE)
#define ENABLE_BOOTSTAGE
#endif
#endif
diff --git a/include/cli.h b/include/cli.h
index c777c90313f..f433f932711 100644
--- a/include/cli.h
+++ b/include/cli.h
@@ -126,7 +126,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer,
*/
int cli_simple_parse_line(char *line, char *argv[]);
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
/**
* cli_process_fdt() - process the boot command from the FDT
*
diff --git a/include/clk.h b/include/clk.h
index 138766bd49f..836c0901317 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -90,7 +90,7 @@ struct clk_bulk {
struct phandle_1_arg;
-#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_CLK)
/**
* clk_get_by_phandle() - Get a clock by its phandle information (of-platadata)
* @dev: Device containing the phandle
@@ -388,7 +388,7 @@ enum clk_defaults_stage {
CLK_DEFAULTS_POST_FORCE,
};
-#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_CLK)
/**
* clk_set_defaults - Process ``assigned-{clocks/clock-parents/clock-rates}``
* properties to configure clocks
@@ -422,7 +422,7 @@ static inline int clk_release_bulk(struct clk_bulk *bulk)
return clk_release_all(bulk->clks, bulk->count);
}
-#if CONFIG_IS_ENABLED(CLK)
+#if IS_ENABLED(CONFIG_CLK)
/**
* clk_request() - Request a clock by provider-specific ID.
* @dev: The clock provider device.
@@ -585,7 +585,7 @@ int clk_get_by_id(ulong id, struct clk **clkp);
*/
bool clk_dev_binded(struct clk *clk);
-#else /* CONFIG_IS_ENABLED(CLK) */
+#else /* IS_ENABLED(CONFIG_CLK) */
static inline int clk_request(struct udevice *dev, struct clk *clk)
{
@@ -661,7 +661,7 @@ static inline bool clk_dev_binded(struct clk *clk)
{
return false;
}
-#endif /* CONFIG_IS_ENABLED(CLK) */
+#endif /* IS_ENABLED(CONFIG_CLK) */
/**
* clk_valid() - check if clk is valid
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index b3673147dc2..2c3b824bf9e 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -229,7 +229,7 @@
/*
* I2C
*/
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
#define CFG_SYS_I2C_NOPROBES { {0, 0x69} }
#endif
diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h
index e7ae18ec5f9..1d87b29b4d3 100644
--- a/include/configs/kmcent2.h
+++ b/include/configs/kmcent2.h
@@ -314,7 +314,7 @@
* shorted - index 1
* Retain non-DM serial port for debug purposes.
*/
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#define CFG_SYS_NS16550_CLK (get_bus_freq(0) / 2)
#define CFG_SYS_NS16550_COM1 (CFG_SYS_CCSRBAR + 0x11C500)
#endif
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 669303091d6..746890efcc8 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -33,7 +33,7 @@
* NS16550 Configuration
*/
#define CFG_SYS_NS16550_CLK CFG_SYS_TCLK
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
#endif
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index fd8c729d839..2828047241d 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -311,7 +311,7 @@
#define CFG_SYS_NS16550_COM2 (CFG_SYS_CCSRBAR+0x4600)
/* I2C */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
#define CFG_SYS_I2C_NOPROBES { {0, 0x29} }
#endif
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index d2d70f0fc23..2545a5acb71 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -23,7 +23,7 @@
#else
#define CFG_SYS_NS16550_CLK 24000000
#endif
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
# define CFG_SYS_NS16550_COM1 SUNXI_UART0_BASE
# define CFG_SYS_NS16550_COM2 SUNXI_UART1_BASE
# define CFG_SYS_NS16550_COM3 SUNXI_UART2_BASE
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 9e312ac16d1..2a44cb9b549 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -28,7 +28,7 @@
* Hardware drivers
*/
#define CFG_SYS_NS16550_CLK 48000000
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#define CFG_SYS_NS16550_COM3 UART3_BASE
#endif
diff --git a/include/configs/x530.h b/include/configs/x530.h
index e1678e79e49..472aef8c90f 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -14,7 +14,7 @@
* NS16550 Configuration
*/
#define CFG_SYS_NS16550_CLK CFG_SYS_TCLK
-#if !CONFIG_IS_ENABLED(DM_SERIAL)
+#if !IS_ENABLED(CONFIG_DM_SERIAL)
#define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
#endif
diff --git a/include/dfu.h b/include/dfu.h
index 06efbf4b208..76dae7023cf 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -435,7 +435,7 @@ int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
/* Each entity has 5 arguments in maximum. */
#define DFU_MAX_ENTITY_ARGS 5
-#if CONFIG_IS_ENABLED(DFU_MMC)
+#if IS_ENABLED(CONFIG_DFU_MMC)
extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
char **argv, int argc);
#else
@@ -447,7 +447,7 @@ static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
}
#endif
-#if CONFIG_IS_ENABLED(DFU_NAND)
+#if IS_ENABLED(CONFIG_DFU_NAND)
extern int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr,
char **argv, int argc);
#else
@@ -459,7 +459,7 @@ static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr,
}
#endif
-#if CONFIG_IS_ENABLED(DFU_RAM)
+#if IS_ENABLED(CONFIG_DFU_RAM)
extern int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr,
char **argv, int argc);
#else
@@ -471,7 +471,7 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr,
}
#endif
-#if CONFIG_IS_ENABLED(DFU_SF)
+#if IS_ENABLED(CONFIG_DFU_SF)
extern int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr,
char **argv, int argc);
#else
@@ -483,7 +483,7 @@ static inline int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr,
}
#endif
-#if CONFIG_IS_ENABLED(DFU_MTD)
+#if IS_ENABLED(CONFIG_DFU_MTD)
extern int dfu_fill_entity_mtd(struct dfu_entity *dfu, char *devstr,
char **argv, int argc);
#else
@@ -514,7 +514,7 @@ static inline int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr,
extern bool dfu_reinit_needed;
-#if CONFIG_IS_ENABLED(DFU_WRITE_ALT)
+#if IS_ENABLED(CONFIG_DFU_WRITE_ALT)
/**
* dfu_write_by_name() - write data to DFU medium
* @dfu_entity_name: Name of DFU entity to write
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index 3adfe217678..04e793c3176 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -10,7 +10,7 @@
#define __DM_ACPI_H__
/* Allow operations to be optional for ACPI */
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
#define ACPI_OPS_PTR(_ptr) .acpi_ops = _ptr,
#else
#define ACPI_OPS_PTR(_ptr)
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index f31c4702086..f8045625292 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -204,7 +204,7 @@ int device_probe(struct udevice *dev);
* this is a vital device and flags is DM_REMOVE_NON_VITAL, other -ve on
* error (such an error here is normally a very bad thing)
*/
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int device_remove(struct udevice *dev, uint flags);
#else
static inline int device_remove(struct udevice *dev, uint flags) { return 0; }
@@ -218,13 +218,13 @@ static inline int device_remove(struct udevice *dev, uint flags) { return 0; }
* @dev: Pointer to device to unbind
* Return: 0 if OK, -ve on error
*/
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int device_unbind(struct udevice *dev);
#else
static inline int device_unbind(struct udevice *dev) { return 0; }
#endif
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
void device_free(struct udevice *dev);
#else
static inline void device_free(struct udevice *dev) {}
@@ -241,7 +241,7 @@ static inline void device_free(struct udevice *dev) {}
* @drv: The targeted driver
* Return: 0 on success, -ve on error
*/
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int device_chld_unbind(struct udevice *dev, struct driver *drv);
#else
static inline int device_chld_unbind(struct udevice *dev, struct driver *drv)
@@ -266,7 +266,7 @@ static inline int device_chld_unbind(struct udevice *dev, struct driver *drv)
* Return: 0 on success, -EPROBE_DEFER if any child failed to remove, other
* -ve on error
*/
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int device_chld_remove(struct udevice *dev, struct driver *drv,
uint flags);
#else
@@ -397,7 +397,7 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr);
#define DM_UCLASS_ROOT_S_NON_CONST (((gd_t *)gd)->uclass_root_s)
/* device resource management */
-#if CONFIG_IS_ENABLED(DEVRES)
+#if IS_ENABLED(CONFIG_DEVRES)
/**
* devres_release_probe - Release managed resources allocated after probing
@@ -431,7 +431,7 @@ static inline void devres_release_all(struct udevice *dev)
static inline int device_notify(const struct udevice *dev, enum event_t type)
{
-#if CONFIG_IS_ENABLED(DM_EVENT)
+#if IS_ENABLED(CONFIG_DM_EVENT)
return event_notify(type, &dev, sizeof(dev));
#else
return 0;
diff --git a/include/dm/device.h b/include/dm/device.h
index e9460386ca9..0e12a846a68 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -182,27 +182,27 @@ struct udevice {
struct list_head uclass_node;
struct list_head child_head;
struct list_head sibling_node;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+#if !IS_ENABLED(CONFIG_OF_PLATDATA_RT)
u32 flags_;
#endif
int seq_;
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
ofnode node_;
#endif
-#if CONFIG_IS_ENABLED(DEVRES)
+#if IS_ENABLED(CONFIG_DEVRES)
struct list_head devres_head;
#endif
-#if CONFIG_IS_ENABLED(DM_DMA)
+#if IS_ENABLED(CONFIG_DM_DMA)
ulong dma_offset;
#endif
-#if CONFIG_IS_ENABLED(IOMMU)
+#if IS_ENABLED(CONFIG_IOMMU)
struct udevice *iommu;
#endif
};
static inline int dm_udevice_size(void)
{
- if (CONFIG_IS_ENABLED(OF_PLATDATA_RT))
+ if (IS_ENABLED(CONFIG_OF_PLATDATA_RT))
return ALIGN(sizeof(struct udevice), CONFIG_LINKER_LIST_ALIGN);
return sizeof(struct udevice);
@@ -230,7 +230,7 @@ struct udevice_rt {
/* Returns the operations for a device */
#define device_get_ops(dev) ((dev)->driver->ops)
-#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_RT)
u32 dev_get_flags(const struct udevice *dev);
void dev_or_flags(const struct udevice *dev, u32 or);
void dev_bic_flags(const struct udevice *dev, u32 bic);
@@ -259,7 +259,7 @@ static inline void dev_bic_flags(struct udevice *dev, u32 bic)
*/
static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
return dev->node_;
#else
return ofnode_null();
@@ -269,7 +269,7 @@ static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev)
/* Returns non-zero if the device is active (probed and not removed) */
#define device_active(dev) (dev_get_flags(dev) & DM_FLAG_ACTIVATED)
-#if CONFIG_IS_ENABLED(DM_DMA)
+#if IS_ENABLED(CONFIG_DM_DMA)
#define dev_set_dma_offset(_dev, _offset) _dev->dma_offset = _offset
#define dev_get_dma_offset(_dev) _dev->dma_offset
#else
@@ -279,7 +279,7 @@ static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev)
static inline __attribute_const__ int dev_of_offset(const struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
return ofnode_to_offset(dev_ofnode(dev));
#else
return -1;
@@ -288,7 +288,7 @@ static inline __attribute_const__ int dev_of_offset(const struct udevice *dev)
static inline __attribute_const__ bool dev_has_ofnode(const struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
return ofnode_valid(dev_ofnode(dev));
#else
return false;
@@ -297,7 +297,7 @@ static inline __attribute_const__ bool dev_has_ofnode(const struct udevice *dev)
static inline void dev_set_ofnode(struct udevice *dev, ofnode node)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
dev->node_ = node;
#endif
}
@@ -317,11 +317,11 @@ struct udevice_id {
ulong data;
};
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if IS_ENABLED(CONFIG_OF_REAL)
#define of_match_ptr(_ptr) (_ptr)
#else
#define of_match_ptr(_ptr) NULL
-#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
+#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */
/**
* struct driver - A driver for a feature or peripheral
@@ -389,7 +389,7 @@ struct driver {
int per_child_plat_auto;
const void *ops; /* driver-specific operations */
uint32_t flags;
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
struct acpi_ops *acpi_ops;
#endif
};
diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h
index 82d7a7d4924..47329089d50 100644
--- a/include/dm/device_compat.h
+++ b/include/dm/device_compat.h
@@ -48,7 +48,7 @@
if ((_DEBUG && level == LOGL_DEBUG) || \
(_VERBOSE_DEBUG && level == LOGL_DEBUG_CONTENT)) \
printf(fmt, ##__VA_ARGS__); \
- else if (CONFIG_IS_ENABLED(LOG)) \
+ else if (IS_ENABLED(CONFIG_LOG)) \
log(cat, level, fmt, ##__VA_ARGS__); \
else if (level < CONFIG_VAL(LOGLEVEL)) \
printf(fmt, ##__VA_ARGS__); \
diff --git a/include/dm/devres.h b/include/dm/devres.h
index 697534aa5be..92717e1c30c 100644
--- a/include/dm/devres.h
+++ b/include/dm/devres.h
@@ -30,7 +30,7 @@ struct devres_stats {
int total_size;
};
-#if CONFIG_IS_ENABLED(DEVRES)
+#if IS_ENABLED(CONFIG_DEVRES)
#ifdef CONFIG_DEBUG_DEVRES
void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index fa9865602d8..02a92f2ca18 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -27,7 +27,7 @@ struct ofnode_phandle_args {
uint32_t args[OF_MAX_PHANDLE_ARGS];
};
-#if CONFIG_IS_ENABLED(OFNODE_MULTI_TREE)
+#if IS_ENABLED(CONFIG_OFNODE_MULTI_TREE)
/**
* oftree_reset() - reset the state of the oftree list
*
@@ -549,7 +549,7 @@ bool ofnode_read_bool(ofnode node, const char *propname);
*/
ofnode ofnode_find_subnode(ofnode node, const char *subnode_name);
-#if CONFIG_IS_ENABLED(DM_INLINE_OFNODE)
+#if IS_ENABLED(CONFIG_DM_INLINE_OFNODE)
#include <asm/global_data.h>
static inline bool ofnode_is_enabled(ofnode node)
@@ -1436,7 +1436,7 @@ ofnode ofnode_get_phy_node(ofnode eth_node);
*/
phy_interface_t ofnode_read_phy_mode(ofnode mac_node);
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
/**
* ofnode_conf_read_bool() - Read a boolean value from the U-Boot config
*
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index e3e50afeaff..933774fca8e 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -479,7 +479,7 @@ enum pin_config_param {
PIN_CONFIG_MAX = 255, /* 0xFF */
};
-#if CONFIG_IS_ENABLED(PINCTRL_GENERIC)
+#if IS_ENABLED(CONFIG_PINCTRL_GENERIC)
/**
* pinctrl_generic_set_state() - Generic set_state operation
* @pctldev: Pinctrl device to use
@@ -501,7 +501,7 @@ static inline int pinctrl_generic_set_state(struct udevice *pctldev,
}
#endif
-#if CONFIG_IS_ENABLED(PINCTRL)
+#if IS_ENABLED(CONFIG_PINCTRL)
/**
* pinctrl_select_state() - Set a device to a given state
* @dev: Peripheral device
diff --git a/include/dm/platdata.h b/include/dm/platdata.h
index 47ba8aab7ae..322541f3b3d 100644
--- a/include/dm/platdata.h
+++ b/include/dm/platdata.h
@@ -27,13 +27,13 @@
struct driver_info {
const char *name;
const void *plat;
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
unsigned short plat_size;
short parent_idx;
#endif
};
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
#define driver_info_parent_id(driver_info) driver_info->parent_idx
#else
#define driver_info_parent_id(driver_info) (-1)
@@ -59,7 +59,7 @@ struct driver_rt {
* When of-platdata is in use, U_BOOT_DRVINFO() cannot be used outside of the
* dt-plat.c file created by dtoc
*/
-#if CONFIG_IS_ENABLED(OF_PLATDATA) && !defined(DT_PLAT_C)
+#if IS_ENABLED(CONFIG_OF_PLATDATA) && !defined(DT_PLAT_C)
#define U_BOOT_DRVINFO(__name) _Static_assert(false, \
"Cannot use U_BOOT_DRVINFO with of-platdata. Please use devicetree instead")
#else
diff --git a/include/dm/read.h b/include/dm/read.h
index cc4f16196fd..cb9d1b0bb14 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -18,7 +18,7 @@
struct resource;
-#if CONFIG_IS_ENABLED(OF_LIVE)
+#if IS_ENABLED(CONFIG_OF_LIVE)
static inline const struct device_node *dev_np(const struct udevice *dev)
{
return ofnode_to_np(dev_ofnode(dev));
@@ -30,7 +30,7 @@ static inline const struct device_node *dev_np(const struct udevice *dev)
}
#endif
-#if !defined(CONFIG_DM_DEV_READ_INLINE) || CONFIG_IS_ENABLED(OF_PLATDATA)
+#if !defined(CONFIG_DM_DEV_READ_INLINE) || IS_ENABLED(CONFIG_OF_PLATDATA)
/**
* dev_read_u8() - read a 8-bit integer from a device's DT property
*
@@ -1096,7 +1096,7 @@ static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
static inline int dev_read_alias_seq(const struct udevice *dev, int *devnump)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name,
dev_of_offset(dev), devnump);
#else
@@ -1166,7 +1166,7 @@ static inline int dev_get_dma_range(const struct udevice *dev, phys_addr_t *cpu,
static inline int dev_read_alias_highest_id(const char *stem)
{
- if (!CONFIG_IS_ENABLED(OF_LIBFDT) || !gd->fdt_blob)
+ if (!IS_ENABLED(CONFIG_OF_LIBFDT) || !gd->fdt_blob)
return -1;
return fdtdec_get_alias_highest_id(gd->fdt_blob, stem);
}
diff --git a/include/dm/root.h b/include/dm/root.h
index b2f30a842f5..85276535aa4 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -155,7 +155,7 @@ int dm_init(bool of_live);
*/
int dm_uninit(void);
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
/**
* dm_remove_devices_flags - Call remove function of all drivers with
* specific removal flags set to selectively
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index 3ddcdd21439..47f753b049a 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -259,7 +259,7 @@ int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
*/
int uclass_bind_device(struct udevice *dev);
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
/**
* uclass_pre_unbind_device() - Prepare to deassociate device with a uclass
*
@@ -316,7 +316,7 @@ int uclass_post_probe_device(struct udevice *dev);
* @dev: Pointer to the device
* Return: 0 on success, -ve on error
*/
-#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
+#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)
int uclass_pre_remove_device(struct udevice *dev);
#else
static inline int uclass_pre_remove_device(struct udevice *dev) { return 0; }
diff --git a/include/dm/util.h b/include/dm/util.h
index 4bb49e9e8c0..28660fe9482 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -8,7 +8,7 @@
struct dm_stats;
-#if CONFIG_IS_ENABLED(DM_WARN)
+#if IS_ENABLED(CONFIG_DM_WARN)
#define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt)
#else
static inline void dm_warn(const char *fmt, ...)
@@ -61,7 +61,7 @@ void dm_dump_static_driver_info(void);
*/
void dm_dump_mem(struct dm_stats *stats);
-#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_INST) && IS_ENABLED(CONFIG_READ_ONLY)
void *dm_priv_to_rw(void *priv);
#else
static inline void *dm_priv_to_rw(void *priv)
diff --git a/include/dma.h b/include/dma.h
index 9b392212277..f10f3c700da 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -165,7 +165,7 @@ struct dma {
unsigned long id;
};
-# if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(DMA)
+# if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_DMA)
/**
* dma_get_by_index - Get/request a DMA by integer index.
*
@@ -307,7 +307,7 @@ int dma_send(struct dma *dma, void *src, size_t len, void *metadata);
int dma_get_cfg(struct dma *dma, u32 cfg_id, void **cfg_data);
#endif /* CONFIG_DMA_CHANNELS */
-#if CONFIG_IS_ENABLED(DMA)
+#if IS_ENABLED(CONFIG_DMA)
/*
* dma_get_device - get a DMA device which supports transfer
* type of transfer_type
diff --git a/include/dt-structs.h b/include/dt-structs.h
index fa1622cb1dc..7c73c9d0da6 100644
--- a/include/dt-structs.h
+++ b/include/dt-structs.h
@@ -7,7 +7,7 @@
#define __DT_STRUCTS
/* These structures may only be used in SPL */
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
struct driver_info;
/**
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index e08530ec4e5..da723df174c 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -47,7 +47,7 @@ void dwc3_uboot_exit(int index);
void dwc3_uboot_handle_interrupt(int index);
struct phy;
-#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_PHY) && IS_ENABLED(CONFIG_DM_USB)
int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys);
int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys);
#else
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 4560b0d04cb..e345f1ee479 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -32,7 +32,7 @@ static inline void *guidcpy(void *dst, const void *src)
return memcpy(dst, src, sizeof(efi_guid_t));
}
-#if CONFIG_IS_ENABLED(EFI_LOADER)
+#if IS_ENABLED(CONFIG_EFI_LOADER)
/**
* __efi_runtime_data - declares a non-const variable for EFI runtime section
@@ -102,7 +102,7 @@ void efi_print_image_infos(void *pc);
/* Hook at initialization */
efi_status_t efi_launch_capsules(void);
-#else /* CONFIG_IS_ENABLED(EFI_LOADER) */
+#else /* IS_ENABLED(CONFIG_EFI_LOADER) */
/* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */
#define __efi_runtime_data
@@ -125,7 +125,7 @@ static inline efi_status_t efi_launch_capsules(void)
return EFI_SUCCESS;
}
-#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */
+#endif /* IS_ENABLED(CONFIG_EFI_LOADER) */
/* Maximum number of configuration tables */
#define EFI_MAX_CONFIGURATION_TABLES 16
diff --git a/include/env_internal.h b/include/env_internal.h
index 6a694946468..5421af6628e 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -188,7 +188,7 @@ struct env_driver {
#define env_save_ptr(x) NULL
#endif
-#define ENV_SAVE_PTR(x) (CONFIG_IS_ENABLED(SAVEENV) ? (x) : NULL)
+#define ENV_SAVE_PTR(x) (IS_ENABLED(CONFIG_SAVEENV) ? (x) : NULL)
#define ENV_ERASE_PTR(x) (IS_ENABLED(CONFIG_CMD_ERASEENV) ? (x) : NULL)
extern struct hsearch_data env_htab;
diff --git a/include/errno.h b/include/errno.h
index 5a8816d0a1d..5dc03603b63 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -25,7 +25,7 @@ extern int errno __errno_asm_label;
* Return: string describing the error. If CONFIG_ERRNO_STR is not
* defined an empty string is returned.
*/
-#if CONFIG_IS_ENABLED(ERRNO_STR)
+#if IS_ENABLED(CONFIG_ERRNO_STR)
const char *errno_str(int errno);
#else
static const char error_message[] = "";
diff --git a/include/event.h b/include/event.h
index e4580b68350..b7b1effb524 100644
--- a/include/event.h
+++ b/include/event.h
@@ -95,13 +95,13 @@ typedef int (*event_handler_t)(void *ctx, struct event *event);
struct evspy_info {
event_handler_t func;
enum event_t type;
-#if CONFIG_IS_ENABLED(EVENT_DEBUG)
+#if IS_ENABLED(CONFIG_EVENT_DEBUG)
const char *id;
#endif
};
/* Declare a new event spy */
-#if CONFIG_IS_ENABLED(EVENT_DEBUG)
+#if IS_ENABLED(CONFIG_EVENT_DEBUG)
#define _ESPY_REC(_type, _func) { _func, _type, #_func, }
#else
#define _ESPY_REC(_type, _func) { _func, _type, }
@@ -109,7 +109,7 @@ struct evspy_info {
static inline const char *event_spy_id(struct evspy_info *spy)
{
-#if CONFIG_IS_ENABLED(EVENT_DEBUG)
+#if IS_ENABLED(CONFIG_EVENT_DEBUG)
return spy->id;
#else
return "?";
@@ -190,7 +190,7 @@ int event_manual_reloc(void);
*/
int event_notify(enum event_t type, void *data, int size);
-#if CONFIG_IS_ENABLED(EVENT)
+#if IS_ENABLED(CONFIG_EVENT)
/**
* event_notify_null() - notify spies about an event
*
@@ -207,7 +207,7 @@ static inline int event_notify_null(enum event_t type)
}
#endif
-#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
+#if IS_ENABLED(CONFIG_EVENT_DYNAMIC)
/**
* event_uninit() - Clean up dynamic events
*
diff --git a/include/exports.h b/include/exports.h
index 6f8c9cf4517..e1845bc228e 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -35,7 +35,7 @@ int printf(const char* fmt, ...);
void install_hdlr(int, interrupt_handler_t, void*);
void free_hdlr(int);
void *malloc(size_t);
-#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
+#if !IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE)
void free(void*);
#endif
void __udelay(unsigned long);
@@ -49,7 +49,7 @@ long simple_strtol(const char *cp, char **endp, unsigned int base);
int strcmp(const char *cs, const char *ct);
unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
-#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_CMD_I2C) && !IS_ENABLED(CONFIG_DM_I2C)
int i2c_write (uchar, uint, int , uchar* , int);
int i2c_read (uchar, uint, int , uchar* , int);
#endif
diff --git a/include/generic-phy.h b/include/generic-phy.h
index f8eddeff67a..70c215a5262 100644
--- a/include/generic-phy.h
+++ b/include/generic-phy.h
@@ -155,7 +155,7 @@ struct phy_bulk {
unsigned int count;
};
-#if CONFIG_IS_ENABLED(PHY)
+#if IS_ENABLED(CONFIG_PHY)
/**
* generic_phy_init() - initialize the PHY port
diff --git a/include/handoff.h b/include/handoff.h
index 0104b834f2c..503b388c44f 100644
--- a/include/handoff.h
+++ b/include/handoff.h
@@ -8,7 +8,7 @@
#ifndef __HANDOFF_H
#define __HANDOFF_H
-#if CONFIG_IS_ENABLED(HANDOFF)
+#if IS_ENABLED(CONFIG_HANDOFF)
#include <asm/handoff.h>
diff --git a/include/hash.h b/include/hash.h
index 8b3f79ec473..e418598aec7 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -16,7 +16,7 @@ struct cmd_tbl;
* Maximum digest size for all algorithms we support. Having this value
* avoids a malloc() or C99 local declaration in common/cmd_hash.c.
*/
-#if CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512)
+#if IS_ENABLED(CONFIG_SHA384) || IS_ENABLED(CONFIG_SHA512)
#define HASH_MAX_DIGEST_SIZE 64
#else
#define HASH_MAX_DIGEST_SIZE 32
diff --git a/include/hwspinlock.h b/include/hwspinlock.h
index d8556c0b4b4..6a3968fb4f5 100644
--- a/include/hwspinlock.h
+++ b/include/hwspinlock.h
@@ -26,7 +26,7 @@ struct hwspinlock {
unsigned long id;
};
-#if CONFIG_IS_ENABLED(DM_HWSPINLOCK)
+#if IS_ENABLED(CONFIG_DM_HWSPINLOCK)
/**
* hwspinlock_get_by_index - Get a hardware spinlock by integer index
diff --git a/include/i2c.h b/include/i2c.h
index ef3820eaba7..14f7d190abe 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -614,7 +614,7 @@ int acpi_i2c_of_to_plat(struct udevice *dev);
void i2c_early_init_f(void);
#endif
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
@@ -750,7 +750,7 @@ extern struct i2c_bus_hose i2c_bus[];
void i2c_init(int speed, int slaveaddr);
void i2c_init_board(void);
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY)
/*
* i2c_get_bus_num:
*
@@ -930,7 +930,7 @@ unsigned int i2c_get_bus_speed(void);
* only for backwardcompatibility, should go away if we switched
* completely to new multibus support.
*/
-#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || defined(CFG_I2C_MULTI_BUS)
+#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || defined(CFG_I2C_MULTI_BUS)
# if !defined(CFG_SYS_MAX_I2C_BUS)
# define CFG_SYS_MAX_I2C_BUS 2
# endif
diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h
index 32dcb034973..fa86a7cc7e0 100644
--- a/include/i2c_eeprom.h
+++ b/include/i2c_eeprom.h
@@ -22,7 +22,7 @@ struct i2c_eeprom {
unsigned long size;
};
-#if CONFIG_IS_ENABLED(I2C_EEPROM)
+#if IS_ENABLED(CONFIG_I2C_EEPROM)
/*
* i2c_eeprom_read() - read bytes from an I2C EEPROM chip
*
diff --git a/include/image.h b/include/image.h
index 7717a4c13d3..8aa05d55e87 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1262,7 +1262,7 @@ int fit_image_verify_with_data(const void *fit, int image_noffset,
size_t size);
int fit_image_verify(const void *fit, int noffset);
-#if CONFIG_IS_ENABLED(FIT_SIGNATURE)
+#if IS_ENABLED(CONFIG_FIT_SIGNATURE)
int fit_config_verify(const void *fit, int conf_noffset);
#else
static inline int fit_config_verify(const void *fit, int conf_noffset)
@@ -1398,7 +1398,7 @@ int calculate_hash(const void *data, int data_len, const char *algo,
# endif
#else
# define IMAGE_ENABLE_SIGN 0
-# define FIT_IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE)
+# define FIT_IMAGE_ENABLE_VERIFY IS_ENABLED(CONFIG_FIT_SIGNATURE)
#endif
#ifdef USE_HOSTCC
@@ -1691,7 +1691,7 @@ static inline int fit_image_check_target_arch(const void *fdt, int node)
# endif
#else
# define IMAGE_ENABLE_ENCRYPT 0
-# define IMAGE_ENABLE_DECRYPT CONFIG_IS_ENABLED(FIT_CIPHER)
+# define IMAGE_ENABLE_DECRYPT IS_ENABLED(CONFIG_FIT_CIPHER)
#endif
/* Information passed to the ciphering routines */
diff --git a/include/init.h b/include/init.h
index 699dc2482c0..7588122ef41 100644
--- a/include/init.h
+++ b/include/init.h
@@ -223,7 +223,7 @@ int pci_init(void);
*/
int init_cache_f_r(void);
-#if !CONFIG_IS_ENABLED(CPU)
+#if !IS_ENABLED(CONFIG_CPU)
/**
* print_cpuinfo() - Display information about the CPU
*
diff --git a/include/iommu.h b/include/iommu.h
index cf9719c5e91..c35eefc3fa2 100644
--- a/include/iommu.h
+++ b/include/iommu.h
@@ -24,8 +24,8 @@ struct iommu_ops {
void (*unmap)(struct udevice *dev, dma_addr_t addr, size_t size);
};
-#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \
- CONFIG_IS_ENABLED(IOMMU)
+#if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)) && \
+ IS_ENABLED(CONFIG_IOMMU)
int dev_iommu_enable(struct udevice *dev);
#else
static inline int dev_iommu_enable(struct udevice *dev)
diff --git a/include/irq.h b/include/irq.h
index 1d08cb858d0..4d26878537c 100644
--- a/include/irq.h
+++ b/include/irq.h
@@ -125,7 +125,7 @@ struct irq_ops {
*/
int (*free)(struct irq *irq);
-#if CONFIG_IS_ENABLED(ACPIGEN)
+#if IS_ENABLED(CONFIG_ACPIGEN)
/**
* get_acpi() - Get the ACPI info for an irq
*
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 1a3060117f1..b2e49b8f681 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -138,7 +138,7 @@ struct ftrace_likely_data {
* Do not use __always_inline here, since currently it expands to inline again
* (which would break users of __always_inline).
*/
-#if !CONFIG_IS_ENABLED(OPTIMIZE_INLINING)
+#if !IS_ENABLED(CONFIG_OPTIMIZE_INLINING)
#define inline inline __attribute__((__always_inline__)) __gnu_inline \
__inline_maybe_unused notrace
#else
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 09f52698877..61e1d9bd0bf 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -572,8 +572,8 @@ static inline int del_mtd_partitions(struct mtd_info *mtd)
}
#endif
-#if defined(CONFIG_MTD_PARTITIONS) && CONFIG_IS_ENABLED(DM) && \
- CONFIG_IS_ENABLED(OF_CONTROL)
+#if defined(CONFIG_MTD_PARTITIONS) && IS_ENABLED(CONFIG_DM) && \
+ IS_ENABLED(CONFIG_OF_CONTROL)
int add_mtd_partitions_of(struct mtd_info *master);
#else
static inline int add_mtd_partitions_of(struct mtd_info *master)
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 2861b73edbc..b8988aff24b 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -636,7 +636,7 @@ void spi_nor_setup_op(const struct spi_nor *nor,
*/
int spi_nor_scan(struct spi_nor *nor);
-#if CONFIG_IS_ENABLED(SPI_FLASH_TINY)
+#if IS_ENABLED(CONFIG_SPI_FLASH_TINY)
static inline int spi_nor_remove(struct spi_nor *nor)
{
return 0;
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index b3f4b8d134c..1d7d67bbffd 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -970,7 +970,7 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *);
extern int usb_gadget_handle_interrupts(int index);
-#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+#if IS_ENABLED(CONFIG_DM_USB_GADGET)
int usb_gadget_initialize(int index);
int usb_gadget_release(int index);
int dm_usb_gadget_handle_interrupts(struct udevice *dev);
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 14b2c7eb2e6..fe288c9d42e 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -21,7 +21,7 @@ enum usb_phy_interface {
USBPHY_INTERFACE_MODE_HSIC,
};
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/**
* usb_get_phy_mode - Get phy mode for given device_node
* @np: Pointer to the given device_node
diff --git a/include/log.h b/include/log.h
index 8a7b961bbfb..e97b62db015 100644
--- a/include/log.h
+++ b/include/log.h
@@ -162,7 +162,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
* This header may be including when CONFIG_LOG is disabled, in which case
* CONFIG_LOG_MAX_LEVEL is not defined. Add a check for this.
*/
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
#define _LOG_MAX_LEVEL CONFIG_VAL(LOG_MAX_LEVEL)
#else
#define _LOG_MAX_LEVEL LOGL_INFO
@@ -189,7 +189,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
#define _LOG_DEBUG 0
#endif
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
/* Emit a log record if the level is less that the maximum */
#define log(_cat, _level, _fmt, _args...) ({ \
@@ -240,7 +240,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
#define _SPL_BUILD 0
#endif
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
#define debug_cond(cond, fmt, args...) \
({ \
@@ -314,7 +314,7 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,
_val; \
})
-#if CONFIG_IS_ENABLED(LOG) && defined(CONFIG_LOG_ERROR_RETURN)
+#if IS_ENABLED(CONFIG_LOG) && defined(CONFIG_LOG_ERROR_RETURN)
/*
* Log an error return value, possibly with a message. Usage:
*
@@ -654,7 +654,7 @@ int log_remove_filter(const char *drv_name, int filter_num);
*/
int log_device_set_enable(struct log_driver *drv, bool enable);
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
/**
* log_init() - Set up the log system ready for use
*
diff --git a/include/malloc.h b/include/malloc.h
index 161ccbd1298..4ccc719ff11 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -895,7 +895,7 @@ void malloc_enable_testing(int max_allocs);
/** malloc_disable_testing() - Put malloc() into normal mode */
void malloc_disable_testing(void);
-#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
+#if IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE)
#define malloc malloc_simple
#define realloc realloc_simple
#define memalign memalign_simple
diff --git a/include/mmc.h b/include/mmc.h
index 571fa625d02..bd71961a916 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -18,10 +18,10 @@
struct bd_info;
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)
#define MMC_SUPPORTS_TUNING
#endif
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
#define MMC_SUPPORTS_TUNING
#endif
@@ -429,7 +429,7 @@ struct mmc_data {
/* forward decl. */
struct mmc;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
struct dm_mmc_ops {
/**
* deferred_probe() - Some configurations that need to be deferred
@@ -504,7 +504,7 @@ struct dm_mmc_ops {
*/
int (*wait_dat0)(struct udevice *dev, int state, int timeout_us);
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
/* set_enhanced_strobe() - set HS400 enhanced strobe */
int (*set_enhanced_strobe)(struct udevice *dev);
#endif
@@ -576,7 +576,7 @@ static inline int mmc_hs400_prepare_ddr(struct mmc *mmc)
struct mmc_config {
const char *name;
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
const struct mmc_ops *ops;
#endif
uint host_caps;
@@ -620,15 +620,15 @@ static inline bool mmc_is_mode_ddr(enum bus_mode mode)
{
if (mode == MMC_DDR_52)
return true;
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
else if (mode == UHS_DDR50)
return true;
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)
else if (mode == MMC_HS_400)
return true;
#endif
-#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)
else if (mode == MMC_HS_400_ES)
return true;
#endif
@@ -642,7 +642,7 @@ static inline bool mmc_is_mode_ddr(enum bus_mode mode)
static inline bool supports_uhs(uint caps)
{
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)
return (caps & UHS_CAPS) ? true : false;
#else
return false;
@@ -656,7 +656,7 @@ static inline bool supports_uhs(uint caps)
* TODO struct mmc should be in mmc_private but it's hard to fix right now
*/
struct mmc {
-#if !CONFIG_IS_ENABLED(BLK)
+#if !IS_ENABLED(CONFIG_BLK)
struct list_head link;
#endif
const struct mmc_config *cfg; /* provided configuration */
@@ -687,14 +687,14 @@ struct mmc {
uint tran_speed;
uint legacy_speed; /* speed for the legacy mode provided by the card */
uint read_bl_len;
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
uint write_bl_len;
uint erase_grp_size; /* in 512-byte sectors */
#endif
-#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
+#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING)
uint hc_wp_grp_size; /* in 512-byte sectors */
#endif
-#if CONFIG_IS_ENABLED(MMC_WRITE)
+#if IS_ENABLED(CONFIG_MMC_WRITE)
struct sd_ssr ssr; /* SD status register */
#endif
u64 capacity;
@@ -706,16 +706,16 @@ struct mmc {
u64 enh_user_start;
u64 enh_user_size;
#endif
-#if !CONFIG_IS_ENABLED(BLK)
+#if !IS_ENABLED(CONFIG_BLK)
struct blk_desc block_dev;
#endif
char op_cond_pending; /* 1 if we are waiting on an op_cond command */
char init_in_progress; /* 1 if we have done mmc_start_init() */
char preinit; /* start init as early as possible */
int ddr_mode;
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
struct udevice *dev; /* Device for this MMC controller */
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
struct udevice *vmmc_supply; /* Main voltage regulator (Vcc)*/
struct udevice *vqmmc_supply; /* IO voltage regulator (Vccq)*/
#endif
@@ -735,7 +735,7 @@ struct mmc {
enum bus_mode user_speed_mode; /* input speed mode from user */
};
-#if CONFIG_IS_ENABLED(DM_MMC)
+#if IS_ENABLED(CONFIG_DM_MMC)
#define mmc_to_dev(_mmc) _mmc->dev
#else
#define mmc_to_dev(_mmc) NULL
@@ -849,7 +849,7 @@ int mmc_switch_part(struct mmc *mmc, unsigned int part_num);
int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf,
enum mmc_hwpart_conf_mode mode);
-#if !CONFIG_IS_ENABLED(DM_MMC)
+#if !IS_ENABLED(CONFIG_DM_MMC)
int mmc_getcd(struct mmc *mmc);
int board_mmc_getcd(struct mmc *mmc);
int mmc_getwp(struct mmc *mmc);
diff --git a/include/mpc85xx.h b/include/mpc85xx.h
index e26e131114c..ca6eb974b8c 100644
--- a/include/mpc85xx.h
+++ b/include/mpc85xx.h
@@ -35,7 +35,7 @@
CFG_SYS_CCSRBAR_PHYS_LOW and/or CFG_SYS_CCSRBAR_PHYS_HIGH instead."
#endif
-#if CONFIG_IS_ENABLED(SYS_CCSR_DO_NOT_RELOCATE)
+#if IS_ENABLED(CONFIG_SYS_CCSR_DO_NOT_RELOCATE)
#undef CFG_SYS_CCSRBAR_PHYS_HIGH
#undef CFG_SYS_CCSRBAR_PHYS_LOW
#define CFG_SYS_CCSRBAR_PHYS_HIGH 0
diff --git a/include/nand.h b/include/nand.h
index 70c1286ccb4..9cb3fe676a3 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -18,7 +18,7 @@ unsigned long nand_size(void);
int nand_mtd_to_devnum(struct mtd_info *mtd);
-#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
+#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT)
void board_nand_init(void);
int nand_register(int devnum, struct mtd_info *mtd);
#else
diff --git a/include/net.h b/include/net.h
index 399af5e0645..009a7bfba43 100644
--- a/include/net.h
+++ b/include/net.h
@@ -901,7 +901,7 @@ static inline struct in_addr env_get_ip(char *var)
*/
void reset_phy(void);
-#if CONFIG_IS_ENABLED(NET)
+#if IS_ENABLED(CONFIG_NET)
/**
* eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs
*
diff --git a/include/ns16550.h b/include/ns16550.h
index 552db4da2ad..bd7f0b2ed24 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -26,7 +26,7 @@
#include <linux/types.h>
-#if CONFIG_IS_ENABLED(DM_SERIAL) || defined(CONFIG_NS16550_DYNAMIC) || \
+#if IS_ENABLED(CONFIG_DM_SERIAL) || defined(CONFIG_NS16550_DYNAMIC) || \
defined(CONFIG_DEBUG_UART)
/*
* For driver model we always use one byte per register, and sort out the
@@ -109,7 +109,7 @@ struct ns16550 {
UART_REG(scr); /* 10*/
UART_REG(ssr); /* 11*/
#endif
-#if CONFIG_IS_ENABLED(DM_SERIAL)
+#if IS_ENABLED(CONFIG_DM_SERIAL)
struct ns16550_plat *plat;
#endif
};
diff --git a/include/nvmem.h b/include/nvmem.h
index 822e698bdd4..7eeb69a3016 100644
--- a/include/nvmem.h
+++ b/include/nvmem.h
@@ -33,7 +33,7 @@ struct nvmem_cell {
struct udevice;
-#if CONFIG_IS_ENABLED(NVMEM)
+#if IS_ENABLED(CONFIG_NVMEM)
/**
* nvmem_cell_read() - Read the value of an nvmem cell
diff --git a/include/palmas.h b/include/palmas.h
index e259a4d04ba..e6a0f93257a 100644
--- a/include/palmas.h
+++ b/include/palmas.h
@@ -117,7 +117,7 @@
#define BB_VSEL_VBAT (3 << 1)
#define BB_CHRG_EN (1 << 0)
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
/*
* Functions to read and write from TPS659038/TWL6035/TWL6037
* or other Palmas family of TI PMICs
diff --git a/include/part.h b/include/part.h
index be75c735495..d65e4fa59c1 100644
--- a/include/part.h
+++ b/include/part.h
@@ -69,7 +69,7 @@ struct disk_partition {
* PART_EFI_SYSTEM_PARTITION the partition is an EFI system partition
*/
int bootable;
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
char uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */
#endif
#ifdef CONFIG_PARTITION_TYPE_GUID
@@ -87,7 +87,7 @@ struct disk_part {
};
/* Misc _get_dev functions */
-#if CONFIG_IS_ENABLED(PARTITIONS)
+#if IS_ENABLED(CONFIG_PARTITIONS)
/**
* blk_get_dev() - get a pointer to a block device given its type and number
*
@@ -414,7 +414,7 @@ struct part_driver {
#include <part_efi.h>
-#if CONFIG_IS_ENABLED(EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_PARTITION)
/* disk/part_efi.c */
/**
* write_gpt_table() - Write the GUID Partition Table to disk
@@ -550,7 +550,7 @@ int get_disk_guid(struct blk_desc *dev_desc, char *guid);
#endif
-#if CONFIG_IS_ENABLED(DOS_PARTITION)
+#if IS_ENABLED(CONFIG_DOS_PARTITION)
/**
* is_valid_dos_buf() - Ensure that a DOS MBR image is valid
*
@@ -577,7 +577,7 @@ int layout_mbr_partitions(struct disk_partition *p, int count,
#endif
-#if CONFIG_IS_ENABLED(PARTITIONS)
+#if IS_ENABLED(CONFIG_PARTITIONS)
/**
* part_driver_get_count() - get partition driver count
*
diff --git a/include/phys2bus.h b/include/phys2bus.h
index 866b8b51a8c..7db6826adc0 100644
--- a/include/phys2bus.h
+++ b/include/phys2bus.h
@@ -21,7 +21,7 @@ static inline unsigned long bus_to_phys(unsigned long bus)
}
#endif
-#if CONFIG_IS_ENABLED(DM)
+#if IS_ENABLED(CONFIG_DM)
#include <dm/device.h>
static inline dma_addr_t dev_phys_to_bus(struct udevice *dev, phys_addr_t phys)
diff --git a/include/power-domain.h b/include/power-domain.h
index 2ff6c77cd76..9fb8f458b83 100644
--- a/include/power-domain.h
+++ b/include/power-domain.h
@@ -76,7 +76,7 @@ struct power_domain {
* @power_domain A pointer to a power domain struct to initialize.
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_get(struct udevice *dev, struct power_domain *power_domain);
#else
static inline
@@ -95,7 +95,7 @@ int power_domain_get(struct udevice *dev, struct power_domain *power_domain)
*
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_get_by_index(struct udevice *dev,
struct power_domain *power_domain, int index);
#else
@@ -116,7 +116,7 @@ int power_domain_get_by_index(struct udevice *dev,
*
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_get_by_name(struct udevice *dev,
struct power_domain *power_domain, const char *name);
#else
@@ -135,7 +135,7 @@ int power_domain_get_by_name(struct udevice *dev,
* requested by power_domain_get().
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_free(struct power_domain *power_domain);
#else
static inline int power_domain_free(struct power_domain *power_domain)
@@ -151,7 +151,7 @@ static inline int power_domain_free(struct power_domain *power_domain)
* requested by power_domain_get().
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_on(struct power_domain *power_domain);
#else
static inline int power_domain_on(struct power_domain *power_domain)
@@ -167,7 +167,7 @@ static inline int power_domain_on(struct power_domain *power_domain)
* requested by power_domain_get().
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_POWER_DOMAIN)
int power_domain_off(struct power_domain *power_domain);
#else
static inline int power_domain_off(struct power_domain *power_domain)
@@ -183,7 +183,7 @@ static inline int power_domain_off(struct power_domain *power_domain)
*
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_POWER_DOMAIN)
int dev_power_domain_on(struct udevice *dev);
#else
static inline int dev_power_domain_on(struct udevice *dev)
@@ -199,7 +199,7 @@ static inline int dev_power_domain_on(struct udevice *dev)
*
* Return: 0 if OK, or a negative error code.
*/
-#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(POWER_DOMAIN)
+#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_POWER_DOMAIN)
int dev_power_domain_off(struct udevice *dev);
#else
static inline int dev_power_domain_off(struct udevice *dev)
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
index cf476c85ab3..ca7e9ffb711 100644
--- a/include/power/max77686_pmic.h
+++ b/include/power/max77686_pmic.h
@@ -154,7 +154,7 @@ enum {
OPMODE_ON,
};
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV);
int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode);
int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV);
diff --git a/include/power/pmic.h b/include/power/pmic.h
index f3045f82ad7..89e55677484 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -17,8 +17,8 @@
enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
-/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+/* TODO: Change to !IS_ENABLED(CONFIG_DM_PMIC) when SPL_DM_PMIC exists */
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
enum { I2C_PMIC, I2C_NUM, };
enum { PMIC_READ, PMIC_WRITE, };
enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
@@ -83,7 +83,7 @@ struct pmic {
struct pmic *parent;
struct list_head list;
};
-#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
+#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */
#ifdef CONFIG_PPL_DM_PMIC
/**
@@ -309,8 +309,8 @@ struct uc_pmic_priv {
#endif /* DM_PMIC */
-/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
-#if CONFIG_IS_ENABLED(POWER_LEGACY)
+/* TODO: Change to IS_ENABLED(CONFIG_DM_PMIC) when SPL_DM_PMIC exists */
+#if IS_ENABLED(CONFIG_POWER_LEGACY)
/* Legacy API, do not use */
int pmic_init(unsigned char bus);
@@ -323,7 +323,7 @@ int pmic_probe(struct pmic *p);
int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
-#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
+#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */
#define pmic_i2c_addr (p->hw.i2c.addr)
#define pmic_i2c_tx_num (p->hw.i2c.tx_num)
diff --git a/include/power/regulator.h b/include/power/regulator.h
index ff1bfc2435a..2e8118ef731 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -268,7 +268,7 @@ struct dm_regulator_ops {
int (*set_mode)(struct udevice *dev, int mode_id);
};
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
+#if IS_ENABLED(CONFIG_DM_REGULATOR)
/**
* regulator_mode: returns a pointer to the array of regulator mode info
*
diff --git a/include/reboot-mode/reboot-mode-gpio.h b/include/reboot-mode/reboot-mode-gpio.h
index 16b1185c698..93d65d2b4f6 100644
--- a/include/reboot-mode/reboot-mode-gpio.h
+++ b/include/reboot-mode/reboot-mode-gpio.h
@@ -13,7 +13,7 @@
* we can use this struct to declare the pins used.
*/
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
struct reboot_mode_gpio_config {
int gpio_dev_offset;
int gpio_offset;
@@ -23,7 +23,7 @@ struct reboot_mode_gpio_config {
struct reboot_mode_gpio_platdata {
struct gpio_desc *gpio_desc;
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !IS_ENABLED(CONFIG_OF_CONTROL)
struct reboot_mode_gpio_config *gpios_config;
#endif
int gpio_count;
diff --git a/include/remoteproc.h b/include/remoteproc.h
index f48054de6ba..8a7e8e5f6c1 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -506,7 +506,7 @@ struct dm_rproc_ops {
/* Accessor */
#define rproc_get_ops(dev) ((struct dm_rproc_ops *)(dev)->driver->ops)
-#if CONFIG_IS_ENABLED(REMOTEPROC)
+#if IS_ENABLED(CONFIG_REMOTEPROC)
/**
* rproc_init() - Initialize all bound remote proc devices
* Return: 0 if all ok, else appropriate error value.
diff --git a/include/reset.h b/include/reset.h
index 965f02e0cee..ef34b7bf52b 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -83,7 +83,7 @@ struct reset_ctl_bulk {
unsigned int count;
};
-#if CONFIG_IS_ENABLED(DM_RESET)
+#if IS_ENABLED(CONFIG_DM_RESET)
/**
* devm_reset_control_get - resource managed reset_get_by_name()
diff --git a/include/rtc.h b/include/rtc.h
index b6fdbb60dc2..f2accf78b84 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -20,7 +20,7 @@
typedef int64_t time64_t;
struct udevice;
-#if CONFIG_IS_ENABLED(DM_RTC)
+#if IS_ENABLED(CONFIG_DM_RTC)
struct rtc_ops {
/**
* get() - get the current time
diff --git a/include/sdhci.h b/include/sdhci.h
index 24b4599b857..af9043deb38 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -347,7 +347,7 @@ struct sdhci_host {
#define USE_ADMA64 (0x1 << 2)
#define USE_DMA (USE_SDMA | USE_ADMA | USE_ADMA64)
dma_addr_t adma_addr;
-#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
+#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA)
struct sdhci_adma_desc *adma_desc_table;
#endif
};
diff --git a/include/semihosting.h b/include/semihosting.h
index 4e844cbad87..abf37c040ac 100644
--- a/include/semihosting.h
+++ b/include/semihosting.h
@@ -28,7 +28,7 @@
long smh_trap(unsigned int sysnum, void *addr);
-#if CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK)
+#if IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK)
/**
* semihosting_enabled() - Determine whether semihosting is supported
*
@@ -50,7 +50,7 @@ void disable_semihosting(void);
#else
static inline bool semihosting_enabled(void)
{
- return CONFIG_IS_ENABLED(SEMIHOSTING);
+ return IS_ENABLED(CONFIG_SEMIHOSTING);
}
static inline void disable_semihosting(void)
diff --git a/include/serial.h b/include/serial.h
index 5c8be294bf6..2aa117c37b7 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -362,7 +362,7 @@ void serial_setbrg(void);
void serial_putc(const char ch);
void serial_putc_raw(const char ch);
void serial_puts(const char *str);
-#if defined(CONFIG_CONSOLE_FLUSH_SUPPORT) && CONFIG_IS_ENABLED(DM_SERIAL)
+#if defined(CONFIG_CONSOLE_FLUSH_SUPPORT) && IS_ENABLED(CONFIG_DM_SERIAL)
void serial_flush(void);
#else
static inline void serial_flush(void) {}
diff --git a/include/spi.h b/include/spi.h
index 1bc18e65525..0d40949de55 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -139,7 +139,7 @@ enum spi_polarity {
* @flags: Indication of SPI flags.
*/
struct spi_slave {
-#if CONFIG_IS_ENABLED(DM_SPI)
+#if IS_ENABLED(CONFIG_DM_SPI)
struct udevice *dev; /* struct spi_slave is dev->parentdata */
uint max_hz;
#else
@@ -327,7 +327,7 @@ int spi_cs_is_valid(unsigned int bus, unsigned int cs);
* removed soon as part of the SPI DM migration. Drop them if driver model is
* enabled for SPI.
*/
-#if !CONFIG_IS_ENABLED(DM_SPI)
+#if !IS_ENABLED(CONFIG_DM_SPI)
/**
* Activate a SPI chipselect.
* This function is provided by the board code when using a driver
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 10d19fd4b11..6ec41d03497 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -39,7 +39,7 @@ struct dm_spi_flash_ops {
/* Access the serial operations for a device */
#define sf_get_ops(dev) ((struct dm_spi_flash_ops *)(dev)->driver->ops)
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
/**
* spi_flash_read_dm() - Read data from SPI flash
*
diff --git a/include/spl.h b/include/spl.h
index 17d6fd59d4d..e69b47bb0f8 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -247,7 +247,7 @@ struct spl_image_info {
u8 os;
uintptr_t load_addr;
uintptr_t entry_point;
-#if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL)
+#if IS_ENABLED(CONFIG_LOAD_FIT) || IS_ENABLED(CONFIG_LOAD_FIT_FULL)
void *fdt_addr;
#endif
u32 boot_device;
diff --git a/include/syscon.h b/include/syscon.h
index f5e6cc1a4b1..4d15d50615f 100644
--- a/include/syscon.h
+++ b/include/syscon.h
@@ -25,7 +25,7 @@ struct syscon_ops {
#define syscon_get_ops(dev) ((struct syscon_ops *)(dev)->driver->ops)
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if IS_ENABLED(CONFIG_OF_PLATDATA)
/*
* We don't support 64-bit machines. If they are so resource-contrained that
* they need to use OF_PLATDATA, something is horribly wrong with the
diff --git a/include/sysinfo.h b/include/sysinfo.h
index b140d742e93..febbc84464e 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -122,7 +122,7 @@ struct sysinfo_ops {
#define sysinfo_get_ops(dev) ((struct sysinfo_ops *)(dev)->driver->ops)
-#if CONFIG_IS_ENABLED(SYSINFO)
+#if IS_ENABLED(CONFIG_SYSINFO)
/**
* sysinfo_detect() - Run the hardware info detection procedure for this device.
*
diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h
index a2c333e7446..7fefa1c2c5e 100644
--- a/include/tlv_eeprom.h
+++ b/include/tlv_eeprom.h
@@ -65,7 +65,7 @@ struct __attribute__ ((__packed__)) tlvinfo_tlv {
#define TLV_CODE_VENDOR_EXT 0xFD
#define TLV_CODE_CRC_32 0xFE
-#if CONFIG_IS_ENABLED(CMD_TLV_EEPROM)
+#if IS_ENABLED(CONFIG_CMD_TLV_EEPROM)
/**
* read_tlv_eeprom - Read the EEPROM binary data from the hardware
@@ -110,7 +110,7 @@ int write_tlv_eeprom(void *eeprom, int len);
int read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
struct tlvinfo_tlv **first_entry, int dev);
-#else /* !CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */
+#else /* !IS_ENABLED(CONFIG_CMD_TLV_EEPROM) */
static inline int read_tlv_eeprom(void *eeprom, int offset, int len, int dev)
{
@@ -129,7 +129,7 @@ read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
return -ENOSYS;
}
-#endif /* CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */
+#endif /* IS_ENABLED(CONFIG_CMD_TLV_EEPROM) */
/**
* is_valid_tlvinfo_header
diff --git a/include/twl4030.h b/include/twl4030.h
index 0a6d85a7c1c..e0d5243f6af 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -648,7 +648,7 @@
* examples are TWL4030_PM_RECEIVER_VMMC1_DEV_GRP and
* TWL4030_LED_LEDEN.
*/
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static inline int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
return i2c_write(chip_no, reg, 1, &val, 1);
diff --git a/include/twl6030.h b/include/twl6030.h
index 05d476f8048..2b149a2c230 100644
--- a/include/twl6030.h
+++ b/include/twl6030.h
@@ -186,7 +186,7 @@ struct twl6030_data{
};
/* Functions to read and write from TWL6030 */
-#if !CONFIG_IS_ENABLED(DM_I2C)
+#if !IS_ENABLED(CONFIG_DM_I2C)
static inline int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
return i2c_write(chip_no, reg, 1, &val, 1);
diff --git a/include/usb.h b/include/usb.h
index 80cb8467203..1473990540c 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -140,7 +140,7 @@ struct usb_device {
int act_len; /* transferred bytes */
int maxchild; /* Number of ports if hub */
int portnr; /* Port number, 1=first */
-#if !CONFIG_IS_ENABLED(DM_USB)
+#if !IS_ENABLED(CONFIG_DM_USB)
/* parent hub, or NULL if this is the root hub */
struct usb_device *parent;
struct usb_device *children[USB_MAXCHILDREN];
@@ -148,7 +148,7 @@ struct usb_device {
#endif
/* slot_id - for xHCI enabled devices */
unsigned int slot_id;
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct udevice *dev; /* Pointer to associated device */
struct udevice *controller_dev; /* Pointer to associated controller */
#endif
@@ -174,7 +174,7 @@ enum usb_init_type {
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
int usb_lowlevel_stop(int index);
-#if defined(CONFIG_USB_MUSB_HOST) || CONFIG_IS_ENABLED(DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) || IS_ENABLED(CONFIG_DM_USB)
int usb_reset_root_port(struct usb_device *dev);
#else
#define usb_reset_root_port(dev)
@@ -188,7 +188,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, int interval, bool nonblock);
#if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST \
- || CONFIG_IS_ENABLED(DM_USB)
+ || IS_ENABLED(CONFIG_DM_USB)
struct int_queue *create_int_queue(struct usb_device *dev, unsigned long pipe,
int queuesize, int elementsize, void *buffer, int interval);
int destroy_int_queue(struct usb_device *dev, struct int_queue *queue);
@@ -596,7 +596,7 @@ struct usb_hub_device {
struct usb_tt tt; /* Transaction Translator */
};
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
/**
* struct usb_plat - Platform data about a USB controller
*
@@ -924,7 +924,7 @@ int usb_remove_ehci_gadget(struct ehci_ctrl **ctlrp);
*/
void usb_stor_reset(void);
-#else /* !CONFIG_IS_ENABLED(DM_USB) */
+#else /* !IS_ENABLED(CONFIG_DM_USB) */
struct usb_device *usb_get_dev_index(int index);
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
index 4a4ac10229a..b06c520165f 100644
--- a/include/usb/xhci.h
+++ b/include/usb/xhci.h
@@ -1204,7 +1204,7 @@ void xhci_hcd_stop(int index);
#define XHCI_STS_CNR (1 << 11)
struct xhci_ctrl {
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
struct udevice *dev;
#endif
struct xhci_hccr *hccr; /* R/O registers, not need for volatile */
@@ -1230,7 +1230,7 @@ struct xhci_ctrl {
#define XHCI_MTK_HOST BIT(0)
};
-#if CONFIG_IS_ENABLED(DM_USB)
+#if IS_ENABLED(CONFIG_DM_USB)
#define xhci_to_dev(_ctrl) _ctrl->dev
#else
#define xhci_to_dev(_ctrl) NULL
@@ -1297,7 +1297,7 @@ struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev);
static inline dma_addr_t xhci_dma_map(struct xhci_ctrl *ctrl, void *addr,
size_t size)
{
-#if CONFIG_IS_ENABLED(IOMMU)
+#if IS_ENABLED(CONFIG_IOMMU)
return dev_iommu_dma_map(xhci_to_dev(ctrl), addr, size);
#else
return dev_phys_to_bus(xhci_to_dev(ctrl), virt_to_phys(addr));
@@ -1307,7 +1307,7 @@ static inline dma_addr_t xhci_dma_map(struct xhci_ctrl *ctrl, void *addr,
static inline void xhci_dma_unmap(struct xhci_ctrl *ctrl, dma_addr_t addr,
size_t size)
{
-#if CONFIG_IS_ENABLED(IOMMU)
+#if IS_ENABLED(CONFIG_IOMMU)
dev_iommu_dma_unmap(xhci_to_dev(ctrl), addr, size);
#endif
}
diff --git a/include/xilinx.h b/include/xilinx.h
index e4e29797988..5e8219b3d28 100644
--- a/include/xilinx.h
+++ b/include/xilinx.h
@@ -62,7 +62,7 @@ struct xilinx_fpga_op {
struct fpga_secure_info *fpga_sec_info);
int (*dump)(xilinx_desc *desc, const void *buf, size_t bsize);
int (*info)(xilinx_desc *desc);
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
int (*str2flag)(xilinx_desc *desc, const char *string);
#endif
};
diff --git a/include/zynqmppl.h b/include/zynqmppl.h
index acf75a8f079..0f5feeb5044 100644
--- a/include/zynqmppl.h
+++ b/include/zynqmppl.h
@@ -25,7 +25,7 @@
extern struct xilinx_fpga_op zynqmp_op;
-#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
+#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)
#define ZYNQMP_FPGA_FLAGS (FPGA_LEGACY | \
FPGA_XILINX_ZYNQMP_DDRAUTH | \
FPGA_XILINX_ZYNQMP_ENC)
diff --git a/lib/display_options.c b/lib/display_options.c
index 80def5201f9..7d1455c0d60 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -189,7 +189,7 @@ int hexdump_line(ulong addr, const void *data, uint width, uint count,
x = lb.us[i] = *(volatile uint16_t *)data;
else
x = lb.uc[i] = *(volatile uint8_t *)data;
- if (CONFIG_IS_ENABLED(USE_TINY_PRINTF))
+ if (IS_ENABLED(CONFIG_USE_TINY_PRINTF))
out += sprintf(out, " %x", (uint)x);
else
out += sprintf(out, " %0*lx", width * 2, x);
diff --git a/lib/efi_loader/efi_conformance.c b/lib/efi_loader/efi_conformance.c
index 3036d46349a..ee8c85d526c 100644
--- a/lib/efi_loader/efi_conformance.c
+++ b/lib/efi_loader/efi_conformance.c
@@ -38,7 +38,7 @@ efi_status_t efi_ecpt_register(void)
return ret;
}
- if (CONFIG_IS_ENABLED(EFI_EBBR_2_1_CONFORMANCE))
+ if (IS_ENABLED(CONFIG_EFI_EBBR_2_1_CONFORMANCE))
guidcpy(&ecpt->conformance_profiles[num_entries++],
&efi_ebbr_2_1_guid);
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 1ed8c7aa36e..2e2d7929822 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -465,7 +465,7 @@ static efi_status_t EFIAPI efi_cout_set_attribute(
*/
static void efi_clear_screen(void)
{
- if (CONFIG_IS_ENABLED(EFI_SCROLL_ON_CLEAR_SCREEN)) {
+ if (IS_ENABLED(CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN)) {
unsigned int row, screen_rows, screen_columns;
/* Avoid overwriting previous outputs on streaming consoles */
@@ -1313,7 +1313,7 @@ efi_status_t efi_console_register(void)
NULL);
/* Create console node and install device path protocols */
- if (CONFIG_IS_ENABLED(DM_SERIAL)) {
+ if (IS_ENABLED(CONFIG_DM_SERIAL)) {
dp = efi_dp_from_uart();
if (!dp)
goto out_of_memory;
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 3b267b713e9..58adb11f577 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -863,7 +863,7 @@ static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
break;
case SIG_TYPE_GUID:
hddp->signature_type = 2;
-#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+#if IS_ENABLED(CONFIG_PARTITION_UUIDS)
/* info.uuid exists only with PARTITION_UUIDS */
if (uuid_str_to_bin(info.uuid,
hddp->partition_signature,
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index d2256713a8e..bffd03e6b78 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -123,7 +123,7 @@ static efi_status_t efi_disk_rw_blocks(struct efi_block_io *this,
if (buffer_size & (blksz - 1))
return EFI_BAD_BUFFER_SIZE;
- if (CONFIG_IS_ENABLED(PARTITIONS) &&
+ if (IS_ENABLED(CONFIG_PARTITIONS) &&
device_get_uclass_id(diskobj->header.dev) == UCLASS_PARTITION) {
if (direction == EFI_DISK_READ)
n = disk_blk_read(diskobj->header.dev, lba, blocks,
diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c
index 108c14b95bd..cdc5d94cee3 100644
--- a/lib/efi_loader/efi_root_node.c
+++ b/lib/efi_loader/efi_root_node.c
@@ -53,7 +53,7 @@ efi_status_t efi_root_node_register(void)
(&efi_root,
/* Device path protocol */
&efi_guid_device_path, dp,
-#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT)
+#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT)
/* Device path to text protocol */
&efi_guid_device_path_to_text_protocol,
&efi_device_path_to_text,
@@ -63,7 +63,7 @@ efi_status_t efi_root_node_register(void)
&efi_guid_device_path_utilities_protocol,
&efi_device_path_utilities,
#endif
-#if CONFIG_IS_ENABLED(EFI_DT_FIXUP)
+#if IS_ENABLED(CONFIG_EFI_DT_FIXUP)
/* Device-tree fix-up protocol */
&efi_guid_dt_fixup_protocol,
&efi_dt_fixup_prot,
diff --git a/lib/efi_selftest/efi_selftest_ecpt.c b/lib/efi_selftest/efi_selftest_ecpt.c
index 09c5e96c5e1..839fd56841c 100644
--- a/lib/efi_selftest/efi_selftest_ecpt.c
+++ b/lib/efi_selftest/efi_selftest_ecpt.c
@@ -53,7 +53,7 @@ static int execute(void)
return EFI_ST_FAILURE;
}
- if (CONFIG_IS_ENABLED(EFI_EBBR_2_1_CONFORMANCE)) {
+ if (IS_ENABLED(CONFIG_EFI_EBBR_2_1_CONFORMANCE)) {
++expected_entries;
if (ecpt_find_guid(ecpt, &guid_ebbr_2_1))
return EFI_ST_FAILURE;
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 0827e16859f..b044bd33826 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -127,7 +127,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
return FDT_ADDR_T_NONE;
}
-#if CONFIG_IS_ENABLED(OF_TRANSLATE)
+#if IS_ENABLED(CONFIG_OF_TRANSLATE)
if (translate)
addr = fdt_translate_address(blob, node, prop_addr);
else
@@ -912,7 +912,7 @@ int fdt_get_resource(const void *fdt, int node, const char *property,
while (ptr + na + ns <= end) {
if (i == index) {
- if (CONFIG_IS_ENABLED(OF_TRANSLATE))
+ if (IS_ENABLED(CONFIG_OF_TRANSLATE))
res->start = fdt_translate_address(fdt, node, ptr);
else
res->start = fdtdec_get_number(ptr, na);
@@ -1158,18 +1158,18 @@ int fdtdec_setup_mem_size_base_lowest(void)
static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
{
-#if CONFIG_IS_ENABLED(MULTI_DTB_FIT_GZIP) ||\
- CONFIG_IS_ENABLED(MULTI_DTB_FIT_LZO)
+#if IS_ENABLED(CONFIG_MULTI_DTB_FIT_GZIP) ||\
+ IS_ENABLED(CONFIG_MULTI_DTB_FIT_LZO)
size_t sz_out = CONFIG_VAL(MULTI_DTB_FIT_UNCOMPRESS_SZ);
bool gzip = 0, lzo = 0;
ulong sz_in = sz_src;
void *dst;
int rc;
- if (CONFIG_IS_ENABLED(GZIP))
+ if (IS_ENABLED(CONFIG_GZIP))
if (gzip_parse_header(src, sz_in) >= 0)
gzip = 1;
- if (CONFIG_IS_ENABLED(LZO))
+ if (IS_ENABLED(CONFIG_LZO))
if (!gzip && lzop_is_valid_header(src))
lzo = 1;
@@ -1177,23 +1177,23 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
return -EBADMSG;
- if (CONFIG_IS_ENABLED(MULTI_DTB_FIT_DYN_ALLOC)) {
+ if (IS_ENABLED(CONFIG_MULTI_DTB_FIT_DYN_ALLOC)) {
dst = malloc(sz_out);
if (!dst) {
puts("uncompress_blob: Unable to allocate memory\n");
return -ENOMEM;
}
} else {
-# if CONFIG_IS_ENABLED(MULTI_DTB_FIT_USER_DEFINED_AREA)
+# if IS_ENABLED(CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA)
dst = (void *)CONFIG_VAL(MULTI_DTB_FIT_USER_DEF_ADDR);
# else
return -ENOTSUPP;
# endif
}
- if (CONFIG_IS_ENABLED(GZIP) && gzip)
+ if (IS_ENABLED(CONFIG_GZIP) && gzip)
rc = gunzip(dst, sz_out, (u8 *)src, &sz_in);
- else if (CONFIG_IS_ENABLED(LZO) && lzo)
+ else if (IS_ENABLED(CONFIG_LZO) && lzo)
rc = lzop_decompress(src, sz_in, dst, &sz_out);
else
hang();
@@ -1201,7 +1201,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
if (rc < 0) {
/* not a valid compressed blob */
puts("uncompress_blob: Unable to uncompress\n");
- if (CONFIG_IS_ENABLED(MULTI_DTB_FIT_DYN_ALLOC))
+ if (IS_ENABLED(CONFIG_MULTI_DTB_FIT_DYN_ALLOC))
free(dst);
return -EBADMSG;
}
@@ -1691,7 +1691,7 @@ int fdtdec_setup(void)
}
}
- if (CONFIG_IS_ENABLED(MULTI_DTB_FIT))
+ if (IS_ENABLED(CONFIG_MULTI_DTB_FIT))
setup_multi_dtb_fit();
ret = fdtdec_prepare_fdt(gd->fdt_blob);
diff --git a/lib/hang.c b/lib/hang.c
index 2735774f9a4..4e6d04b3ec2 100644
--- a/lib/hang.c
+++ b/lib/hang.c
@@ -23,8 +23,8 @@
void hang(void)
{
#if !defined(CONFIG_SPL_BUILD) || \
- (CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \
- CONFIG_IS_ENABLED(SERIAL))
+ (IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT) && \
+ IS_ENABLED(CONFIG_SERIAL))
puts("### ERROR ### Please RESET the board ###\n");
#endif
bootstage_error(BOOTSTAGE_ID_NEED_RESET);
diff --git a/lib/hashtable.c b/lib/hashtable.c
index f2d36bd34b4..b741a527dc6 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -818,7 +818,7 @@ int himport_r(struct hsearch_data *htab,
if (nvars)
memcpy(localvars, vars, sizeof(vars[0]) * nvars);
-#if CONFIG_IS_ENABLED(ENV_APPEND)
+#if IS_ENABLED(CONFIG_ENV_APPEND)
flag |= H_NOCLEAR;
#endif
diff --git a/lib/hexdump.c b/lib/hexdump.c
index 149c93ead8b..c76c4f564da 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -21,7 +21,7 @@
const char hex_asc[] = "0123456789abcdef";
const char hex_asc_upper[] = "0123456789ABCDEF";
-#if CONFIG_IS_ENABLED(HEXDUMP)
+#if IS_ENABLED(CONFIG_HEXDUMP)
int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
char *linebuf, size_t linebuflen, bool ascii)
{
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 5ec0f94ab3e..c72f8fb10a5 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -58,7 +58,7 @@ static lbaint_t write_sparse_chunk_raw(struct sparse_storage *info,
lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100;
uint32_t *aligned_buf = NULL;
- if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) {
+ if (IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) {
write_blks = info->write(info, blk, n, data);
if (write_blks < n)
goto write_fail;
diff --git a/lib/lmb.c b/lib/lmb.c
index ec790760db6..08720ddedca 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -191,10 +191,10 @@ static void lmb_reserve_common(struct lmb *lmb, void *fdt_blob)
arch_lmb_reserve(lmb);
board_lmb_reserve(lmb);
- if (CONFIG_IS_ENABLED(OF_LIBFDT) && fdt_blob)
+ if (IS_ENABLED(CONFIG_OF_LIBFDT) && fdt_blob)
boot_fdt_add_mem_rsv_regions(lmb, fdt_blob);
- if (CONFIG_IS_ENABLED(EFI_LOADER))
+ if (IS_ENABLED(CONFIG_EFI_LOADER))
efi_lmb_reserve(lmb);
}
diff --git a/lib/panic.c b/lib/panic.c
index 58382ac4f4c..746a2824c29 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -39,7 +39,7 @@ void panic_str(const char *str)
void panic(const char *fmt, ...)
{
-#if CONFIG_IS_ENABLED(PRINTF)
+#if IS_ENABLED(CONFIG_PRINTF)
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index d20bdb58a57..97403481a03 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -402,7 +402,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo,
goto err_sign;
}
- if (CONFIG_IS_ENABLED(FIT_RSASSA_PSS) && padding_algo &&
+ if (IS_ENABLED(CONFIG_FIT_RSASSA_PSS) && padding_algo &&
!strcmp(padding_algo->name, "pss")) {
if (EVP_PKEY_CTX_set_rsa_padding(ckey,
RSA_PKCS1_PSS_PADDING) <= 0) {
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 2f3b3440391..4eab297d87b 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -90,7 +90,7 @@ U_BOOT_PADDING_ALGO(pkcs_15) = {
};
#endif
-#if CONFIG_IS_ENABLED(FIT_RSASSA_PSS)
+#if IS_ENABLED(CONFIG_FIT_RSASSA_PSS)
static void u32_i2osp(uint32_t val, uint8_t *buf)
{
buf[0] = (uint8_t)((val >> 24) & 0xff);
@@ -400,7 +400,7 @@ int rsa_verify_with_pkey(struct image_sign_info *info,
struct key_prop *prop;
int ret;
- if (!CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY))
+ if (!IS_ENABLED(CONFIG_RSA_VERIFY_WITH_PKEY))
return -EACCES;
/* Public key is self-described to fill key_prop */
@@ -418,7 +418,7 @@ int rsa_verify_with_pkey(struct image_sign_info *info,
return ret;
}
-#if CONFIG_IS_ENABLED(FIT_SIGNATURE)
+#if IS_ENABLED(CONFIG_FIT_SIGNATURE)
/**
* rsa_verify_with_keynode() - Verify a signature against some data using
* information in node with prperties of RSA Key like modulus, exponent etc.
@@ -499,7 +499,7 @@ int rsa_verify_hash(struct image_sign_info *info,
* RSA encryption, rsa_verify_with_pkey()/rsa_gen_key_prop() are
* of no use and should not be compiled in.
*/
- if (!tools_build() && CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY) &&
+ if (!tools_build() && IS_ENABLED(CONFIG_RSA_VERIFY_WITH_PKEY) &&
!info->fdt_blob) {
/* don't rely on fdt properties */
ret = rsa_verify_with_pkey(info, hash, sig, sig_len);
@@ -508,7 +508,7 @@ int rsa_verify_hash(struct image_sign_info *info,
return ret;
}
- if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) {
+ if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) {
const void *blob = info->fdt_blob;
int ndepth, noffset;
int sig_node, node;
diff --git a/lib/semihosting.c b/lib/semihosting.c
index 831774e3566..d5cbac4b01b 100644
--- a/lib/semihosting.c
+++ b/lib/semihosting.c
@@ -20,7 +20,7 @@
#define SYSFLEN 0x0C
#define SYSERRNO 0x13
-#if CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK)
+#if IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK)
static bool _semihosting_enabled = true;
static bool try_semihosting = true;
diff --git a/lib/string.c b/lib/string.c
index ecea755f405..0afa8d35078 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -526,7 +526,7 @@ __used void * memset(void * s,int c,size_t count)
unsigned long *sl = (unsigned long *) s;
char *s8;
-#if !CONFIG_IS_ENABLED(TINY_MEMSET)
+#if !IS_ENABLED(CONFIG_TINY_MEMSET)
unsigned long cl = 0;
int i;
diff --git a/lib/time.c b/lib/time.c
index 5252190af53..aaa70ecb3f8 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -66,7 +66,7 @@ ulong timer_get_boot_us(void)
extern unsigned long timer_read_counter(void);
#endif
-#if CONFIG_IS_ENABLED(TIMER)
+#if IS_ENABLED(CONFIG_TIMER)
ulong notrace get_tbclk(void)
{
if (!gd->timer) {
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index f661fc65054..d8c389b5780 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -270,7 +270,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
}
break;
case 'p':
- if (CONFIG_IS_ENABLED(NET) || _DEBUG) {
+ if (IS_ENABLED(CONFIG_NET) || _DEBUG) {
pointer(info, fmt, va_arg(va, void *));
/*
* Skip this because it pulls in _ctype which is
@@ -327,7 +327,7 @@ abort:
return 0;
}
-#if CONFIG_IS_ENABLED(PRINTF)
+#if IS_ENABLED(CONFIG_PRINTF)
static void putc_normal(struct printf_info *info, char ch)
{
putc(ch);
@@ -378,7 +378,7 @@ int sprintf(char *buf, const char *fmt, ...)
return ret;
}
-#if CONFIG_IS_ENABLED(LOG)
+#if IS_ENABLED(CONFIG_LOG)
/* Note that size is ignored */
int vsnprintf(char *buf, size_t size, const char *fmt, va_list va)
{
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 2d13e68b579..86c6cfee45f 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -308,7 +308,7 @@ static __maybe_unused char *string16(char *buf, char *end, u16 *s,
return buf;
}
-#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT)
+#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT)
static char *device_path_string(char *buf, char *end, void *dp, int field_width,
int precision, int flags)
{
@@ -469,7 +469,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
switch (*fmt) {
/* Device paths only exist in the EFI context. */
-#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
+#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
case 'D':
return device_path_string(buf, end, ptr, field_width,
precision, flags);
@@ -629,7 +629,7 @@ repeat:
case 's':
/* U-Boot uses UTF-16 strings in the EFI context only. */
-#if (CONFIG_IS_ENABLED(EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) && \
+#if (IS_ENABLED(CONFIG_EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) && \
!defined(API_BUILD)
if (qualifier == 'l') {
str = string16(str, end, va_arg(args, u16 *),
@@ -808,7 +808,7 @@ int sprintf(char *buf, const char *fmt, ...)
return i;
}
-#if CONFIG_IS_ENABLED(PRINTF)
+#if IS_ENABLED(CONFIG_PRINTF)
int printf(const char *fmt, ...)
{
va_list args;
diff --git a/net/bootp.c b/net/bootp.c
index 8b1a4ae2ef8..5fd911a6d8b 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -1077,7 +1077,7 @@ static void dhcp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
strlen(CONFIG_SYS_BOOTFILE_PREFIX)) == 0) {
#endif /* CONFIG_SYS_BOOTFILE_PREFIX */
dhcp_packet_process_options(bp);
- if (CONFIG_IS_ENABLED(EFI_LOADER) &&
+ if (IS_ENABLED(CONFIG_EFI_LOADER) &&
IS_ENABLED(CONFIG_NETDEVICES))
efi_net_set_dhcp_ack(pkt, len);
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index b01a910938e..c4283b836d8 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -500,7 +500,7 @@ static int eth_post_bind(struct udevice *dev)
#ifdef CONFIG_DM_ETH_PHY
eth_phy_binds_nodes(dev);
#endif
- if (CONFIG_IS_ENABLED(BOOTDEV_ETH) && !priv->no_bootdevs) {
+ if (IS_ENABLED(CONFIG_BOOTDEV_ETH) && !priv->no_bootdevs) {
ret = bootdev_setup_for_dev(dev, "eth_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);
@@ -520,7 +520,7 @@ static int eth_pre_unbind(struct udevice *dev)
static bool eth_dev_get_mac_address(struct udevice *dev, u8 mac[ARP_HLEN])
{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if IS_ENABLED(CONFIG_OF_CONTROL)
const uint8_t *p;
struct nvmem_cell mac_cell;
diff --git a/net/eth_common.c b/net/eth_common.c
index 82d527abba6..b33a6268819 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -32,7 +32,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index,
void eth_common_init(void)
{
bootstage_mark(BOOTSTAGE_ID_NET_ETH_START);
-#if CONFIG_IS_ENABLED(ETH)
+#if IS_ENABLED(CONFIG_ETH)
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
miiphy_init();
#endif
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index fe8180ab4e7..82a3b748b65 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -477,7 +477,7 @@ static int run_tests(void)
CHECKP(buf + 7, out);
CHECKP(buf + 13, end);
- strcpy(buf, "CONFIG_IS_ENABLED(FRED)");
+ strcpy(buf, "IS_ENABLED(CONFIG_FRED)");
out = parse_config_line(buf, &end);
CHECKP(buf + 18, out);
CHECKP(buf + 22, end);
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index 1713d0d1c85..821061b269f 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -93,7 +93,7 @@ static struct cmd_tbl cmd_ut_sub[] = {
#ifdef CONFIG_UT_TIME
U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
#endif
-#if CONFIG_IS_ENABLED(UT_UNICODE) && !defined(API_BUILD)
+#if IS_ENABLED(CONFIG_UT_UNICODE) && !defined(API_BUILD)
U_BOOT_CMD_MKENT(unicode, CONFIG_SYS_MAXARGS, 1, do_ut_unicode, "", ""),
#endif
#ifdef CONFIG_SANDBOX
diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c
index e4ebb93cdad..80065e5da53 100644
--- a/test/dm/clk_ccf.c
+++ b/test/dm/clk_ccf.c
@@ -22,7 +22,7 @@ static int dm_test_clk_ccf(struct unit_test_state *uts)
struct udevice *dev;
long long rate;
int ret;
-#if CONFIG_IS_ENABLED(CLK_CCF)
+#if IS_ENABLED(CONFIG_CLK_CCF)
const char *clkname;
int clkid, i;
#endif
@@ -108,7 +108,7 @@ static int dm_test_clk_ccf(struct unit_test_state *uts)
rate = clk_get_rate(clk);
ut_asserteq(rate, 60000000);
-#if CONFIG_IS_ENABLED(CLK_CCF)
+#if IS_ENABLED(CONFIG_CLK_CCF)
/* Test clk tree enable/disable */
ret = clk_get_by_id(SANDBOX_CLK_I2C_ROOT, &clk);
ut_assertok(ret);
diff --git a/test/dm/core.c b/test/dm/core.c
index 7f3f8d183bc..4544bc69deb 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -1203,7 +1203,7 @@ static int dm_test_all_have_seq(struct unit_test_state *uts)
}
DM_TEST(dm_test_all_have_seq, UT_TESTF_SCAN_PDATA);
-#if CONFIG_IS_ENABLED(DM_DMA)
+#if IS_ENABLED(CONFIG_DM_DMA)
static int dm_test_dma_offset(struct unit_test_state *uts)
{
struct udevice *dev;
diff --git a/test/dm/fastboot.c b/test/dm/fastboot.c
index 758538d0e85..52c0c7a8ba7 100644
--- a/test/dm/fastboot.c
+++ b/test/dm/fastboot.c
@@ -41,7 +41,7 @@ static int dm_test_fastboot_mmc_part(struct unit_test_state *uts)
*/
ut_asserteq(0, CONFIG_FASTBOOT_FLASH_MMC_DEV);
ut_assertok(blk_get_device_by_str("mmc", "0", &mmc_dev_desc));
- if (CONFIG_IS_ENABLED(RANDOM_UUID)) {
+ if (IS_ENABLED(CONFIG_RANDOM_UUID)) {
gen_rand_uuid_str(parts[0].uuid, UUID_STR_FORMAT_STD);
gen_rand_uuid_str(parts[1].uuid, UUID_STR_FORMAT_STD);
gen_rand_uuid_str(str_disk_guid, UUID_STR_FORMAT_STD);
diff --git a/test/dm/of_platdata.c b/test/dm/of_platdata.c
index a241c427936..85015154883 100644
--- a/test/dm/of_platdata.c
+++ b/test/dm/of_platdata.c
@@ -149,7 +149,7 @@ static int dm_test_of_plat_dev(struct unit_test_state *uts)
uint i;
/* Skip this test if there is no platform data */
- if (!CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT))
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT))
return -EAGAIN;
/* Record the indexes that are found */
@@ -209,7 +209,7 @@ static int dm_test_of_plat_phandle(struct unit_test_state *uts)
}
DM_TEST(dm_test_of_plat_phandle, UT_TESTF_SCAN_PDATA);
-#if CONFIG_IS_ENABLED(OF_PLATDATA_PARENT)
+#if IS_ENABLED(CONFIG_OF_PLATDATA_PARENT)
/* Test that device parents are correctly set up */
static int dm_test_of_plat_parent(struct unit_test_state *uts)
{
diff --git a/test/dm/part.c b/test/dm/part.c
index 35e99eeb01a..940d2bc6697 100644
--- a/test/dm/part.c
+++ b/test/dm/part.c
@@ -44,7 +44,7 @@ static int dm_test_part(struct unit_test_state *uts)
};
ut_asserteq(2, blk_get_device_by_str("mmc", "2", &mmc_dev_desc));
- if (CONFIG_IS_ENABLED(RANDOM_UUID)) {
+ if (IS_ENABLED(CONFIG_RANDOM_UUID)) {
gen_rand_uuid_str(parts[0].uuid, UUID_STR_FORMAT_STD);
gen_rand_uuid_str(parts[1].uuid, UUID_STR_FORMAT_STD);
gen_rand_uuid_str(str_disk_guid, UUID_STR_FORMAT_STD);
diff --git a/test/dm/spi.c b/test/dm/spi.c
index 325799bbf10..1f63fe289f6 100644
--- a/test/dm/spi.c
+++ b/test/dm/spi.c
@@ -194,7 +194,7 @@ static int dm_test_spi_xfer(struct unit_test_state *uts)
* Since we are about to destroy all devices, we must tell sandbox
* to forget the emulation device
*/
-#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
+#if IS_ENABLED(CONFIG_DM_SPI_FLASH)
sandbox_sf_unbind_emul(state_get_current(), busnum, cs);
#endif
diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c
index 472d2c57280..8fb6422c905 100644
--- a/test/lib/kconfig.c
+++ b/test/lib/kconfig.c
@@ -18,9 +18,9 @@ static int lib_test_is_enabled(struct unit_test_state *uts)
ut_asserteq(1, IS_ENABLED(CONFIG_CMDLINE))
ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED))
- ut_asserteq(1, CONFIG_IS_ENABLED(CMDLINE))
- ut_asserteq(0, CONFIG_IS_ENABLED(OF_PLATDATA))
- ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED))
+ ut_asserteq(1, IS_ENABLED(CONFIG_CMDLINE))
+ ut_asserteq(0, IS_ENABLED(CONFIG_OF_PLATDATA))
+ ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED))
ut_asserteq(0xc000,
IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR));
@@ -47,7 +47,7 @@ static int lib_test_is_enabled(struct unit_test_state *uts)
* cause SPL to not be built.
*/
if (!IS_ENABLED(CONFIG_SANDBOX_SPL) &&
- CONFIG_IS_ENABLED(TEST_KCONFIG)) {
+ IS_ENABLED(CONFIG_TEST_KCONFIG)) {
val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE,
TEST_KCONFIG_VALUE);
printf("value2 %ld\n", val);
diff --git a/test/lib/kconfig_spl.c b/test/lib/kconfig_spl.c
index c89ceaec66f..5c66183dc3d 100644
--- a/test/lib/kconfig_spl.c
+++ b/test/lib/kconfig_spl.c
@@ -15,9 +15,9 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts)
{
ulong val;
- ut_asserteq(0, CONFIG_IS_ENABLED(CMDLINE))
- ut_asserteq(1, CONFIG_IS_ENABLED(OF_PLATDATA))
- ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED))
+ ut_asserteq(0, IS_ENABLED(CONFIG_CMDLINE))
+ ut_asserteq(1, IS_ENABLED(CONFIG_OF_PLATDATA))
+ ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED))
/*
* This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the
@@ -33,7 +33,7 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts)
* This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the
* value is used.
*/
- if (CONFIG_IS_ENABLED(TEST_KCONFIG)) {
+ if (IS_ENABLED(CONFIG_TEST_KCONFIG)) {
val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE,
TEST_KCONFIG_VALUE);
printf("value2 %ld\n", val);
diff --git a/test/print_ut.c b/test/print_ut.c
index 47a6ce57840..eb7592ff740 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -23,7 +23,7 @@
/* Declare a new print test */
#define PRINT_TEST(_name, _flags) UNIT_TEST(_name, _flags, print_test)
-#if CONFIG_IS_ENABLED(LIB_UUID)
+#if IS_ENABLED(CONFIG_LIB_UUID)
/* Test printing GUIDs */
static int print_guid(struct unit_test_state *uts)
{
@@ -62,7 +62,7 @@ static int print_guid(struct unit_test_state *uts)
PRINT_TEST(print_guid, 0);
#endif
-#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
+#if IS_ENABLED(CONFIG_EFI_LOADER) && !defined(API_BUILD)
/* Test efi_loader specific printing */
static int print_efi_ut(struct unit_test_state *uts)
{
diff --git a/test/test-main.c b/test/test-main.c
index b3c30d92937..a88f9635f97 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -96,7 +96,7 @@ static int dm_test_pre_run(struct unit_test_state *uts)
fdt_totalsize(gd->fdt_blob));
gd->dm_root = NULL;
malloc_disable_testing();
- if (CONFIG_IS_ENABLED(UT_DM) && !CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (IS_ENABLED(CONFIG_UT_DM) && !IS_ENABLED(CONFIG_OF_PLATDATA))
memset(dm_testdrv_op_count, '\0', sizeof(dm_testdrv_op_count));
arch_reset_for_test();
@@ -145,7 +145,7 @@ static int dm_test_post_run(struct unit_test_state *uts)
* destroy them we cannot get them back since uclass_add() is not
* supported. So skip this.
*/
- if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA_INST)) {
for (id = 0; id < UCLASS_COUNT; id++) {
struct uclass *uc;
@@ -267,11 +267,11 @@ static int dm_test_restore(struct device_node *of_root)
gd_set_of_root(of_root);
gd->dm_root = NULL;
- ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE));
+ ret = dm_init(IS_ENABLED(CONFIG_OF_LIVE));
if (ret)
return ret;
dm_scan_plat(false);
- if (!CONFIG_IS_ENABLED(OF_PLATDATA))
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA))
dm_scan_fdt(false);
return 0;
@@ -303,7 +303,7 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test)
if (test->flags & UT_TESTF_PROBE_TEST)
ut_assertok(do_autoprobe(uts));
- if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA) &&
(test->flags & UT_TESTF_SCAN_FDT)) {
/*
* only set this if we know the ethernet uclass will be created
@@ -456,7 +456,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
/* Run with the live tree if possible */
runs = 0;
- if (CONFIG_IS_ENABLED(OF_LIVE)) {
+ if (IS_ENABLED(CONFIG_OF_LIVE)) {
if (!(test->flags & UT_TESTF_FLAT_TREE)) {
uts->of_live = true;
ut_assertok(ut_run_test(uts, test, test->name));
@@ -477,7 +477,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
* boards)
*/
if (!(test->flags & UT_TESTF_LIVE_TREE) &&
- (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) ||
+ (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) ||
!(test->flags & UT_TESTF_OTHER_FDT)) &&
(!runs || ut_test_run_on_flattree(test)) &&
!(gd->flags & GD_FLG_FDT_CHANGED)) {
@@ -600,7 +600,7 @@ int ut_run_list(const char *category, const char *prefix,
bool has_dm_tests = false;
int ret;
- if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
+ if (!IS_ENABLED(CONFIG_OF_PLATDATA) &&
ut_list_has_dm_tests(tests, count)) {
has_dm_tests = true;
/*
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index 382b7965161..1d28a4b00fd 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -104,7 +104,7 @@ static int unicode_test_u16_strcpy(struct unit_test_state *uts)
UNICODE_TEST(unicode_test_u16_strcpy);
/* U-Boot uses UTF-16 strings in the EFI context only. */
-#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
+#if IS_ENABLED(CONFIG_EFI_LOADER) && !defined(API_BUILD)
static int unicode_test_string16(struct unit_test_state *uts)
{
char buf[20];
@@ -635,7 +635,7 @@ static int unicode_test_u16_strcasecmp(struct unit_test_state *uts)
ut_assert(u16_strcasecmp(u"abcd", u"abcE") < 0);
ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0);
ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0);
- if (CONFIG_IS_ENABLED(EFI_UNICODE_CAPITALIZATION)) {
+ if (IS_ENABLED(CONFIG_EFI_UNICODE_CAPITALIZATION)) {
/* Cyrillic letters */
ut_assert(u16_strcasecmp(u"\x043a\x043d\x0438\x0433\x0430",
u"\x041a\x041d\x0418\x0413\x0410") == 0);
--
2.39.1.519.gcb327c4b5f-goog
More information about the U-Boot
mailing list