staticconstchar *socinfo_to_package_id(u32 socinfo)
{ unsignedintpack = socinfo_to_pack(socinfo); unsignedint major = socinfo_to_major(socinfo); int i;
for (i = 0 ; i < ARRAY_SIZE(soc_packages) ; ++i) { if (soc_packages[i].major_id == major &&
soc_packages[i].pack_id ==
(pack & soc_packages[i].pack_mask)) return soc_packages[i].name;
}
return"Unknown";
}
staticconstchar *socinfo_to_soc_id(u32 socinfo)
{ unsignedint id = socinfo_to_major(socinfo); int i;
for (i = 0 ; i < ARRAY_SIZE(soc_ids) ; ++i) { if (soc_ids[i].id == id) return soc_ids[i].name;
}
/* look up for chipid node */
np = of_find_compatible_node(NULL, NULL, "amlogic,meson-gx-ao-secure"); if (!np) return -ENODEV;
/* check if interface is enabled */ if (!of_device_is_available(np)) {
of_node_put(np); return -ENODEV;
}
/* check if chip-id is available */ if (!of_property_read_bool(np, "amlogic,has-chip-id")) {
of_node_put(np); return -ENODEV;
}
/* node should be a syscon */
regmap = syscon_node_to_regmap(np);
of_node_put(np); if (IS_ERR(regmap)) {
pr_err("%s: failed to get regmap\n", __func__); return -ENODEV;
}
ret = regmap_read(regmap, AO_SEC_SOCINFO_OFFSET, &socinfo); if (ret < 0) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.