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: 26743 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E9961202E0 for ; Thu, 20 Mar 2014 17:08:02 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kq14sf2876628pab.6 for ; Thu, 20 Mar 2014 10:08:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=+uMMSJFKdphgXrEvPIcBUvI4uPXNp92EfGtnGYN3EPo=; b=YG19pTGTp+/arRg0IKyH2ToTrL2p7PY26u/GUrjE/FM9b5hneBDh45GyHVTE92LA6r jM2TFFtyaOHlII+EGUkMKDcX1cenviuA1GaLpR7FpKaCK4r4/4ePpuysPeTrs9PRUz99 J1yna4RBNGbcdcqsff+rXF7su9ZW/KVR12/7mLs/1debzWeMIbaG5fxVBNojutNBO8h6 zS9D4z9iS+FQvFWAJtwJIzbBFgZzZ0e7g2tEW9pAmqdInDPcYrTbhuYq3yt+4xmja45A et9zTDl7C/rvMBk4Bkpp02MuqrZpk1rYw8LKbFU0wg9qtLxPp0LjgbW8Rf87Z5N6kgq1 HNMA== X-Gm-Message-State: ALoCoQk5VHHqQ3Evx0qqDMli46UZ4PNEU622ooizNU8PHy1DlV7GFLoFFaRsPWa9hR0bnqb2Z/qE X-Received: by 10.67.4.202 with SMTP id cg10mr17012806pad.42.1395335282051; Thu, 20 Mar 2014 10:08:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.35 with SMTP id m32ls312584qgd.81.gmail; Thu, 20 Mar 2014 10:08:01 -0700 (PDT) X-Received: by 10.53.1.69 with SMTP id be5mr14702337vdd.27.1395335281927; Thu, 20 Mar 2014 10:08:01 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id kj3si574602vdb.69.2014.03.20.10.08.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 10:08:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id la4so1311858vcb.31 for ; Thu, 20 Mar 2014 10:08:01 -0700 (PDT) X-Received: by 10.58.4.3 with SMTP id g3mr711231veg.61.1395335281845; Thu, 20 Mar 2014 10:08:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp404659vck; Thu, 20 Mar 2014 10:08:01 -0700 (PDT) X-Received: by 10.68.170.36 with SMTP id aj4mr49769422pbc.54.1395335280924; Thu, 20 Mar 2014 10:08:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si1841617pbn.403.2014.03.20.10.08.00; Thu, 20 Mar 2014 10:08:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759320AbaCTRHw (ORCPT + 26 others); Thu, 20 Mar 2014 13:07:52 -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: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);