Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt.c Create Date:2022-07-28 06:18:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fdt_next_tag

Proto:uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)

Type:uint32_t

Parameter:

TypeParameterName
const void *fdt
intstartoffset
int *nextoffset
130  offset = startoffset
133  nextoffset = -Error codes: codes for bad device tree blobs
134  tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE)
135  If Not tagp Then Return FDT_END
137  tag = fdt32_to_cpu( * tagp)
138  offset += FDT_TAGSIZE
140  nextoffset = -FDT_ERR_BADVERSION: Given device tree has a version which* can't be handled by the requested operation. For* read-write functions, this may mean that fdt_open_into() is* required to convert the tree to the expected version.
142  Case tag == Start node: full name
144  Do
145  p = fdt_offset_ptr(fdt, offset++, 1)
146  When p && p != '\0' cycle
147  If Not p Then Return FDT_END
149  Break
151  Case tag == Property: name off,size, content
152  lenp = fdt_offset_ptr(fdt, offset, size of lenp )
153  If Not lenp Then Return FDT_END
156  offset += size of fdt_property - FDT_TAGSIZE + fdt32_to_cpu( * lenp)
158  If fdt_version(fdt) < 0x10 && fdt32_to_cpu( * lenp) >= 8 && (offset - fdt32_to_cpu( * lenp)) % 8 != 0 Then offset += 4
161  Break
163  Case tag == FDT_END
164  Case tag == End node
165  Case tag == p
166  Break
168  Default
169  Return FDT_END
172  If Not fdt_offset_ptr(fdt, startoffset, offset - startoffset) Then Return FDT_END
175  nextoffset = FDT_TAGALIGN(offset)
176  Return tag