From: Ian Abbott <abbotti@mev.co.uk>
To: barebox@lists.infradead.org
Subject: Cadence QSPI xload boot timing issue
Date: Fri, 2 Dec 2016 17:09:31 +0000 [thread overview]
Message-ID: <378a4a5b-43e1-c693-b271-8647a951c41b@mev.co.uk> (raw)
Hi everyone,
I'm using BareBox and xload 2016.11.0 with custom BSP patches for my
Altera Cyclone V SoCFPGA based custom board, which boots from QSPI.
The board boots fine, but I ran into a weird boot timing issue when
playing around with the LOGLEVEL configuration options in xload. Before
playing around with them, my initial LOGLEVEL options were as follows:
CONFIG_COMPILE_LOGLEVEL=6
CONFIG_DEFAULT_LOGLEVEL=7
I ran into the boot timing issue when setting them as follows:
CONFIG_COMPILE_LOGLEVEL=6
CONFIG_DEFAULT_LOGLEVEL=5
The symptoms were that xload reported the following errors:
mtd0: failed to get image size
mtd0: failed to detect barebox and it's image size so use 1048576
It then went on to load and boot the barebox image successfully.
To debug the problem, I hex-dumped the barebox image header to the
terminal after it had been read by read_image_head() in
"lib/bootstrap/devfs.c" and found it to contain only '\xFF' bytes.
However, if I insert a small delay by calling mdelay(1) before reading
the barebox image header, it is read correctly and I don't get the error
messages.
It seems like a small delay is required after the Cadence QSPI driver
("drivers/mtd/spi-nor/cadence_quadspi.c") has set up the flash chip
before it is in a useable state. Adding a call mdelay(1) just before
cqspi_probe() returns fixes the problem for me, but I'm not sure if
that's the best way to fix it!
For reference, my flash chip is a Spansion s25fl256s1 (32768 Kbytes) and
the Cadence QSPI controller built in to the SoCFPGA is being clocked at
400 MHz.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2016-12-02 17:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=378a4a5b-43e1-c693-b271-8647a951c41b@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=barebox@lists.infradead.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