From: James Hanley <jhanley@dgtlrift.com>
To: Alistair Francis <alistair.francis@xilinx.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] MTD timeout on bootup
Date: Fri, 31 Mar 2017 11:28:31 -0400	[thread overview]
Message-ID: <CAF++6AOLSd0SYyv_LmnjinEj-jHBbyNZv_hxvdksGqCoDcpmjA@mail.gmail.com> (raw)
When trying to bootup a pristine zync image from the zc702 tarball, it
would always fail with the MTD detection of the serial flash device type
command over the SPI.  I believe this section of code may have the logic
flipped.  Once I changed it to the following, I was able to detect the
flash type when booting the pristine image from Xilinx.
-Jim
>From baaaacca370c13526fd2b8c7b33c7d9e8a6d7b8d Mon Sep 17 00:00:00 2001
From: Jim Hanley <Jim.Hanley@LandisGyr.com>
Date: Thu, 23 Mar 2017 10:29:34 -0400
Subject: [PATCH] MTD writes from the SPI were never being dequeue...
Signed-off-by:
---
 hw/ssi/xilinx_spips.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index da8adfa..a3af1f7 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -482,8 +482,8 @@ static void xilinx_spips_write(void *opaque, hwaddr
addr,
     s->regs[addr] = (s->regs[addr] & ~mask) | (value & mask);
 no_reg_update:
     xilinx_spips_update_cs_lines(s);
-    if ((man_start_com && s->regs[R_CONFIG] & MAN_START_EN) ||
-            (fifo8_is_empty(&s->tx_fifo) && s->regs[R_CONFIG] &
MAN_START_EN)) {
+    if (!((man_start_com && s->regs[R_CONFIG] & MAN_START_EN) ||
+            (fifo8_is_empty(&s->tx_fifo) && s->regs[R_CONFIG] &
MAN_START_EN))) {
         xilinx_spips_flush_txfifo(s);
     }
     xilinx_spips_update_cs_lines(s);
-- 
2.7.4
next             reply	other threads:[~2017-03-31 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 15:28 James Hanley [this message]
2017-04-03 17:32 ` [Qemu-devel] MTD timeout on bootup Alistair Francis
2017-04-05 16:36   ` James Hanley
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=CAF++6AOLSd0SYyv_LmnjinEj-jHBbyNZv_hxvdksGqCoDcpmjA@mail.gmail.com \
    --to=jhanley@dgtlrift.com \
    --cc=alistair.francis@xilinx.com \
    --cc=crosthwaite.peter@gmail.com \
    --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 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).