Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apb_timer.c Create Date:2022-07-28 08:43:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:apbt_set_mapping

Proto:static inline void apbt_set_mapping(void)

Type:void

Parameter:Nothing

81  phy_cs_timer_id = 0
83  If apbt_virt_address Then
84  pr_debug("APBT base already mapped\n")
85  Return
87  mtmr = sfi_get_mtmr(APBT_CLOCKEVENT0_NUM)
88  If (mtmr == NULL) Then
89  printk(r conditions "Failed to get MTMR %d from SFI\n", APBT_CLOCKEVENT0_NUM)
91  Return
93  apbt_address = phy base addr for the timer
94  If Not apbt_address Then
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  If Not apbt_virt_address Then
101  pr_debug("Failed mapping APBT phy address at %lu\n", (unsignedlong)apbt_address)
102  Go to panic_noapbt
104  Common DW APB timer info = in HZ
105  sfi_free_mtmr(mtmr)
108  mtmr = sfi_get_mtmr(APBT_CLOCKSOURCE_NUM)
109  If (mtmr == NULL) Then Go to 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  Return
123  panic_noapbt :
124  panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
Caller
NameDescribe
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