From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 4/8] spi: dw: Use generic function to read reg address
Date: Thu, 5 Mar 2020 14:19:21 -0500 [thread overview]
Message-ID: <20200305191925.959494-5-seanga2@gmail.com> (raw)
In-Reply-To: <20200305191925.959494-1-seanga2@gmail.com>
Using an fdt-specific function causes problems when compiled with a live
tree.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
drivers/spi/designware_spi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 765fa2f582..38c24fe550 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -161,7 +161,9 @@ static int dw_spi_ofdata_to_platdata(struct udevice *bus)
{
struct dw_spi_platdata *plat = bus->platdata;
- plat->regs = (struct dw_spi *)devfdt_get_addr(bus);
+ plat->regs = dev_read_addr_ptr(bus);
+ if (!plat->regs)
+ return -EINVAL;
/* Use 500KHz as a suitable default */
plat->frequency = dev_read_u32_default(bus, "spi-max-frequency",
--
2.25.0
next prev parent reply other threads:[~2020-03-05 19:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 19:19 [PATCH v1 0/8] riscv: Add SPI support for Kendryte K210 Sean Anderson
2020-03-05 19:19 ` [PATCH v1 1/8] doc: Fix typo in FIT documentation Sean Anderson
2020-03-22 1:52 ` Marek Vasut
2020-03-23 13:58 ` Tom Rini
2020-03-05 19:19 ` [PATCH v1 2/8] spi: dw: Add device tree properties for fields in CTRL0 Sean Anderson
2020-03-22 1:51 ` Marek Vasut
2020-03-22 2:36 ` Sean Anderson
2020-03-22 3:04 ` Marek Vasut
2020-03-22 3:08 ` Sean Anderson
2020-03-22 3:13 ` Marek Vasut
2020-03-22 3:33 ` Sean Anderson
2020-03-22 4:22 ` Marek Vasut
2020-03-05 19:19 ` [PATCH v1 3/8] spi: dw: Rename "cs-gpio" to "cs-gpios" Sean Anderson
2020-04-02 12:17 ` Jagan Teki
2020-04-02 12:33 ` Sean Anderson
2020-03-05 19:19 ` Sean Anderson [this message]
2020-04-02 12:24 ` [PATCH v1 4/8] spi: dw: Use generic function to read reg address Jagan Teki
2020-04-02 12:32 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 5/8] spi: dw: Speed up transfer loops Sean Anderson
2020-03-22 1:49 ` Marek Vasut
2020-03-22 3:54 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 6/8] spi: dw: Add mem_ops Sean Anderson
2020-03-05 22:15 ` Eugeniy Paltsev
2020-03-06 0:48 ` Sean Anderson
2020-03-06 17:03 ` Eugeniy Paltsev
2020-03-06 20:36 ` Sean Anderson
2020-03-06 21:20 ` Sean Anderson
2020-03-12 16:01 ` Eugeniy Paltsev
2020-03-05 19:19 ` [PATCH v1 7/8] riscv: Add device tree bindings for SPI Sean Anderson
2020-03-22 1:55 ` Marek Vasut
2020-03-22 2:39 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 8/8] riscv: Add support for SPI on Kendryte K210 Sean Anderson
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=20200305191925.959494-5-seanga2@gmail.com \
--to=seanga2@gmail.com \
--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 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.