Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp8214rdh; Fri, 22 Sep 2023 22:35:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGf5pI2F+ss9IHvzkxEI1r/pI65ZfXzrNCqz7k8zIPHeUqPVXWH7OclHKJ1TaKw4HNYuuyl X-Received: by 2002:a05:6a00:2e8b:b0:68e:45df:4648 with SMTP id fd11-20020a056a002e8b00b0068e45df4648mr1808846pfb.23.1695447347693; Fri, 22 Sep 2023 22:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695447347; cv=none; d=google.com; s=arc-20160816; b=cQU5xCh/fJsj7ka1pvkQGx5W7I2k67GPiG1sLpjsy0+a3pFDu1L3zAs6lWXHZ1ZuVT lHYLvWAVux9QLYJ7sEmXUPmmKiTN84Bz9j0cE7JUAcieRqiLd6dedE0Fc0UzzAlMzsID TMefwZtGL5Bl97MqHIIfqOv/K+xfVVsSr1dNGwM3BbFLlF7cWhtm2dPsvt6oHrcBE7h2 k3/4BdoAbblvtbPXhTxgbSCsYClIwV/1jMBEbA0KuTTXE5j6TbOPYTD3kjD6n9VSxnr3 5AL5QX9ucxvcwU6b+gI7XyvhsucWOhXE4akfDQTiCHQQeZA2FOOxxZoQoxa7RTuIIweR 86dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bRzCTvAX8lq6ewJO7NcrsXgOFKTlOn5VfN4T0R6NmVE=; fh=aMGPFvMMPP8U074O8k0QzaIYdvBVzW4B4Car9rdeRjk=; b=duGWumoMAg5nqHbAkx2UPtOVLi2/J+IAnYuCQZ3b8F1vfQlTRze4UTpMy8F8lzrpmm QCYJyOK7HJUw6vAU/yaAE6YzXdbutTSjODyNYhRagsH38GGEJ5wLjp7eeYXtEZtmvpRN L62/ZyO8xG7CG+uZNigu9axOLwRbVPaitdAUx9DUuWlNLi3zlfrCFVJVg/SRc0ueKK6H 8HeqqIgbmDR/mAH2rNbKcpbEtLzYgAAg1bg5dr3CFqUJY5uJz+DHmnhVqDcnNrv9QOka fqUErPb89IMJ5KogEo00+g2XjobWzqfM+ic4vFqpUjf9tKOwtU4VpbUeADEJPZpH9Pa6 oU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F8nu001f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id s17-20020a656911000000b00578c4e244easi5400263pgq.791.2023.09.22.22.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 22:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F8nu001f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4BD5E8360A1D; Fri, 22 Sep 2023 15:48:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230176AbjIVWsz (ORCPT + 99 others); Fri, 22 Sep 2023 18:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjIVWsy (ORCPT ); Fri, 22 Sep 2023 18:48:54 -0400 Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E1A0AB; Fri, 22 Sep 2023 15:48:48 -0700 (PDT) Received: by mail-ua1-x92d.google.com with SMTP id a1e0cc1a2514c-79a2216a2d1so1284813241.2; Fri, 22 Sep 2023 15:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695422927; x=1696027727; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bRzCTvAX8lq6ewJO7NcrsXgOFKTlOn5VfN4T0R6NmVE=; b=F8nu001fh9WgcEMWgmhgT8GwdTfkC+V4+rEHu6URg92Kk1qnpwzJLnIIAvCeAeKZxh hMljXNWNZ54LayoY+ufMtdN2hbT2gAySBRN1wBb8Dofqib5vYAvQoAu8BrntRa3yJ2HT nwLq+myc9FqcdgINrtwUGyDbHJnkcsjH2seF1j6XRXG3thwvA33tXpgOC8jjCo7MuNw1 Unt90P+Z54cXt7UjBqDd4qQ/TfPf6W2ZsBteqKUMic48r8EIhiqcEEn8p376k7gYdcDP bUTuezPxA5EsgGiAMHA+h1kxkWinApDXlUoDs37i1cMbCkfTx2OxVitrF4gGYbBJl/BK NrDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695422927; x=1696027727; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bRzCTvAX8lq6ewJO7NcrsXgOFKTlOn5VfN4T0R6NmVE=; b=Bzt6FmyXTqK3lBNsRGFhyu2P40WHnrPgPg8M1OgeGPPGst+LFfGvQRwvaZQ6TzrzGw RcBQEopopiIVpUhUJcwxa8hKu3NPtbxmD7nH0H+FONi4UlKauV3Nh3PaMq75X2TGGgYv TskAF1La78wiRpokvOiXeR8j3ncrGiHp9nuTWhgkPbJ0yCvvPR8Pqtp8ucMjFqPskVzE Aapwne2/JfOxWouHgP60+EEPbVLm64HS1yImwkBGlxrp8y93r9RhTtv3SfmBiXlCCtrH nPcfqqkvG+X2/GT05TUKWmFj2UQ2OKxPteJngjKE6Qt5ge41QKPAORhUt6aRSpgtLEiw fxZw== X-Gm-Message-State: AOJu0Yz8+o4gTPhor9I6CP5P/VbRU7eQQJnQx3rJgROZoaaYdusIm7vz aSXVnWilnsN9rZQsiI/N+G2lv+E9scfbHwTqy5U= X-Received: by 2002:a67:ef99:0:b0:452:951f:2bb1 with SMTP id r25-20020a67ef99000000b00452951f2bb1mr838983vsp.29.1695422927511; Fri, 22 Sep 2023 15:48:47 -0700 (PDT) MIME-Version: 1.0 References: <20230921-th1520-mmc-v1-0-49f76c274fb3@baylibre.com> In-Reply-To: From: Robert Nelson Date: Fri, 22 Sep 2023 17:48:21 -0500 Message-ID: Subject: Re: [PATCH 0/6] RISC-V: Add eMMC support for TH1520 boards To: Drew Fustini Cc: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Adrian Hunter , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Jason Kridner , Xi Ruoyao , Han Gao , Icenowy Zheng , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 22 Sep 2023 15:48:56 -0700 (PDT) X-Spam-Level: ** On Fri, Sep 22, 2023 at 2:08=E2=80=AFPM Robert Nelson wrote: > > On Thu, Sep 21, 2023 at 8:51=E2=80=AFPM Drew Fustini wrote: > > > > This series adds support for the eMMC on the BeagleV Ahead and the > > Sipeed LicheePi 4A. This allows the kernel to boot with the rootfs on > > eMMC. > > > > I tested on top of v6.6-rc2 with this config [1]. I was able to boot > > both the Ahead [2] and LPi4a [3] from eMMC. The following prerequisites > > are required: > > > > [PATCH v2] riscv: dts: thead: set dma-noncoherent to soc bus [4] > > > > I pushed a branch [5] with this patch series and the above patch for > > those that find a git branch easier to test. > > > > Please note that only the MMC controller connected to the eMMC device > > is enabled in the device trees for these two boards. I did not yet > > attempt to configure and use the microSD card slot. My preference is to > > address that in a future patch series. > > > > References: > > [1] https://gist.github.com/pdp7/5fbdcf2a65eb1abdd3a29d519c19cdd2 > > [2] https://gist.github.com/pdp7/91a801a5f8d1070c53509eda9800ad78 > > [3] https://gist.github.com/pdp7/1445c3c991e88fd69c60165cef65726a > > [4] https://lore.kernel.org/linux-riscv/20230912072232.2455-1-jszhang@k= ernel.org/ > > [5] https://github.com/pdp7/linux/tree/b4/th1520-mmc > > This patchset came out very nice! > > v6.6-rc2 with Last RFC v2: > > [ 4.066630] mmc0: SDHCI controller on ffe7080000.mmc > [ffe7080000.mmc] using PIO > > debian@BeagleV:~$ sudo hdparm -tT /dev/mmcblk0 > > /dev/mmcblk0: > Timing cached reads: 1516 MB in 2.00 seconds =3D 758.09 MB/sec > Timing buffered disk reads: 84 MB in 3.01 seconds =3D 27.94 MB/sec > > vs v6.6-rc2 with this patchset: > > [ 4.096837] mmc0: SDHCI controller on ffe7080000.mmc > [ffe7080000.mmc] using DMA > > debian@BeagleV:~$ sudo hdparm -tT /dev/mmcblk0 > > /dev/mmcblk0: > Timing cached reads: 1580 MB in 2.00 seconds =3D 790.97 MB/sec > Timing buffered disk reads: 418 MB in 3.00 seconds =3D 139.11 MB/sec Drew pointed out on Slack, this was not quite right.. After more digging by Drew, CONFIG_DMA_GLOBAL_POOL is causing a DMA limitation with the multiplatform defconfig. so with, ./scripts/config --disable CONFIG_ARCH_R9A07G043 (to remove CONFIG_DMA_GLOBAL_POOL)... another 2x in buffered reads.. [ 4.059242] mmc0: SDHCI controller on ffe7080000.mmc [ffe7080000.mmc] using ADMA 64-bit debian@BeagleV:~$ sudo hdparm -tT /dev/mmcblk0 /dev/mmcblk0: Timing cached reads: 1600 MB in 2.00 seconds =3D 800.93 MB/sec Timing buffered disk reads: 892 MB in 3.00 seconds =3D 297.06 MB/sec Regards, --=20 Robert Nelson https://rcn-ee.com/