From 2da77958e96151295e72f8f85aee352d0b4010fe Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 7 May 2015 16:11:42 +0200 Subject: Add config to disable commands used only in production CONFIG_TRDX_CMD_IMX_MFGR in menu 'ARM architecture' While at it remove unused include g_dnl.h --- board/toradex/apalis_imx6/Kconfig | 9 +++++++++ board/toradex/apalis_imx6/Makefile | 4 ++-- board/toradex/apalis_imx6/apalis_imx6.c | 4 ++++ board/toradex/colibri_imx6/Kconfig | 9 +++++++++ board/toradex/colibri_imx6/Makefile | 4 ++-- board/toradex/colibri_imx6/colibri_imx6.c | 5 ++++- 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/board/toradex/apalis_imx6/Kconfig b/board/toradex/apalis_imx6/Kconfig index ad48b96218..67e592b475 100644 --- a/board/toradex/apalis_imx6/Kconfig +++ b/board/toradex/apalis_imx6/Kconfig @@ -30,4 +30,13 @@ config TRDX_CFG_BLOCK_PART config TRDX_CFG_BLOCK_OFFSET default "655360" +menuconfig TRDX_CMD_IMX_MFGR + bool "Enable factory testing commands for Toradex iMX 6 modules" + help + This adds the commands + mfgr_fuse: OTP fusing during module production + pf0100_otp_prog- Program the OTP fuses on the PMIC PF0100 + If executed on already fused modules they don't change any fuse setting. + default y + endif diff --git a/board/toradex/apalis_imx6/Makefile b/board/toradex/apalis_imx6/Makefile index 96370a141c..1e32379be9 100644 --- a/board/toradex/apalis_imx6/Makefile +++ b/board/toradex/apalis_imx6/Makefile @@ -2,5 +2,5 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y := apalis_imx6.o -obj-y += pf0100.o -obj-y += do_fuse.o +obj-$(CONFIG_TRDX_CMD_IMX_MFGR) += pf0100.o +obj-$(CONFIG_TRDX_CMD_IMX_MFGR) += do_fuse.o diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index c2d38f3ecf..5b08481994 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -32,7 +32,9 @@ #include #include "../common/configblock.h" +#ifdef TRDX_CMD_IMX_MFGR #include "pf0100.h" +#endif DECLARE_GLOBAL_DATA_PTR; @@ -794,7 +796,9 @@ int board_init(void) setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc); setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3); +#ifdef TRDX_CMD_IMX_MFGR (void) pmic_init(); +#endif #ifdef CONFIG_CMD_SATA setup_sata(); diff --git a/board/toradex/colibri_imx6/Kconfig b/board/toradex/colibri_imx6/Kconfig index ff6af7a2b0..13d4c26ae0 100644 --- a/board/toradex/colibri_imx6/Kconfig +++ b/board/toradex/colibri_imx6/Kconfig @@ -30,4 +30,13 @@ config TRDX_CFG_BLOCK_PART config TRDX_CFG_BLOCK_OFFSET default "655360" +menuconfig TRDX_CMD_IMX_MFGR + bool "Enable factory testing commands for Toradex iMX 6 modules" + help + This adds the commands + mfgr_fuse: OTP fusing during module production + pf0100_otp_prog- Program the OTP fuses on the PMIC PF0100 + If executed on already fused modules they don't change any fuse setting. + default y + endif diff --git a/board/toradex/colibri_imx6/Makefile b/board/toradex/colibri_imx6/Makefile index 7c22750228..4a07de621b 100644 --- a/board/toradex/colibri_imx6/Makefile +++ b/board/toradex/colibri_imx6/Makefile @@ -2,5 +2,5 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y := colibri_imx6.o -obj-y += pf0100.o -obj-y += do_fuse.o +obj-$(CONFIG_TRDX_CMD_IMX_MFGR) += pf0100.o +obj-$(CONFIG_TRDX_CMD_IMX_MFGR) += do_fuse.o diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 61c3eff545..16eb02caec 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -29,11 +29,12 @@ #include #include #include -#include #include #include "../common/configblock.h" +#ifdef TRDX_CMD_IMX_MFGR #include "pf0100.h" +#endif DECLARE_GLOBAL_DATA_PTR; @@ -534,7 +535,9 @@ int board_init(void) setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc); +#ifdef TRDX_CMD_IMX_MFGR (void) pmic_init(); +#endif #ifdef CONFIG_CMD_SATA setup_sata(); -- cgit v1.2.3