@@ -302,9 +302,9 @@ static DEFINE_MUTEX(of_rmem_assigned_device_mutex);
* @idx: Index of selected region
*
* This function assigns respective DMA-mapping operations based on reserved
- * memory region specified by 'memory-region' property in @np node to the @dev
- * device. When driver needs to use more than one reserved memory region, it
- * should allocate child devices and initialize regions by name for each of
+ * memory region specified by 'memory-region(s)' property in @np node to the
+ * @dev device. When driver needs to use more than one reserved memory region,
+ * it should allocate child devices and initialize regions by name for each of
* child device.
*
* Returns error code or zero on success.
@@ -320,7 +320,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
if (!np || !dev)
return -EINVAL;
- target = of_parse_phandle(np, "memory-region", idx);
+ target = of_parse_phandle(np, "memory-regions", idx);
+ if (!target)
+ target = of_parse_phandle(np, "memory-region", idx);
+
if (!target)
return -ENODEV;