From patchwork Thu Mar 20 17:06:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 332317 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9BDBD2C007A for ; Fri, 21 Mar 2014 04:09:09 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758959AbaCTRHs (ORCPT ); Thu, 20 Mar 2014 13:07:48 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44841 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757079AbaCTRHp (ORCPT ); Thu, 20 Mar 2014 13:07:45 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2KH6hdp023345; Thu, 20 Mar 2014 12:06:43 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KH6hnf012871; Thu, 20 Mar 2014 12:06:43 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 20 Mar 2014 12:06:42 -0500 Received: from khorivan.itg.ti.com (incasgf5a_e1_2.itg.ti.com [10.167.216.36]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KH6SEJ009716; Thu, 20 Mar 2014 12:06:38 -0500 From: Ivan Khoronzhuk To: , , , CC: , , , , , , , , , , , , Murali Karicheri , Ivan Khoronzhuk Subject: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option Date: Thu, 20 Mar 2014 19:06:23 +0200 Message-ID: <1395335184-4745-3-git-send-email-ivan.khoronzhuk@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395335184-4745-1-git-send-email-ivan.khoronzhuk@ti.com> References: <1395335184-4745-1-git-send-email-ivan.khoronzhuk@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Murali Karicheri After testing NAND flash with ubifs for k2hk-emv board were committed that flash doesn't support subpage writing, so we can fix it by adding a property to disable subpage write. Signed-off-by: Murali Karicheri Signed-off-by: Ivan Khoronzhuk --- Documentation/devicetree/bindings/mtd/davinci-nand.txt | 2 ++ drivers/mtd/nand/davinci_nand.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt index cfb18ab..50af930 100644 --- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt +++ b/Documentation/devicetree/bindings/mtd/davinci-nand.txt @@ -53,6 +53,8 @@ Recommended properties : identifier is saved in OOB area. If not present false. +- ti,davinci-nosubpage-write: disable subpage write for the device + Deprecated properties: - ti,davinci-ecc-mode: operation mode of the NAND ecc mode. ECC mode diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 4615d79..3ba058d 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -581,6 +581,9 @@ static struct davinci_nand_pdata of_property_read_bool(pdev->dev.of_node, "ti,davinci-nand-use-bbt")) pdata->bbt_options = NAND_BBT_USE_FLASH; + if (of_property_read_bool(pdev->dev.of_node, + "ti,davinci-no-subpage-write")) + pdata->options |= NAND_NO_SUBPAGE_WRITE; } return dev_get_platdata(&pdev->dev);