Skip to contentSkip to conversation

pci: pci_mvebu: Add comment about missing of_n_addr_cells() call

PATCH New Stefan Roese 1 participant 2 messages Feb 11, 2019 – Mar 19, 2019 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: pci_mvebu: Add comment about missing of_n_addr_cells() call

This patch adds a comment to explain the use of the hardcoded value for the number of address cells in mvebu_get_tgt_attr(). This should help to rework this function, once CONFIG_OF_LIVE is enabled for MVEBU in general.

---
 drivers/pci/pci_mvebu.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/pci/pci_mvebu.c +6 -0
index 6026fa67f9..e21dc10c2f 100644
@@ -369,6 +369,12 @@ static int mvebu_get_tgt_attr(ofnode node, int devfn,
 	if (!range)
 		return -EINVAL;
 
+	/*
+	 * Linux uses of_n_addr_cells() to get the number of address cells
+	 * here. Currently this function is only available in U-Boot when
+	 * CONFIG_OF_LIVE is enabled. Until this is enabled for MVEBU in
+	 * general, lets't hardcode the "pna" value in the U-Boot code.
+	 */
 	pna = 2; /* hardcoded for now because of lack of of_n_addr_cells() */
 	rangesz = pna + na + ns;
 	nranges = rlen / sizeof(__be32) / rangesz;
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 pci: pci_mvebu: Add comment about missing of_n_addr_cells() call

Quoted 7 lines · Stefan Roese

This patch adds a comment to explain the use of the hardcoded value for the number of address cells in mvebu_get_tgt_attr(). This should help to rework this function, once CONFIG_OF_LIVE is enabled for MVEBU in general.

Applied to u-boot-marvell/master.

Thanks,
Stefan