From patchwork Mon Feb 28 13:44:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12763317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56FF9C433EF for ; Mon, 28 Feb 2022 13:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VDe41i7uapAa3TGWvD2xvU4jxglZctJLdNGoAfVKFRY=; b=xejYyw6Wr1aaMj 9y5A+YXWkaaQ2riM+/8HI2aFCcEXVwPtUaOk3BeMmPETk0VqKLefqlVFVDd28hcGIpHkGb5ZmC6Nr jZ8bxyplLhpQTasnj8HPYdp+Ks7QAOexRSNV1nDN6QrpKVx49I9ZkPIy/c2kQUBzgLJIuFu7Oop0K W/omLVNDc1QLsKoK9k2OiuKVD0FPR7QRUJAFXcJE2P+By1OO+f1eIVpIfs3gg60VVQ52NeqDiN5P2 ko+lKOVNFHmk6LblP639IKbTsZbBtJ6UpIXm15CYm/1vUsn/DKFktJCKzCC59GNer2WGy5+flTtZe iP7UoJM8urUxEH0IkRcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOgLA-00CecR-N3; Mon, 28 Feb 2022 13:45:28 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOgKv-00Cea3-PF; Mon, 28 Feb 2022 13:45:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646055913; x=1677591913; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EtFiFcCF/Pmo5CHCOR90IWGS6JiiaZ3DPkFG0COOhBY=; b=S/G0KLlppKqSX2fJy6qCRBieB6bkRGXogN2D/FhdCeeVZ6o/iWjoVodb JiKZHqoPGYcbYOR1CFecnEZVcFnuTgLdCuPKNEUMESYnMMAjq/LL1g6PV OqnO131f/CDkeCek7TSMXg8JohdS8kXgZ+VBZ1/sKC/m7nUQG7fiGdyJi 3+VYXeBZYSpM4rMPptr3cYy07fjMdsek+XmQnCt+pq0/yJ8IlxJ0woU4g 9nwEpAcAulV8gixkhzv9uI0Zj1m+BR5DS5F/HGRGM7otX3knzKQDVgiyV V9HG2lvTWFdvNcizyp45pItvxSCiy/S1A/eooSbGwUeLWM3SWBJOR6OCE g==; X-IronPort-AV: E=Sophos;i="5.90,142,1643698800"; d="scan'208";a="163872923" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Feb 2022 06:45:12 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 28 Feb 2022 06:45:11 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 28 Feb 2022 06:45:07 -0700 From: Tudor Ambarus To: , , , , , , Subject: [PATCH v4 0/6] mtd: spi-nor: Handle ID collisions Date: Mon, 28 Feb 2022 15:44:59 +0200 Message-ID: <20220228134505.203270-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_054513_876243_CED6680B X-CRM114-Status: UNSURE ( 7.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jaimeliao@mxic.com.tw, Tudor Ambarus , vigneshr@ti.com, richard@nod.at, linux@rasmusvillemoes.dk, knaerzche@gmail.com, linux-mtd@lists.infradead.org, code@reto-schneider.ch, miquel.raynal@bootlin.com, sr@denx.de, linux-arm-kernel@lists.infradead.org, zhengxunli@mxic.com.tw Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Tested with MX25L3233F. I need sysfs dumps where there aren't. v4: - adapt core to handle collisions between SFDP and non-SFDP flashes - rebase on latest spi-nor/next v3: - report correct manufacturer name in ID collisions driver - use fixup name of the first flash, not of the one that collide - use xxd to dump sfdp (where I had the flash) - drop locking support on xt25f128b - constify flash_info fixups hook Tudor Ambarus (6): mtd: spi-nor: core: Report correct name in case of ID collisions mtd: spi-nor: core: Handle ID collisions between SFDP & non-SFDP flashes mtd: spi-nor: macronix: Handle ID collision b/w MX25L3233F and MX25L3205D mtd: spi-nor: macronix: Handle ID collision b/w MX25L12805D and MX25L12835F mtd: spi-nor: Introduce Manufacturer ID collisions driver mtd: spi-nor: manuf-id-collisions: Add support for xt25f128b drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/core.c | 21 +++++++++-- drivers/mtd/spi-nor/core.h | 1 + drivers/mtd/spi-nor/macronix.c | 46 ++++++++++++++++++++++- drivers/mtd/spi-nor/manuf-id-collisions.c | 46 +++++++++++++++++++++++ drivers/mtd/spi-nor/sysfs.c | 4 +- include/linux/mtd/spi-nor.h | 6 +++ 7 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 drivers/mtd/spi-nor/manuf-id-collisions.c