* [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu @ 2016-01-04 4:19 Peng Fan 2016-01-04 4:19 ` [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL Peng Fan 2016-01-04 8:59 ` [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Stefano Babic 0 siblings, 2 replies; 6+ messages in thread From: Peng Fan @ 2016-01-04 4:19 UTC (permalink / raw) To: u-boot 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 " Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> --- 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"); -- 2.6.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL 2016-01-04 4:19 [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Peng Fan @ 2016-01-04 4:19 ` Peng Fan 2016-01-04 8:59 ` Stefano Babic 2016-01-07 16:52 ` Stefano Babic 2016-01-04 8:59 ` [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Stefano Babic 1 sibling, 2 replies; 6+ messages in thread From: Peng Fan @ 2016-01-04 4:19 UTC (permalink / raw) To: u-boot With DEBUG macro enabled, SPL build failure: " arch/arm/cpu/armv7/built-in.o: In function `reset_misc': ~/uboot/arch/arm/cpu/armv7/mx6/soc.c:406: undefined reference to `lcdif_power_down' scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed " Wrap VIDEO settings with ifndef CONFIG_SPL_BUILD Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> --- include/configs/mx6ul_14x14_evk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index 5779632..a4f624c 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -243,6 +243,7 @@ #define CONFIG_IMX_THERMAL +#ifndef CONFIG_SPL_BUILD #define CONFIG_VIDEO #ifdef CONFIG_VIDEO #define CONFIG_CFB_CONSOLE @@ -259,5 +260,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR #endif +#endif #endif -- 2.6.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL 2016-01-04 4:19 ` [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL Peng Fan @ 2016-01-04 8:59 ` Stefano Babic 2016-01-07 16:52 ` Stefano Babic 1 sibling, 0 replies; 6+ messages in thread From: Stefano Babic @ 2016-01-04 8:59 UTC (permalink / raw) To: u-boot On 04/01/2016 05:19, Peng Fan wrote: > With DEBUG macro enabled, SPL build failure: > " > arch/arm/cpu/armv7/built-in.o: In function `reset_misc': > ~/uboot/arch/arm/cpu/armv7/mx6/soc.c:406: undefined reference to `lcdif_power_down' > scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed > " > Wrap VIDEO settings with ifndef CONFIG_SPL_BUILD > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > Cc: Stefano Babic <sbabic@denx.de> > --- > include/configs/mx6ul_14x14_evk.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h > index 5779632..a4f624c 100644 > --- a/include/configs/mx6ul_14x14_evk.h > +++ b/include/configs/mx6ul_14x14_evk.h > @@ -243,6 +243,7 @@ > > #define CONFIG_IMX_THERMAL > > +#ifndef CONFIG_SPL_BUILD > #define CONFIG_VIDEO > #ifdef CONFIG_VIDEO > #define CONFIG_CFB_CONSOLE > @@ -259,5 +260,6 @@ > #define CONFIG_VIDEO_BMP_LOGO > #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR > #endif > +#endif > > #endif > Reviewed-by: Stefano Babic <sbabic@denx.de> 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 ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL 2016-01-04 4:19 ` [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL Peng Fan 2016-01-04 8:59 ` Stefano Babic @ 2016-01-07 16:52 ` Stefano Babic 1 sibling, 0 replies; 6+ messages in thread From: Stefano Babic @ 2016-01-07 16:52 UTC (permalink / raw) To: u-boot On 04/01/2016 05:19, Peng Fan wrote: > With DEBUG macro enabled, SPL build failure: > " > arch/arm/cpu/armv7/built-in.o: In function `reset_misc': > ~/uboot/arch/arm/cpu/armv7/mx6/soc.c:406: undefined reference to `lcdif_power_down' > scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed > " > Wrap VIDEO settings with ifndef CONFIG_SPL_BUILD > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > Cc: Stefano Babic <sbabic@denx.de> > --- Applied (fix) to u-boot-imx, thanks ! 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 ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu 2016-01-04 4:19 [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Peng Fan 2016-01-04 4:19 ` [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL Peng Fan @ 2016-01-04 8:59 ` Stefano Babic 2016-01-04 9:10 ` Peng Fan 1 sibling, 1 reply; 6+ messages in thread From: Stefano Babic @ 2016-01-04 8:59 UTC (permalink / raw) To: u-boot 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 <peng.fan@nxp.com> > Cc: Albert Aribaud <albert.u.boot@aribaud.net> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > --- > 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 ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu 2016-01-04 8:59 ` [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Stefano Babic @ 2016-01-04 9:10 ` Peng Fan 0 siblings, 0 replies; 6+ messages in thread From: Peng Fan @ 2016-01-04 9:10 UTC (permalink / raw) To: u-boot Hi Stefano, On Mon, Jan 04, 2016 at 09:59:10AM +0100, Stefano Babic wrote: >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 ? Will switch to enable "#define CONFIG_SPL_WATCHDOG_SUPPORT" in imx6_spl.h to fix this issue. Thanks, Peng. > >> >> Signed-off-by: Peng Fan <peng.fan@nxp.com> >> Cc: Albert Aribaud <albert.u.boot@aribaud.net> >> Cc: Stefano Babic <sbabic@denx.de> >> Cc: Fabio Estevam <fabio.estevam@freescale.com> >> --- >> 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 >===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-07 16:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-04 4:19 [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Peng Fan 2016-01-04 4:19 ` [U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL Peng Fan 2016-01-04 8:59 ` Stefano Babic 2016-01-07 16:52 ` Stefano Babic 2016-01-04 8:59 ` [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu Stefano Babic 2016-01-04 9:10 ` Peng Fan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox