From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-bw0-f218.google.com ([209.85.218.218]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NmK8o-0004VK-LT for linux-mtd@lists.infradead.org; Tue, 02 Mar 2010 04:55:35 +0000 Received: by bwz10 with SMTP id 10so2679057bwz.2 for ; Mon, 01 Mar 2010 20:55:28 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1267188460.30247.10811.camel@macbook.infradead.org> References: <1260178153.25784.28.camel@localhost> <1260185336.3047.0.camel@localhost> <1263372005.2917.21.camel@localhost> <1267188460.30247.10811.camel@macbook.infradead.org> From: Vimal Singh Date: Tue, 2 Mar 2010 10:25:08 +0530 Message-ID: Subject: Re: [PATCH - V2] Add NAND lock/unlock routines To: David Woodhouse Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Linux MTD , dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Feb 26, 2010 at 6:17 PM, David Woodhouse wrot= e: > On Wed, 2010-01-13 at 14:55 +0530, Vimal Singh wrote: >> >> >> @@ -2999,8 +3211,8 @@ int nand_scan_tail(struct mtd_info *mtd) >> >> =A0 =A0 =A0 mtd->read_oob =3D nand_read_oob; >> >> =A0 =A0 =A0 mtd->write_oob =3D nand_write_oob; >> >> =A0 =A0 =A0 mtd->sync =3D nand_sync; >> >> - =A0 =A0 mtd->lock =3D NULL; >> >> - =A0 =A0 mtd->unlock =3D NULL; >> >> + =A0 =A0 mtd->lock =3D nand_lock; >> >> + =A0 =A0 mtd->unlock =3D nand_unlock; >> > >> > What makes you believe it is safe to assign these call-backs here? >> > >> > AFAICS, this means it will be done for all flashes. Do all of them >> > support lock/unlock? I did not investigate this, but I think that >> > probably not. >> >> OK. In that case I'll rather not do it here and do it in my specific >> driver. > > Hm, I'm not sure that's the best approach. It's a function of the NAND > chip, not the controller. We should detect the presence of the feature > from the chip ID, if at all possible. > > I'm happy with your first two patches as part of a three-patch set > though. Thanks. > Thanks David. I'll see the datasheet if chip ID has this information. --=20 Regards, Vimal Singh