Re: [PATCH v1 u-boot-marvell 4/5] arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

2020-04-14 Thread Stefan Roese
On 08.04.20 19:25, Marek Behún wrote: In case when ARM Trusted Firmware changes the default address of PCIe regions (which can be done for devices with 4 GB RAM to maximize the amount of RAM the device can use) we add code that looks at how ATF changed the PCIe windows in the CPU Address Decoder

Re: [PATCH v1 u-boot-marvell 4/5] arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

2020-04-09 Thread Marek Behun
Hi Stefan, sorry I overlooked the other two things you commented on the code. On Thu, 9 Apr 2020 10:09:52 +0200 Stefan Roese wrote: > > + return -1; > > return -ENOENT; ? The function returns u32. The error is reported by returning (u32)-1. The check base < 0 won't work. I would spe

Re: [PATCH v1 u-boot-marvell 4/5] arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

2020-04-09 Thread Marek Behun
> > +} > > + > > +int a3700_fdt_fix_pcie_regions(void *blob) > > +{ > > + u32 new_ranges[14], base; > > Where does this "14" come from? Is this a safe upper margin? Yes, the way how the code below works, it won't overflow or anything. I even test whether the "ranges" property from the dtc has

Re: [PATCH v1 u-boot-marvell 4/5] arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

2020-04-09 Thread Stefan Roese
On 08.04.20 19:25, Marek Behún wrote: In case when ARM Trusted Firmware changes the default address of PCIe regions (which can be done for devices with 4 GB RAM to maximize the amount of RAM the device can use) we add code that looks at how ATF changed the PCIe windows in the CPU Address Decoder

[PATCH v1 u-boot-marvell 4/5] arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

2020-04-08 Thread Marek Behún
In case when ARM Trusted Firmware changes the default address of PCIe regions (which can be done for devices with 4 GB RAM to maximize the amount of RAM the device can use) we add code that looks at how ATF changed the PCIe windows in the CPU Address Decoder and changes given device-tree blob accor