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,URIBL_BLOCKED,USER_AGENT_SANE_1 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 27E7EC432BE for ; Wed, 4 Aug 2021 18:49:23 +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 273F660EE9 for ; Wed, 4 Aug 2021 18:49:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 273F660EE9 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 5530E82C7C; Wed, 4 Aug 2021 20:49:19 +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="bN/p8qja"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C09F383129; Wed, 4 Aug 2021 20:49:17 +0200 (CEST) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 346188262E for ; Wed, 4 Aug 2021 20:49:09 +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-qt1-x831.google.com with SMTP id w10so2083685qtj.3 for ; Wed, 04 Aug 2021 11:49:09 -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=2CYvmDU/QCwfhGMgwzFv3v5GqZjVPQre4zoAIeYynik=; b=bN/p8qjao7jYs4RtiPcoQPSjhZ5YfOVcrSSvWV0t1CddCRzqQhd7X+JblZLkHydhBi hucGlcKC8gmdSRModYGXZrrhyWNc47Ku7pI9yowfzqkAxDcG3chkBXczRczHaxco5XRB 8MNF9OwN2jXebNuGlCBvcPigy+sO+zGdMc3nA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2CYvmDU/QCwfhGMgwzFv3v5GqZjVPQre4zoAIeYynik=; b=POz5dJ/k4fup6wgLZnTHzGXxYXAG6I7reX107KcNTh+YphsHE4u8f4g0QHj1oZAz3T Zg9RLt4MLvTn+9yqYstXhqX8wmmp5as6nrzLWVLJoeIbyauNCCjeZPI8FTxd/f/cqJqK Rc6Tm8uU2ck0mZCOveAQXc0QMKOaVjkV0/cIMlP4XMiUGJl+7Xf7zxtLAfxS3o2DX2Nv Sh2Lh+rvRnHj+cAVACHbskTcUDzLjuBtSqb7/rYFfulG75KH+3u7j4iSTBSre4gMHdnD AodhfIi+JBMXcdPnWJ/rtx9/AKyiBMjBgNKv66x0Fo/XNT/da+CEDrsJ2OkfYHsynD92 ge4g== X-Gm-Message-State: AOAM531hiBY2G7XE2XXjGY+7kKtzrvXTxNQOuJ6kzCY76+JTKTCA66be Nh8FZyQUG81CHzgwPHWr0f+dFQ== X-Google-Smtp-Source: ABdhPJyjdHNjEK2kx4aqHz1UJaf6KgqEin1vX61OrtAK3waCt3Au9i4D6DIcd43SnGKZte7Ao+fFtg== X-Received: by 2002:ac8:108a:: with SMTP id a10mr969394qtj.14.1628102947704; Wed, 04 Aug 2021 11:49:07 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-a9d9-7fe0-6131-a526.res6.spectrum.com. [2603:6081:7b01:cbda:a9d9:7fe0:6131:a526]) by smtp.gmail.com with ESMTPSA id d1sm647654qtr.33.2021.08.04.11.49.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Aug 2021 11:49:07 -0700 (PDT) Date: Wed, 4 Aug 2021 14:49:05 -0400 From: Tom Rini To: Simon Glass Cc: Jagan Teki , Marek =?iso-8859-1?Q?Beh=FAn?= , U-Boot-Denx Subject: Re: Proposal: U-Boot MTD (rewriting old story) Message-ID: <20210804184905.GD9379@bill-the-cat> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jm8b7ayRJkwjIulh" Content-Disposition: inline In-Reply-To: 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 --jm8b7ayRJkwjIulh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 04, 2021 at 10:09:55AM -0600, Simon Glass wrote: > Hi Jagan, >=20 > On Tue, 3 Aug 2021 at 09:01, Jagan Teki wrot= e: > > > > Yes, this is the old discussion and triggered again now since we had a > > discussion on the last U-Boot contributor call. > > > > I will brief the main points here, as most of the details are > > mentioned in previous threads. > > > > Here are the couple of old and new implementations on the SPI-NOR side. > > > > http://u-boot.10912.n7.nabble.com/PATCH-v10-00-27-dm-Generic-MTD-Subsys= tem-with-SPI-NOR-interface-tt315694.html#none > > http://u-boot.10912.n7.nabble.com/PATCH-0-5-mtd-Implement-MTD-UCLASS-us= e-SPINOR-td419538.html#a419541 > > https://patchwork.ozlabs.org/project/uboot/cover/20200709111709.68904-1= -jagan@amarulasolutions.com/ > > > > Idea is to > > 1. Create MTD_UCLASS, already present > > 2. Create DM MTD Operations, above patchset does. > > 3. Create Flash specific MTD UClass's like > > UCLASS_NAND > > UCLASS_SPI_NAND > > UCLASS_SPI_NOR > > UCLASS_NOR > > UCLASS_UBI > > and register to UCLASS_MTD as interface slaves like how MMC, SCSI are > > registered to UCLASS_BLK > > 4. Sync only respective flash specific code, and drop __UBOOT__ > > 5. Interface mtd, sf, and nand commands to UCLASS_MTD. >=20 > This all seems good to me. >=20 > > > > Hard points: > > 1. Hard to arrange Linux specific code and drop unneeded _UBOOT_ code, > > but possible. > > 2. Requires a lot of testing. >=20 > Let's add simple emulators for NAND, SPI_NAND and UBI. We already have > one for SPI_NOR I believe. That will be a good long-term investment. What are our viable options here via QEMU? --=20 Tom --jm8b7ayRJkwjIulh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEK4R0ACgkQFHw5/5Y0 tyy46QwAi6lJ+0lfwpl6sJSxEqqxX460zwf2iDlLp6U9pK5swd9ocoiKiRZdSGUs qCjM1MpX4TYUUkbCCHDle56KqXTKSD3SPjVsrG2GJlRd0YYcWgw5mkF5FpUWXHmC yO7JNu/YcIX400fo2Z8FEBCFqrJyhUzXk6VGKO4AemSJkgPCVxmH8iY6ZEEtXx34 NqRbsMrt7lnxMoD+K6WpSzd0YPZq+959jW1retmtzdPFlw4zFMEwCkhtVMRV4SlB HVjWTjx27umIRSlQQF3ord4oU0pNkKTQLviIJdUg1kJtPmPKz69SyJPNVF0hODCd u39TfB1QeqAXnhDIkLtIVbR/FximXntMMDmdWCRdPXNeAbhm5auE5JDibAHg7QwD 6U7cXdJIzKLnxqf4XFgaLi6lsjzhG5fSkJHTXr/sg0/Mbyfg34XYB6PC0nCMcXXE +fH6xRBxOCeTYMLKV4AySmouPGvXhE3eDyeyhs2eEdCfeKy+56qULfiKHe8nVVDM EIQ7BPef =sOmi -----END PGP SIGNATURE----- --jm8b7ayRJkwjIulh--