Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\hpet.c Create Date:2022-07-28 08:42:53
Last Modify:2020-03-16 21:38:50 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hpet_clkevt_set_state_periodic

Proto:static int hpet_clkevt_set_state_periodic(struct clock_event_device *evt)

Type:int

Parameter:

TypeParameterName
struct clock_event_device *evt
297  channel = num
301  Common HPET functions
302  delta = NSEC_PER_SEC / HZ * mult
303  delta >>= shift
304  now = hpet_readl(HPET_COUNTER)
305  cmp = now + delta
306  cfg = hpet_readl(HPET_Tn_CFG(channel))
307  cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL | HPET_TN_32BIT
309  hpet_writel(cfg, HPET_Tn_CFG(channel))
310  hpet_writel(cmp, HPET_Tn_CMP(channel))
311  0x10c7 is 2**32 / 1000000 (rounded up) (1)
319  hpet_writel((unsignedint)delta, HPET_Tn_CMP(channel))
320  hpet_start_counter()
321  hpet_print_config()
323  Return 0