
Hi Asherah,
On Fri, Feb 26, 2021 at 10:14 AM Bin Meng bmeng.cn@gmail.com wrote:
Hi Asherah,
On Wed, Feb 24, 2021 at 11:23 AM Asherah Connor ashe@kivikakk.ee wrote:
Updates the QFW driver to use the driver model, splitting the driver into qfw_pio and qfw_mmio (for non-x86) in their own uclass.
Signed-off-by: Asherah Connor ashe@kivikakk.ee
Changes in v4:
- PIO definitions are now #defines
- qfw_*_plat structs are no longer in header files
- Remove yield/pause in DMA wait loop
- Change struct udevice *qfw_get_dev(void) to int qfw_get_dev(struct udevice **)
arch/arm/Kconfig | 1 + arch/x86/cpu/qemu/cpu.c | 9 +- arch/x86/cpu/qemu/qemu.c | 47 +------- arch/x86/cpu/qfw_cpu.c | 11 +- cmd/qfw.c | 52 ++++----- common/Makefile | 2 + common/qfw.c | 105 +++++++++++++++++ drivers/misc/Makefile | 6 +- drivers/misc/qfw.c | 238 ++++++++++++++------------------------- drivers/misc/qfw_mmio.c | 119 ++++++++++++++++++++ drivers/misc/qfw_pio.c | 69 ++++++++++++ include/dm/uclass-id.h | 1 + include/qfw.h | 61 ++++++---- 13 files changed, 466 insertions(+), 255 deletions(-) create mode 100644 common/qfw.c create mode 100644 drivers/misc/qfw_mmio.c create mode 100644 drivers/misc/qfw_pio.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d51abbeaf0..cd01dc458a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -937,6 +937,7 @@ config ARCH_QEMU imply DM_RNG imply DM_RTC imply RTC_PL031
imply CMD_QFW
This patch mixed two things together. The adding ARM support should not belong to this patch.
So we need to split the patch like this:
1. Convert the existing QFW driver of x86 to QFW uclass driver 2. Add a new QFW mmio driver 3. Enable the driver on QEMU ARM
Regards, Bin