bool tegra_is_silicon(void)
{ switch (tegra_get_chip_id()) { case TEGRA194: case TEGRA234: case TEGRA241: case TEGRA264: if (tegra_get_platform() == 0) returntrue;
returnfalse;
}
/* * Chips prior to Tegra194 have a different way of determining whether * they are silicon or not. Since we never supported simulation on the * older Tegra chips, don't bother extracting the information and just * report that we're running on silicon.
*/ returntrue;
}
u32 tegra_read_straps(void)
{
WARN(!chipid, "Tegra ABP MISC not yet available\n");
/* * The function sets ERD(Error Response Disable) bit. * This allows to mask inband errors and always send an * OKAY response from CBB to the master which caused error.
*/ int tegra194_miscreg_mask_serror(void)
{ if (!apbmisc_base) return -EPROBE_DEFER;
if (!of_machine_is_compatible("nvidia,tegra194")) {
WARN(1, "Only supported for Tegra194 devices!\n"); return -EOPNOTSUPP;
}
/** * tegra_init_apbmisc - Initializes Tegra APBMISC and Strapping registers. * * This is called during early init as some of the old 32-bit ARM code needs * information from the APBMISC registers very early during boot.
*/ void __init tegra_init_apbmisc(void)
{ struct resource apbmisc, straps; struct device_node *np;
np = of_find_matching_node(NULL, apbmisc_match); if (!np) { /* * Fall back to legacy initialization for 32-bit ARM only. All * 64-bit ARM device tree files for Tegra are required to have * an APBMISC node. * * This is for backwards-compatibility with old device trees * that didn't contain an APBMISC node.
*/ if (IS_ENABLED(CONFIG_ARM) && soc_is_tegra()) { /* APBMISC registers (chip revision, ...) */
apbmisc.start = 0x70000800;
apbmisc.end = 0x70000863;
apbmisc.flags = IORESOURCE_MEM;
pr_warn("Using APBMISC region %pR\n", &apbmisc);
pr_warn("Using strapping options registers %pR\n",
&straps);
} else { /* * At this point we're not running on Tegra, so play * nice with multi-platform kernels.
*/ return;
}
} else { /* * Extract information from the device tree if we've found a * matching node.
*/ if (of_address_to_resource(np, 0, &apbmisc) < 0) {
pr_err("failed to get APBMISC registers\n"); goto put;
}
if (of_address_to_resource(np, 1, &straps) < 0) {
pr_err("failed to get strapping options registers\n"); goto put;
}
}
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.