From patchwork Thu Mar 22 21:55:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 132313 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1377066ljb; Thu, 22 Mar 2018 14:55:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELs8pBhTvXnBN9qMx5TMPOkBYzSAgnl3S9Ko+K0kLoSKnwqGOPjZi9ttmYnOgpRmxNi08n6U X-Received: by 10.80.215.74 with SMTP id i10mr26534874edj.95.1521755708932; Thu, 22 Mar 2018 14:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521755708; cv=none; d=google.com; s=arc-20160816; b=cQ8xdGCUokiXTzMVnI8CizdNgzlwjzA+8ZNAmC2wCycvJplGM+yVnI1RiaBHYIC8xn kF8NK7OZCyC2xI1slBMjGJM4FTvPDDSsDlQ3QBIyDwvAXhQexhBV5M3YOE+5uifRlgZl F9ppskjqNUZ70PJdrnOclR8O42l5jheO6BrtvYJNju4lRWnauS2Y0X8I9V9rGb1tfofD IdMA+1opo8EK2VYun5VN8+yH4sQlm4znL28XFSXIt60nsFeFMFCWdrcCSntLj913nMez 2HX3VbFmDgAWaphN9YLdD4SsoTDJtS8Nph6pGAf/wlOd8sohsKVFCUygqAP60sogHblj JsAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=m2febWktm9BTLWXhrHOUQpe7VLtocpAROw+UHNv0aJ8=; b=MZETNtV6WNA1pMePlVZB+rp50RbaGP5L/iKxPq5SGvliXt0JDT6V1lTegClFwBHRHU 0TPD5a+rp77VOA4z5yM6Gnd53fIkU+oVop7VM8si7NxjmeQ9ybe+xcVd/G29nsJ9Q9UP QLfaXbWSN9b4W3coK5oeF5mXn4Tb73r5ceWboKi+RdQ3RGzg1K6DgTyPDZ7KXy3x7Ugs m62b+dz2OHVy5Rc5Sk0tknOfiPTi8uavt9Q0UMe4IkeSSpUMbNJsvSCgjr0OgfP9YSKB uIaS5Dn+U4Lp4iGkBguONtvy9Ia9QP8YGpoXXfDgwPR4KENqUuuhhAl2KQHk8VdJs0mT FOuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id n42si1303094edd.444.2018.03.22.14.55.08; Thu, 22 Mar 2018 14:55:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: by lists.denx.de (Postfix, from userid 105) id 838F4C21DF9; Thu, 22 Mar 2018 21:55:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9A4FEC21C6A; Thu, 22 Mar 2018 21:55:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91102C21C6A; Thu, 22 Mar 2018 21:55:04 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id 4E8A1C21BE5 for ; Thu, 22 Mar 2018 21:55:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id 06C6B274262 Received: by beast.luon.net (Postfix, from userid 1000) id 25B753E2302; Thu, 22 Mar 2018 22:55:02 +0100 (CET) From: Sjoerd Simons To: u-boot@lists.denx.de Date: Thu, 22 Mar 2018 22:55:02 +0100 Message-Id: <20180322215502.3726-1-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.16.2 Cc: Jagan Teki Subject: [U-Boot] [PATCH] omap3: spi: Correct ti, pindir-d0-out-d1-in parsing X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/spi/omap3_spi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 053a67bbe0..1ac691a68e 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -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; }