From patchwork Fri Apr 21 01:07:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 753050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w8Hdv18Yzz9s73 for ; Fri, 21 Apr 2017 11:07:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pL9xwUlY"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=agner.ch header.i=@agner.ch header.b="v/qLOyU2"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=T4zw55FZRvIu/q+ckNC8vnnmiCBYXjgpyNwdpgNINyY=; b=pL9xwUlY8F4ChTBzxbIuWOMaVC gZchEmNsqW05wcDp0QmI2hXB/CZh0rXiooyeSHxIcCq+h0ZVK74pd2cMXGorY8JDoVUe/uMtGL4f/ 4u+EQWOQl65drJugj+fOIw3gU5t7qvvAa+pddybeiPM54V1d+CHnA45Q5TQc5vmNVBFC7wgn7xvq/ 58M/Mcax6hJuBsc5zFKTTur+71aUawBJ/p4jQLgNn2hVk5gXfZfdMPUHfaGwTVBYiixs8VI3JbkTH 06zNDuJ8K2OO1mnztm2mu877oNGPViLj/vEDHQ1CUffnj0quJsJ7CtY/Da9cE5PvnNPvRNsh2xVZe YpKfpdgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d1N2k-0000JD-PL; Fri, 21 Apr 2017 01:07:26 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d1N22-0007ds-VV; Fri, 21 Apr 2017 01:06:44 +0000 Received: from trochilidae.toradex.int (75-146-58-181-Washington.hfc.comcastbusiness.net [75.146.58.181]) by mail.kmu-office.ch (Postfix) with ESMTPSA id DA7DC5C1BDC; Fri, 21 Apr 2017 03:06:08 +0200 (CEST) From: Stefan Agner To: dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@atmel.com Subject: [PATCH 2/5] mtd: nand: gpmi: add i.MX 7 SoC support Date: Thu, 20 Apr 2017 18:07:52 -0700 Message-Id: <20170421010755.18025-3-stefan@agner.ch> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170421010755.18025-1-stefan@agner.ch> References: <20170421010755.18025-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1492736772; bh=jgKVZCIR7NOuJxKxRgx1f3ngCmZHPR8h86WD57S1oXI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=v/qLOyU2EvJqF45L6S/Cnmo8+cqRGtK2eqNVM+/FBYteJfGxXkL4FhIQ19dkKE+xQLqIVcw/P8R0ddoirTxWM1sZbu48G1e8AaWZGStm4wARVIOQ3+OvUY1GGeGO56TARcNS+4O184MIeM1HMR9iC/5jUDIFCzJNQXgdXMbSKwA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170420_180643_214686_E8BEAE74 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, fabio.estevam@freescale.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner , robh+dt@kernel.org, linux-mtd@lists.infradead.org, kernel@pengutronix.de, han.xu@nxp.com, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, LW@KARO-electronics.de MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add support for i.MX 7 SoC. The i.MX 7 has a slightly different clock architecture requiring only two clocks to be referenced. The IP is slightly different compared to i.MX 6SoloX, but currently none of this differences are in use so there is no detection needed and the driver can reuse IS_MX6SX. Signed-off-by: Stefan Agner --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index c8bbf5da2ab8..4a45d37ddc80 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -127,6 +127,18 @@ static const struct gpmi_devdata gpmi_devdata_imx6sx = { .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), }; +static const char * const gpmi_clks_for_mx7d[] = { + "gpmi_io", "gpmi_bch_apb", +}; + +static const struct gpmi_devdata gpmi_devdata_imx7d = { + .type = IS_MX6SX, + .bch_max_ecc_strength = 62, + .max_chain_delay = 12, + .clks = gpmi_clks_for_mx7d, + .clks_count = ARRAY_SIZE(gpmi_clks_for_mx7d), +}; + static irqreturn_t bch_irq(int irq, void *cookie) { struct gpmi_nand_data *this = cookie; @@ -2071,6 +2083,9 @@ static const struct of_device_id gpmi_nand_id_table[] = { }, { .compatible = "fsl,imx6sx-gpmi-nand", .data = &gpmi_devdata_imx6sx, + }, { + .compatible = "fsl,imx7d-gpmi-nand", + .data = &gpmi_devdata_imx7d, }, {} }; MODULE_DEVICE_TABLE(of, gpmi_nand_id_table);