summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-05-07 16:11:42 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-05-07 17:32:24 +0200
commit2da77958e96151295e72f8f85aee352d0b4010fe (patch)
tree6e6abcf2f7bd80c54ec930fd8bb1fcb2382d9dc5 /board
parentdb9abc87f80ef8bfc91ce9578f32e2a33dbaed4b (diff)
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
Diffstat (limited to 'board')
-rw-r--r--board/toradex/apalis_imx6/Kconfig9
-rw-r--r--board/toradex/apalis_imx6/Makefile4
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c4
-rw-r--r--board/toradex/colibri_imx6/Kconfig9
-rw-r--r--board/toradex/colibri_imx6/Makefile4
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c5
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 <i2c.h>
#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 <netdev.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/mxc_hdmi.h>
-#include <g_dnl.h>
#include <i2c.h>
#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();