// SPDX-License-Identifier: GPL-2.0-only /* * drivers/soc/tegra/flowctrl.c * * Functions and macros to control the flowcontroller * * Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved.
*/
if (tegra_get_chip_id() == TEGRA30) { /* * The wfi doesn't work well on Tegra30 because * CPU hangs under some odd circumstances after * power-gating (like memory running off PLLP), * hence use wfe that is working perfectly fine. * Note that Tegra30 TRM doc clearly stands that * wfi should be used for the "Cluster Switching", * while wfe for the power-gating, just like it * is done on Tegra20.
*/
reg |= TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 << cpuid;
} else { /* pwr gating on wfi */
reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid;
} break;
}
reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr flag */
reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event flag */
reg |= FLOW_CTRL_CSR_ENABLE; /* pwr gating */
flowctrl_write_cpu_csr(cpuid, reg);
for (i = 0; i < num_possible_cpus(); i++) { if (i == cpuid) continue;
reg = flowctrl_read_cpu_csr(i);
reg |= FLOW_CTRL_CSR_EVENT_FLAG;
reg |= FLOW_CTRL_CSR_INTR_FLAG;
flowctrl_write_cpu_csr(i, reg);
}
}
np = of_find_matching_node(NULL, tegra_flowctrl_match); if (np) { if (of_address_to_resource(np, 0, &res) < 0) {
pr_err("failed to get flowctrl register\n"); return -ENXIO;
}
of_node_put(np);
} elseif (IS_ENABLED(CONFIG_ARM)) { /* * Hardcoded fallback for 32-bit Tegra * devices if device tree node is missing.
*/
res.start = 0x60007000;
res.end = 0x60007fff;
res.flags = IORESOURCE_MEM;
} else { /* * At this point we're running on a Tegra, * that doesn't support the flow controller * (eg. Tegra186), so just return.
*/ return 0;
}
tegra_flowctrl_base = ioremap(res.start, resource_size(&res)); if (!tegra_flowctrl_base) return -ENXIO;
return 0;
}
early_initcall(tegra_flowctrl_init);
Messung V0.5
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet)
¤
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.