From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 6/6] spi: cadence_qspi: get fifo width from device tree
Date: Thu, 24 Sep 2015 09:34:55 +0200 [thread overview]
Message-ID: <20150924073455.4DC90380905@gemini.denx.de> (raw)
In-Reply-To: <1443053976-9112-7-git-send-email-vikas.manocha@st.com>
Dear Vikas Manocha,
In message <1443053976-9112-7-git-send-email-vikas.manocha@st.com> you wrote:
> Fifo width could be different on different socs, e.g. stv0991 & altera soc
> have different fifo width.
...
> --- a/drivers/spi/cadence_qspi.c
> +++ b/drivers/spi/cadence_qspi.c
> @@ -312,6 +312,7 @@ static int cadence_spi_ofdata_to_platdata(struct udevice *bus)
> plat->tchsh_ns = fdtdec_get_int(blob, subnode, "tchsh-ns", 20);
> plat->tslch_ns = fdtdec_get_int(blob, subnode, "tslch-ns", 20);
> plat->sram_size = fdtdec_get_int(blob, node, "sram-size", 128);
> + plat->fifo_width = fdtdec_get_int(blob, node, "cdns,fifo-width", 4);
Is using default values (which are known to be wrong on some
platforms) the right approach here? It means that some systems will
silently misperform when the respective entries in the DT are missing.
Should we not add proper error handling here?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nobody trips over mountains. It is the small pebble that causes you
to stumble. Pass all the pebbles in your path and you will find you
have crossed the mountain.
prev parent reply other threads:[~2015-09-24 7:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 0:19 [U-Boot] [PATCH v7 0/6] spi: cadence_qspi: optimize & fix indirect rd-writes Vikas Manocha
2015-09-24 0:19 ` [U-Boot] [PATCH v7 1/6] spi: cadence_qspi: move trigger base configuration in init Vikas Manocha
2015-09-24 7:22 ` Wolfgang Denk
2015-09-24 18:12 ` Vikas MANOCHA
2015-09-24 18:56 ` Wolfgang Denk
2015-09-24 19:39 ` Jagan Teki
2015-09-24 22:32 ` Wolfgang Denk
2015-09-25 23:25 ` Vikas MANOCHA
2015-09-24 0:19 ` [U-Boot] [PATCH v7 2/6] spi: cadence_qspi: fix indirect read/write start address Vikas Manocha
2015-09-24 7:18 ` Wolfgang Denk
2015-09-24 0:19 ` [U-Boot] [PATCH v7 3/6] spi: cadence_qspi: fix base trigger address & transfer " Vikas Manocha
2015-09-24 7:24 ` Wolfgang Denk
2015-09-24 7:49 ` Wolfgang Denk
2015-09-24 0:19 ` [U-Boot] [PATCH v7 4/6] spi: cadence_qspi: rename ahbbase to flashbase for clarity Vikas Manocha
2015-09-24 0:19 ` [U-Boot] [PATCH v7 5/6] spi: cadence_qspi: remove unused macro Vikas Manocha
2015-09-24 0:19 ` [U-Boot] [PATCH v7 6/6] spi: cadence_qspi: get fifo width from device tree Vikas Manocha
2015-09-24 7:34 ` Wolfgang Denk [this message]
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=20150924073455.4DC90380905@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/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