Re: [U-Boot] [PATCH v4 3/5] OMAP: spl: call timer_inti() from SPL
On Mon, Aug 6, 2012 at 8:02 AM, Ilya Yanok wrote: > Hi Tom, > > On Mon, Aug 6, 2012 at 2:35 AM, Tom Rini wrote: > >> On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok >> wrote: >> > We need to initialize timer properly, otherwise all delays >> > inside SPL will be wrong. >> > >> > Signed-off-by: Ilya Yanok >> > --- >> > >> > arch/arm/cpu/armv7/omap-common/spl.c |2 ++ >> > 1 file changed, 2 insertions(+) >> > >> > diff --git a/arch/arm/cpu/armv7/omap-common/spl.c >> b/arch/arm/cpu/armv7/omap-common/spl.c >> > index 4d1ac85..f0d766c 100644 >> > --- a/arch/arm/cpu/armv7/omap-common/spl.c >> > +++ b/arch/arm/cpu/armv7/omap-common/spl.c >> > @@ -152,6 +152,8 @@ void board_init_r(gd_t *id, ulong dummy) >> > mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, >> > CONFIG_SYS_SPL_MALLOC_SIZE); >> > >> > + timer_init(); >> > + >> > #ifdef CONFIG_SPL_BOARD_INIT >> > spl_board_init(); >> > #endif >> >> Calling it twice has other bad side-effects so there should be a >> timer_init removal somewhere too. > > > Hm, I can see any so far. I think you are mixing it with init_timer() > function you fixed in commit 2ab2810 (BTW, these two functions deal with > the same piece of hardware. do we really need both?). > Speaking about 2ab2810, I think the problem was not init_timer() being > called twice but init_timer() called _after_ timer_init() (timer_init() > programs the timer to get correct delays but init_timer() resets the timer > so delays are wrong again). Ug, that is a mess, your patch is fine, I'll go figure out what's going on in the am33xx-specific portion. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/5] OMAP: spl: call timer_inti() from SPL
Hi Tom, On Mon, Aug 6, 2012 at 2:35 AM, Tom Rini wrote: > On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok > wrote: > > We need to initialize timer properly, otherwise all delays > > inside SPL will be wrong. > > > > Signed-off-by: Ilya Yanok > > --- > > > > arch/arm/cpu/armv7/omap-common/spl.c |2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/arm/cpu/armv7/omap-common/spl.c > b/arch/arm/cpu/armv7/omap-common/spl.c > > index 4d1ac85..f0d766c 100644 > > --- a/arch/arm/cpu/armv7/omap-common/spl.c > > +++ b/arch/arm/cpu/armv7/omap-common/spl.c > > @@ -152,6 +152,8 @@ void board_init_r(gd_t *id, ulong dummy) > > mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, > > CONFIG_SYS_SPL_MALLOC_SIZE); > > > > + timer_init(); > > + > > #ifdef CONFIG_SPL_BOARD_INIT > > spl_board_init(); > > #endif > > Calling it twice has other bad side-effects so there should be a > timer_init removal somewhere too. Hm, I can see any so far. I think you are mixing it with init_timer() function you fixed in commit 2ab2810 (BTW, these two functions deal with the same piece of hardware. do we really need both?). Speaking about 2ab2810, I think the problem was not init_timer() being called twice but init_timer() called _after_ timer_init() (timer_init() programs the timer to get correct delays but init_timer() resets the timer so delays are wrong again). Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/5] OMAP: spl: call timer_inti() from SPL
On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok wrote: > We need to initialize timer properly, otherwise all delays > inside SPL will be wrong. > > Signed-off-by: Ilya Yanok > --- > > arch/arm/cpu/armv7/omap-common/spl.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/cpu/armv7/omap-common/spl.c > b/arch/arm/cpu/armv7/omap-common/spl.c > index 4d1ac85..f0d766c 100644 > --- a/arch/arm/cpu/armv7/omap-common/spl.c > +++ b/arch/arm/cpu/armv7/omap-common/spl.c > @@ -152,6 +152,8 @@ void board_init_r(gd_t *id, ulong dummy) > mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, > CONFIG_SYS_SPL_MALLOC_SIZE); > > + timer_init(); > + > #ifdef CONFIG_SPL_BOARD_INIT > spl_board_init(); > #endif Calling it twice has other bad side-effects so there should be a timer_init removal somewhere too. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot