From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from co202.xi-lite.net ([149.6.83.202]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1P8yNK-0006F3-Kn for linux-mtd@lists.infradead.org; Thu, 21 Oct 2010 16:52:23 +0000 Message-ID: <4CC06FC2.2060406@parrot.com> Date: Thu, 21 Oct 2010 18:52:18 +0200 From: Matthieu CASTET MIME-Version: 1.0 To: Florian Fainelli Subject: Re: [PATCH 3/3 v3] NAND: add support for reading ONFI parameters from NAND device References: <201008301832.24672.florian@openwrt.org> In-Reply-To: <201008301832.24672.florian@openwrt.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Cc: David Woodhouse , Artem Bityutskiy , "linux-mtd@lists.infradead.org" , Brian Norris , Maxime Bizon List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Florian Fainelli a écrit : > This patch adds support for reading NAND device ONFI parameters and use > the ONFI informations to define its geometry. In case the device supports > ONFI, the onfi_version field in struct nand_chip contains the version (BCD) > and the onfi_params structure can be used by drivers to set up timings and > such. We currently only support ONFI 1.0 parameters. > > Signed-off-by: Brian Norris > Signed-off-by: Matthieu Castet > Signed-off-by: Maxime Bizon > Signed-off-by: Florian Fainelli > --- chip->cmdfunc = nand_command_lp; > > + /* TODO onfi flash name */ > printk(KERN_INFO "NAND device: Manufacturer ID:" > - " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, dev_id, > - nand_manuf_ids[maf_idx].name, type->name); > + " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, *dev_id, > + nand_manuf_ids[maf_idx].name, > + chip->onfi_version ? type->name:chip->onfi_params.model); > I don't know if it has been noticed but it should be chip->onfi_version ? chip->onfi_params.model : type->name Matthieu