* [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs
@ 2017-05-10 21:58 Angelo Dureghello
2017-05-10 22:03 ` Simon Glass
2017-05-15 23:18 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Angelo Dureghello @ 2017-05-10 21:58 UTC (permalink / raw)
To: u-boot
Coldfire arch is not happy with timer_init since interrupt handlers
are still not set at that stage, and the boot hangs silently.
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
---
common/board_f.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/board_f.c b/common/board_f.c
index d9431ee79a..30e588e213 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs
2017-05-10 21:58 [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs Angelo Dureghello
@ 2017-05-10 22:03 ` Simon Glass
2017-05-10 22:36 ` Angelo Dureghello
2017-05-15 23:18 ` [U-Boot] " Tom Rini
1 sibling, 1 reply; 6+ messages in thread
From: Simon Glass @ 2017-05-10 22:03 UTC (permalink / raw)
To: u-boot
Hi Angelo,
On 10 May 2017 at 15:58, Angelo Dureghello <angelo@sysam.it> wrote:
> Coldfire arch is not happy with timer_init since interrupt handlers
> are still not set at that stage, and the boot hangs silently.
>
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> ---
> common/board_f.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/common/board_f.c b/common/board_f.c
> index d9431ee79a..30e588e213 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -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
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs
2017-05-10 22:03 ` Simon Glass
@ 2017-05-10 22:36 ` Angelo Dureghello
2017-05-17 1:38 ` Simon Glass
0 siblings, 1 reply; 6+ messages in thread
From: Angelo Dureghello @ 2017-05-10 22:36 UTC (permalink / raw)
To: u-boot
Hi Simon,
On 11/05/2017 00:03, Simon Glass wrote:
> Hi Angelo,
>
> On 10 May 2017 at 15:58, Angelo Dureghello <angelo@sysam.it> wrote:
>> Coldfire arch is not happy with timer_init since interrupt handlers
>> are still not set at that stage, and the boot hangs silently.
>>
>> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
>> ---
>> common/board_f.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index d9431ee79a..30e588e213 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -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
>> --
>> 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.
> 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().
>
> Regards,
> Simon
>
Regards,
angelo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] board_f: skip timer_init() on Coldfire archs
2017-05-10 21:58 [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs Angelo Dureghello
2017-05-10 22:03 ` Simon Glass
@ 2017-05-15 23:18 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-05-15 23:18 UTC (permalink / raw)
To: u-boot
On Wed, May 10, 2017 at 11:58:06PM +0200, Angelo Dureghello wrote:
> Coldfire arch is not happy with timer_init since interrupt handlers
> are still not set at that stage, and the boot hangs silently.
>
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs
2017-05-10 22:36 ` Angelo Dureghello
@ 2017-05-17 1:38 ` Simon Glass
2017-05-19 7:49 ` Angelo Dureghello
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2017-05-17 1:38 UTC (permalink / raw)
To: u-boot
Hi Angelo,
On 10 May 2017 at 16:36, Angelo Dureghello <angelo@sysam.it> wrote:
> Hi Simon,
>
>
> On 11/05/2017 00:03, Simon Glass wrote:
>>
>> Hi Angelo,
>>
>> On 10 May 2017 at 15:58, Angelo Dureghello <angelo@sysam.it> wrote:
>>>
>>> Coldfire arch is not happy with timer_init since interrupt handlers
>>> are still not set at that stage, and the boot hangs silently.
>>>
>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
>>> ---
>>> common/board_f.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/common/board_f.c b/common/board_f.c
>>> index d9431ee79a..30e588e213 100644
>>> --- a/common/board_f.c
>>> +++ b/common/board_f.c
>>> @@ -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
>>> --
>>> 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.
>
>> 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().
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs
2017-05-17 1:38 ` Simon Glass
@ 2017-05-19 7:49 ` Angelo Dureghello
0 siblings, 0 replies; 6+ messages in thread
From: Angelo Dureghello @ 2017-05-19 7:49 UTC (permalink / raw)
To: u-boot
Hi Simon.
On 17/05/2017 03:38, Simon Glass wrote:
> Hi Angelo,
>
> On 10 May 2017 at 16:36, Angelo Dureghello <angelo@sysam.it> wrote:
>> Hi Simon,
>>
>>
>> On 11/05/2017 00:03, Simon Glass wrote:
>>>
>>> Hi Angelo,
>>>
>>> On 10 May 2017 at 15:58, Angelo Dureghello <angelo@sysam.it> wrote:
>>>>
>>>> Coldfire arch is not happy with timer_init since interrupt handlers
>>>> are still not set at that stage, and the boot hangs silently.
>>>>
>>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
>>>> ---
>>>> common/board_f.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/common/board_f.c b/common/board_f.c
>>>> index d9431ee79a..30e588e213 100644
>>>> --- a/common/board_f.c
>>>> +++ b/common/board_f.c
>>>> @@ -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
>>>> --
>>>> 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.
>>
>>> 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().
>
> 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
>
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
> Regards,
> Simon
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-19 7:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10 21:58 [U-Boot] [PATCH] board_f: skip timer_init() on Coldfire archs Angelo Dureghello
2017-05-10 22:03 ` Simon Glass
2017-05-10 22:36 ` Angelo Dureghello
2017-05-17 1:38 ` Simon Glass
2017-05-19 7:49 ` Angelo Dureghello
2017-05-15 23:18 ` [U-Boot] " Tom Rini
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.