Skip to contentSkip to conversation

arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

PATCH New Lukasz Majewski 3 participants 6 messages Apr 9, 2014 – Apr 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
board/samsung/trats2/trats2.c +13 -0
index 2a6c9f9..75a6c7b 100644
@@ -150,9 +150,22 @@ static int pmic_init_max77686(void);
 
 int exynos_init(void)
 {
+	struct exynos4_power *pwr =
+		(struct exynos4_power *)samsung_get_base_power();
+
 	check_hw_revision();
 	printf("HW Revision:\t0x%04x\n", board_rev);
 
+	/*
+	 * First bootloader on the TRATS2 platform uses
+	 * INFORM4 and INFORM5 registers for recovery
+	 *
+	 * To indicate correct boot chain - those two
+	 * registers must be cleared out
+	 */
+	writel(0, (unsigned int)&pwr->inform4);
+	writel(0, (unsigned int)&pwr->inform5);
+
 	return 0;
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

Dear Lukasz Majewski,

Quoted 27 lines · Lukasz Majewski

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
board/samsung/trats2/trats2.c +3 -0
index 2a6c9f9..75a6c7b 100644
@@ -150,9 +150,22 @@ static int pmic_init_max77686(void);
 
 int exynos_init(void)
 {
+	struct exynos4_power *pwr =
+		(struct exynos4_power *)samsung_get_base_power();
+
 	check_hw_revision();
 	printf("HW Revision:\t0x%04x\n", board_rev);

board/samsung/trats2/trats2.c static int pmic_init_max77686(void); · line 167

Quoted 10 lines
board/samsung/trats2/trats2.c +9 -0
 
+	/*
+	 * First bootloader on the TRATS2 platform uses
+	 * INFORM4 and INFORM5 registers for recovery
+	 *
+	 * To indicate correct boot chain - those two
+	 * registers must be cleared out
+	 */
+	writel(0, (unsigned int)&pwr->inform4);
+	writel(0, (unsigned int)&pwr->inform5);

I think, you don't have to do type casting.

board/samsung/trats2/trats2.c static int pmic_init_max77686(void); · line 171

Quoted 5 lines
board/samsung/trats2/trats2.c +1 -0
+
 	return 0;
 }
 

Thanks,
Minkyu Kang.

#2 lore raw

PATCH 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

Hi Minkyu,

Quoted 32 lines

Dear Lukasz Majewski,

Quoted 29 lines · Lukasz Majewski

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
(quoted diff) +0 -0

b/board/samsung/trats2/trats2.c index 2a6c9f9..75a6c7b 100644

board/samsung/trats2/trats2.c +3 -0
@@ -150,9 +150,22 @@ static int pmic_init_max77686(void);
 
 int exynos_init(void)
 {
+	struct exynos4_power *pwr =
+		(struct exynos4_power *)samsung_get_base_power();
+
 	check_hw_revision();
 	printf("HW Revision:\t0x%04x\n", board_rev);
 
Quoted 11 lines

board/samsung/trats2/trats2.c static int pmic_init_max77686(void); · line 167

Quoted 9 lines
board/samsung/trats2/trats2.c +9 -0
+	/*
+	 * First bootloader on the TRATS2 platform uses
+	 * INFORM4 and INFORM5 registers for recovery
+	 *
+	 * To indicate correct boot chain - those two
+	 * registers must be cleared out
+	 */
+	writel(0, (unsigned int)&pwr->inform4);
+	writel(0, (unsigned int)&pwr->inform5);

I think, you don't have to do type casting.

You are right, thanks for pointing out.

Quoted 9 lines

board/samsung/trats2/trats2.c static int pmic_init_max77686(void); · line 171

Quoted 6 lines
board/samsung/trats2/trats2.c +1 -0
+
 	return 0;
 }
 

Thanks,
Minkyu Kang.

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#3 lore raw

PATCH v2 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

In reply to Lukasz Majewski

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

---
Changes for v2:
- Remove redundant cast

---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
board/samsung/trats2/trats2.c +13 -0
index 2a6c9f9..f558ef9 100644
@@ -150,9 +150,22 @@ static int pmic_init_max77686(void);
 
 int exynos_init(void)
 {
+	struct exynos4_power *pwr =
+		(struct exynos4_power *)samsung_get_base_power();
+
 	check_hw_revision();
 	printf("HW Revision:\t0x%04x\n", board_rev);
 
+	/*
+	 * First bootloader on the TRATS2 platform uses
+	 * INFORM4 and INFORM5 registers for recovery
+	 *
+	 * To indicate correct boot chain - those two
+	 * registers must be cleared out
+	 */
+	writel(0, &pwr->inform4);
+	writel(0, &pwr->inform5);
+
 	return 0;
 }
 
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

Quoted 36 lines · Lukasz Majewski

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

---
Changes for v2:
- Remove redundant cast

---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
board/samsung/trats2/trats2.c +6 -0
index 2a6c9f9..f558ef9 100644
@@ -150,9 +150,22 @@ static int pmic_init_max77686(void);
 
 int exynos_init(void)
 {
+	struct exynos4_power *pwr =
+		(struct exynos4_power *)samsung_get_base_power();
+
 	check_hw_revision();
 	printf("HW Revision:\t0x%04x\n", board_rev);
 
+	/*
+	 * First bootloader on the TRATS2 platform uses
+	 * INFORM4 and INFORM5 registers for recovery

board/samsung/trats2/trats2.c static int pmic_init_max77686(void); · line 171

Quoted 10 lines
board/samsung/trats2/trats2.c +7 -0
+	 *
+	 * To indicate correct boot chain - those two
+	 * registers must be cleared out
+	 */
+	writel(0, &pwr->inform4);
+	writel(0, &pwr->inform5);
+
 	return 0;
 }
 

Thanks,
Minkyu Kang.

#5 lore raw

PATCH v2 1/1 arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot

In reply to Lukasz Majewski
Quoted 11 lines · ?ukasz Majewski

During switch to device tree, commit 1ecab0f has removed this code.

INFORM4 and INFORM5 registers are used by TRATS2 first stage bootloader for providing recovery. For normal operation, those two must be cleared out.

This error emerges when one force reset from u-boot's command line for three times.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140411/ac455ed3/attachment.pgp>