[PATCH v5 1/3] x86: qemu: move QFW to its own uclass

Simon Glass sjg at chromium.org
Fri Mar 5 05:08:31 CET 2021


Hi Asherah,

On Mon, 1 Mar 2021 at 01:35, Asherah Connor <ashe at kivikakk.ee> wrote:
>
> We move qfw into its own uclass and split the PIO functions into a
> specific driver for that uclass.  The PIO driver is selected in the
> qemu-x86 board config (this covers x86 and x86_64).
>
> A sandbox driver and test are added for the uclass, and a test in QEMU
> added for qfw functionality to confirm it doesn't break in real world
> use.
>
> include/qfw.h is cleaned up and documentation added.
>
> Signed-off-by: Asherah Connor <ashe at kivikakk.ee>
>
> ---
>
> Changes in v5:
> * Split conversion of existing x86-only QFW to DM into its own patch.
> * Fix qfw_get_dev() so it actually returns -ENODEV when device is
>   missing.
> * Add CONFIG_QFW_PIO.
> * Choose CONFIG_QFW_PIO in board/emulation/qemu-x86/Kconfig.
> * QFW sandbox driver no longer inserts itself from device tree; wasn't
>   relevant to implementation and the ``compatible'' string was too
>   made-up.  Use U_BOOT_DRVINFO like the other QFW driver in this patch.
> * Relevant documentation and sandbox/qemu tests are now here.
>
>  arch/x86/cpu/qemu/cpu.c          |   9 +-
>  arch/x86/cpu/qemu/qemu.c         |  49 +------
>  arch/x86/cpu/qfw_cpu.c           |  11 +-
>  board/emulation/qemu-x86/Kconfig |   1 +
>  cmd/qfw.c                        |  56 ++++---
>  common/Makefile                  |   2 +
>  common/qfw.c                     | 105 +++++++++++++
>  drivers/misc/Kconfig             |  11 +-
>  drivers/misc/Makefile            |   6 +-
>  drivers/misc/qfw.c               | 243 +++++++++++--------------------
>  drivers/misc/qfw_pio.c           |  69 +++++++++
>  drivers/misc/qfw_sandbox.c       | 128 ++++++++++++++++
>  include/dm/uclass-id.h           |   1 +
>  include/qfw.h                    | 200 +++++++++++++++++++++----
>  test/dm/Makefile                 |   1 +
>  test/dm/qfw.c                    |  42 ++++++
>  test/py/tests/test_qfw.py        |  21 +++
>  17 files changed, 683 insertions(+), 272 deletions(-)
>  create mode 100644 common/qfw.c
>  create mode 100644 drivers/misc/qfw_pio.c
>  create mode 100644 drivers/misc/qfw_sandbox.c
>  create mode 100644 test/dm/qfw.c
>  create mode 100644 test/py/tests/test_qfw.py

This looks sensible but it really is a huge patch. Can it be split up a bit?

Regards,
Simon


More information about the U-Boot mailing list