From patchwork Wed Jun 27 10:46:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 167609 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 40C4FB7024 for ; Wed, 27 Jun 2012 20:44:34 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sjpi7-0008Nx-Eg; Wed, 27 Jun 2012 10:42:59 +0000 Received: from mga01.intel.com ([192.55.52.88]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sjphw-0008N0-AW; Wed, 27 Jun 2012 10:42:49 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 27 Jun 2012 03:42:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="asc'?scan'208";a="185556422" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 27 Jun 2012 03:42:46 -0700 Received: from [10.237.72.167] (sauron.fi.intel.com [10.237.72.167]) by linux.intel.com (Postfix) with ESMTP id 2C32E6A4007; Wed, 27 Jun 2012 03:42:44 -0700 (PDT) Message-ID: <1340794007.29342.50.camel@sauron.fi.intel.com> Subject: Re: [PATCH v7] MTD: LPC32xx SLC NAND driver From: Artem Bityutskiy To: Roland Stigge Date: Wed, 27 Jun 2012 13:46:47 +0300 In-Reply-To: <1339064536-20553-1-git-send-email-stigge@antcom.de> References: <1339064536-20553-1-git-send-email-stigge@antcom.de> X-Mailer: Evolution 3.2.3 (3.2.3-3.fc16) Mime-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.88 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedekind1[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.8 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 FSL_FREEMAIL_1 FSL_FREEMAIL_1 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 3.2 TVD_SUBJ_NUM_OBFU_MINFP TVD_SUBJ_NUM_OBFU_MINFP Cc: srinivas.bakki@nxp.com, lars@metafoo.de, linux@arm.linux.org.uk, linux-doc@vger.kernel.org, leiwen@marvell.com, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, kevin.wells@nxp.com, b32955@freescale.com, linux-mtd@lists.infradead.org, hechtb@googlemail.com, dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 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 Thu, 2012-06-07 at 12:22 +0200, Roland Stigge wrote: > This patch adds support for the SLC NAND controller inside the LPC32xx SoC. > > Signed-off-by: Roland Stigge Now the write_page and write_page_raw functions return an error code, see this commit in the l2 tree: http://git.infradead.org/users/dedekind/l2-mtd.git/commit/49c8d9ab3b70732665249f2d993f734378ebbba9 I've amended your SLC driver, see below the diff. But I think it could return the real return code becuse it can fail - could you please take a look and send an incremental patch? Please, base your work on top of the l2-mtd tree: git://git.infradead.org/users/dedekind/l2-mtd.git Thanks! diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 796e37b..7e2e78d 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c @@ -673,9 +673,9 @@ static int lpc32xx_nand_read_page_raw_syndrome(struct mtd_info *mtd, * Write the data and OOB data to the device, use ECC with the data, * disable ECC for the OOB data */ -static void lpc32xx_nand_write_page_syndrome(struct mtd_info *mtd, - struct nand_chip *chip, - const u8 *buf, int oob_required) +static int lpc32xx_nand_write_page_syndrome(struct mtd_info *mtd, + struct nand_chip *chip, + const u8 *buf, int oob_required) { struct lpc32xx_nand_host *host = chip->priv; u8 *pb = chip->oob_poi + chip->ecc.layout->eccpos[0]; @@ -691,20 +691,22 @@ static void lpc32xx_nand_write_page_syndrome(struct mtd_info *mtd, /* Write ECC data to device */ chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); + return 0; } /* * Write the data and OOB data to the device, no ECC correction with the * data or OOB data */ -static void lpc32xx_nand_write_page_raw_syndrome(struct mtd_info *mtd, - struct nand_chip *chip, - const u8 *buf, - int oob_required) +static int lpc32xx_nand_write_page_raw_syndrome(struct mtd_info *mtd, + struct nand_chip *chip, + const u8 *buf, + int oob_required) { /* Raw writes can just use the FIFO interface */ chip->write_buf(mtd, buf, chip->ecc.size * chip->ecc.steps); chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); + return 0; } static bool lpc32xx_dma_filter(struct dma_chan *chan, void *param)