From: Biwen Li <biwen.li@nxp.com>
To: u-boot@lists.denx.de
Subject: [v6 2/8] armv8: fsl-layerscape: spl: fix build error when DM_I2C is enabled
Date: Mon, 23 Dec 2019 19:45:28 +0800 [thread overview]
Message-ID: <20191223114534.14298-2-biwen.li@nxp.com> (raw)
In-Reply-To: <20191223114534.14298-1-biwen.li@nxp.com>
Fix below SPL build error when DM_I2C is enabled,
- arch/arm/cpu/armv8/built-in.o: In function `board_init_f:
arch/arm/cpu/armv8/fsl-layerscape/spl.c:74: undefined reference to `i2c_init_all'
arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:(.text.board_init_f+0x30):
relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
`i2c_init_all'
make[2]: *** [spl/u-boot-spl] Error 1
make[1]: *** [spl/u-boot-spl] Error 2
make: *** [sub-make] Error 2
arch/arm/cpu/armv8/fsl-layerscape/spl.c: In function 'board_init_f':
arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:2: warning: implicit
declaration of function 'i2c_init_all'; did you mean 'misc_init_r'?
[-Wimplicit-function-declaration]`
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
---
Changes in v6:
- none
Changes in v5:
- none
Changes in v4:
- update copyright
Changes in v3:
- update commit messages
Changes in v2:
- none
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 58a39e1123..30792afe82 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2014-2015 Freescale Semiconductor, Inc.
+ * Copyright 2019 NXP
*/
#include <common.h>
@@ -71,9 +72,11 @@ void board_init_f(ulong dummy)
preloader_console_init();
spl_set_bd();
+#ifdef CONFIG_SYS_I2C
#ifdef CONFIG_SPL_I2C_SUPPORT
i2c_init_all();
#endif
+#endif
#ifdef CONFIG_VID
init_func_vid();
#endif
--
2.17.1
next prev parent reply other threads:[~2019-12-23 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 11:45 [v6 1/8] rtc: pcf8563: Add driver model support Biwen Li
2019-12-23 11:45 ` Biwen Li [this message]
2019-12-23 11:45 ` [v6 3/8] i2c: mxc_i2c: add DM_FLAG_PRE_RELOC flag Biwen Li
2019-12-23 11:54 ` Fabio Estevam
2019-12-23 12:02 ` [EXT] " Biwen Li
2019-12-24 1:30 ` Fabio Estevam
2019-12-24 2:00 ` Biwen Li
2019-12-23 11:45 ` [v6 4/8] Kconfigs: layerscape: use a convenient default value for SYS_MALLOC_F_LEN Biwen Li
2019-12-23 11:45 ` [v6 5/8] dm: arm64: ls1012a: add i2c DM support Biwen Li
2019-12-23 11:45 ` [v6 6/8] dm: arm64: ls1043a: " Biwen Li
2019-12-23 11:45 ` [v6 7/8] dm: arm64: ls1046a: " Biwen Li
2019-12-23 11:45 ` [v6 8/8] dm: arm: ls1021a: " Biwen Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191223114534.14298-2-biwen.li@nxp.com \
--to=biwen.li@nxp.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.