* [U-Boot] [PATCH] freescale; Ensure common commands are not included in SPL binary
@ 2018-01-03 13:57 Tom Rini
2018-01-19 0:54 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2018-01-03 13:57 UTC (permalink / raw)
To: u-boot
Both the "qixis_reset" and esbc_validate" commands can only be used in
full U-Boot so do not build them in SPL. As part of this rework the
qixis code to declare things as static and make use of __weak for
function aliases.
Cc; York Sun <york.sun@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
board/freescale/common/cmd_esbc_validate.c | 2 ++
board/freescale/common/qixis.c | 14 +++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c
index b3e5f019b87b..f45e2249fbac 100644
--- a/board/freescale/common/cmd_esbc_validate.c
+++ b/board/freescale/common/cmd_esbc_validate.c
@@ -23,6 +23,7 @@ loop:
return 0;
}
+#ifndef CONFIG_SPL_BUILD
static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
@@ -82,3 +83,4 @@ U_BOOT_CMD(
"Put the core in spin loop (Secure Boot Only)",
""
);
+#endif
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c
index 0db0ed667002..24459f863578 100644
--- a/board/freescale/common/qixis.c
+++ b/board/freescale/common/qixis.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <asm/io.h>
+#include <linux/compiler.h>
#include <linux/time.h>
#include <i2c.h>
#include "qixis.h"
@@ -136,12 +137,13 @@ void board_deassert_mem_reset(void)
}
#endif
-void qixis_reset(void)
+#ifndef CONFIG_SPL_BUILD
+static void qixis_reset(void)
{
QIXIS_WRITE(rst_ctl, QIXIS_RST_CTL_RESET);
}
-void qixis_bank_reset(void)
+static void qixis_bank_reset(void)
{
QIXIS_WRITE(rcfg_ctl, QIXIS_RCFG_CTL_RECONFIG_IDLE);
QIXIS_WRITE(rcfg_ctl, QIXIS_RCFG_CTL_RECONFIG_START);
@@ -196,15 +198,12 @@ static void qixis_dump_regs(void)
printf("stat_alrm = %02x\n", QIXIS_READ(stat_alrm));
}
-static void __qixis_dump_switch(void)
+void __weak qixis_dump_switch(void)
{
puts("Reverse engineering switch is not implemented for this board\n");
}
-void qixis_dump_switch(void)
- __attribute__((weak, alias("__qixis_dump_switch")));
-
-int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
@@ -305,3 +304,4 @@ U_BOOT_CMD(
"qixis_reset dump - display the QIXIS registers\n"
"qixis_reset switch - display switch\n"
);
+#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] freescale; Ensure common commands are not included in SPL binary
2018-01-03 13:57 [U-Boot] [PATCH] freescale; Ensure common commands are not included in SPL binary Tom Rini
@ 2018-01-19 0:54 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2018-01-19 0:54 UTC (permalink / raw)
To: u-boot
On 01/03/2018 05:58 AM, Tom Rini wrote:
> Both the "qixis_reset" and esbc_validate" commands can only be used in
> full U-Boot so do not build them in SPL. As part of this rework the
> qixis code to declare things as static and make use of __weak for
> function aliases.
>
> Cc; York Sun <york.sun@nxp.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
Minor change to subject.
Applied to fsl-qoriq master. Thanks.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-19 0:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 13:57 [U-Boot] [PATCH] freescale; Ensure common commands are not included in SPL binary Tom Rini
2018-01-19 0:54 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.