From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wend5-0001wn-A9 for linux-mtd@lists.infradead.org; Mon, 28 Apr 2014 15:38:03 +0000 Received: by mail-pd0-f172.google.com with SMTP id w10so5852819pde.17 for ; Mon, 28 Apr 2014 08:37:41 -0700 (PDT) Date: Mon, 28 Apr 2014 23:37:32 +0800 From: Huang Shijie To: Graham Moore Subject: Re: [PATCH V3] Add support for flag status register on Micron chips. Message-ID: <20140428153728.GA2020@localhost.localdomain> References: <1398175396-7560-1-git-send-email-grmoore@altera.com> <201404260012.24311.marex@denx.de> <20140426031011.GA4811@localhost.localdomain> <201404280706.18068.marex@denx.de> <20140428070602.GA29525@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Marek Vasut , Geert Uytterhoeven , Yves Vandervennet , Artem Bityutskiy , Sascha Hauer , Jingoo Han , linux-kernel@vger.kernel.org, Huang Shijie , linux-mtd@lists.infradead.org, Graham Moore , Alan Tull , Sourav Poddar , Brian Norris , Insop Song , David Woodhouse , Dinh Nguyen List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Apr 28, 2014 at 09:22:58AM -0500, Graham Moore wrote: > On Mon, Apr 28, 2014 at 2:06 AM, Huang Shijie wrote: > > On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: > >> > >> Two things competing over the same pointer looks misdesigned to me. I will need > >> to dig into this one more time ... > > Please refer to the code for NAND chip, the nand_get_flash_type() : > > > > ----------------------------------------------------------- > > /* Do not replace user supplied command function! */ > > if (mtd->writesize > 512 && chip->cmdfunc == nand_command) > > chip->cmdfunc = nand_command_lp; > > ----------------------------------------------------------- > > > > It uses the same logic: > > " Do not replace user supplied command function!" > > > > thanks > > Huang Shijie > > I would like to set the @wait_till_ready in m25p80.c, because the > USE_FSR flag is only for Micron chips. But the m25p80 driver doesn't m25p80.c is not the right place. we should put these code in the spi-nor.c thanks Huang Shijie