From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Mon, 4 Jan 2016 09:59:10 +0100 Subject: [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu In-Reply-To: <1451881154-5686-1-git-send-email-peng.fan@nxp.com> References: <1451881154-5686-1-git-send-email-peng.fan@nxp.com> Message-ID: <568A345E.7050101@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Peng, On 04/01/2016 05:19, Peng Fan wrote: > This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which > breaks SPL build when DEBUG macro defined. > > Introudce a weak function reset_cpu to avoid build failure when > building SPL for i.MX with DEBUG enabled. > " > arch/arm/lib/built-in.o: In function `do_reset': > ~/uboot/arch/arm/lib/reset.c:45: undefined reference to `reset_cpu' > scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed > " I do not like to add a weak function just to fix the build, if this is not strictly necessary. IMHO the build fails because we moved reset_cpu() inside the watchdog driver to make it available for all CPUs. Is imx_watchdog not built together with SPL ? > > Signed-off-by: Peng Fan > Cc: Albert Aribaud > Cc: Stefano Babic > Cc: Fabio Estevam > --- > arch/arm/lib/reset.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c > index 9a95f08..4dd0131 100644 > --- a/arch/arm/lib/reset.c > +++ b/arch/arm/lib/reset.c > @@ -27,6 +27,10 @@ __weak void reset_misc(void) > { > } > > +__weak void reset_cpu(ulong addr) > +{ > +} > + > int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) > { > puts ("resetting ...\n"); > Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================