spi: xilinx_spi: convert to livetree
authorVipul Kumar <vipul.kumar@xilinx.com>
Sat, 30 Jun 2018 02:45:20 +0000 (08:15 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 16 Jul 2018 08:31:20 +0000 (14:01 +0530)
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>
drivers/spi/xilinx_spi.c

index 8621738b76534dfa8baf4ebe1636432bcde89bec..2b5f2cf54838251c7e4a277629e4d4c371b60596 100644 (file)
@@ -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);