summaryrefslogtreecommitdiff
path: root/drivers/ddr/microchip/ddr2_regs.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2021-02-25 17:22:24 +0800
committerPriyanka Jain <priyanka.jain@nxp.com>2021-03-05 10:25:42 +0530
commita932aa3c692606d6ada803de966b1aee09257993 (patch)
treefa7b835d7d4083115886622ad7ce30aa8f0d3735 /drivers/ddr/microchip/ddr2_regs.h
parent5cd1ecb994904365018f64132a85144625017fb9 (diff)
common: fdt_support: Support special case of PCI address in fdt_read_prop()
At present fdt_read_prop() can only handle 1 or 2 cells. It is called by fdt_read_range() which may be used to read PCI address from <ranges> for a PCI bus node where the number of PCI address cell is 3. The <ranges> property is an array of: { <child address> <parent address> <size in child address space> } When trying to read <child address> from a PCI bus node using fdt_read_prop(), as the codes below: /* Read <child address> */ if (child_addr) { r = fdt_read_prop(ranges, ranges_len, cell, child_addr, acells); if (r) return r; } it will fail, because the PCI child address is made up of 3 cells but fdt_read_prop() cannot handle it. We advance the cell offset by 1 so that the <child address> can be correctly read. This adds the special handling of such case. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'drivers/ddr/microchip/ddr2_regs.h')
0 files changed, 0 insertions, 0 deletions