Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933092AbbELOjx (ORCPT ); Tue, 12 May 2015 10:39:53 -0400 Received: from down.free-electrons.com ([37.187.137.238]:54456 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932776AbbELOjq (ORCPT ); Tue, 12 May 2015 10:39:46 -0400 Date: Tue, 12 May 2015 16:39:43 +0200 From: Antoine Tenart To: Ezequiel Garcia Cc: Antoine Tenart , sebastian.hesselbarth@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, zmxu@marvell.com, jszhang@marvell.com, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 05/12] mtd: pxa3xx_nand: rework flash detection and timing setup Message-ID: <20150512143943.GC32171@kwain> References: <1431356341-31640-1-git-send-email-antoine.tenart@free-electrons.com> <1431356341-31640-6-git-send-email-antoine.tenart@free-electrons.com> <555128F0.30702@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <555128F0.30702@vanguardiasur.com.ar> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 43 Ezequiel, On Mon, May 11, 2015 at 07:10:56PM -0300, Ezequiel Garcia wrote: > > On 05/11/2015 11:58 AM, Antoine Tenart wrote: > [..] > > - > > - /* calculate flash information */ > > - host->read_id_bytes = (f->page_size == 2048) ? 4 : 2; > > - > > [..] > > @@ -1732,6 +1669,7 @@ static int alloc_nand_resource(struct platform_device *pdev) > > host->mtd = mtd; > > host->cs = cs; > > host->info_data = info; > > + host->read_id_bytes = 4; > > Are you sure this is correct? The value is set according to the page > size before this patch. Before reading the ID, the pxa3xx driver uses a default configuration, builtin_flash_types[0], which defines a page size of 2048 leading to set host->read_id_bytes to 4. I'm using this default value here. There might be an issue, as host->read_id_bytes isn't updated after reading the ID (and getting the actual page size). I don't know if this can be a problem. I can modify pxa3xx_nand_config_flash() to update host->read_id_bytes if needed. What do you think? Antoine -- Antoine T?nart, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/