]> git.sur5r.net Git - u-boot/commitdiff
omap3: spi: Correct ti, pindir-d0-out-d1-in parsing
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Thu, 22 Mar 2018 21:55:02 +0000 (22:55 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 23 Mar 2018 17:33:29 +0000 (23:03 +0530)
The ti,pindir-d0-out-d1-in property is not expected to have a value
according to the device-tree binding, so treat it as a boolean not a
uint property.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/omap3_spi.c

index 053a67bbe0f2d2a470a6916950c75f746bae8171..1ac691a68e7a2404dcaa7a6c2cbbda68bf3dd30f 100644 (file)
@@ -630,8 +630,10 @@ static int omap3_spi_probe(struct udevice *dev)
                (struct omap2_mcspi_platform_config*)dev_get_driver_data(dev);
 
        priv->regs = (struct mcspi *)(devfdt_get_addr(dev) + data->regs_offset);
-       priv->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in",
-                                           MCSPI_PINDIR_D0_IN_D1_OUT);
+       if (fdtdec_get_bool(blob, node, "ti,pindir-d0-out-d1-in"))
+               priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
+       else
+               priv->pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT;
        priv->wordlen = SPI_DEFAULT_WORDLEN;
        return 0;
 }