plat/st/common/stm32mp_dt.c
/*******************************************************************************
 * This function return global node status (generic use of fdt library).
 ******************************************************************************/
This function return global node status (generic use of fdt library).
This function return global node status ( generic use of fdt library ) .
uint8_t fdt_get_status(int node)
{
	uint8_t status = DT_DISABLED;
	int len;
	const char *cchar;
	cchar = fdt_getprop(fdt, node, "status", &len);
	if ((cchar == NULL) ||
	    (strncmp(cchar, "okay", (size_t)len) == 0)) {
		status |= DT_NON_SECURE;
	}
	cchar = fdt_getprop(fdt, node, "secure-status", &len);
	if (cchar == NULL) {
		if (status == DT_NON_SECURE) {
			status |= DT_SECURE;
		}
	} else if (strncmp(cchar, "okay", (size_t)len) == 0) {
		status |= DT_SECURE;
	}
	return status;
}
uint8_t fdt_get_status ( int node ) { uint8_t status = DT_DISABLED ; int len ; const char * cchar ; cchar = fdt_getprop ( fdt , node , " " , & len ) ; if ( ( cchar == NULL ) || ( strncmp ( cchar , " " , ( size_t ) len ) == 0 ) ) { status |= DT_NON_SECURE ; } cchar = fdt_getprop ( fdt , node , " " , & len ) ; if ( cchar == NULL ) { if ( status == DT_NON_SECURE ) { status |= DT_SECURE ; } } else if ( strncmp ( cchar , " " , ( size_t ) len ) == 0 ) { status |= DT_SECURE ; } return status ; }
This function return global node status (generic use of fdt library).
This function return global node status ( generic use of fdt library ) .