RISC-V BSP: a clock driver

Hesham Almatary heshamelmatary at gmail.com
Sun Jun 25 21:03:06 UTC 2017


On Sun, Jun 25, 2017 at 9:13 PM, Denis Obrezkov <denisobrezkov at gmail.com> wrote:
> 2017-06-25 13:04 GMT+02:00 Hesham Almatary <heshamelmatary at gmail.com>:
>>
>> Hi Denis,
>>
>> Good to know you're making progress this far. There's no clock driver for
>> Spike BSP (the one my port is based on), it just used simulated tick. You'll
>> have to implement both console and click driver for your board. I'd suggest
>> you start with the console driver.
>>
>> Cheers,
>> Hesham
>>
>> On Sun, 25 Jun 2017 at 8:49 pm, Denis Obrezkov <denisobrezkov at gmail.com>
>> wrote:
>>>
>>> Hello all,
>>> I was able to proceed till the rtems_io_initialize function,
>>> so it seems to me that now I need to initialize a clock driver.
>>>
>>> I tried to find the current implementation of the driver in RISC-V BSP,
>>> but wasn't able to do it. Hesham, could you clarify the current state of
>>> the clock driver in the BSP?
>>>
>>> --
>>> Regards, Denis Obrezkov
>>
>> --
>> Hesham
>
>
> Could you expand, how it works? I have read a RTEMS Driver Manual and found
> there some information
> about drivers initialization, but I can't find in your BSP any IRQ handlers
> or clock initialization routine
> (in the manual it is written that a simple tick driver also needs some
> initialization )
>
Simulated clock driver [1] is architecture-independent i.e. it doesn't
need any IRQ or init handling. It's provided by RTEMS. You'll have to
write your init code and IRQ handling for both UART and Clock drivers
for HiFive.

[1] https://github.com/heshamelmatary/rtems-riscv/blob/priv-1.10/c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am#L70
>
> --
> Regards, Denis Obrezkov



-- 
Hesham


More information about the devel mailing list