summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorVipul Kumar <vipul.kumar@xilinx.com>2018-06-30 08:15:20 +0530
committerJagan Teki <jagan@amarulasolutions.com>2018-07-16 14:01:20 +0530
commit6e9d9fcb4cfc869dfad9d9207f44595e7ce17a95 (patch)
tree539196bc458ba2e613a357898183b1d2fc4f48b7 /drivers/spi
parent83ce646943f6bc8eb3a42e68eb53bbbe6c40123f (diff)
spi: xilinx_spi: convert to livetree
Update the xilinx spi driver to support a live tree. Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/xilinx_spi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 8621738b76..2b5f2cf548 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -113,10 +113,9 @@ static int xilinx_spi_probe(struct udevice *bus)
struct xilinx_spi_priv *priv = dev_get_priv(bus);
struct xilinx_spi_regs *regs = priv->regs;
- priv->regs = (struct xilinx_spi_regs *)devfdt_get_addr(bus);
+ priv->regs = (struct xilinx_spi_regs *)dev_read_addr(bus);
- priv->fifo_depth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(bus),
- "fifo-size", 0);
+ priv->fifo_depth = dev_read_u32_default(bus, "fifo-size", 0);
writel(SPISSR_RESET_VALUE, &regs->srr);