qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/5] ppc/pnv: Add SPI controller model


From: Chalapathi V
Subject: Re: [PATCH v3 1/5] ppc/pnv: Add SPI controller model
Date: Fri, 14 Jun 2024 17:53:08 +0530
User-agent: Mozilla Thunderbird


On 14-06-2024 16:57, Cédric Le Goater wrote:
On 6/13/24 3:45 PM, Chalapathi V wrote:

On 20-05-2024 11:19, Cédric Le Goater wrote:
On 5/15/24 19:41, Chalapathi V wrote:
SPI controller device model supports a connection to a single SPI responder. This provide access to SPI seeproms, TPM, flash device and an ADC controller.

All SPI function control is mapped into the SPI register space to enable full control by firmware. In this commit SPI configuration component is modelled which contains all SPI configuration and status registers as well as the hold
registers for data to be sent or having been received.

An existing QEMU SSI framework is used and SSI_BUS is created.

Signed-off-by: Chalapathi V <chalapathi.v@linux.ibm.com>
---
  include/hw/ppc/pnv_xscom.h    |   3 +
  include/hw/ssi/pnv_spi.h      |  44 +++++++
  include/hw/ssi/pnv_spi_regs.h | 114 +++++++++++++++++
  hw/ppc/pnv_spi_controller.c   | 228 ++++++++++++++++++++++++++++++++++

The file names are not consistent.

Please rename hw/ppc/pnv_spi_controller.c to /hw/ssi/pnv_spi.c.

Hello Cedric,

I could not compile hw/ssi/pnv_spi.c because of target specific code.

/FAILED: libcommon.fa.p/hw_ssi_pnv_spi.c.o
cc -m64 -mcx16 -Ilibcommon.fa.p -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/slirp -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -isystem <qemu_dir>/linux-headers -isystem linux-headers -iquote . -iquote <qemu_dir> -iquote <<qemu_dir>>/include -iquote <qemu_dir>/host/include/x86_64 -iquote <qemu_dir>/host/include/generic -iquote <qemu_dir>/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE -MD -MQ libcommon.fa.p/hw_ssi_pnv_spi.c.o -MF libcommon.fa.p/hw_ssi_pnv_spi.c.o.d -o libcommon.fa.p/hw_ssi_pnv_spi.c.o -c ../hw/ssi/pnv_spi.c
In file included from <qemu_dir>/target/ppc/cpu.h:25,
from <qemu_dir>/include/hw/ppc/pnv.h:24,
from <qemu_dir>/include/hw/ppc/pnv_xscom.h:24,
                  from ../hw/ssi/pnv_spi.c:12:
<qemu_dir>/include/exec/cpu-defs.h:23:2: error: #error cpu.h included from common code
  #error cpu.h included from common code
   ^~~~~
In file included from /<qemu_dir>/target/ppc/cpu.h:25,
from <qemu_dir>/include/hw/ppc/pnv.h:24,
from <qemu_dir>/include/hw/ppc/pnv_xscom.h:24,
                  from ../hw/ssi/pnv_spi.c:12:
<qemu_dir>/include/exec/cpu-defs.h:34:10: fatal error: cpu-param.h: No such file or directory
  #include "cpu-param.h"
           ^~~~~~~~~~~~~
compilation terminated.
/

Hence shall I keep pnv_spi.c in /hw/ppc/ ?


Can't we "fix" pnv_xscom.h to be more friendly ? with forward declarations
of the Pnv* types ?


Thanks,

C.

Sure, Thank you for the suggestions, I will test and update the patch ASAP.

Thank You,

Chalapathi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]