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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C703CC433F5 for ; Tue, 28 Sep 2021 18:46:22 +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 01B1360F9D for ; Tue, 28 Sep 2021 18:46:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 01B1360F9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 B8AB1831D6; Tue, 28 Sep 2021 20:46:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com 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; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Ch4gxXVf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F7CC8022E; Tue, 28 Sep 2021 20:45:38 +0200 (CEST) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 F361283146 for ; Tue, 28 Sep 2021 20:45:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2a.google.com with SMTP id a9so14128430qvf.0 for ; Tue, 28 Sep 2021 11:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5bPO8yBLzkoG3y+0VD4iBeVzBL5Xe2aMxGkfEziDrmo=; b=Ch4gxXVfJ6JJJIcKQCPjcNn3o11TVXKRoSJ2NQdL3mLXQtlC/SjjYouqjXp5IxvNih zuNi1V9pW4JOBVtYjdDG/zEAuWiDEetiyKd+szQIMlF5ZeAoYlBBV/y1Cs+buKw9zU4X +vTO2pjRWf73YSoZQYs4k+wYu8PE8t1bzLy+A= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5bPO8yBLzkoG3y+0VD4iBeVzBL5Xe2aMxGkfEziDrmo=; b=K+hEu0UL3Dk30XkFur2YkXHXWMgyvAb31fBYTaWKYPEyDhHWXdXQFJNnksduNuPbn3 H0R3u9pzTy1TJqRxIVb8WK6CncX4F75kWHr9RH+bPbIOd7j0z2t/kpwI17ILR3xBg7bJ 4dy4nmUHcGsOANa2r60eKx3fNcfVIujhJ9/ltRQLqIG9GN3PZl3LEY8FC5X+eipJuHv4 DyT3uv9NzHQWxMh5W7rTaj7h1UBYITG3OKkuVRm37W/hRYUiytIqBzyL5yhpObsAqukl VIqVWku0r2k+Ac+mt8HNWslobYsI/gngd2J79Q8998HDs6/XFkTi9qmstOXFQiSQnMNs lQHg== X-Gm-Message-State: AOAM533GMCPk4b07T5Gm8AqAoPaURiVdxWyxf/q9YZCWpHj+sNemVVUf A/cHlAPXUHUYZw5Y4UVftp+T/A== X-Google-Smtp-Source: ABdhPJylphPeM1vhqHUrbheYYRU4Lr7algmZi/3xQdCCE6WttuChnZjpIFOuCl5KhkfjXFERaHJzew== X-Received: by 2002:ad4:4873:: with SMTP id u19mr7365907qvy.11.1632854723842; Tue, 28 Sep 2021 11:45:23 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-c022-6242-d139-1392.res6.spectrum.com. [2603:6081:7b01:cbda:c022:6242:d139:1392]) by smtp.gmail.com with ESMTPSA id d24sm15211090qka.7.2021.09.28.11.45.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Sep 2021 11:45:23 -0700 (PDT) Date: Tue, 28 Sep 2021 14:45:20 -0400 From: Tom Rini To: Patrick Delaunay Cc: u-boot@lists.denx.de, Pali =?iso-8859-1?Q?Roh=E1r?= , Marek Vasut , Jagan Teki , Christophe KERELLO , Miquel Raynal , Priyanka Jain , Patrice Chotard , Heiko Schocher , Marek =?iso-8859-1?Q?Beh=FAn?= , Simon Glass , Vignesh R , U-Boot STM32 Subject: Re: [PATCH v4 2/2] mtd: spi: nor: force mtd name to "nor%d" Message-ID: <20210928184520.GX31748@bill-the-cat> References: <20210922162909.1857566-1-patrick.delaunay@foss.st.com> <20210922182841.v4.2.Ia461e670c7438478aa8f8939209d45c818ccd284@changeid> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qAWpXEdoCCy57CK7" Content-Disposition: inline In-Reply-To: <20210922182841.v4.2.Ia461e670c7438478aa8f8939209d45c818ccd284@changeid> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --qAWpXEdoCCy57CK7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 22, 2021 at 06:29:08PM +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. >=20 > This patch is coherent with existing "nand" and "spi-nand" > mtd device names. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > This patch also avoids issue when the same NOR device is present 2 times, > for example on STM32MP15F-EV1: >=20 > STM32MP> mtd list > SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, \ > total 64 MiB >=20 > List of MTD devices: > * nand0 > - type: NAND flash > - block size: 0x40000 bytes > - min I/O: 0x1000 bytes > - OOB size: 224 bytes > - OOB available: 118 bytes > - ECC strength: 8 bits > - ECC step size: 512 bytes > - bitflip threshold: 6 bits > - 0x000000000000-0x000040000000 : "nand0" > * mx66l51235l > - device: mx66l51235l@0 > - parent: spi@58003000 > - driver: jedec_spi_nor > - path: /soc/spi@58003000/mx66l51235l@0 > - type: NOR flash > - block size: 0x10000 bytes > - min I/O: 0x1 bytes > - 0x000000000000-0x000004000000 : "mx66l51235l" > * mx66l51235l > - device: mx66l51235l@1 > - parent: spi@58003000 > - driver: jedec_spi_nor > - path: /soc/spi@58003000/mx66l51235l@1 > - type: NOR flash > - block size: 0x10000 bytes > - min I/O: 0x1 bytes > - 0x000000000000-0x000004000000 : "mx66l51235l" >=20 > The same mtd name "mx66l51235l" identify the 2 instances > mx66l51235l@0 and mx66l51235l@1. >=20 > This patch fixes a ST32CubeProgrammer / stm32prog command issue > with nor0 target on STM32MP157C-EV1 board introduced by > commit b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when > DM is enabled"). >=20 > Fixes: b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when = DM is enabled") > Signed-off-by: Patrick Delaunay Applied to u-boot/master, thanks! --=20 Tom --qAWpXEdoCCy57CK7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFTYsAACgkQFHw5/5Y0 tyyzjgwAi+p5jLemFm+vib5zH7fgSBi8GafsmHVV2Fso0MVfPDUL1FOR7SHPe9Mu 4K8AxDkXJYKNDjVOAhs3nA8Bjy5pHOWs/5/B/jeY08zvJ6tWl5DuwSjCPdZg331T uAyEnKfVmrN2oDfqpQIzz+T8s3z43rrGizTMyUwE7rkmwDtaGbcCCEyZdH+9pj24 CpHEuiOiab77SOgk3HkOct1k9nj+ylNkyNMXm5DIKa1XE3GWPsJ67negOON+CJni PWBlZtfFtS7USXu21zUSmvdrz8Xt18vgerHsNwnc6d+zbitiPF5muhDrqkJbIudu fhumSfXXPpyXjVxMy+yZq3WgchYBWH/i5EryoDGWjP0U82eeUDcXOz1hGR/FrM/H kEEfekfw/1Tk6D5c5+2QNYbkPma8n5mD+cyuDLCHLQBR8ry0uxlGLHg9VlowAx4j kDB2+mdsGCRuoadUJDKocdbm9TGaiiguwsGnOKCoxv5Z6R3Kjl8/51dEpPG5NJ3m qtaNqwaP =rjEz -----END PGP SIGNATURE----- --qAWpXEdoCCy57CK7--