Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85adcf19 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cma: Add support for status in DT nodes"

parents 5af00a82 d6b5770a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -225,10 +225,19 @@ int __init cma_fdt_scan(unsigned long node, const char *uname,
	unsigned long size_cells = dt_root_size_cells;
	unsigned long addr_cells = dt_root_addr_cells;
	phys_addr_t limit = MEMBLOCK_ALLOC_ANYWHERE;
	char *status;

	if (!of_get_flat_dt_prop(node, "linux,reserve-contiguous-region", NULL))
		return 0;

	status = of_get_flat_dt_prop(node, "status", NULL);
	/*
	 * Yes, we actually want strncmp here to check for a prefix
	 * ok vs. okay
	 */
	if (status && (strncmp(status, "ok", 2) != 0))
		return 0;

	prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
	if (prop)
		size_cells = be32_to_cpup(prop);