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 61F53C4338F for ; Thu, 5 Aug 2021 19:40:06 +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 18CDD61102 for ; Thu, 5 Aug 2021 19:40:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 18CDD61102 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 A8B378203B; Thu, 5 Aug 2021 21:40:01 +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="S6IwouEG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6FF4A80223; Thu, 5 Aug 2021 21:39:59 +0200 (CEST) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (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 75180800BF for ; Thu, 5 Aug 2021 21:39:55 +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-xf29.google.com with SMTP id m12so3588095qvt.1 for ; Thu, 05 Aug 2021 12:39:55 -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=q4H0tjhnBqE8pJTC2ZdFljsorjnuTfZMXR9hpVBjZdI=; b=S6IwouEGZM9q96c0nzR3PFjw6YvDnokceIVVIlMTCNmEBcS2j3Obda7LzdoQSzamqt hAx+n5V+P0gdZQH5vz7CoN+w8c1WsXxvHpDNMiIrFKZfzsUQ4SYVqz1mDUipTCKEKNUr dpccLHcG/2VguZfLXIBw+P1VxU42EgpcWDJv4= 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=q4H0tjhnBqE8pJTC2ZdFljsorjnuTfZMXR9hpVBjZdI=; b=lDfuf1RsC3MwbU+W2X/eaGxrmJ5Juto4rezgcxksPMrnwEHz804jNHl6KEjPW+BTzs yk0/Mbe1XlU6wyIhAhF5iA2LplUEjcscQtWHqkuMGcrGUIZ78pjoclps76c219e5VB62 bA1OyGIF4vUXK61vuPVpyy1wngbeItPhKwXfspqx7IHfTA8bCRmSl4W45txBSvcx6een OKF8322Vn13TDHIL8UGRs6YIVlroJa8+7zQ+Z1ol3J4iSCK6im0FUlepql621RbhyKev zded8Q4GT3KgNKLgeZPmKMzf1gOQ49K2qF1BFmuQfZDZCWYRBE8S96x2ataBRLRH/Rk9 PmnA== X-Gm-Message-State: AOAM532ZbYwjd+eUKdCl+04SBbKQwdZ7TGN2ixEokyxD8alLvE3aorOn F2g6lXof6MOqnqHJyQ6gPDdzFA== X-Google-Smtp-Source: ABdhPJwl9Yl3WbC0HRE/XIEwnyFwTNSMVW9b3Tr9tqjumpl0qqp65weHjSiAcMnVYyQ2Tucdj6kTZQ== X-Received: by 2002:ad4:5ce3:: with SMTP id iv3mr6988186qvb.54.1628192394268; Thu, 05 Aug 2021 12:39:54 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-91f5-8795-37c3-31a0.res6.spectrum.com. [2603:6081:7b01:cbda:91f5:8795:37c3:31a0]) by smtp.gmail.com with ESMTPSA id y124sm3604094qke.70.2021.08.05.12.39.52 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Aug 2021 12:39:53 -0700 (PDT) Date: Thu, 5 Aug 2021 15:39:50 -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: <20210805193950.GP858@bill-the-cat> References: <20210804184905.GD9379@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="movZSYdJ761vCHaE" 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 --movZSYdJ761vCHaE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 05, 2021 at 01:20:51PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 4 Aug 2021 at 12:49, Tom Rini wrote: > > > > On Wed, Aug 04, 2021 at 10:09:55AM -0600, Simon Glass wrote: > > > Hi Jagan, > > > > > > On Tue, 3 Aug 2021 at 09:01, Jagan Teki = wrote: > > > > > > > > Yes, this is the old discussion and triggered again now since we ha= d 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 s= ide. > > > > > > > > http://u-boot.10912.n7.nabble.com/PATCH-v10-00-27-dm-Generic-MTD-Su= bsystem-with-SPI-NOR-interface-tt315694.html#none > > > > http://u-boot.10912.n7.nabble.com/PATCH-0-5-mtd-Implement-MTD-UCLAS= S-use-SPINOR-td419538.html#a419541 > > > > https://patchwork.ozlabs.org/project/uboot/cover/20200709111709.689= 04-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 a= re > > > > registered to UCLASS_BLK > > > > 4. Sync only respective flash specific code, and drop __UBOOT__ > > > > 5. Interface mtd, sf, and nand commands to UCLASS_MTD. > > > > > > This all seems good to me. > > > > > > > > > > > Hard points: > > > > 1. Hard to arrange Linux specific code and drop unneeded _UBOOT_ co= de, > > > > but possible. > > > > 2. Requires a lot of testing. > > > > > > 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 > I don't mean QEMU, just sandbox emulators. They are pretty simple to > write and faster/easier to run and debug than qemu. If something exists in QEMU today, there's nothing to write. There are many things sandbox is good for, and that I wish we made more use of (it would be amazing if allyesconfig was viable for sandbox so everything outside of arch/ could be static analyzed for example). But when it comes to driver testing, I really want to know what we can do with QEMU first. --=20 Tom --movZSYdJ761vCHaE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEMPoMACgkQFHw5/5Y0 tywOZwwAhlnoJ9RvjlgEwk71qOalW5J53+FwQVug/NbGKpdZ9O/jOQkXt0kb9ESn Y0BzXNqlhMBpODxntFWYI4lstXcwnAkzh+yjVmKAlTzdpHMRw6/rlLNmIrPjVEiz 8YA5T+JWDlk66XRWzoLcjiMcLCLvnaUhJEr1o0BqZa7eiZfTV1wgc6fRhF7PsRYv fiS1L3AC2OLY93tM5Km3kAGVHbwKvnjykWn8IxG20xI4vgfi/W6nQ6cq/m7HLJ/Y uEd9wEgbU94rWVZyw9LWbZDA41c4W5GlMdJGgri0VvM2QXplc57lkO9rtdqjvJCV CD1hOboLcO/oemZOTHYyE1W/6Kpq3S1yEoOSs8m3ZHF5dzrIqbn+QxLyYntwT8C+ er3EOfAILPWcVwUtUKvdWzgiVUg+lWokTn2MjekXhM7Ehtntmj5d4qFHLwaagDPv pHzGZEexhIi1/6dixDfaK4+UXjyU+9CU564h+GU0Xjqiiv0NKcMZLwXNmlSWwdVY 8Uibl0kz =DMqZ -----END PGP SIGNATURE----- --movZSYdJ761vCHaE--