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

Function soc_id

freebsd/arm/mv/mv_common.c:666–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666void
667soc_id(uint32_t *dev, uint32_t *rev)
668{
669 uint64_t mv_pcie_base = MV_PCIE_BASE;
670 phandle_t node;
671
672 /*
673 * Notice: system identifiers are available in the registers range of
674 * PCIE controller, so using this function is only allowed (and
675 * possible) after the internal registers range has been mapped in via
676 * devmap_bootstrap().
677 */
678 *dev = 0;
679 *rev = 0;
680 if ((node = OF_finddevice("/")) == -1)
681 return;
682 if (ofw_bus_node_is_compatible(node, "marvell,armada380"))
683 mv_pcie_base = MV_PCIE_BASE_ARMADA38X;
684
685 *dev = bus_space_read_4(fdtbus_bs_tag, mv_pcie_base, 0) >> 16;
686 *rev = bus_space_read_4(fdtbus_bs_tag, mv_pcie_base, 8) & 0xff;
687}
688
689static void
690soc_identify(uint32_t d, uint32_t r)

Callers 10

ts_probeFunction · 0.85
mv_ic_attachFunction · 0.85
mv_check_soc_familyFunction · 0.85
cpu_extra_featFunction · 0.85
soc_decode_winFunction · 0.85
win_cpu_can_remapFunction · 0.85
ddr_attrFunction · 0.85
ddr_targetFunction · 0.85
xor_max_engFunction · 0.85
decode_win_sata_validFunction · 0.85

Calls 1

bus_space_read_4Function · 0.85

Tested by

no test coverage detected