board_f: skip timer_init() on Coldfire archs
PATCH 1/1 board_f: skip timer_init() on Coldfire archs
Coldfire arch is not happy with timer_init since interrupt handlers are still not set at that stage, and the boot hangs silently.
--- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+)
common/board_f.c +2 -0
@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {/* get CPU and bus clocks according to the environment variable */ get_clocks, /* get CPU and bus clocks (etc.) */#endif +#if !defined(CONFIG_M68K ) timer_init, /* initialize timer */ +#endif #if defined(CONFIG_BOARD_POSTCLK_INIT ) board_postclk_init,#endif
Signature · 1 line
2.11.0
PATCH 1/1 board_f: skip timer_init() on Coldfire archs
Hi Angelo,
Quoted 23 lines · Angelo Dureghello
Coldfire arch is not happy with
timer_initsince interrupt handlers are still not set at that stage, and the boot hangs silently.Signed-off-by Angelo Dureghello <[email protected]>--- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+)common/board_f.c +2
-1@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {/* get CPU and bus clocks according to the environment variable */ get_clocks, /* get CPU and bus clocks (etc.) */#endif +#if !defined(CONFIG_M68K ) timer_init, /* initialize timer */ +#endif #if defined(CONFIG_BOARD_POSTCLK_INIT ) board_postclk_init,#endif --
Quoted 2 lines
2.11.0
I'm really hoping we can get rid of all arch-specific things from the init sequence.
Is there no way that m68k can init its timer here? Or perhaps it could be a nop function?
Regards,
Simon
PATCH 1/1 board_f: skip timer_init() on Coldfire archs
Hi Simon,
Quoted 23 lines · Simon Glass
Hi Angelo,
Quoted 20 lines · Angelo Dureghello
Coldfire arch is not happy with
timer_initsince interrupt handlers are still not set at that stage, and the boot hangs silently.Signed-off-by Angelo Dureghello <[email protected]>--- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+)common/board_f.c +2
-0@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {/* get CPU and bus clocks according to the environment variable */ get_clocks, /* get CPU and bus clocks (etc.) */#endif +#if !defined(CONFIG_M68K ) timer_init, /* initialize timer */ +#endif #if defined(CONFIG_BOARD_POSTCLK_INIT )
Quoted 9 lines
Quoted 5 lines
common/board_f.c +0
-1board_postclk_init,#endif --2.11.0
I'm really hoping we can get rid of all arch-specific things from the init sequence.
Yes, i have seen you unified that step for all archs, and unfortunately i discovered the issue now only updating u-boot on my mcf5307 based board.
Quoted 2 lines
Is there no way that m68k can init its timer here? Or perhaps it could be a nop function?
I checked now all the cpu/xxx/start.S. At that early stage, all the vector handlers are set to _fault thats is just and endless loop.
In Coldfire arch, timer_init() is implemented in lib/time.c, as to setup and start the system timer overflow interrupt. It is called later from board_init_r(), line 863, after interrupt_init().
So, no :( unless you don't have some suggestion, i don't see any easy way to keep that timer_init() call enabled in board_init_f().
Quoted 4 lines
Regards,
Simon
Regards,
angelo
PATCH 1/1 board_f: skip timer_init() on Coldfire archs
Hi Angelo,
Quoted 50 lines · Angelo Dureghello
Hi Simon,
Quoted 26 lines · Simon Glass
Hi Angelo,
Quoted 22 lines · Angelo Dureghello
Coldfire arch is not happy with
timer_initsince interrupt handlers are still not set at that stage, and the boot hangs silently.Signed-off-by Angelo Dureghello <[email protected]>--- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+)common/board_f.c +2
-0@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {/* get CPU and bus clocks according to the environment variable */ get_clocks, /* get CPU and bus clocks (etc.) */#endif +#if !defined(CONFIG_M68K ) timer_init, /* initialize timer */ +#endif #if defined(CONFIG_BOARD_POSTCLK_INIT )Quoted 9 lines
Quoted 5 lines
common/board_f.c +0
-0board_postclk_init,#endif
--
2.11.0I'm really hoping we can get rid of all arch-specific things from the init sequence.
Yes, i have seen you unified that step for all archs, and unfortunately i discovered the issue now only updating u-boot on my mcf5307 based board.
Quoted 2 lines
Is there no way that m68k can init its timer here? Or perhaps it could be a nop function?
I checked now all the
cpu/xxx/start.S. At that early stage, all the vector handlers are set to_faultthats is just and endless loop.
Quoted 6 lines
In Coldfire arch,
timer_init()is implemented inlib/time.c, as to setup and start the system timer overflow interrupt. It is called later fromboard_init_r(), line 863, afterinterrupt_init().So, no :( unless you don't have some suggestion, i don't see any easy way to keep that
timer_init()call enabled inboard_init_f().
My only ideas are:
- user driver model for timer and then call the interrupt init from your driver's probe() method
- make timer_init() a nop for you arch
Regards,
Simon
PATCH 1/1 board_f: skip timer_init() on Coldfire archs
Hi Simon.
Quoted 57 lines · Simon Glass
Hi Angelo,
Quoted 54 lines · Angelo Dureghello
Hi Simon,
Quoted 26 lines · Simon Glass
Hi Angelo,
Quoted 22 lines · Angelo Dureghello
Coldfire arch is not happy with
timer_initsince interrupt handlers are still not set at that stage, and the boot hangs silently.Signed-off-by Angelo Dureghello <[email protected]>--- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+)common/board_f.c +2
-0@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {/* get CPU and bus clocks according to the environment variable */ get_clocks, /* get CPU and bus clocks (etc.) */#endif +#if !defined(CONFIG_M68K ) timer_init, /* initialize timer */ +#endif #if defined(CONFIG_BOARD_POSTCLK_INIT )Quoted 9 lines
Quoted 5 lines
common/board_f.c +0
-0board_postclk_init,#endif
--
2.11.0I'm really hoping we can get rid of all arch-specific things from the init sequence.
Yes, i have seen you unified that step for all archs, and unfortunately i discovered the issue now only updating u-boot on my mcf5307 based board.
Quoted 2 lines
Is there no way that m68k can init its timer here? Or perhaps it could be a nop function?
I checked now all the
cpu/xxx/start.S. At that early stage, all the vector handlers are set to_faultthats is just and endless loop.In Coldfire arch,
timer_init()is implemented inlib/time.c, as to setup and start the system timer overflow interrupt. It is called later fromboard_init_r(), line 863, afterinterrupt_init().
Quoted 9 lines
Quoted 2 lines
So, no :( unless you don't have some suggestion, i don't see any easy way to keep that
timer_init()call enabled inboard_init_f().My only ideas are:
- user driver model for timer and then call the interrupt init from your driver's
probe()method
- maketimer_init()a nop for you arch
thanks, it sounds good.
Ok, i see the patch has been applied to master so we have the things working for now.
I'll try to do the change above in the next future, i keep it in the todo list.
Regards,
Angelo
Quoted 3 lines
Regards,
Simon
Quoted 4 lines · Angelo Dureghello
Coldfire arch is not happy with
timer_initsince interrupt handlers are still not set at that stage, and the boot hangs silently.Signed-off-by Angelo Dureghello <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170515/04f0169b/attachment.sig>