From patchwork Mon Feb 27 22:14:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Tull X-Patchwork-Id: 9594339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A0CA1604A2 for ; Mon, 27 Feb 2017 22:17:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9248127F90 for ; Mon, 27 Feb 2017 22:17:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 870DF28236; Mon, 27 Feb 2017 22:17:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C2EA27F90 for ; Mon, 27 Feb 2017 22:17:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbdB0WPc (ORCPT ); Mon, 27 Feb 2017 17:15:32 -0500 Received: from mail.kernel.org ([198.145.29.136]:54640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbdB0WOo (ORCPT ); Mon, 27 Feb 2017 17:14:44 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09EC4202F0; Mon, 27 Feb 2017 22:14:33 +0000 (UTC) Received: from localhost.localdomain (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98FF2202AE; Mon, 27 Feb 2017 22:14:31 +0000 (UTC) From: Alan Tull To: Greg Kroah-Hartman Cc: Moritz Fischer , Alan Tull , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org Subject: [PATCH 0/5] fpga: ts73xx and iCE40 support Date: Mon, 27 Feb 2017 16:14:21 -0600 Message-Id: <20170227221426.4176-1-atull@kernel.org> X-Mailer: git-send-email 2.11.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-fpga-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Greg, Please take these patches that add FPGA suppport for ts73xx and iCE0 FPGAs. I've done small fixups. drivers/fpga/ice40-spi.c: fix printf format s/%ld/%d/ in 2 places drivers/fpga/ts73xx-fpga.c: remove error message in probe. More details on the fixups: Alan Florian Fainelli (2): FPGA: Add TS-7300 FPGA manager ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300 Joel Holdsworth (3): of: Add vendor prefix for Lattice Semiconductor Documentation: Add binding document for Lattice iCE40 FPGA manager fpga: Add support for Lattice iCE40 FPGAs .../bindings/fpga/lattice-ice40-fpga-mgr.txt | 21 +++ .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/mach-ep93xx/ts72xx.c | 26 +++ drivers/fpga/Kconfig | 13 ++ drivers/fpga/Makefile | 2 + drivers/fpga/ice40-spi.c | 207 +++++++++++++++++++++ drivers/fpga/ts73xx-fpga.c | 156 ++++++++++++++++ 7 files changed, 426 insertions(+) create mode 100644 Documentation/devicetree/bindings/fpga/lattice-ice40-fpga-mgr.txt create mode 100644 drivers/fpga/ice40-spi.c create mode 100644 drivers/fpga/ts73xx-fpga.c diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c index 6a4194be9f00..7fca82023062 100644 --- a/drivers/fpga/ice40-spi.c +++ b/drivers/fpga/ice40-spi.c @@ -163,14 +163,14 @@ static int ice40_fpga_probe(struct spi_device *spi) priv->cdone = devm_gpiod_get(dev, "cdone", GPIOD_IN); if (IS_ERR(priv->cdone)) { ret = PTR_ERR(priv->cdone); - dev_err(dev, "Failed to get CDONE GPIO: %ld\n", ret); + dev_err(dev, "Failed to get CDONE GPIO: %d\n", ret); return ret; } priv->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(priv->reset)) { ret = PTR_ERR(priv->reset); - dev_err(dev, "Failed to get CRESET_B GPIO: %ld\n", ret); + dev_err(dev, "Failed to get CRESET_B GPIO: %d\n", ret); return ret; } diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c index 5acdbcfe447b..f6a96b42e2ca 100644 --- a/drivers/fpga/ts73xx-fpga.c +++ b/drivers/fpga/ts73xx-fpga.c @@ -117,7 +117,6 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) struct device *kdev = &pdev->dev; struct ts73xx_fpga_priv *priv; struct resource *res; - int err; priv = devm_kzalloc(kdev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -132,14 +131,8 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) return PTR_ERR(priv->io_base); } - err = fpga_mgr_register(kdev, "TS-73xx FPGA Manager", - &ts73xx_fpga_ops, priv); - if (err) { - dev_err(kdev, "failed to register FPGA manager\n"); - return err; - } - - return err; + return fpga_mgr_register(kdev, "TS-73xx FPGA Manager", + &ts73xx_fpga_ops, priv); } static int ts73xx_fpga_remove(struct platform_device *pdev)