[PATCH v2 00/38] ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support

Bin Meng bmeng.cn at gmail.com
Fri Feb 19 02:29:22 CET 2021


On Thu, Feb 18, 2021 at 11:58 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> At present when building qemu-ppce500 the following warnings are seen:
>
> ===================== WARNING ======================
> This board does not use CONFIG_DM. CONFIG_DM will be
> compulsory starting with the v2020.01 release.
> Failure to update may result in board removal.
>   UPD     include/generated/timestamp_autogenerated.h
> See doc/driver-model/migration.rst for more info.
> ====================================================
> ===================== WARNING ======================
> This board does not use CONFIG_DM_PCI Please update
> the board to use CONFIG_DM_PCI before the v2019.07 release.
> Failure to update by the deadline may result in board removal.
> See doc/driver-model/migration.rst for more info.
> ====================================================
> ===================== WARNING ======================
> This board does not use CONFIG_DM_ETH (Driver Model
> for Ethernet drivers). Please update the board to use
> CONFIG_DM_ETH before the v2020.07 release. Failure to
> update by the deadline may result in board removal.
> See doc/driver-model/migration.rst for more info.
> ====================================================
>
> The conversion of qemu-ppce500 board to driver model is long overdue.
>
> When testing the exisitng qemu-ppce500 support, PCI was found broken.
> This is caused by 2 separate issues:
>
> - One issue was caused by U-Boot:
>   Commit e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions")
>   Patch #1 updated the non-DM fsl_pci_init driver to dynamically allocate the
>   PCI regions, to keep in sync with the pci uclass driver
> - One issue was caused by QEMU:
>   commit e6b4e5f4795b ("PPC: e500: Move CCSR and MMIO space to upper end of address space")
>   commit cb3778a0455a ("PPC: e500 pci host: Add support for ATMUs")
>   Patch #3-4 fixed this issue to keep in sync with latest QEMU upstream
>
> Patch #5-8, #34-36 are minor fixes and clean-ups.
>
> Starting from patch#9, these are driver model conversion patches.
>
> Patch #11-17 are mainly related to CONFIG_ADDR_MAP, a library to support targets
> that have non-identity virtual-physical address mappings. A new command 'addrmap'
> is introduced to aid debugging, and a fix to arch/powerpc/asm/include/io.h is
> made to correct the usage of CONFIG_ADDR_MAP as it can only be used in the post-
> relocation phase. Also the initialization of this library is moved a bit earlier
> in the post-relocation phase otherwise device drivers won't work.
>
> Patch #19-21 are 85xx PCI driver fixes. It adds support to controller register
> physical address beyond 32-bit, as well as support to 64-bit bus and cpu address
> as current upstream QEMU uses 64-bit cpu address.
>
> Starting from patch#24, these are additional driver support patches.
>
> Patch #24, #26 are minor fix to the 'virtio' command and BLK driver dependency.
>
> Patch #25 enables the VirtIO NET support as by default a VirtIO standard PCI
> networking device is connected as an ethernet interface at PCI address 0.1.0.
>
> Patch #27 enables the VirtIO BLK driver support.
>
> Patch #28-30 enables the GPIO support.
>
> Patch #31-32 enables poweroff via GPIO.
>
> Patch #33 enables RTC over the I2C bus.
>
> Patch #37 moves the qemu-ppce500 boards codes to board/emulation as that is the
> place for other QEMU targets like x86, arm, riscv.
>
> Patch #38 adds a reST document to describe how to build and run U-Boot for the
> QEMU ppce500 machine.
>
> I hope we can make this series to U-Boot v2021.04 release.
>
> This series is available at u-boot-x86/qemu-ppc for testing.
>
> This cover letter is cc'ed to QEMU mailing list for a heads-up.
> A future patch will be sent to QEMU mailing list to bring its in-tree
> U-Boot source codes up-to-date.
>
> Changes in v2:
> - drop the revert patch of commit e002474158d1
> - new patch: pci: fsl_pci_init: Dynamically allocate the PCI regions
> - add more details in the commit message, and put some comments
>   in the codes to explain why
> - add doc/usage/addrmap.rst
> - new patch: test: cmd: Add a basic test for 'addrmap' command
> - new patch: virtio: Fix VirtIO BLK driver dependency
> - new patch: ppc: qemu: Enable VirtIO BLK support
> - new patch: ppc: mpc85xx: Add 'gpibe' register to 'struct ccsr_gpio'
> - new patch: gpio: mpc8xxx: Support controller register physical address beyond 32-bit
> - new patch: ppc: qemu: Enable GPIO support
> - new patch: dm: sysreset: Add a Kconfig option for the 'reset' command
> - new patch: ppc: qemu: Enable support for power off via GPIO
> - new patch: ppc: qemu: Enable RTC support via I2C
> - new patch: ppc: qemu: Delete the temporary FDT virtual-physical mapping after U-Boot is relocated
> - new patch: ppc: qemu: Drop a custom env variable 'fdt_addr_r'
> - new patch: ppc: qemu: Drop fixed_sdram()
> - add descriptions for VirtIO BLK, RTC and power off
>

Azure results: PASS
https://dev.azure.com/bmeng/GitHub/_build/results?buildId=324&view=results

Regards,
Bin


More information about the U-Boot mailing list