From patchwork Wed Oct 14 08:42:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 35930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 55932B7B6F for ; Wed, 14 Oct 2009 19:46:48 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MxzRU-0008OA-Us; Wed, 14 Oct 2009 08:42:44 +0000 Received: from smtp.nokia.com ([192.100.105.134] helo=mgw-mx09.nokia.com) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MxzRM-0007r7-1l; Wed, 14 Oct 2009 08:42:40 +0000 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9E8g0Do013339; Wed, 14 Oct 2009 03:42:30 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Oct 2009 11:42:28 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Oct 2009 11:42:23 +0300 Received: from [172.21.40.36] (esdhcp04036.research.nokia.com [172.21.40.36]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9E8gJaF002714; Wed, 14 Oct 2009 11:42:20 +0300 Subject: RE: [PATCH 1/2] Update ts72xx to use generic platform nand driver From: Artem Bityutskiy To: H Hartley Sweeten In-Reply-To: References: <1255260621.16942.38.camel@localhost> Date: Wed, 14 Oct 2009 11:42:19 +0300 Message-Id: <1255509739.32489.123.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) X-OriginalArrivalTime: 14 Oct 2009 08:42:23.0573 (UTC) FILETIME=[40057050:01CA4CAA] X-Nokia-AV: Clean X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20091014_044236_192893_7D34A94D X-CRM114-Status: GOOD ( 22.73 ) X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.100.105.134 listed in list.dnswl.org] Cc: Matthieu Crapet , linux-mtd@lists.infradead.org, David Woodhouse , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Sun, 2009-10-11 at 17:19 -0400, H Hartley Sweeten wrote: > Update the ts72xx platform's nand driver support. > > This changes the ts72xx platform from using a custom nand driver > (ts7250.c) to the generic platform nand driver (plat_nand.c). > > Tested on TS-7250 with 32MB NAND. > > Signed-off-by: H Hartley Sweeten > Tested-by: Matthieu Crapet > Cc: David Woodhouse > Cc: Artem Bityutskiy > Cc: > Cc: > > --- > > V2 - rebased to current mtd tree (Artem Bityutskiy) > > arch/arm/mach-ep93xx/ts72xx.c | 177 +++++++++++++++++++++++++++++------------ > 1 files changed, 125 insertions(+), 52 deletions(-) Ok, I've tried this patch on both mtd-2.6 and linux-2.6 git trees, and it does not apply cleanly. [dedekind@eru mtd-2.6]$ git am ../l2-mtd-2.6.git/sweeten1 Applying: RE: [PATCH 1/2] Update ts72xx to use generic platform nand driver error: patch failed: arch/arm/mach-ep93xx/ts72xx.c:54 error: arch/arm/mach-ep93xx/ts72xx.c: patch does not apply Patch failed at 0001 RE: [PATCH 1/2] Update ts72xx to use generic platform nand driver When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [dedekind@eru mtd-2.6]$ patch -p1 < .git/rebase-apply/patch patching file arch/arm/mach-ep93xx/ts72xx.c Hunk #2 succeeded at 56 with fuzz 1. Ok, I can do things manually: [dedekind@eru mtd-2.6]$ git update-index arch/arm/mach-ep93xx/ts72xx.c [dedekind@eru mtd-2.6]$ git am --resolved Applying: RE: [PATCH 1/2] Update ts72xx to use generic platform nand driver But then the second patch does not apply anyway: [dedekind@eru mtd-2.6]$ git am ../l2-mtd-2.6.git/sweeten2 Applying: RE: [PATCH 2/2] Remove now-defunct ts7250 nand driver error: patch failed: drivers/mtd/nand/ts7250.c:1 error: drivers/mtd/nand/ts7250.c: patch does not apply Patch failed at 0001 RE: [PATCH 2/2] Remove now-defunct ts7250 nand driver When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [dedekind@eru mtd-2.6]$ patch -p1 < .git/rebase-apply/patch patching file arch/arm/mach-ep93xx/include/mach/ts72xx.h patching file drivers/mtd/nand/Kconfig patching file drivers/mtd/nand/Makefile patching file drivers/mtd/nand/ts7250.c Reversed (or previously applied) patch detected! Assume -R? [n] ^C This is where I'm in the mtd-2.6.git tree, for reference. [dedekind@eru mtd-2.6]$ git show commit e4af3bf6334341435740fce9ff236ba814686b99 Author: Claudio Scordino Date: Wed Oct 7 14:27:07 2009 +0200 mtd: atmel_nand: unused variable removed Unused variable "eccpos" removed from atmel_nand driver. Signed-off-by: Claudio Scordino Signed-off-by: David Woodhouse /* get the first 2 ECC bytes */ diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index f8e9975..4f62d20 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -192,7 +192,6 @@ static int atmel_nand_calculate(struct mtd_info *mtd, { struct nand_chip *nand_chip = mtd->priv; struct atmel_nand_host *host = nand_chip->priv; - uint32_t *eccpos = nand_chip->ecc.layout->eccpos; unsigned int ecc_value;