mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
spi: dw: Use generic function to read reg address
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>
This commit is contained in:
parent
13fc44e222
commit
c785f43ffd
1 changed files with 2 additions and 0 deletions
|
@ -160,6 +160,8 @@ static int dw_spi_ofdata_to_platdata(struct udevice *bus)
|
||||||
struct dw_spi_platdata *plat = bus->platdata;
|
struct dw_spi_platdata *plat = bus->platdata;
|
||||||
|
|
||||||
plat->regs = dev_read_addr_ptr(bus);
|
plat->regs = dev_read_addr_ptr(bus);
|
||||||
|
if (!plat->regs)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Use 500KHz as a suitable default */
|
/* Use 500KHz as a suitable default */
|
||||||
plat->frequency = dev_read_u32_default(bus, "spi-max-frequency",
|
plat->frequency = dev_read_u32_default(bus, "spi-max-frequency",
|
||||||
|
|
Loading…
Add table
Reference in a new issue