[PATCH 01/26] Revert "pci: pci-uclass: Dynamically allocate the PCI regions"

Stefan Roese sr at denx.de
Wed Feb 10 08:13:15 CET 2021


Hi Simon, Bin & Tom,

On 10.02.21 06:10, Simon Glass wrote:
> Hi Bin,
> 
> On Tue, 9 Feb 2021 at 17:47, Bin Meng <bmeng.cn at gmail.com> wrote:
>>
>> Hi Simon,
>>
>> On Sun, Feb 7, 2021 at 11:34 PM Simon Glass <sjg at chromium.org> wrote:
>>>
>>> Hi Bin,
>>>
>>> On Sun, 7 Feb 2021 at 08:11, Bin Meng <bmeng.cn at gmail.com> wrote:
>>>>
>>>> This reverts commit e002474158d1054a7a2ff9a66149384c639ff242.
>>>>
>>>> Commit e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions")
>>>> changes 'struct pci_controller'.regions from pre-allocated array of
>>>> regions to dynamically allocated, which unfortunately broken lots of
>>>> boards that still use the non-DM PCI driver.
>>>>
>>>> We may update every non-DM PCI board codes to do the dynamical
>>>> allocation of PCI regions but that's a lot of work (e.g.: almost
>>>> all Freescale PowerPC boards are broken now and need to be fixed).
>>>> Let's do the easy way.
>>>
>>> No one has noticed since July, apparently. I think it would be better
>>> to disable PCI on these boards, until either someone migrates them or
>>> they are removed. The PCI deadline was about 18 months ago.
>>>
>>
>> Yep, but I'd like to keep this revert instead of just fixing the
>> qemu-ppce500 here, to give people a chance to test their original
>> non-DM version of PCI driver before the DM conversion.
>>
>> Once all boards have converted to DM PCI, we can revert this revert patch again.
> 
> I'm fine with that if Tom is. But deleting unmaintained code is always
> another option!

Sorry for chiming in this late in this discussion. If we decide to
revert this patch, this will break OcteonTX/TX2 support. As we need
a higher value for the PCI regions here. Originally we just increased
MAX_PCI_REGIONS to 10. This dynamic allocation superseeded this change.
This increase might introduce size issues on other platforms though.

So please keep this in mind that with the revert the value of
MAX_PCI_REGIONS needs to get increased to 10 - at least for Octeon TX.

Thanks,
Stefan


More information about the U-Boot mailing list