Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2152240ima; Mon, 22 Oct 2018 05:18:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV62w31z1XyiQjdVr6n0zKyFkNlC9Onn2ZPZlzvVFR4VSROu5yBQrQf+1X9eptmvBP0OnlC5r X-Received: by 2002:a62:1b45:: with SMTP id b66-v6mr45402589pfb.94.1540210727625; Mon, 22 Oct 2018 05:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540210727; cv=none; d=google.com; s=arc-20160816; b=S849phvVrxRE18YVYo/+8v8JM8y1YG6Jai/jC+9LSaGJUyqkwMjLR+LVfWN4JwmBsJ 2r/DyLY0wOgSJ0sVkTWYzLkHJ3iDpC9xf8cs3eZpzI6cj2hvBklDdRZdcxHWZ04Xc+os IBvjw/ii0X0E1JE5NSPIFCaDUMd9jVDTKcSoeP88q6/5dk+uRnOaLrcM8AJISc1ll91W CYAoxH58XxXuEy+mSD3h1O46grgN2un+czUHe4LqRlyp7XE0ClcKPfPXQTJf21iG3BC3 H60++sPyA/AIC3IgigpUjsc9F4gGaUBa9tDDj4rumHE2hVx4A9RAYWlvdilpCt+NPQOH KwNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=7r+iGUH0fnl4jDvFfkb5i2fmy7C77So5KBBwLh8Og3o=; b=A5jpwC/pPizHZZPjvZYTmiDxSJ/UToeqrDAooCVqTx31V0kgKmJArV2c7zvnn0S7rb xbCkPxYRfRMntlLQq2+slBlEUsArx+moryKl4c7zrGGOZ6yF6t5+bFCfCM8l/cnH4rCT s4RnEuXyBQXD2wf/TBw4xv/dRxi9JDsuAfBl6GJGzYBvhFi24V8ae6pxZOqWcGkrQz47 XwvAnZ0zZ9mfdJafQ8yPV4jyEsvJBIcUt+9NJ1dzDOYaN2bvLOpusD7w28NsmYw8XnuU fBGu6ZcXycDDZBzysArnNvhEqY6Aqb2hIrvhVMlkTtvM8tCmlaw4oja82U+NywyyorRA NiUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11-v6si34316325pgj.276.2018.10.22.05.18.32; Mon, 22 Oct 2018 05:18:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbeJVUKs (ORCPT + 99 others); Mon, 22 Oct 2018 16:10:48 -0400 Received: from mail.bootlin.com ([62.4.15.54]:48743 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbeJVUKr (ORCPT ); Mon, 22 Oct 2018 16:10:47 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 36930208C7; Mon, 22 Oct 2018 13:52:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (aaubervilliers-681-1-25-52.w90-88.abo.wanadoo.fr [90.88.145.52]) by mail.bootlin.com (Postfix) with ESMTPSA id 46C06207A3; Mon, 22 Oct 2018 13:52:11 +0200 (CEST) Date: Mon, 22 Oct 2018 13:52:11 +0200 From: Boris Brezillon To: Yogesh Narayan Gaur Cc: "Cristian.Birsan@microchip.com" , Tudor Ambarus , "richard@nod.at" , Mark Brown , "linux-kernel@vger.kernel.org" , "nicolas.ferre@microchip.com" , "marek.vasut@gmail.com" , "cyrille.pitchen@microchip.com" , "linux-mtd@lists.infradead.org" , Cyrille Pitchen , "computersforpeace@gmail.com" , "dwmw2@infradead.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories Message-ID: <20181022135211.1978c25d@bbrezillon> In-Reply-To: References: <20180911154007.17195-1-tudor.ambarus@microchip.com> <20181017090724.12f2cd79@bbrezillon> <20181017091045.124e0266@bbrezillon> <20181017092941.3658bd9a@bbrezillon> <20181017115237.07310b74@bbrezillon> <20181022111543.2a607efc@bbrezillon> <20181022122659.0675942e@bbrezillon> <20181022124627.2c6c3b93@bbrezillon> <20181022125259.42df83ea@bbrezillon> <20181022134324.2c1bd248@bbrezillon> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Oct 2018 11:46:55 +0000 Yogesh Narayan Gaur wrote: > Hi, > > > -----Original Message----- > > From: Boris Brezillon [mailto:boris.brezillon@bootlin.com] > > Sent: Monday, October 22, 2018 5:13 PM > > To: Yogesh Narayan Gaur > > Cc: Cristian.Birsan@microchip.com; Tudor Ambarus > > ; richard@nod.at; Mark Brown > > ; linux-kernel@vger.kernel.org; > > nicolas.ferre@microchip.com; marek.vasut@gmail.com; > > cyrille.pitchen@microchip.com; linux-mtd@lists.infradead.org; Cyrille Pitchen > > ; computersforpeace@gmail.com; > > dwmw2@infradead.org; linux-arm-kernel@lists.infradead.org > > Subject: Re: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI > > NOR flash memories > > > > On Mon, 22 Oct 2018 11:03:09 +0000 > > Yogesh Narayan Gaur wrote: > > > > > Hi, > > > > > > > -----Original Message----- > > > > From: Boris Brezillon [mailto:boris.brezillon@bootlin.com] > > > > Sent: Monday, October 22, 2018 4:23 PM > > > > To: Yogesh Narayan Gaur ; > > > > Cristian.Birsan@microchip.com > > > > Cc: Tudor Ambarus ; richard@nod.at; > > > > Mark Brown ; linux-kernel@vger.kernel.org; > > > > nicolas.ferre@microchip.com; marek.vasut@gmail.com; > > > > cyrille.pitchen@microchip.com; linux-mtd@lists.infradead.org; > > > > Cyrille Pitchen ; > > > > computersforpeace@gmail.com; dwmw2@infradead.org; > > > > linux-arm-kernel@lists.infradead.org > > > > Subject: Re: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform > > > > SFDP SPI NOR flash memories > > > > > > > > On Mon, 22 Oct 2018 12:46:27 +0200 > > > > Boris Brezillon wrote: > > > > > > > > > On Mon, 22 Oct 2018 10:39:48 +0000 Yogesh Narayan Gaur > > > > > wrote: > > > > > > Patch used > > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -2863,26 +2863,39 @@ static u8 spi_nor_smpt_read_dummy(const struct spi_nor *nor, const u32 settings) > /* Determine if there are any optional Detection Command Descriptors */ > - while (!(smpt[i] & SMPT_DESC_TYPE_MAP)) { > + for (i = 0; i< smpt_len; i++) { See, you should have i += 2 here, not i++. > + if ((smpt[i] & SMPT_DESC_TYPE_MAP)) > + break; > + > read_data_mask = SMPT_CMD_READ_DATA(smpt[i]); > nor->addr_width = spi_nor_smpt_addr_width(nor, smpt[i]); > - nor->read_dummy = spi_nor_smpt_read_dummy(nor, smpt[i]); > + if (!nor->addr_width) > + nor->addr_width = 3; > + > + nor->read_dummy = 8; //spi_nor_smpt_read_dummy(nor, smpt[i]); > nor->read_opcode = SMPT_CMD_OPCODE(smpt[i]); > + pr_info("smpt[%d]=[addr_width:%08x, read_dumy:%08x, read_opcode:%08x]\n", i, nor->addr_width, nor->read_dummy, nor->read_opcode); > + > addr = smpt[i + 1]; > > err = spi_nor_read_raw(nor, addr, 1, &data_byte); And add a trace here to print data_byte and addr. Thanks, Boris