From patchwork Mon Oct 12 23:16:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mark A. Greer" X-Patchwork-Id: 53261 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9CNJQl5009475 for ; Mon, 12 Oct 2009 23:19:27 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9CNH6tC018835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Oct 2009 18:17:06 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n9CNH5mI010667; Mon, 12 Oct 2009 18:17:06 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 3BC4380627; Mon, 12 Oct 2009 18:17:05 -0500 (CDT) X-Original-To: Davinci-linux-open-source@linux.davincidsp.com Delivered-To: Davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id EDFDD80626 for ; Mon, 12 Oct 2009 18:17:02 -0500 (CDT) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id n9CNH259018962 for ; Mon, 12 Oct 2009 18:17:02 -0500 (CDT) Received: from mail176-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.114]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9CNH1cg013323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 12 Oct 2009 18:17:02 -0500 Received: from mail176-va3 (localhost.localdomain [127.0.0.1]) by mail176-va3-R.bigfish.com (Postfix) with ESMTP id 436174702D8 for ; Mon, 12 Oct 2009 23:17:01 +0000 (UTC) X-SpamScore: 7 X-BigFish: vps7(zza4b1ozz1202hzzz2dh6bh61h) X-Spam-TCS-SCL: 0:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 63.81.120.158; Service: EHS Received: by mail176-va3 (MessageSwitch) id 1255389415143291_23934; Mon, 12 Oct 2009 23:16:55 +0000 (UCT) Received: from VA3EHSMHS030.bigfish.com (unknown [10.7.14.249]) by mail176-va3.bigfish.com (Postfix) with ESMTP id 1F88A9E8056 for ; Mon, 12 Oct 2009 23:16:55 +0000 (UTC) Received: from gateway-1237.mvista.com (63.81.120.158) by VA3EHSMHS030.bigfish.com (10.7.99.40) with Microsoft SMTP Server id 14.0.482.32; Mon, 12 Oct 2009 23:16:54 +0000 Received: from mag.az.mvista.com (mag.az.mvista.com [10.50.1.99]) by hermes.mvista.com (Postfix) with ESMTP id B87EE1BB84; Mon, 12 Oct 2009 16:16:37 -0700 (PDT) Received: from mgreer by mag.az.mvista.com with local (Exim 4.69) (envelope-from ) id 1MxU85-0005Uj-FL; Mon, 12 Oct 2009 16:16:37 -0700 Date: Mon, 12 Oct 2009 16:16:37 -0700 From: "Mark A. Greer" To: linux-mtd@lists.infradead.org Message-ID: <20091012231637.GA21098@mag.az.mvista.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Reverse-DNS: unknown Cc: Davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH] mtd: Add bad block table overrides to Davinci NAND driver X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h index b520c4b..b2ad809 100644 --- a/arch/arm/mach-davinci/include/mach/nand.h +++ b/arch/arm/mach-davinci/include/mach/nand.h @@ -79,6 +79,10 @@ struct davinci_nand_pdata { /* platform_data */ /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ unsigned options; + + /* Main and mirror bbt descriptor overrides */ + struct nand_bbt_descr *bbt_td; + struct nand_bbt_descr *bbt_md; }; #endif /* __ARCH_ARM_DAVINCI_NAND_H */ diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 68cc924..fe3eba8 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -591,6 +591,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev) /* options such as NAND_USE_FLASH_BBT or 16-bit widths */ info->chip.options = pdata->options; + info->chip.bbt_td = pdata->bbt_td; + info->chip.bbt_md = pdata->bbt_md; info->ioaddr = (uint32_t __force) vaddr;