From patchwork Wed Dec 14 02:28:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9473619 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 660D16021C for ; Wed, 14 Dec 2016 02:31:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58589286DF for ; Wed, 14 Dec 2016 02:31:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C8AC286EB; Wed, 14 Dec 2016 02:31:30 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0DF52286DF for ; Wed, 14 Dec 2016 02:31:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGzKI-0002Lp-Jh; Wed, 14 Dec 2016 02:29:50 +0000 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGzJj-0002BX-EU for linux-arm-kernel@lists.infradead.org; Wed, 14 Dec 2016 02:29:17 +0000 Received: by mail-oi0-x244.google.com with SMTP id v84so772302oie.2 for ; Tue, 13 Dec 2016 18:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BOm40tLSg8+a5i8egBSFDOQpb9lwZz0hB1XiabNqyRY=; b=w+Dp2uZMNV9h4fW4HzLtBPL+qkfzB5OIuN/Mcg19Se7DP/uwmD147/71QFcKAEG1fw aY3HiORmsr3nawhbTB7deM0VMMF0A/sUBETCh18dwzA+hD9mjfqBoJaxMr7xf1SjNOMt nStmkTTaGZNkzQyR/xzhrtp1c6d3e0Kljy+Q9uKPKleb2/qt4S6RYIDvukGqRe7KzlUY nvB4WCMeNLtLfbIUCX20Zifo5/v51lOdpGz0pf06DTTm5eWV1WeY61Fibc3+nPp5kz5g M0gyUZ31yfP10v/FxIE6cwE+c4QAZ7iiuAkryiXjY/MS4pwwU1zcODfUHG3qG7BiEyzh e6Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BOm40tLSg8+a5i8egBSFDOQpb9lwZz0hB1XiabNqyRY=; b=T1pWJ14U3YKLVyDpipg46xyRyDvCDkOU30FsWMpBVUemkP8yPnT5QNbylV1UJ7/obq p07j2yf4iAv326G9eUbe3f2F+lBixN3cvnq110n1DOohXEL6opjunHkj5W/SkTGAvarE 4vzATOxZxPKJxu7M6WEaQLgB+9gHkYQ2ofaIdOGe8XE/vOYuojwkquyJmxJofanbJfqU H4b6HG178LFakVfoIskENvxrsqkWjxmdsNOx3wo7J5t+9/ULxsdG+9ly4SdffiQQK19a R7kPb3gFRxefiy4nDUngYzWCiVGlGYj5rhIYRSCNoAXZ4cMPM9rbisy059NwYPEBlaik i4kw== X-Gm-Message-State: AKaTC00Wdsr+QDp/lI/s8hDGDM7QIHzh5Darjb7+w8Ut8vW8pNhiXK/eMytbb2nOsdCkeQ== X-Received: by 10.157.6.7 with SMTP id 7mr59822589otn.43.1481682534209; Tue, 13 Dec 2016 18:28:54 -0800 (PST) Received: from fainelli-laptop.lan ([2001:470:d:73f:5129:7af2:33f2:9a35]) by smtp.gmail.com with ESMTPSA id l37sm19838021otd.33.2016.12.13.18.28.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2016 18:28:53 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300 Date: Tue, 13 Dec 2016 18:28:44 -0800 Message-Id: <20161214022845.5692-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161214022845.5692-1-f.fainelli@gmail.com> References: <20161214022845.5692-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161213_182915_624025_3DCF6614 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linxu-fpga@vger.kernel.org, moritz.fischer@ettus.com, Florian Fainelli , rmallon@gmail.com, atull@opensource.altera.com, linux@armlinux.org.uk, hsweeten@visionengravers.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Register the TS-7300 FPGA manager device drivers which allows us to load bitstreams into the on-board Altera Cyclone II FPGA. Signed-off-by: Florian Fainelli --- arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 3b39ea353d30..acf72ea670ef 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -230,6 +230,28 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = { .phy_id = 1, }; +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX) + +/* Relative to EP93XX_CS1_PHYS_BASE */ +#define TS73XX_FPGA_LOADER_BASE 0x03c00000 + +static struct resource ts73xx_fpga_resources[] = { + { + .start = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, + .end = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device ts73xx_fpga_device = { + .name = "ts73xx-fpga-mgr", + .id = -1, + .resource = ts73xx_fpga_resources, + .num_resources = ARRAY_SIZE(ts73xx_fpga_resources), +}; + +#endif + static void __init ts72xx_init_machine(void) { ep93xx_init_devices(); @@ -238,6 +260,10 @@ static void __init ts72xx_init_machine(void) platform_device_register(&ts72xx_wdt_device); ep93xx_register_eth(&ts72xx_eth_data, 1); +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX) + if (board_is_ts7300()) + platform_device_register(&ts73xx_fpga_device); +#endif } MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")