MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fsl_ocotp_devmap

Function fsl_ocotp_devmap

freebsd/arm/freescale/fsl_ocotp.c:69–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67static vm_size_t ocotp_size;
68
69static void
70fsl_ocotp_devmap(void)
71{
72 phandle_t child, root;
73 u_long base, size;
74
75 if ((root = OF_finddevice("/")) == -1)
76 goto fatal;
77 if ((child = fdt_depth_search_compatible(root, "fsl,imx6q-ocotp", 0)) == 0)
78 goto fatal;
79 if (fdt_regsize(child, &base, &size) != 0)
80 goto fatal;
81
82 ocotp_size = (vm_size_t)size;
83
84 if ((ocotp_regs = pmap_mapdev((vm_offset_t)base, ocotp_size)) == NULL)
85 goto fatal;
86
87 return;
88fatal:
89 panic("cannot find/map the ocotp registers");
90}
91/* XXX end of temporary code */
92
93struct ocotp_softc {

Callers 1

fsl_ocotp_read_4Function · 0.85

Calls 2

pmap_mapdevFunction · 0.50
panicFunction · 0.50

Tested by

no test coverage detected