imx: Update FSL_MFGPROT config for iMX8M
authorYe Li <ye.li@nxp.com>
Tue, 19 Apr 2022 09:13:24 +0000 (14:43 +0530)
committerStefano Babic <sbabic@denx.de>
Thu, 21 Apr 2022 13:18:25 +0000 (15:18 +0200)
Update the Kconfig and Makefile to allow build for iMX8M and
restrict the build only in u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile

index 9aa1d84..ad0fb36 100644 (file)
@@ -137,7 +137,7 @@ config CMD_NANDBCB
 
 config FSL_MFGPROT
        bool "Support the 'mfgprot' command"
-       depends on IMX_HAB && ARCH_MX7
+       depends on IMX_HAB && (ARCH_MX7 || ARCH_IMX8M)
        help
          This option enables the manufacturing protection command
          which can be used has a protection feature for Manufacturing
index 77e7270..aa0b644 100644 (file)
@@ -38,8 +38,12 @@ ifeq ($(SOC),$(filter $(SOC),mx7))
 obj-y  += cpu.o
 obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
 obj-$(CONFIG_ENV_IS_IN_MMC) += mmc_env.o
+endif
+ifeq ($(SOC),$(filter $(SOC),mx7 imx8m))
+ifneq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_FSL_MFGPROT) += cmd_mfgprot.o
 endif
+endif
 ifeq ($(SOC),$(filter $(SOC),mx5 mx6 mx7))
 obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o
 endif