Skip to contentSkip to conversation

ARM: tegra: emc: correction of ram-code parsing from dt

PATCH Applied Dmitry Osipenko 2 participants 3 messages May 12, 2013 – May 20, 2013 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: emc: correction of ram-code parsing from dt

Change tegra_emc_ramcode_devnode() to get ram-code from child node instead of parent.

---
For me it looks like it should be better to place ram-code inside of table nodes, so num_tables will be incremented if table has valid ram-code and table with invalid ram-code will be skipped on getting table params loop. This avoids placing of #address-cells and #size-cells in nodes with ram-code. If it looks ok, I may send new patch.

 arch/arm/mach-tegra/tegra2_emc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/tegra2_emc.c +1 -1
index 9e8bdfa..25f0189 100644
@@ -183,7 +183,7 @@ static struct device_node *tegra_emc_ramcode_devnode(struct device_node *np)
 	u32 reg;
 
 	for_each_child_of_node(np, iter) {
-		if (of_property_read_u32(np, "nvidia,ram-code", &reg))
+		if (of_property_read_u32(iter, "nvidia,ram-code", &reg))
 			continue;
 		if (reg == tegra_bct_strapping)
 			return of_node_get(iter);
Signature · 1 line
1.8.2.1

A message that is not in the archive (sent off-list or not yet received): 1368390409-14156-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 2 lines · Dmitry Osipenko

Change tegra_emc_ramcode_devnode() to get ram-code from child node instead of parent.

I've applied this to Tegra's for-3.11/soc branch.

Quoted 5 lines

For me it looks like it should be better to place ram-code inside of table nodes, so num_tables will be incremented if table has valid ram-code and table with invalid ram-code will be skipped on getting table params loop. This avoids placing of #address-cells and #size-cells in nodes with ram-code. If it looks ok, I may send new patch.

That would be a change to the DT binding. DT bindings are supposed to be a stable ABI, so we wouldn't want to change the binding unless there was a strong reason. I don't think there is one here.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

18.05.2013 03:53, Stephen Warren пишет:

Quoted 6 lines · Dmitry Osipenko
Quoted 2 lines

Change tegra_emc_ramcode_devnode() to get ram-code from child node instead of parent.

I've applied this to Tegra's for-3.11/soc branch.

Thanks.

Quoted 10 lines
Quoted 5 lines

For me it looks like it should be better to place ram-code inside of table nodes, so num_tables will be incremented if table has valid ram-code and table with invalid ram-code will be skipped on getting table params loop. This avoids placing of #address-cells and #size-cells in nodes with ram-code. If it looks ok, I may send new patch.

That would be a change to the DT binding. DT bindings are supposed to be a stable ABI, so we wouldn't want to change the binding unless there was a strong reason. I don't think there is one here.

Ok.