lib/extensions/amu/amu_fconf.c
static int amu_fconf_populate_cpu(const void *fdt, int node, uintptr_t mpidr)
{
	int ret;
	int idx;

	uint32_t amu_phandle;
	struct amu_fconf_core *amu;

	ret = fdt_read_uint32(fdt, node, "amu", &amu_phandle);
	if (ret < 0) {
		if (ret == -FDT_ERR_NOTFOUND) {
			ret = 0;
		}

		return ret;
	}

	node = fdt_node_offset_by_phandle(fdt, amu_phandle);
	if (node < 0) {
		return node;
	}

	idx = plat_core_pos_by_mpidr(mpidr);
	amu = &amu_topology_.cores[idx];

	return amu_fconf_populate_cpu_amu(fdt, node, amu);
}
/*
 * Within a `cpu` node, attempt to dereference the `amu` property, and populate
 * the AMU information for the core.
 *
 * Returns `0` on success, or a negative integer representing an error code.
 */
Within a `cpu` node, attempt to dereference the `amu` property, and populate
the AMU information for the core.

Returns `0` on success, or a negative integer representing an error code.
Within a ` cpu ` node attempt to dereference the ` amu ` property and populate the AMU information for the core . Returns ` 0 ` on success or a negative integer representing an error code .
static int amu_fconf_populate_cpu(const void *fdt, int node, uintptr_t mpidr)
{
	int ret;
	int idx;
	uint32_t amu_phandle;
	struct amu_fconf_core *amu;
	ret = fdt_read_uint32(fdt, node, "amu", &amu_phandle);
	if (ret < 0) {
		if (ret == -FDT_ERR_NOTFOUND) {
			ret = 0;
		}
		return ret;
	}
	node = fdt_node_offset_by_phandle(fdt, amu_phandle);
	if (node < 0) {
		return node;
	}
	idx = plat_core_pos_by_mpidr(mpidr);
	amu = &amu_topology_.cores[idx];
	return amu_fconf_populate_cpu_amu(fdt, node, amu);
}
static int amu_fconf_populate_cpu ( const void * fdt , int node , uintptr_t mpidr ) { int ret ; int idx ; uint32_t amu_phandle ; struct amu_fconf_core * amu ; ret = fdt_read_uint32 ( fdt , node , " " , & amu_phandle ) ; if ( ret < 0 ) { if ( ret == - FDT_ERR_NOTFOUND ) { ret = 0 ; } return ret ; } node = fdt_node_offset_by_phandle ( fdt , amu_phandle ) ; if ( node < 0 ) { return node ; } idx = plat_core_pos_by_mpidr ( mpidr ) ; amu = & amu_topology_ . cores [ idx ] ; return amu_fconf_populate_cpu_amu ( fdt , node , amu ) ; }
Within a `cpu` node, attempt to dereference the `amu` property, and populate
 the AMU information for the core.
Within a ` cpu ` node attempt to dereference the ` amu ` property and populate the AMU information for the core .