projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13fc44e
)
spi: dw: Use generic function to read reg address
author
Sean Anderson
<seanga2@gmail.com>
Fri, 16 Oct 2020 22:57:46 +0000
(18:57 -0400)
committer
Jagan Teki
<jagan@amarulasolutions.com>
Fri, 18 Dec 2020 10:46:36 +0000
(16:16 +0530)
Using an fdt-specific function causes problems when compiled with a live
tree.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/designware_spi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/designware_spi.c
b/drivers/spi/designware_spi.c
index
32de33f
..
e8ba80e
100644
(file)
--- a/
drivers/spi/designware_spi.c
+++ b/
drivers/spi/designware_spi.c
@@
-160,6
+160,8
@@
static int dw_spi_ofdata_to_platdata(struct udevice *bus)
struct dw_spi_platdata *plat = bus->platdata;
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",