plat/st/common/stm32mp_dt.c
/*******************************************************************************
 * This function fills the generic information from a given node.
 ******************************************************************************/
This function fills the generic information from a given node.
This function fills the generic information from a given node .
void dt_fill_device_info(struct dt_node_info *info, int node)
{
	const fdt32_t *cuint;
	cuint = fdt_getprop(fdt, node, "reg", NULL);
	if (cuint != NULL) {
		info->base = fdt32_to_cpu(*cuint);
	} else {
		info->base = 0;
	}
	cuint = fdt_getprop(fdt, node, "clocks", NULL);
	if (cuint != NULL) {
		cuint++;
		info->clock = (int)fdt32_to_cpu(*cuint);
	} else {
		info->clock = -1;
	}
	cuint = fdt_getprop(fdt, node, "resets", NULL);
	if (cuint != NULL) {
		cuint++;
		info->reset = (int)fdt32_to_cpu(*cuint);
	} else {
		info->reset = -1;
	}
	info->status = fdt_get_status(node);
}
void dt_fill_device_info ( struct dt_node_info * info , int node ) { const fdt32_t * cuint ; cuint = fdt_getprop ( fdt , node , " " , NULL ) ; if ( cuint != NULL ) { info -> base = fdt32_to_cpu ( * cuint ) ; } else { info -> base = 0 ; } cuint = fdt_getprop ( fdt , node , " " , NULL ) ; if ( cuint != NULL ) { cuint ++ ; info -> clock = ( int ) fdt32_to_cpu ( * cuint ) ; } else { info -> clock = -1 ; } cuint = fdt_getprop ( fdt , node , " " , NULL ) ; if ( cuint != NULL ) { cuint ++ ; info -> reset = ( int ) fdt32_to_cpu ( * cuint ) ; } else { info -> reset = -1 ; } info -> status = fdt_get_status ( node ) ; }
This function fills the generic information from a given node.
This function fills the generic information from a given node .