include/clocksource/timer-xilinx.h

Source file repositories/reference/linux-study-clean/include/clocksource/timer-xilinx.h

File Facts

System
Linux kernel
Corpus path
include/clocksource/timer-xilinx.h
Extension
.h
Size
1766 bytes
Lines
74
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct xilinx_timer_priv {
	struct regmap *map;
	struct clk *clk;
	u64 max;
};

/**
 * xilinx_timer_tlr_cycles() - Calculate the TLR for a period specified
 *                             in clock cycles
 * @priv: The timer's private data
 * @tcsr: The value of the TCSR register for this counter
 * @cycles: The number of cycles in this period
 *
 * Callers of this function MUST ensure that @cycles is representable as
 * a TLR.
 *
 * Return: The calculated value for TLR
 */
u32 xilinx_timer_tlr_cycles(struct xilinx_timer_priv *priv, u32 tcsr,
			    u64 cycles);

/**
 * xilinx_timer_get_period() - Get the current period of a counter
 * @priv: The timer's private data
 * @tlr: The value of TLR for this counter
 * @tcsr: The value of TCSR for this counter
 *
 * Return: The period, in ns
 */
unsigned int xilinx_timer_get_period(struct xilinx_timer_priv *priv,
				     u32 tlr, u32 tcsr);

#endif /* XILINX_TIMER_H */

Annotation

Implementation Notes