public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
@ 2014-04-09 12:41 Lukasz Majewski
  2014-04-09 12:59 ` Minkyu Kang
  2014-04-09 13:09 ` [U-Boot] [PATCH v2] " Lukasz Majewski
  0 siblings, 2 replies; 6+ messages in thread
From: Lukasz Majewski @ 2014-04-09 12:41 UTC (permalink / raw)
  To: u-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.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 2a6c9f9..75a6c7b 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -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;
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
  2014-04-09 12:41 [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot Lukasz Majewski
@ 2014-04-09 12:59 ` Minkyu Kang
  2014-04-09 13:02   ` Lukasz Majewski
  2014-04-09 13:09 ` [U-Boot] [PATCH v2] " Lukasz Majewski
  1 sibling, 1 reply; 6+ messages in thread
From: Minkyu Kang @ 2014-04-09 12:59 UTC (permalink / raw)
  To: u-boot

Dear Lukasz Majewski,

On 09/04/14 21:41, Lukasz Majewski wrote:
> 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.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  board/samsung/trats2/trats2.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
> index 2a6c9f9..75a6c7b 100644
> --- a/board/samsung/trats2/trats2.c
> +++ b/board/samsung/trats2/trats2.c
> @@ -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);

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

> +
>  	return 0;
>  }
>  
> 

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
  2014-04-09 12:59 ` Minkyu Kang
@ 2014-04-09 13:02   ` Lukasz Majewski
  0 siblings, 0 replies; 6+ messages in thread
From: Lukasz Majewski @ 2014-04-09 13:02 UTC (permalink / raw)
  To: u-boot

Hi Minkyu,

> Dear Lukasz Majewski,
> 
> On 09/04/14 21:41, Lukasz Majewski wrote:
> > 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.
> > 
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Cc: Minkyu Kang <mk7.kang@samsung.com>
> > ---
> >  board/samsung/trats2/trats2.c |   13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/board/samsung/trats2/trats2.c
> > b/board/samsung/trats2/trats2.c index 2a6c9f9..75a6c7b 100644
> > --- a/board/samsung/trats2/trats2.c
> > +++ b/board/samsung/trats2/trats2.c
> > @@ -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);
> 
> I think, you don't have to do type casting.

You are right, thanks for pointing out.

> 
> > +
> >  	return 0;
> >  }
> >  
> > 
> 
> Thanks,
> Minkyu Kang.



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
  2014-04-09 12:41 [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot Lukasz Majewski
  2014-04-09 12:59 ` Minkyu Kang
@ 2014-04-09 13:09 ` Lukasz Majewski
  2014-04-10  1:09   ` Minkyu Kang
  2014-04-11 20:43   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 2 replies; 6+ messages in thread
From: Lukasz Majewski @ 2014-04-09 13:09 UTC (permalink / raw)
  To: u-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.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>

---
Changes for v2:
- Remove redundant cast
---
 board/samsung/trats2/trats2.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 2a6c9f9..f558ef9 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -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;
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
  2014-04-09 13:09 ` [U-Boot] [PATCH v2] " Lukasz Majewski
@ 2014-04-10  1:09   ` Minkyu Kang
  2014-04-11 20:43   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Minkyu Kang @ 2014-04-10  1:09 UTC (permalink / raw)
  To: u-boot

On 09/04/14 22:09, Lukasz Majewski wrote:
> 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.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> 
> ---
> Changes for v2:
> - Remove redundant cast
> ---
>  board/samsung/trats2/trats2.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
> index 2a6c9f9..f558ef9 100644
> --- a/board/samsung/trats2/trats2.c
> +++ b/board/samsung/trats2/trats2.c
> @@ -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;
>  }
>  
> 

Acked-by: Minkyu Kang <mk7.kang@samsung.com>

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [U-Boot, v2] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot
  2014-04-09 13:09 ` [U-Boot] [PATCH v2] " Lukasz Majewski
  2014-04-10  1:09   ` Minkyu Kang
@ 2014-04-11 20:43   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2014-04-11 20:43 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 09, 2014 at 03:09:44PM +0200, ?ukasz Majewski wrote:

> 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.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Acked-by: Minkyu Kang <mk7.kang@samsung.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-11 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 12:41 [U-Boot] [PATCH] arm:board:trats2:FIX: Clear INFORM4 and INFORM5 registers at correct boot Lukasz Majewski
2014-04-09 12:59 ` Minkyu Kang
2014-04-09 13:02   ` Lukasz Majewski
2014-04-09 13:09 ` [U-Boot] [PATCH v2] " Lukasz Majewski
2014-04-10  1:09   ` Minkyu Kang
2014-04-11 20:43   ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox