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: 9691587 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 9C86D6037F for ; Fri, 21 Apr 2017 01:08:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D529201A4 for ; Fri, 21 Apr 2017 01:08:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 817C02846A; Fri, 21 Apr 2017 01:08:19 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D89F201A4 for ; Fri, 21 Apr 2017 01:08:19 +0000 (UTC) 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=dHdXOC7fyiRaz852T3/MHd7+ex92w6PK5E+Qh+csvKA=; b=L1cIkvPocZOceHRULTyNhLhJZm jJkNT7wKC2GHMQGAJCIAaXpgpWg2ryTh+CE69OCTNGcFUt2BDUpc6bqEOgdWigDQgqWp4rXiQp5IF np7giWxp/i6FFUtR6mhv7oUigW79KzMPVbGUSSmBNgK4PEnODPQzlQeowpc7LSaeSKAsHVA7vcRNm nuR3xwdqqrL7OvJBmsQoCYCepR8hhDDH7QXdPJkDB5HjCA7tLXKiDsW5w/CeSAjemM1HANbGCqpV9 g983JepSxWi+OHlfG3NoC11uGKRm9a3y2mvs7z6caqWSP5ig8CPiUn2xQpP4DQII4ibmGfTQEzcMZ VSZcwgfQ==; 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 1d1N3a-0001Wp-AI; Fri, 21 Apr 2017 01:08:18 +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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);