From: Chalapathi V <chalapathi.v@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, fbarrat@linux.ibm.com, npiggin@gmail.com,
calebs@us.ibm.com, chalapathi.v@ibm.com,
saif.abrar@linux.vnet.ibm.com, dantan@us.ibm.com,
milesg@linux.vnet.ibm.com
Subject: Re: [PATCH v3 1/5] ppc/pnv: Add SPI controller model
Date: Fri, 14 Jun 2024 17:53:08 +0530 [thread overview]
Message-ID: <0d3b4ece-a41e-4108-843d-067d56f3eff2@linux.ibm.com> (raw)
In-Reply-To: <ceefb013-7e8a-47ae-9450-2601db9872aa@kaod.org>
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
next prev parent reply other threads:[~2024-06-14 12:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 17:41 [PATCH v3 0/5] hw/ppc: SPI model Chalapathi V
2024-05-15 17:41 ` [PATCH v3 1/5] ppc/pnv: Add SPI controller model Chalapathi V
2024-05-20 5:49 ` Cédric Le Goater
2024-05-21 6:13 ` Chalapathi V
2024-05-21 6:33 ` Chalapathi V
2024-06-13 13:45 ` Chalapathi V
2024-06-14 11:27 ` Cédric Le Goater
2024-06-14 12:23 ` Chalapathi V [this message]
2024-05-15 17:41 ` [PATCH v3 2/5] ppc/pnv: Extend SPI model Chalapathi V
2024-05-15 17:41 ` [PATCH v3 3/5] hw/block: Add Microchip's 25CSM04 to m25p80 Chalapathi V
2024-05-20 5:56 ` Cédric Le Goater
2024-05-15 17:41 ` [PATCH v3 4/5] hw/ppc: SPI controller wiring to P10 chip Chalapathi V
2024-05-20 6:05 ` Cédric Le Goater
2024-05-15 17:41 ` [PATCH v3 5/5] tests/qtest: Add pnv-spi-seeprom qtest Chalapathi V
2024-05-20 6:13 ` Cédric Le Goater
2024-05-21 6:38 ` Chalapathi V
[not found] <20240516163304.25191-1-chalapathi.v@linux.ibm.com>
[not found] ` <20240516163304.25191-2-chalapathi.v@linux.ibm.com>
2024-05-17 16:27 ` [PATCH v3 1/5] ppc/pnv: Add SPI controller model Miles Glenn
2024-05-21 6:09 ` Chalapathi V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d3b4ece-a41e-4108-843d-067d56f3eff2@linux.ibm.com \
--to=chalapathi.v@linux.ibm.com \
--cc=calebs@us.ibm.com \
--cc=chalapathi.v@ibm.com \
--cc=clg@kaod.org \
--cc=dantan@us.ibm.com \
--cc=fbarrat@linux.ibm.com \
--cc=milesg@linux.vnet.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=saif.abrar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).