[U-Boot] [PATCH v1 13/16] arm: socfpga: stratix10: Add timer support for Stratix10 SoC

Marek Vasut
2018-04-23T03:40:22Z

On 04/23/2018 03:54 AM, Ley Foon Tan wrote:
> On Thu, Apr 19, 2018 at 4:21 PM, Marek Vasut <marex@denx.de> wrote:
>> On 04/19/2018 07:26 AM, See, Chin Liang wrote:
>>> On Thu, 2018-04-19 at 04:59 +0200, Marek Vasut wrote:
>>>> On 04/19/2018 11:50 AM, Ley Foon Tan wrote:
>>>>>
>>>>> Add timer support for Stratix SoC
>>>> Is this really custom timer or is that some armv8 thing you're adding
>>>> here ? Don't we already have a generic implementation for that ? If
>>>> not,
>>>> that's what we should do here.
>>>
>>> Yes but not the init function. It's left with platform specific code to
>>> init it.
>>
>> Where is the common part ?
>>
>> --
>> Best regards,
>> Marek Vasut
>
> timer_init weak function is in lib/time.c and common code is in this
> file as well.
>
> int __weak timer_init(void)
> {
> return 0;
> }

Oh, that's what you use, I see.

I suspect having a timer_gen5. and timer_gen10.c would be a bit cleaner
than the ifdef.

--
Best regards,
Marek Vasut