Skip to contentSkip to conversation

imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

PATCH New Peng Fan 4 participants 9 messages Jan 4, 2016 Arm i.MX and Layerscape

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tim Harvey <[email protected]>
---
 include/configs/imx6_spl.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx6_spl.h +1 -0
index 43ce7fe..68d3fd7 100644
@@ -34,6 +34,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
+#define CONFIG_SPL_WATCHDOG_SUPPORT
 
 /* NAND support */
 #if defined(CONFIG_SPL_NAND_SUPPORT)
Signature · 1 line
2.6.2
author
#1 lore raw

PATCH v2 2/2 imx: mx6ul: disable VIDEO for SPL

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

---
 include/configs/mx6ul_14x14_evk.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/mx6ul_14x14_evk.h +2 -0
index 5779632..a4f624c 100644
@@ -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
Signature · 1 line
2.6.2
#2 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

In reply to Peng Fan

Hi Peng,

Quoted 24 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tim Harvey <[email protected]>
---
 include/configs/imx6_spl.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx6_spl.h +0 -0
index 43ce7fe..68d3fd7 100644

include/configs/imx6_spl.h line 38

Quoted 5 lines
include/configs/imx6_spl.h +1 -0
@@ -34,6 +34,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
+#define CONFIG_SPL_WATCHDOG_SUPPORT
 

I've been carrying a local patch for the same, so

#3 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

In reply to Peng Fan
Quoted 9 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Why don't you implement dummy reset_cpu() {} instead ?

Quoted 14 lines
Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tim Harvey <[email protected]>
---
 include/configs/imx6_spl.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx6_spl.h +0 -0
index 43ce7fe..68d3fd7 100644

include/configs/imx6_spl.h line 40

Quoted 7 lines
include/configs/imx6_spl.h +1 -0
@@ -34,6 +34,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
+#define CONFIG_SPL_WATCHDOG_SUPPORT
 
 /* NAND support */
 #if defined(CONFIG_SPL_NAND_SUPPORT)

Best regards,
Marek Vasut

author
#4 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

Hi Marek,

Quoted 4 lines · Marek Vasut
Quoted 3 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

Quoted 8 lines
Quoted 6 lines

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Why don't you implement dummy reset_cpu() {} instead ?

Do you mean this, https://patchwork.ozlabs.org/patch/562232/?

Regards,
Peng

Quoted 25 lines
Quoted 15 lines
Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tim Harvey <[email protected]>
---
 include/configs/imx6_spl.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx6_spl.h +0 -0
index 43ce7fe..68d3fd7 100644

include/configs/imx6_spl.h line 40

Quoted 7 lines
include/configs/imx6_spl.h +1 -0
@@ -34,6 +34,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
+#define CONFIG_SPL_WATCHDOG_SUPPORT
 
 /* NAND support */
 #if defined(CONFIG_SPL_NAND_SUPPORT)

Best regards,
Marek Vasut

#5 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

Quoted 14 lines · Peng Fan

Hi Marek,

Quoted 11 lines · Marek Vasut
Quoted 9 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Quoted 3 lines
Quoted 1 line

Why don't you implement dummy reset_cpu() {} instead ?

Do you mean this, https://patchwork.ozlabs.org/patch/562232/?

Yes, I'd prefer that, since I do not want to see watchdog support becoming mandatory part of the SPL build. Watchdog support should be optional.

Best regards,
Marek Vasut

author
#6 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

Quoted 15 lines · Marek Vasut
Quoted 14 lines · Peng Fan

Hi Marek,

Quoted 11 lines · Marek Vasut
Quoted 9 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Why don't you implement dummy reset_cpu() {} instead ?

Do you mean this, https://patchwork.ozlabs.org/patch/562232/?

Yes, I'd prefer that, since I do not want to see watchdog support becoming mandatory part of the SPL build. Watchdog support should be optional.

Wait for Stefano's comments on this -:)

Regards,
Peng.

Quoted 3 lines

Best regards,
Marek Vasut

#7 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

In reply to Marek Vasut

Hi Marek, Peng,

Quoted 15 lines · Marek Vasut
Quoted 14 lines · Peng Fan

Hi Marek,

Quoted 11 lines · Marek Vasut
Quoted 9 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Why don't you implement dummy reset_cpu() {} instead ?

Do you mean this, https://patchwork.ozlabs.org/patch/562232/?

Yes, I'd prefer that, since I do not want to see watchdog support becoming mandatory part of the SPL build. Watchdog support should be optional.

Yes, enabling watchdog should be not be mandatory. Anyway, this happens only if CONFIG_IMX_WATCHDOG is set, else CONFIG_SPL_WATCHDOG_SUPPORT lets only to link reset_cpu() to the build. This is also what happens for all MX6 boards that do not enable the watchdog but need reset_cpu().

Adding another dummy function looks nasty to me, and Fabio sent some time ago patches to clean up this and drop empty reset_cpu() inside board files. We should not create this mess again.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================
#8 lore raw

PATCH v2 1/2 imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

Quoted 22 lines · Stefano Babic

Hi Marek, Peng,

Quoted 19 lines · Marek Vasut
Quoted 17 lines · Peng Fan

Hi Marek,

Quoted 4 lines · Marek Vasut
Quoted 3 lines · Peng Fan

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which breaks SPL build when DEBUG macro defined.

Quoted 8 lines
Quoted 6 lines

"
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 "
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Why don't you implement dummy reset_cpu() {} instead ?

Do you mean this, https://patchwork.ozlabs.org/patch/562232/?

Quoted 7 lines
Quoted 3 lines

Yes, I'd prefer that, since I do not want to see watchdog support becoming mandatory part of the SPL build. Watchdog support should be optional.

Yes, enabling watchdog should be not be mandatory. Anyway, this happens only if CONFIG_IMX_WATCHDOG is set, else CONFIG_SPL_WATCHDOG_SUPPORT lets only to link reset_cpu() to the build.

This is completely counter-intuitive and stupid. I suspect this behavior is required on iMX because iMXes reset through watchdog, yes ? In that case, add a comment explaining why we always select watchdog in SPL on i.MXes.

Quoted 6 lines

This is also what happens
for all MX6 boards that do not enable the watchdog but need reset_cpu().

Adding another dummy function looks nasty to me, and Fabio sent some time ago patches to clean up this and drop empty reset_cpu() inside board files. We should not create this mess again.

Fine

Best regards,
Marek Vasut