Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:early_serial_init

Proto:static __init void early_serial_init(char *s)

Type:void

Parameter:

TypeParameterName
char *s
154  baud = DEFAULT_BAUD
157  If s == ',' Then ++s
160  If s Then
162  If Not strncmp(s, "0x", 2) Then
164  Else
165  static const int __initconst bases[] = {0x3f8, 0x2f8}
167  If Not strncmp(s, "ttyS", 4) Then s += 4
170  If port > 1 || s == e Then port = 0
172  yS0 = bases[port]
174  s += strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject*@s: The string to be searched*@reject: The string to avoid
175  If s == ',' Then s++
179  If s Then
180  baud = simple_strtoull - convert a string to an unsigned long long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use
182  If baud == 0 || s == e Then baud = DEFAULT_BAUD
187  divisor = 115200 / baud
190  serial_in = io_serial_in
191  serial_out = io_serial_out
194  early_serial_hw_init(divisor)
Caller
NameDescribe
setup_early_printk