All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Tardieu <sam@rfc1149.net>
To: ~mohammadodeh <Mohammad.Odeh@exalt.ps>
Cc: qemu-devel@nongnu.org, "Alexandre Iooss" <erdnaxe@crans.org>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Gaurav Sharma" <gaurav.sharma_7@nxp.com>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"Bin Meng" <bin.meng@processmission.com>,
	"Shameer Kolothum" <skolothumtho@nvidia.com>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-arm@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH qemu 2/3] hw/ssi: Add STM32L4x5 QuadSPI controller
Date: Wed, 02 Dec 2026 10:05:18 +0100	[thread overview]
Message-ID: <87zeuocasx.fsf@rfc1149.net> (raw)
In-Reply-To: <179449578952.8382.2790865629085512841-2@git.sr.ht>

~mohammadodeh <mohammadodeh@git.sr.ht> writes:

> Model the STM32L4x5 QuadSPI controller indirect read and write modes.
> Wire its clock, interrupt, and SSI bus into the STM32L4x5 SoC.
>
> Automatic polling, memory-mapped mode, and DMA are not implemented.

Hi.

While you check that the clock is properly connected at device realization time, you don't check that it's enabled before performing an operation on the peripheral. I've done some tests on real hardware (a b-l475e-iot01a board), and when the clock is disabled:

- QSPI registers reads return 0 (tried with CR, DCR, and SR)
- QSPI registers write are ignored (tried with DCR)
- A JEDEC-ID command was ignored

Enabling the clock again restores the content of the registers, and a 64 byte SFDP read stalled on a full FIFO survives the clock off/on sequence and can be completed afterwards. It means that turning the clock off doesn't reset any internal state, it just "suspends" the peripheral and returns 0 on read.

  Sam
-- 
Samuel Tardieu


  reply	other threads:[~2026-12-02  9:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 15:03 [PATCH qemu 0/3] hw/arm: Add STM32L496G-DISCO QuadSPI support ~mohammadodeh
2026-09-27  7:08 ` [PATCH qemu 1/3] hw/block: Add Macronix MX25R6435F flash ~mohammadodeh
2026-11-14 10:20   ` Samuel Tardieu
2026-11-18  6:29   ` Bin Meng
2026-09-27  7:09 ` [PATCH qemu 2/3] hw/ssi: Add STM32L4x5 QuadSPI controller ~mohammadodeh
2026-12-02  9:05   ` Samuel Tardieu [this message]
2026-09-27  7:32 ` [PATCH qemu 3/3] hw/arm: Add STM32L496G-DISCO machine ~mohammadodeh
2026-11-14 10:40   ` Samuel Tardieu
2026-11-19  8:49     ` Mohammad Odeh
2026-11-19 20:43       ` Samuel Tardieu
2026-11-14 10:49   ` Peter Maydell
2026-11-14 10:22 ` [PATCH qemu 0/3] hw/arm: Add STM32L496G-DISCO QuadSPI support Samuel Tardieu

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=87zeuocasx.fsf@rfc1149.net \
    --to=sam@rfc1149.net \
    --cc=Mohammad.Odeh@exalt.ps \
    --cc=alistair@alistair23.me \
    --cc=armbru@redhat.com \
    --cc=bin.meng@processmission.com \
    --cc=clg@redhat.com \
    --cc=erdnaxe@crans.org \
    --cc=farosas@suse.de \
    --cc=gaurav.sharma_7@nxp.com \
    --cc=hreitz@redhat.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=jan.kiszka@web.de \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.com \
    --cc=skolothumtho@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.