From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 4/4] hw/ssi: Fix Linux driver init issue with xilinx_spi
Date: Mon, 3 Apr 2023 17:01:17 +0100 [thread overview]
Message-ID: <20230403160117.3034102-5-peter.maydell@linaro.org> (raw)
In-Reply-To: <20230403160117.3034102-1-peter.maydell@linaro.org>
From: Chris Rauer <crauer@google.com>
The problem is that the Linux driver expects the master transaction inhibit
bit(R_SPICR_MTI) to be set during driver initialization so that it can
detect the fifo size but QEMU defaults it to zero out of reset. The
datasheet indicates this bit is active on reset.
See page 25, SPI Control Register section:
https://www.xilinx.com/content/dam/xilinx/support/documents/ip_documentation/axi_quad_spi/v3_2/pg153-axi-quad-spi.pdf
Signed-off-by: Chris Rauer <crauer@google.com>
Message-id: 20230323182811.2641044-1-crauer@google.com
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/ssi/xilinx_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index 552927622f4..d4de2e7aabc 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -156,6 +156,7 @@ static void xlx_spi_do_reset(XilinxSPI *s)
txfifo_reset(s);
s->regs[R_SPISSR] = ~0;
+ s->regs[R_SPICR] = R_SPICR_MTI;
xlx_spi_update_irq(s);
xlx_spi_update_cs(s);
}
--
2.34.1
next prev parent reply other threads:[~2023-04-03 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 16:01 [PULL 0/4] target-arm queue Peter Maydell
2023-04-03 16:01 ` [PULL 1/4] target/arm: Fix non-TCG build failure by inlining pauth_ptr_mask() Peter Maydell
2023-04-03 16:01 ` [PULL 2/4] hw/arm: do not free machine->fdt in arm_load_dtb() Peter Maydell
2023-04-03 16:01 ` [PULL 3/4] target/arm: Fix generated code for cpreg reads when HSTR is active Peter Maydell
2023-04-03 16:01 ` Peter Maydell [this message]
2023-04-04 12:43 ` [PULL 0/4] target-arm queue Peter Maydell
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=20230403160117.3034102-5-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.