Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2296523ybh; Sun, 4 Aug 2019 22:14:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaSdafPBsYXMFXDtcvtkUC3GHMzzR4+Yzv6RJrE2DnQqZhoYe4n58xRw9kxwPRAWbxd+1k X-Received: by 2002:a63:724f:: with SMTP id c15mr138012098pgn.257.1564982088751; Sun, 04 Aug 2019 22:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564982088; cv=none; d=google.com; s=arc-20160816; b=sITnqYPTgT6so6qjYr3RdcddKJP2GTZr02ZExlktj/IOJhp43GdDYs8MVEiXp0eBc/ JU3NVJ3w8iAEO2YCk88+MEBektzvfOwu3mY2DcHYn+hO26wsPj6N9/3OvaZzexx7sV7b DYavnFhEKQ2uB+RAXPkV0iZHP9Y7cLRQAwx7hs3SeHJsM3aft/j/uRAZWK8KiSH6KzOh dOnJ0CRMMAXKfRNbFbGgw6p/wnDVqMtwHe+f4hvbWGkrbUoL8h6x8DK0tG1na2bzYHBM B7Z/YzBOIzPdFlC7Ok0bimQ9Ko5Y2U1OBr1gvCuWkYfMR8B3oAblc+1SSkhdOK6mCysX b06g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ewdIibSSQijgwi+dlHIsVHF2PIynzZcDv3GyCZ5qoao=; b=v7TAOQbgYdav+PAsWWKQR4Ew27nSh3Q5zBjIviSg98jaXn6/TGaXZv5aLs6sJjCTN2 ZRAchf5tkblksXln71qsSRr2cJicAz44o/M1e88wqRKtZw55XFS8mYT71g1Ud87D82W4 OMCb2gCAB0NKauWO+W8ZbOg/e1YykQ1MAbhH4MBo8tnorANgGhd9pygSDCl/RLNC+BOH BDUbpJ/2rfxg5Yc/ysAUO9vLV08R0feEFUp3Ml1zZhO5DcbbIqU41lAvzjLHhYkp9JNJ FZ4zkBeP2KCVvTt/QqBlq5S68uKvuQSipnHc2L4h8kI4GrFaNVogCFE+9+XDlztFFlQF yUvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KQCe62tX; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a89si43447565pla.60.2019.08.04.22.14.33; Sun, 04 Aug 2019 22:14:48 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KQCe62tX; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726592AbfHEFNz (ORCPT + 99 others); Mon, 5 Aug 2019 01:13:55 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43390 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfHEFNz (ORCPT ); Mon, 5 Aug 2019 01:13:55 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x755DX7t000360; Mon, 5 Aug 2019 00:13:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1564982013; bh=ewdIibSSQijgwi+dlHIsVHF2PIynzZcDv3GyCZ5qoao=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=KQCe62tXWVeGrSrKB9tF8y+nwKb2Sh5uurchqHfP8F1fhvgx+d8cxZ3C/x1g2gzah kWUoh9JEucHPLlqgW/DWzGz7rGPZgbSlup4Q/HHYAMBF3fnKJDVCxndejSz8FioivS XC6GeUq/5BAR/0Pk7Dxj1fIG2oFeVjvzZxFidgX8= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x755DXbQ036738 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Aug 2019 00:13:33 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 5 Aug 2019 00:13:32 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 5 Aug 2019 00:13:32 -0500 Received: from [172.24.145.136] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x755DT5L104396; Mon, 5 Aug 2019 00:13:30 -0500 Subject: Re: [PATCH 6/6] mtd: spi-nor: Add the SPI_NOR_XSR_RDY flag To: , , CC: , , , , , , References: <20190731091145.27374-1-tudor.ambarus@microchip.com> <20190731091145.27374-7-tudor.ambarus@microchip.com> From: Vignesh Raghavendra Message-ID: <93dc5a5d-3a72-c80e-0b0d-7fd758a1ea5e@ti.com> Date: Mon, 5 Aug 2019 10:44:13 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190731091145.27374-7-tudor.ambarus@microchip.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/07/19 2:42 PM, Tudor.Ambarus@microchip.com wrote: > From: Boris Brezillon > > S3AN flashes use a specific opcode to read the status register. > We currently use the SPI_S3AN flag to decide whether this specific > SR read opcode should be used, but SPI_S3AN is about to disappear, so > let's add a new flag. > I think you can drop SPI_S3AN right away either as separate patch in this series or as part of this patch itself. Regards Vignesh > Note that we use the same bit as SPI_S3AN implies SPI_NOR_XSR_RDY and > vice versa. > > Signed-off-by: Boris Brezillon > Signed-off-by: Tudor Ambarus > --- > drivers/mtd/spi-nor/spi-nor.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index 5fea5d7ce2cb..01be6d49ce3b 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -213,6 +213,14 @@ struct flash_info { > * bit. Must be used with > * SPI_NOR_HAS_LOCK. > */ > +#define SPI_NOR_XSR_RDY BIT(10) /* > + * S3AN flashes have specific opcode to > + * read the status register. > + * Flags SPI_NOR_XSR_RDY and SPI_S3AN > + * use the same bit as one implies the > + * other, but we will get rid of > + * SPI_S3AN soon. > + */ > #define SPI_S3AN BIT(10) /* > * Xilinx Spartan 3AN In-System Flash > * (MFR cannot be used for probing > @@ -4818,7 +4826,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, > * spi_nor_wait_till_ready(). Xilinx S3AN share MFR > * with Atmel spi-nor > */ > - if (info->flags & SPI_S3AN) > + if (info->flags & SPI_NOR_XSR_RDY) > nor->flags |= SNOR_F_READY_XSR_RDY; > > /* Kept only for backward compatibility purpose. */ > -- Regards Vignesh