summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2019-02-11 07:53:34 +0100
committerStefan Roese <sr@denx.de>2019-03-19 09:22:05 +0100
commit0df62e8da8f48d8bbabd1d92512173cbb424e3c5 (patch)
tree63d39ee525d2a33ac753edd109d7432040bf40cc /drivers/pci
parent374bf7af033aa326a9585c5ff878d206e90c0c1c (diff)
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. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci_mvebu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 6026fa67f9..e21dc10c2f 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -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;