From nobody Tue Jun 23 18:19:59 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53510C433F5 for ; Mon, 28 Feb 2022 15:39:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237599AbiB1PkJ (ORCPT ); Mon, 28 Feb 2022 10:40:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237308AbiB1PkH (ORCPT ); Mon, 28 Feb 2022 10:40:07 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 899B8237F4 for ; Mon, 28 Feb 2022 07:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646062766; x=1677598766; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yQcOpYi3/hD8IEZBHYqUvgPMwoCny9+QNjaItq/xudo=; b=Lpdclo5ESeRQHSwJyBi20uuO51g23Vy+MZwt6Anb0fhWduhUx5l1oHIO U99lLHrBctVi93n5zckVMyzv4UOe/vTQB+ZvEStJJ8sXFqmUHKpgv3Hvh Dbgqge3bgzfhXe9ztvxdSrRP2t9qkbRTLmHNACbnolFZOP+nhrhpVcHvy ePjU8dER60AZjlBa3FUzd9B9U8QkYQdDOLPfewxQfUQcMPnTYXvDIFNXy 4ZHoulG10XGPcUEnTdHK1PvS0wMsPWNUVExfDPReZGgFRPkb4Cf+PgycF tBRs4TkmkWCex4MFOq8OYfJ/5PmaQH0HB+kTas2XU3tHleWr85p3OTEd5 g==; X-IronPort-AV: E=Sophos;i="5.90,142,1643698800"; d="scan'208";a="150249761" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Feb 2022 08:39:25 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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 08:39:24 -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 08:39:22 -0700 From: Tudor Ambarus To: , CC: , , , , , , Tudor Ambarus Subject: [PATCH] mtd: spi-nor: Move XMC to manufacturer ID collisions driver Date: Mon, 28 Feb 2022 17:39:21 +0200 Message-ID: <20220228153921.219668-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" XMC manufacturer ID is defined in bank 10 of JEP106 standard. The XMC flashes that are currently supported do not define the continuation codes and will collide with flashes using the same manufacturer IDs, STMicroelectronics being an example (defined in bank one without continuation codes). Move XMC to manufacturer ID collisions driver as it doesn't respect the JEP106 standard and collides with other manufacturers. Suggested-by: Michael Walle Signed-off-by: Tudor Ambarus --- depends on: https://lore.kernel.org/linux-mtd/20220228134505.203270-1-tudor= .ambarus@microchip.com/ drivers/mtd/spi-nor/core.c | 1 - drivers/mtd/spi-nor/core.h | 1 - drivers/mtd/spi-nor/manuf-id-collisions.c | 8 ++++++++ drivers/mtd/spi-nor/xmc.c | 25 ----------------------- 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 drivers/mtd/spi-nor/xmc.c diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 80d6ce41122a..e2b388d12c6c 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1627,7 +1627,6 @@ static const struct spi_nor_manufacturer *manufacture= rs[] =3D { &spi_nor_sst, &spi_nor_winbond, &spi_nor_xilinx, - &spi_nor_xmc, }; =20 static const struct flash_info * diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index f727e632c0ee..db042c40853f 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -517,7 +517,6 @@ extern const struct spi_nor_manufacturer spi_nor_spansi= on; extern const struct spi_nor_manufacturer spi_nor_sst; extern const struct spi_nor_manufacturer spi_nor_winbond; extern const struct spi_nor_manufacturer spi_nor_xilinx; -extern const struct spi_nor_manufacturer spi_nor_xmc; =20 extern const struct attribute_group *spi_nor_sysfs_groups[]; =20 diff --git a/drivers/mtd/spi-nor/manuf-id-collisions.c b/drivers/mtd/spi-no= r/manuf-id-collisions.c index 0447e245f4b1..33a7d475b1cd 100644 --- a/drivers/mtd/spi-nor/manuf-id-collisions.c +++ b/drivers/mtd/spi-nor/manuf-id-collisions.c @@ -27,6 +27,14 @@ static const struct spi_nor_fixups xtx_nor_fixups =3D { }; =20 static const struct flash_info id_collision_parts[] =3D { + /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ + { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128) + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | + SPI_NOR_QUAD_READ) }, + { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256) + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | + SPI_NOR_QUAD_READ) }, + /* Boya */ { "by25q128as", INFO(0x684018, 0, 64 * 1024, 256) FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c deleted file mode 100644 index 051411e86339..000000000000 --- a/drivers/mtd/spi-nor/xmc.c +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (C) 2005, Intec Automation Inc. - * Copyright (C) 2014, Freescale Semiconductor, Inc. - */ - -#include - -#include "core.h" - -static const struct flash_info xmc_nor_parts[] =3D { - /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ - { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ) }, - { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ) }, -}; - -const struct spi_nor_manufacturer spi_nor_xmc =3D { - .name =3D "xmc", - .parts =3D xmc_nor_parts, - .nparts =3D ARRAY_SIZE(xmc_nor_parts), -}; --=20 2.25.1