Skip to contentSkip to conversation

mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

PATCH New Fabio Estevam 4 participants 7 messages May 27, 2015 – May 28, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

From: Fabio Estevam <[email protected]>

Commit 8183058188cd2d942 ("imx6: centralise common boot options in mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

DDR on mx6sx/mx6sl starts at 0x80000000.

Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl, so that these SoCs can boot again.

---
 include/configs/mx6_common.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/mx6_common.h +6 -1
index 233c6d2..bd16ec2 100644
@@ -53,10 +53,15 @@
 #define CONFIG_REVISION_TAG
 
 /* Boot options */
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
+#define CONFIG_LOADADDR		0x82000000
+#define CONFIG_SYS_TEXT_BASE	0x87800000
+#else
 #define CONFIG_LOADADDR		0x12000000
+#define CONFIG_SYS_TEXT_BASE	0x17800000
+#endif
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
 #ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE	0x17800000
 #endif
 #ifndef CONFIG_BOOTDELAY
 #define CONFIG_BOOTDELAY	3
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

Hi Fabio,

Quoted 28 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 8183058188cd2d942 ("imx6: centralise common boot options in mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

DDR on mx6sx/mx6sl starts at 0x80000000.

Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl, so that these SoCs can boot again.

---
 include/configs/mx6_common.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/mx6_common.h +3 -0
index 233c6d2..bd16ec2 100644
@@ -53,10 +53,15 @@
 #define CONFIG_REVISION_TAG
 
 /* Boot options */
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
+#define CONFIG_LOADADDR		0x82000000
+#define CONFIG_SYS_TEXT_BASE	0x87800000

include/configs/mx6_common.h line 67

Quoted 10 lines
include/configs/mx6_common.h +3 -1
+#else
 #define CONFIG_LOADADDR		0x12000000
+#define CONFIG_SYS_TEXT_BASE	0x17800000
+#endif
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
 #ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE	0x17800000
 #endif
 #ifndef CONFIG_BOOTDELAY
 #define CONFIG_BOOTDELAY	3

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
=====================================================================
#2 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

In reply to Fabio Estevam
Quoted 28 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 8183058188cd2d942 ("imx6: centralise common boot options in mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

DDR on mx6sx/mx6sl starts at 0x80000000.

Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl, so that these SoCs can boot again.

---
 include/configs/mx6_common.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/mx6_common.h +3 -0
index 233c6d2..bd16ec2 100644
@@ -53,10 +53,15 @@
 #define CONFIG_REVISION_TAG
 
 /* Boot options */
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
+#define CONFIG_LOADADDR		0x82000000
+#define CONFIG_SYS_TEXT_BASE	0x87800000

include/configs/mx6_common.h line 67

Quoted 10 lines
include/configs/mx6_common.h +3 -1
+#else
 #define CONFIG_LOADADDR		0x12000000
+#define CONFIG_SYS_TEXT_BASE	0x17800000
+#endif
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
 #ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE	0x17800000
 #endif
 #ifndef CONFIG_BOOTDELAY
 #define CONFIG_BOOTDELAY	3

Applied to u-boot-imx, thanks !

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
=====================================================================
#3 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

Hi Fabio,

Quoted 33 lines · Stefano Babic
Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 8183058188cd2d942 ("imx6: centralise common boot options in mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

DDR on mx6sx/mx6sl starts at 0x80000000.

Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl, so that these SoCs can boot again.

---
 include/configs/mx6_common.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/mx6_common.h +6 -0
index 233c6d2..bd16ec2 100644
@@ -53,10 +53,15 @@
 #define CONFIG_REVISION_TAG
 
 /* Boot options */
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
+#define CONFIG_LOADADDR		0x82000000
+#define CONFIG_SYS_TEXT_BASE	0x87800000
+#else
 #define CONFIG_LOADADDR		0x12000000
+#define CONFIG_SYS_TEXT_BASE	0x17800000
+#endif
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
Quoted 9 lines

include/configs/mx6_common.h line 67

Quoted 6 lines
include/configs/mx6_common.h +0 -1
 #ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE	0x17800000
 #endif
 #ifndef CONFIG_BOOTDELAY
 #define CONFIG_BOOTDELAY	3

Applied to u-boot-imx, thanks !

Sorry, it is not. This breaks (warnings) the tqma6 board. At least we have to undefine CONFIG_SYS_TEXT_BASE in tqma6.h because this board redefines it. I added Markus (b oard maintainer in CC), as he can better explain while this single board requires different CONFIG_SYS_TEXT_BASE. From the addresses I guess he will avoid relocation.

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
=====================================================================
#4 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

Am 28.05.2015 um 12:21 schrieb Stefano Babic:

Quoted 46 lines

Hi Fabio,

Quoted 33 lines · Stefano Babic
Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 8183058188cd2d942 ("imx6: centralise common boot options in mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

DDR on mx6sx/mx6sl starts at 0x80000000.

Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl, so that these SoCs can boot again.

---
 include/configs/mx6_common.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/mx6_common.h +6 -0
index 233c6d2..bd16ec2 100644
@@ -53,10 +53,15 @@
 #define CONFIG_REVISION_TAG
 
 /* Boot options */
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
+#define CONFIG_LOADADDR		0x82000000
+#define CONFIG_SYS_TEXT_BASE	0x87800000
+#else
 #define CONFIG_LOADADDR		0x12000000
+#define CONFIG_SYS_TEXT_BASE	0x17800000
+#endif
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
Quoted 9 lines

include/configs/mx6_common.h line 67

Quoted 6 lines
include/configs/mx6_common.h +0 -1
 #ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE	0x17800000
 #endif
 #ifndef CONFIG_BOOTDELAY
 #define CONFIG_BOOTDELAY	3

Applied to u-boot-imx, thanks !

Quoted 6 lines

Sorry, it is not. This breaks (warnings) the tqma6 board. At least we have to undefine CONFIG_SYS_TEXT_BASE in tqma6.h because this board redefines it. I added Markus (b oard maintainer in CC), as he can better explain while this single board requires different CONFIG_SYS_TEXT_BASE. From the addresses I guess he will avoid relocation.

We do it to have the U-Boot at the end of RAM - some projects using the TQMa6 requires that we have most of RAM available - for instance during system updates.

Markus

Quoted 5 lines

Best regards,
Stefano Babic

#5 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

In reply to Stefano Babic

Hello,

[snip]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

#ifndef CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_TEXT_BASE 0x17800000
#endif

Doesn't this also leave an empty, and therefore meaningless #ifndef...#endif that could be removed completely?

Regards,

Andy.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

PATCH 1/1 mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

Hi Andy,

Quoted 2 lines · Andy Pont

Doesn't this also leave an empty, and therefore meaningless #ifndef...#endif that could be removed completely?

Good catch, thanks.

I sent a v2 that addresses this problem and also the build warning on tqma6.

I am not able to boot test it on real hardware at the moment though.

Regards,

Fabio Estevam