| 67 | static vm_size_t ocotp_size; |
| 68 | |
| 69 | static void |
| 70 | fsl_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; |
| 88 | fatal: |
| 89 | panic("cannot find/map the ocotp registers"); |
| 90 | } |
| 91 | /* XXX end of temporary code */ |
| 92 | |
| 93 | struct ocotp_softc { |
no test coverage detected