Skip to contentSkip to conversation

ignore disabled memory-region nodes

PATCH Superseded Puneet Saxena 2 participants 3 messages May 22, 2019 – May 24, 2019 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ignore disabled memory-region nodes

While parsing "memory-region" node lists if a node is "disabled", parsing halts. Therefore the nodes whose "status" is "okay" or "ok" are not parsed.

The change ignores disabled nodes in the memory-region nodes list and returns 0 to continue parsing next nodes.

---
v2:
* Fixed typo in commit message.
* Used of_device_is_available to check device is disabled/enabled.

Krishna Reddy (1):
of: reserved-memory: ignore disabled memory-region nodes

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 of: reserved-memory: ignore disabled memory-region nodes

From: Krishna Reddy <[email protected]>

Ignore disabled nodes in the memory-region nodes list and continue to initialize the rest of enabled nodes.

Check if the "reserved-memory" node is available and if it's not available, return 0 to ignore the "reserved-memory" node and continue parsing with next node in memory-region nodes list.

---
v2:
* Fixed typo in commit message.
* Used "of_device_is_available" to check "reserved-memory" nodes are disabled/enabled.

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/of_reserved_mem.c +3 -0
index 1977ee0adcb1..b0b7a0c4431d 100644
@@ -322,6 +322,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 	if (!target)
 		return -ENODEV;
 
+	if (!of_device_is_available(target))
+		return 0;
+
 	rmem = __find_rmem(target);
 	of_node_put(target);
 
Signature · 1 line
2.7.4
maintainer Applied
#2 lore raw

Re: [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes

Quoted 13 lines · Puneet Saxena

From: Krishna Reddy <[email protected]>

Ignore disabled nodes in the memory-region nodes list and continue to initialize the rest of enabled nodes.

Check if the "reserved-memory" node is available and if it's not available, return 0 to ignore the "reserved-memory" node and continue parsing with next node in memory-region nodes list.

Quoted 9 lines

---
v2:
* Fixed typo in commit message.
* Used "of_device_is_available" to check "reserved-memory" nodes are disabled/enabled.

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

Applied, thanks.

Rob