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=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 380BFC433EF for ; Thu, 16 Sep 2021 15:16:48 +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 7F62A60F93 for ; Thu, 16 Sep 2021 15:16:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F62A60F93 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz 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 D9B348312A; Thu, 16 Sep 2021 17:16:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="bT7g4FBo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E568382FC0; Thu, 16 Sep 2021 17:16:41 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8BEC883146 for ; Thu, 16 Sep 2021 17:16:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id F2125140B01; Thu, 16 Sep 2021 17:16:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1631805397; bh=AloqtpUlpo5uKvxdKheLiQlxuge6jtV5FxlzOFXDIZE=; h=Date:From:To; b=bT7g4FBoH8NAQb0DC27ccZeCSV2ZEclO21JkS1Ct0k0MSKf1NTUcrnVEcsQnBVHDY jxRWhbVyx/mDME2w0njjUb09F4LM+6i1niATjnnKnLhumVtSKPn6v7FkJF0I4qnA2h rFIN4k1zz2fvMj8v6kC67Jg9LseiW4ZYFAfcykn4= Date: Thu, 16 Sep 2021 17:16:36 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Marek Vasut Cc: u-boot@lists.denx.de, Heiko Schocher , Jagan Teki , Miquel Raynal , Pali =?UTF-8?B?Um9ow6Fy?= , Patrice Chotard , Patrick Delaunay , Priyanka Jain , Simon Glass Subject: Re: [PATCH] mtd: spi-nor: Fix SF MTDIDS when registering multiple MTDs with DM enabled Message-ID: <20210916171636.5fc8cf61@thinkpad> In-Reply-To: <20210914230622.245747-1-marex@denx.de> References: <20210914230622.245747-1-marex@denx.de> 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-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 Wed, 15 Sep 2021 01:06:22 +0200 Marek Vasut wrote: > The flash->mtd.name used to be nor%d before, now it is the type of the > SPI NOR like e.g. mt25ql02g. It is possible to find plenty of examples > of the former in U-Boot configs by searching for MTDIDS.*nor.*spi, while > the later is ambiguous if there are multiple flashes of the same type in > the system and breaks existing environments. > > This does no longer get recognized when running 'mtdparts' for example: > CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0" > > Fix this by setting the correct mtd.name to nor%d. CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0" is defined for configs/am65x_evm_a53_defconfig and configs/am65x_hs_evm_a53_defconfig both using device tree arch/arm/dts/k3-am654-base-board.dts where you have defined DT node flash@0. Just add partition subnodes, and then you won't need mtdparts. This can be done for most users of mtdparts, and we won't to convert mtdpart to OF and get rid of it. Marek