From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA73C433F5 for ; Fri, 17 Sep 2021 03:54:13 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9B35610A4 for ; Fri, 17 Sep 2021 03:54:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B9B35610A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 83EE8831D8; Fri, 17 Sep 2021 05:54:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iDPrwsCb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 45E9482BC3; Thu, 16 Sep 2021 16:49:48 +0200 (CEST) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44F078312A for ; Thu, 16 Sep 2021 16:49:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=behunmarek@gmail.com Received: by mail-wm1-x329.google.com with SMTP id j134-20020a1c238c000000b0030b32367649so1213873wmj.3 for ; Thu, 16 Sep 2021 07:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r7QFRX8PBAbyeCR6FK19Z+LiM7KadU/IlIr3Chk0uwc=; b=iDPrwsCbJq8s70yk8hDTUlKKV8nok+Xou/0v6zbXi8ptcFO6O81mP1urEYQhmzo1eZ 5Z2j5m3rlVhPYR3Bw96BVARKCJ6OTQQnLkQaxlNZBmjnhVSgOqfMO9S4WxqU1s/bTdDN wem/aVV/2RHhHYzqhcCVS/n+wf9PJX2gToSlhMuyt3RPVNP+SXrORd7VXqK/I5mYpHIa gMxiszsn2u9jkYI8cGV8exhaHfGNV2I8hHvbnEmhAW1eBuSKZWUhscwjqbCU63QvE3/K bYdfVZlHsmYBfte3tbxT9cfqzZ00U0iuuMS1yrdW8edNFYqCmBhRNBJWUto5O9RiW8Sn gVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r7QFRX8PBAbyeCR6FK19Z+LiM7KadU/IlIr3Chk0uwc=; b=nIcSjKil6EUe5P7Y8fkf/pe2xbFfO2Mj9OBFcMS7oEt7fiQoAruYoos8P5jEC2Cl9e 9A4D6hHy4kPxgdDZWCCOMqOAl0cbKEyNO5sa7NPwzJqzXGqgEyMcKeZEiA79tr4dH7Rk EQH7BOSCdLin8+UB5RRQ0mXYmLfx19cgAAXMWSVZSYIsTVmFs84jMBMWHCL0r11wTBo4 ZK47x0KCPKdW5EeOpDVqhAI/BuWnwdQnF35XvXctJGGmF1lRgOEOzcNEHoLgFNQzH6xD P1BsA3zSQYddQmHEYL5v/BRAUlrasHpOkt5NDMZN7T2rb7KbQBS9piAlOejNrAS5ZxU8 FKow== X-Gm-Message-State: AOAM532TWQ+4vE3+ZvmS0HLexUtGNKdCYssCmYAUk+lPAoktYKqJmXfx 5jUcMs+UVca/KgXzuZ9cUPY= X-Google-Smtp-Source: ABdhPJxPa2Z3r4FIPtuPbd8Rd0KZzTk0aaAubBlAKhQM0fcNGd/7vhnEp2A9V662v1Vk/lN65GkEww== X-Received: by 2002:a05:600c:4f52:: with SMTP id m18mr10164314wmq.34.1631803782643; Thu, 16 Sep 2021 07:49:42 -0700 (PDT) Received: from thinkpad ([2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by smtp.gmail.com with ESMTPSA id k1sm3767521wrz.61.2021.09.16.07.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 07:49:42 -0700 (PDT) Date: Thu, 16 Sep 2021 16:49:37 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Patrick Delaunay Cc: , Priyanka Jain , Heiko Schocher , Marek Vasut , Jagan Teki , Miquel Raynal , Christophe KERELLO , Patrice Chotard , Pali =?UTF-8?B?Um9ow6Fy?= , Vignesh R , U-Boot STM32 Subject: Re: [PATCH v3 2/2] mtd: spi: nor: force mtd name to "nor%d" Message-ID: <20210916164937.6b87b1ff@thinkpad> In-Reply-To: <20210916155040.v3.2.Ia461e670c7438478aa8f8939209d45c818ccd284@changeid> References: <20210916140118.874028-1-patrick.delaunay@foss.st.com> <20210916155040.v3.2.Ia461e670c7438478aa8f8939209d45c818ccd284@changeid> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 17 Sep 2021 05:53:55 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Thu, 16 Sep 2021 16:01:18 +0200 Patrick Delaunay wrote: > Force the mtd name of spi-nor to "nor" + the driver sequence number: > "nor0", "nor1"... beginning after the existing nor devices. > > This patch is coherent with existing "nand" and "spi-nand" > mtd device names. > > When CFI MTD NOR device are supported, the spi-nor index is chosen after > the last CFI device defined by CONFIG_SYS_MAX_FLASH_BANKS. > > When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated, this config > is replaced by to cfi_flash_num_flash_banks in the include file > mtd/cfi_flash.h. > > This generic name "nor%d" can be use to identify the mtd spi-nor device > without knowing the real device name or the DT path of the device, > used with API get_mtd_device_nm() and is used in mtdparts command. > > This patch also avoids issue when the same NOR device is present 2 times, > for example on STM32MP15F-EV1: This is an unfortunate hack :( This is another reason why the whole mtd subsystem should be refactored.