Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752770AbbH1TmN (ORCPT ); Fri, 28 Aug 2015 15:42:13 -0400 Received: from mail-bn1bon0133.outbound.protection.outlook.com ([157.56.111.133]:53088 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752341AbbH1Tlq (ORCPT ); Fri, 28 Aug 2015 15:41:46 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=freescale.com; From: Han Xu To: CC: , , , , , , , , , , Subject: [PATCH v3 6/6] mtd: nand: gpmi: support NAND on i.MX6UL Date: Fri, 28 Aug 2015 14:32:45 -0500 Message-ID: <1440790365-28072-7-git-send-email-b45815@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440790365-28072-1-git-send-email-b45815@freescale.com> References: <1440790365-28072-1-git-send-email-b45815@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD053;1:WCO1gzAa6OBexYFn5H2jXKGmv/dKWoIq2mK6WALEwTA2UXhVDHS1AH3R3V4zsHxlLkU5vkWRH/QPbd0P/NhTkXFFA/oeEE+nZ04Gf4RRLOR+7GEVlqs5pa3wLlO0q8oX0s9Mht5+Tt9O0kLEGcfojKJ3sUsR+c8YB0mmKbvAvKgDtxJi4MXWFnv5OOhb6DxDINoymzfsTW8xzQVEBVZ/GVIOtb+pVnCePcUdslMZCog1iyQ38kpeE0cy8gTL+zxHm8ocgmivs0PQHdVxRKCXbBtVP21/aQ7pjCt9Io5hDoPxUQlCRQb/9iRrUAbKV8vypngC6q7AI+4zdZObd2+DHU8VjMpR3S909WVXL+3w9aId0SdSC0X11igDjW/N/DFk6gs+6F0V6ZAhQLwRu1FFDsVgB/VGmDIxEl37Ft7o6ug= X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(199003)(189002)(62966003)(189998001)(110136002)(76176999)(50986999)(77156002)(6806004)(47776003)(64706001)(33646002)(77096005)(50226001)(5001860100001)(68736005)(104016003)(5001830100001)(5001960100002)(50466002)(36756003)(85426001)(2950100001)(48376002)(81156007)(92566002)(87936001)(2351001)(229853001)(4001540100001)(97736004)(5007970100001)(105606002)(19580405001)(46102003)(19580395003)(5003940100001)(106466001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB548;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB548;2:KQksdVFbvG7g2apV1SdXac5WQ3OXqVxTgUiJvVBTWzPjfdBl2TDblenkzwEVilnUXdJB8EWj9xd2mSAqEQeQAt0GDViVhSHKkw+A7L6d4MBvvJMb2pv/remye/OOlUvs4n0XJ09hZ0c2VEuDCtWyEvQUzkiLiYxt3g7OPXS1SBo=;3:eFOzKyThTxgKUit5qbVwqWlT5dN5PhOwI7zXO/Nc75Z9TBME0NdOqtvYU3GTgCmadyH9kY6PcX2va/toMT/UVJiKDZvRiEpbNjpELeBh9ZRXaw5yQ1mUkVu1U3yvloVVffTebz2iTvQJgl5aPNDRemG0RFeCfI09gI2lfRZEBdvQzJg5akR1dZfm+Lan4Wbdwig5nd2MOofUIdzMHmDJJuWPL1NO0RvlhZuJs8X8z+A=;25:TokVOZDCgH3nQOtJyQRRuxdeXICItrYQdeoCnE0vEyg/2B6CSclAZNAfDRc1SbaoPKAhldcwuXmx06j5EJPnYMkJdCnxIIGZM9khHgsPYuo9Itsdr4CrskfsWnZIdhjCpH2iLk/O/fShDmyXjUZTr7LYuRAUcl6+i3+GWwK4tvNjNeknH0dWmiP1YUEV6x8xP7/KW4ULeSgJwIKI5uivxVmo/4vk0kukKjIU5RBxgyDkRgw5//USpkZSWqrTSRd5Oitu3LOy1KREAhX5BZpLWw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB548; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB548;20:h3sSD8tJkLvuRYXcttTkWtvSOY2wNBCJVJtERohmbDIwC1p9Q9hRuUDdMl6pzOMB/BQvB81IL4kCNRMJ3KZdwQ22KsVHhkPUrJSUng17yPpGx1KYjMisZ9RUoTxl8eSSjHOU1x4d9JOMNSy/1sNBMtbh9VpTcRVsb7SbflEakOzok8WAekJYoZCDAZjcg5TWDjcPh0aua+avD3njAsflUuzWJtzn7m0vaUa39d6JGgIz7r28VY7+zxfleAWal0QCk3uIUxC5i760zyyuCDF3Q6lO8rlt0TmCsxR9UOiMoBjLPu76QrkDurJ0rn5+orL9ZJdQGUGtLOZNrjJukStg2dF/6O7hYZJA/y5tQXtUprA=;4:zacNFrkuuz6IXyqW4jmudn3b0BnVLU28OL03Nn85u/yN5SDE8XRLWqWPuTXGdMwBUqbE8L0KaEjrBwtfVZ2XdQGWzzH5vkFbfzBLlAPXdCiCn/oDkNm1FH6JVfgCTQ66i7wJahS2BzJYC2Qzs00KKfCSgxYHOJEdgziqojjXidX763zXsiZNNrVcLXpJ3KTSlbqxAX9Ot2JMU+CktoKYfzjDyyz78/tH40XVjnQyun4FqbnLx+nlQqYqyBFT8/nTw/dr9dfF5t4j5mbPujE52UuA0dNUwX6iC1ihW9rFDWxT1d0IfN88fWTbnOUr9KFs X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:BL2PR03MB548;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB548; X-Forefront-PRVS: 0682FC00E8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB548;23:Qbb6RZ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q?TpVdtXm+695HxdQcbFXb4e05kTLvStLxbrMHg9+Jw8pQqL4zcy0qWrpMGKcb?= =?us-ascii?Q?H9NL+7lvWnRPC1IKAmrq25ROrsL9v29JEm9vf4s4P54poTeKLyOC873/QRjx?= =?us-ascii?Q?tfqeJrnpcltlxMG8KzRjPflG/rjydcUAITRDTHnzriEl0jf7ReQa5g7ejuxf?= =?us-ascii?Q?6SS2rdWETsHBpim6ZDxrMwVrxWZKRVkRH9k/C/PsdLEHdvRVOGh6qfx5B8sb?= =?us-ascii?Q?LRUw0h7YGO7xcfzeDSY8Y8MvLM2TUd?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB548;5:RZU81cJehjwXSV5ARAflBSKghSfOK0NhJiUjvirnuBtrze7ClVAa62UJpQqTAI7W6oPAbK+TZmCmuWJSYvMc5SwSc3yW/E5KdsgTkzO7c9gDPjcfVeaQDVUo3C9ohHq/34OMoH9R2SrRdc4Brnw/xw==;24:8QVrUg50dS0XfvY1z1vSEz2BCxM6lH1+Tcfu4iOQIQWW+19QlK/ut26GpRcThPGoHXX0W46EXw+F6+LQT+47yLyzfjjoNPQqcOico5/0Ev0=;20:4vSIcEtd+0yFSzzEW3m7v5vHLwnUhmgAmmgi3cnlOe1sFvBScv+udsOUn5ALgubnR8/6NU6zhSjkUT1RPYgJIg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2015 19:41:43.4048 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB548 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2193 Lines: 66 support GPMI NAND on i.MX6UL Signed-off-by: Han Xu --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 9 +++++++++ drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 4312de2..2fffde4 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -89,6 +89,12 @@ static const struct gpmi_devdata gpmi_devdata_imx7d = { .max_chain_delay = 12, }; +static const struct gpmi_devdata gpmi_devdata_imx6ul = { + .type = IS_MX6UL, + .bch_max_ecc_strength = 40, + .max_chain_delay = 12, +}; + static irqreturn_t bch_irq(int irq, void *cookie) { struct gpmi_nand_data *this = cookie; @@ -2016,6 +2022,9 @@ static const struct of_device_id gpmi_nand_id_table[] = { .compatible = "fsl,imx6sx-gpmi-nand", .data = &gpmi_devdata_imx6sx, }, { + .compatible = "fsl,imx6ul-gpmi-nand", + .data = (void *)&gpmi_devdata_imx6ul, + }, { .compatible = "fsl,imx7d-gpmi-nand", .data = (void *)&gpmi_devdata_imx7d, } diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h index 149a442..331f98e 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h @@ -126,6 +126,7 @@ enum gpmi_type { IS_MX6QP, IS_MX6SX, IS_MX7D, + IS_MX6UL, }; struct gpmi_devdata { @@ -310,8 +311,9 @@ void gpmi_copy_bits(u8 *dst, size_t dst_bit_off, #define GPMI_IS_MX6QP(x) ((x)->devdata->type == IS_MX6QP) #define GPMI_IS_MX6SX(x) ((x)->devdata->type == IS_MX6SX) #define GPMI_IS_MX7D(x) ((x)->devdata->type == IS_MX7D) +#define GPMI_IS_MX6UL(x) ((x)->devdata->type == IS_MX6UL) #define GPMI_IS_MX6(x) (GPMI_IS_MX6Q(x) || GPMI_IS_MX6QP(x)\ - || GPMI_IS_MX6SX(x)) + || GPMI_IS_MX6SX(x) || GPMI_IS_MX6UL(x)) #define GPMI_IS_MX7(x) (GPMI_IS_MX7D(x)) #endif -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/