Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1216347imu; Wed, 28 Nov 2018 06:24:49 -0800 (PST) X-Google-Smtp-Source: AJdET5eIzqKa4UQ2njUy/ccXysRDkNRdi0qy0Wj1VundVIBv6t5qPvTcpTbXW7wZIC6f7PwxeDFL X-Received: by 2002:aa7:87ce:: with SMTP id i14mr37412739pfo.20.1543415089600; Wed, 28 Nov 2018 06:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543415089; cv=none; d=google.com; s=arc-20160816; b=AuFnKr/4CL+Ymm4RLzFtSDAzbe6kNDXe8TN1I3oeQgZOMC5mlUXSM1hQMY6vFNvKFR f67ZAIpmwutBpREkdkX0q6z3vVg2C+iF6MWXnrCp3BLb6z7nm6S5fu6ST/FH1Ebe0ztX ot8VnSijxjJggrnJMo7f4DokYGmRbKbMXux4CUBpQUDTW1UxLLW6/XdLUteGj3UyoIg6 nCJEL3zJBNyTx6iE8YYH5raOP/Xp0Q07JnTaCxyxfO6q9nt3CG3MwRpCStcwv/6GQ6VY NMHGYotAAYKX9BjnuoAAw4bRKpNoxwwraKf8JMvtNLox/lGt26os/6sfFxtIHCDfEQGv XDlw== 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=m/L130plNneKLUVSqPms9TOTWE0swdhdH63Fcwfj1u8=; b=SZ0oAaFRpENWEa65ZxHwOImzw0To7fY5+TRvheQNE3sVHfzl0HAqSjWwPMLsNaJJhK Vlgilkx8P8L4C+nSOA05T9tYdqwzR+lNebHOLqqJnflVdUQqalJKmjyc5q4iZ/p5/XTy f95k6FpMqAvqQ4djNqfK80G5EsqQd8C4hakr6Yd8WOAhPl4qpeWGI9vvwLUR3lQFd1qc K+rfpXTIEfDzG1xLGdLIoFbGIoIa/sWpzzbT4VdDDJDuc8Z88F2yiVAWX9KAB6jL8j5P bm5JM/ZHhCZ7Ck1vo/G1eEh2ni+QX8+xrhtEL6qxraMJ09zkrcuXWqGw70SLS5PBR6hu bULA== 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 x9si6984138pgh.12.2018.11.28.06.24.34; Wed, 28 Nov 2018 06:24:49 -0800 (PST) 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 S1728675AbeK2BYh (ORCPT + 99 others); Wed, 28 Nov 2018 20:24:37 -0500 Received: from mail.bootlin.com ([62.4.15.54]:33667 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbeK2BYh (ORCPT ); Wed, 28 Nov 2018 20:24:37 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 227C920728; Wed, 28 Nov 2018 15:22:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (aaubervilliers-681-1-94-205.w90-88.abo.wanadoo.fr [90.88.35.205]) by mail.bootlin.com (Postfix) with ESMTPSA id D7E7A20728; Wed, 28 Nov 2018 15:22:45 +0100 (CET) Date: Wed, 28 Nov 2018 15:22:45 +0100 From: Boris Brezillon To: , Cc: , , , , , Subject: Re: [PATCH] mtd: spi-nor: parse SFDP 4-byte Address Instruction Table Message-ID: <20181128152245.1bb0ccd8@bbrezillon> In-Reply-To: References: <20181120115512.15958-1-tudor.ambarus@microchip.com> <20181128085745.1ef607b3@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 Wed, 28 Nov 2018 14:17:12 +0000 wrote: > On 11/28/2018 09:57 AM, Boris Brezillon wrote: > > On Tue, 20 Nov 2018 11:55:21 +0000 > > wrote: > > > >> + > >> + /* > >> + * We set nor->addr_width here to skip spi_nor_set_4byte_opcodes() > >> + * later because this latest function implements a legacy quirk for > >> + * the erase size of Spansion memory. However this quirk is no longer > >> + * needed with new SFDP compliant memories. > >> + */ > >> + nor->addr_width = 4; > >> + nor->flags |= SPI_NOR_4B_OPCODES; > > > > You mean SNOR_F_4B_OPCODES (the one introduced here [1]), because > > SPI_NOR_4B_OPCODES should only be used for flash_info->flags and might > > soon conflict with another SNOR_F_ flag? > > > > yes, you're right. > > > [1]http://patchwork.ozlabs.org/patch/991476/ > > > > Can you apply your patch? Will submit a new version afterwards. Actually, I realized setting SNOR_F_4B_OPCODES when the BFPT advertises 4_BYTES_ONLY is incorrect as 4bytes only can mean "use the 3B opcodes but pass address on 4 bytes". Here is a new version of this patch [1]. Feel free to pick it up and send it along with your "SFDP 4-byte Address Instruction Table" patch (I have not reason to send it alone since the problem I was trying to solve is no longer fixed by [1]). [1]https://github.com/bbrezillon/linux-0day/commit/a953b6b435ec67bca00d6666f472db5f6dca4f63