event/cnxk: add external clock support for timer
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Mon, 13 Dec 2021 11:13:44 +0000 (16:43 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 20 Jan 2022 13:44:59 +0000 (14:44 +0100)
commit8bdbae66b29958e454c7401ef22249c508e13453
tree9a5d505609a20bbba1b3494e690561298c03b7ec
parentdcc97999e339f59e4983c0cba7fd7d7d4f8f883e
event/cnxk: add external clock support for timer

Add external clock support for cnxk timer adapter.

External clock mapping is as follows:
RTE_EVENT_TIMER_ADAPTER_EXT_CLK0 = TIM_CLK_SRC_10NS,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK1 = TIM_CLK_SRC_GPIO,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK2 = TIM_CLK_SRC_PTP,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK3 = TIM_CLK_SRC_SYNCE,

TIM supports clock input from external GPIO, PTP, SYNCE clocks.
Input resolution is adjusted based on CNTVCT frequency for better
estimation.

Since TIM is unaware of input clock frequency, application is
expected to pass the frequency.
Example:
-a 0002:0e:00.0,tim_eclk_freq=122880000-0-0

The order of frequencies above is GPIO-PTP-SYNCE.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
doc/guides/eventdevs/cnxk.rst
drivers/common/cnxk/roc_platform.h
drivers/event/cnxk/cn10k_eventdev.c
drivers/event/cnxk/cnxk_tim_evdev.c
drivers/event/cnxk/cnxk_tim_evdev.h