* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
@ 2010-11-19 13:15 Joakim Tjernlund
2010-11-19 17:27 ` Joakim Tjernlund
2010-11-23 18:16 ` Joakim Tjernlund
0 siblings, 2 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-19 13:15 UTC (permalink / raw)
To: u-boot
After the removal of COLD/WARM start flags my mpc8321
board didn't boot anymore.
Trial and error suggests that map/remap_flash_by_xxx needs
to wait after updating LBLAWAR1 to make sure the the change has
reached the HW before continuing with the code that depends on it.
Final fix suggested by Scott Wood.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
v2: Final adjustmenst based on inpt from Scott Wood.
arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index e8b1ebc..5a9b790 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -1191,6 +1191,10 @@ map_flash_by_law1:
bne 1b
stw r4, LBLAWAR1(r3) /* LBLAWAR1 <= 8MB Flash Size */
+ /* Wait for HW to catch up */
+ lwz r4, LBLAWAR1(r3)
+ twi 0,r4,0
+ isync
blr
/* Though all the LBIU Local Access Windows and LBC Banks will be
@@ -1229,5 +1233,9 @@ remap_flash_by_law0:
xor r4, r4, r4
stw r4, LBLAWBAR1(r3)
stw r4, LBLAWAR1(r3) /* Off LBIU LAW1 */
+ /* Wait for HW to catch up */
+ lwz r4, LBLAWAR1(r3)
+ twi 0,r4,0
+ isync
blr
#endif /* CONFIG_SYS_FLASHBOOT */
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-19 13:15 [U-Boot] [PATCHv2] mpc83xx: Make it boot again Joakim Tjernlund
@ 2010-11-19 17:27 ` Joakim Tjernlund
2010-11-22 11:44 ` Joakim Tjernlund
2010-11-23 18:16 ` Joakim Tjernlund
1 sibling, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-19 17:27 UTC (permalink / raw)
To: u-boot
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote on 2010/11/19 14:15:33:
>
> After the removal of COLD/WARM start flags my mpc8321
> board didn't boot anymore.
> Trial and error suggests that map/remap_flash_by_xxx needs
> to wait after updating LBLAWAR1 to make sure the the change has
> reached the HW before continuing with the code that depends on it.
> Final fix suggested by Scott Wood.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
>
> v2: Final adjustmenst based on inpt from Scott Wood.
Guys, I can still crash my board when a add new code in start.S
It is remap_flash_by_law0 that is giving me a hard time.
I noticed that I could bring it down by adding a few nops after
a CS0 is written but before LAW0. I also noticed that it
always crash at a new cacheline.
By swapping LAW0 with CS0 it became much better(crash yet).
I wonder if it is correct to configure CS0 then LAW0?
It seems like one must first adjust LAW0 then CS0 to
be sure it works as intended.
What do you think?
Jocke
> arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
> index e8b1ebc..5a9b790 100644
> --- a/arch/powerpc/cpu/mpc83xx/start.S
> +++ b/arch/powerpc/cpu/mpc83xx/start.S
> @@ -1191,6 +1191,10 @@ map_flash_by_law1:
> bne 1b
>
> stw r4, LBLAWAR1(r3) /* LBLAWAR1 <= 8MB Flash Size */
> + /* Wait for HW to catch up */
> + lwz r4, LBLAWAR1(r3)
> + twi 0,r4,0
> + isync
> blr
>
> /* Though all the LBIU Local Access Windows and LBC Banks will be
> @@ -1229,5 +1233,9 @@ remap_flash_by_law0:
> xor r4, r4, r4
> stw r4, LBLAWBAR1(r3)
> stw r4, LBLAWAR1(r3) /* Off LBIU LAW1 */
> + /* Wait for HW to catch up */
> + lwz r4, LBLAWAR1(r3)
> + twi 0,r4,0
> + isync
> blr
> #endif /* CONFIG_SYS_FLASHBOOT */
> --
> 1.7.2.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-19 17:27 ` Joakim Tjernlund
@ 2010-11-22 11:44 ` Joakim Tjernlund
0 siblings, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-22 11:44 UTC (permalink / raw)
To: u-boot
>
> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote on 2010/11/19 14:15:33:
> >
> > After the removal of COLD/WARM start flags my mpc8321
> > board didn't boot anymore.
> > Trial and error suggests that map/remap_flash_by_xxx needs
> > to wait after updating LBLAWAR1 to make sure the the change has
> > reached the HW before continuing with the code that depends on it.
> > Final fix suggested by Scott Wood.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> >
> > v2: Final adjustmenst based on inpt from Scott Wood.
>
> Guys, I can still crash my board when a add new code in start.S
> It is remap_flash_by_law0 that is giving me a hard time.
> I noticed that I could bring it down by adding a few nops after
> a CS0 is written but before LAW0. I also noticed that it
> always crash at a new cacheline.
>
> By swapping LAW0 with CS0 it became much better(crash yet).
> I wonder if it is correct to configure CS0 then LAW0?
> It seems like one must first adjust LAW0 then CS0 to
> be sure it works as intended.
> What do you think?
OOPS, trashing r3 before calling remap_flash_by_law0 is BAD.
remap_flash_by_law0 should reload r3 with IMMR instead of relying
on r3 pointing to IMMR.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-19 13:15 [U-Boot] [PATCHv2] mpc83xx: Make it boot again Joakim Tjernlund
2010-11-19 17:27 ` Joakim Tjernlund
@ 2010-11-23 18:16 ` Joakim Tjernlund
2010-11-23 18:38 ` Scott Wood
1 sibling, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-23 18:16 UTC (permalink / raw)
To: u-boot
Could we have an ACK before relese please?
> After the removal of COLD/WARM start flags my mpc8321
> board didn't boot anymore.
> Trial and error suggests that map/remap_flash_by_xxx needs
> to wait after updating LBLAWAR1 to make sure the the change has
> reached the HW before continuing with the code that depends on it.
> Final fix suggested by Scott Wood.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
>
> v2: Final adjustmenst based on inpt from Scott Wood.
> arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
> index e8b1ebc..5a9b790 100644
> --- a/arch/powerpc/cpu/mpc83xx/start.S
> +++ b/arch/powerpc/cpu/mpc83xx/start.S
> @@ -1191,6 +1191,10 @@ map_flash_by_law1:
> bne 1b
>
> stw r4, LBLAWAR1(r3) /* LBLAWAR1 <= 8MB Flash Size */
> + /* Wait for HW to catch up */
> + lwz r4, LBLAWAR1(r3)
> + twi 0,r4,0
> + isync
> blr
>
> /* Though all the LBIU Local Access Windows and LBC Banks will be
> @@ -1229,5 +1233,9 @@ remap_flash_by_law0:
> xor r4, r4, r4
> stw r4, LBLAWBAR1(r3)
> stw r4, LBLAWAR1(r3) /* Off LBIU LAW1 */
> + /* Wait for HW to catch up */
> + lwz r4, LBLAWAR1(r3)
> + twi 0,r4,0
> + isync
> blr
> #endif /* CONFIG_SYS_FLASHBOOT */
> --
> 1.7.2.2
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-23 18:16 ` Joakim Tjernlund
@ 2010-11-23 18:38 ` Scott Wood
2010-11-28 16:31 ` Kim Phillips
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2010-11-23 18:38 UTC (permalink / raw)
To: u-boot
On Tue, 23 Nov 2010 19:16:01 +0100
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> Could we have an ACK before relese please?
>
> > After the removal of COLD/WARM start flags my mpc8321
> > board didn't boot anymore.
> > Trial and error suggests that map/remap_flash_by_xxx needs
> > to wait after updating LBLAWAR1 to make sure the the change has
> > reached the HW before continuing with the code that depends on it.
> > Final fix suggested by Scott Wood.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> >
> > v2: Final adjustmenst based on inpt from Scott Wood.
> > arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> > 1 files changed, 8 insertions(+), 0 deletions(-)
ACK
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-23 18:38 ` Scott Wood
@ 2010-11-28 16:31 ` Kim Phillips
2010-11-28 16:33 ` Joakim Tjernlund
2010-11-28 16:38 ` Joakim Tjernlund
0 siblings, 2 replies; 8+ messages in thread
From: Kim Phillips @ 2010-11-28 16:31 UTC (permalink / raw)
To: u-boot
On Tue, 23 Nov 2010 12:38:57 -0600
Scott Wood <scottwood@freescale.com> wrote:
> On Tue, 23 Nov 2010 19:16:01 +0100
> Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
>
> > Could we have an ACK before relese please?
> >
> > > After the removal of COLD/WARM start flags my mpc8321
> > > board didn't boot anymore.
> > > Trial and error suggests that map/remap_flash_by_xxx needs
> > > to wait after updating LBLAWAR1 to make sure the the change has
> > > reached the HW before continuing with the code that depends on it.
> > > Final fix suggested by Scott Wood.
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > > ---
> > >
> > > v2: Final adjustmenst based on inpt from Scott Wood.
> > > arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> > > 1 files changed, 8 insertions(+), 0 deletions(-)
>
> ACK
>
> -Scott
applied.
Thanks everyone.
Kim
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-28 16:31 ` Kim Phillips
@ 2010-11-28 16:33 ` Joakim Tjernlund
2010-11-28 16:38 ` Joakim Tjernlund
1 sibling, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-28 16:33 UTC (permalink / raw)
To: u-boot
Kim Phillips <kim.phillips@freescale.com> wrote on 2010/11/28 17:31:25:
>
> On Tue, 23 Nov 2010 12:38:57 -0600
> Scott Wood <scottwood@freescale.com> wrote:
>
> > On Tue, 23 Nov 2010 19:16:01 +0100
> > Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> >
> > > Could we have an ACK before relese please?
> > >
> > > > After the removal of COLD/WARM start flags my mpc8321
> > > > board didn't boot anymore.
> > > > Trial and error suggests that map/remap_flash_by_xxx needs
> > > > to wait after updating LBLAWAR1 to make sure the the change has
> > > > reached the HW before continuing with the code that depends on it.
> > > > Final fix suggested by Scott Wood.
> > > >
> > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > > > ---
> > > >
> > > > v2: Final adjustmenst based on inpt from Scott Wood.
> > > > arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> > > > 1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > ACK
> >
> > -Scott
>
> applied.
>
> Thanks everyone.
Finally, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCHv2] mpc83xx: Make it boot again
2010-11-28 16:31 ` Kim Phillips
2010-11-28 16:33 ` Joakim Tjernlund
@ 2010-11-28 16:38 ` Joakim Tjernlund
1 sibling, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-11-28 16:38 UTC (permalink / raw)
To: u-boot
Kim Phillips <kim.phillips@freescale.com> wrote on 2010/11/28 17:31:25:
>
> On Tue, 23 Nov 2010 12:38:57 -0600
> Scott Wood <scottwood@freescale.com> wrote:
>
> > On Tue, 23 Nov 2010 19:16:01 +0100
> > Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> >
> > > Could we have an ACK before relese please?
> > >
> > > > After the removal of COLD/WARM start flags my mpc8321
> > > > board didn't boot anymore.
> > > > Trial and error suggests that map/remap_flash_by_xxx needs
> > > > to wait after updating LBLAWAR1 to make sure the the change has
> > > > reached the HW before continuing with the code that depends on it.
> > > > Final fix suggested by Scott Wood.
> > > >
> > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > > > ---
> > > >
> > > > v2: Final adjustmenst based on inpt from Scott Wood.
> > > > arch/powerpc/cpu/mpc83xx/start.S | 8 ++++++++
> > > > 1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > ACK
> >
> > -Scott
>
> applied.
BTW, there was one named
powerpc: fix mpc8315erdb and mpc8313erdb NAND linker script
which I think you should consider. I don't really care as
I don't use these boards, I just noticed it by chance.
Jocke
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-28 16:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 13:15 [U-Boot] [PATCHv2] mpc83xx: Make it boot again Joakim Tjernlund
2010-11-19 17:27 ` Joakim Tjernlund
2010-11-22 11:44 ` Joakim Tjernlund
2010-11-23 18:16 ` Joakim Tjernlund
2010-11-23 18:38 ` Scott Wood
2010-11-28 16:31 ` Kim Phillips
2010-11-28 16:33 ` Joakim Tjernlund
2010-11-28 16:38 ` Joakim Tjernlund
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.