函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apb_timer.c Create Date:2022-07-27 09:42:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:apbt_set_mapping

函数原型:static inline void apbt_set_mapping(void)

返回类型:void

参数:

81  phy_cs_timer_id等于0
83  如果apbt_virt_address
84  pr_debug("APBT base already mapped\n")
85  返回
87  mtmr等于sfi_get_mtmr(APBT_CLOCKEVENT0_NUM)
88  如果(mtmr == NULL)则
89  printk(r conditions "Failed to get MTMR %d from SFI\n", APBT_CLOCKEVENT0_NUM)
91  返回
93  apbt_address等于 phy base addr for the timer
94  如果非apbt_address
95  printk(warning conditions "No timer base from SFI, use default\n")
96  apbt_address等于APBT_DEFAULT_BASE
98  apbt_virt_address等于ioremap_nocache(apbt_address, APBT_MMAP_SIZE)
99  如果非apbt_virt_address
101  pr_debug("Failed mapping APBT phy address at %lu\n", (unsignedlong)apbt_address)
102  转到:panic_noapbt
104  Common DW APB timer info等于 in HZ
105  sfi_free_mtmr(mtmr)
108  mtmr等于sfi_get_mtmr(APBT_CLOCKSOURCE_NUM)
109  如果(mtmr == NULL)则转到:panic_noapbt
113  pr_debug("Use timer %d for clocksource\n", (int)( phy base addr for the timer & 0xff) / APBTMRS_REG_SIZE)
115  phy_cs_timer_id等于 phy base addr for the timer 按位与0xff的值除APBTMRS_REG_SIZE
118  clocksource_apbt等于dw_apb_clocksource_init(APBT_CLOCKSOURCE_RATING, "apbt0", apbt_virt_address + phy_cs_timer_id * APBTMRS_REG_SIZE, Common DW APB timer info)
121  返回
123  panic_noapbt :
124  panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
调用者
名称描述
apbt_time_initEarly setup the APBT timer, only use timer 0 for booting then switch to* per CPU timer if possible.* returns 1 if per cpu apbt is setup* returns 0 if no per cpu apbt is chosen* panic if set up failed, this is the only platform timer on Moorestown.
apbt_quick_calibratealled before apb_timer_enable, use early map