summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx6/pf0100.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-01-03 09:19:17 -0500
committerStefano Babic <sbabic@denx.de>2018-01-12 14:28:04 +0100
commit64c7abf0235a3cb5efc32b6c926b6ff8cc0d1d9b (patch)
tree1917dd5c23dc4b6b76999aa59d160e2bc7af93ac /board/toradex/colibri_imx6/pf0100.c
parentbf52330a507901af2a5581bec99c6da01388a335 (diff)
toradex: imx6: Rework PF0100 fuse programming commands to not be in SPL
The code for programming the OTP fuses on the PMIC PF0100 can only be used in full U-Boot, so do not build / link it into SPL. Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'board/toradex/colibri_imx6/pf0100.c')
-rw-r--r--board/toradex/colibri_imx6/pf0100.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index 6889287760..62e64ab1d7 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -23,7 +23,7 @@
/*#define DEBUG */
/* use GPIO: EXT_IO1 to switch on VPGM, ON: 1 */
-static iomux_v3_cfg_t const pmic_prog_pads[] = {
+static __maybe_unused iomux_v3_cfg_t const pmic_prog_pads[] = {
MX6_PAD_NANDF_D3__GPIO2_IO03 | MUX_PAD_CTRL(NO_PAD_CTRL),
# define PMIC_PROG_VOLTAGE IMX_GPIO_NR(2, 3)
};
@@ -144,7 +144,8 @@ unsigned pmic_init(void)
return programmed;
}
-int pf0100_prog(void)
+#ifndef CONFIG_SPL_BUILD
+static int pf0100_prog(void)
{
unsigned char bus = 1;
unsigned char val;
@@ -191,7 +192,7 @@ int pf0100_prog(void)
return CMD_RET_SUCCESS;
}
-int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
int ret;
@@ -209,3 +210,4 @@ U_BOOT_CMD(
"Program the OTP fuses on the PMIC PF0100",
""
);
+#endif