Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2311687ybl; Sat, 24 Aug 2019 14:35:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdVC5j2iRubVEDcYMyGNfLou/jPs8YEh6dXJ8J6C8pQqxo1hUuH5FvogvjAhohDrgrwD4b X-Received: by 2002:aa7:9e9a:: with SMTP id p26mr12688509pfq.25.1566682543033; Sat, 24 Aug 2019 14:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566682543; cv=none; d=google.com; s=arc-20160816; b=iNZ5k0Ix92lDqmnQ6YIjLbx2QHpGWl64kOOwHuquYM2vfdM0Z7HpIDl2hcPrAnfWM/ yR3cLECXUYmDuQywzx5vilLukGHmkcOFuYrW9sJxKp/m0n0ASahREICjjNgPdLea6fD4 qx2VeoOvnEwIYejxsLFzxuDPrDChtmbmrNFvTZi59PequIsTqi0/6Xk7XzzjYGwk61sc iWK+zW5wFBBgQ2AbJnyfJB6aJ2cT2MmFVqeaBa8lvpMoRthxnAYmTZUpeEgR7t9mh11C sFf0qfEeWoBEdWTy5Mr5bzKuof0F6pSEOrbbWAOrTmT9Jk/L8TuqNeWvChQH26EKxBZq BSXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=savXqhs2uu2xmuEzviZKveXuAb0IFd9jFNiOauijyzY=; b=KakxUKYDZibIiMHOSGjbI/HGf3evqMj5r1Zj+sd02+lkgbzQTQkNhPCswVj3IHrW6i uI0DNGuffGUA5sT4vNH6DYE6XlEaO3tCfH6jNhFI0BGdN5H5dVM5/HjyD8RhzncNCF9V iXoDj7KYpfktFvssQJIWLCsDVLxTnzJVB/WEFc6F9HL3eCKI90vE1KIpxQbddFk1YMqH tS5M8XPzYzcPrMVkvTAVGAVzCsOL1Unr1FtUYCpkrs+82c09rKadLx+VRFGP2QKnFSpE KXGoKOyeuMAXL9iXmH708WD/G7oNoC6VIP+GnxmVCIA+074XBqKvW/rZSvF+WoKXJhLi Hx9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=Vez0S7pa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si6115257pfo.1.2019.08.24.14.35.27; Sat, 24 Aug 2019 14:35:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=Vez0S7pa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728029AbfHXVen (ORCPT + 99 others); Sat, 24 Aug 2019 17:34:43 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:43211 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727868AbfHXVen (ORCPT ); Sat, 24 Aug 2019 17:34:43 -0400 Received: by mail-ot1-f68.google.com with SMTP id e12so11904902otp.10; Sat, 24 Aug 2019 14:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=savXqhs2uu2xmuEzviZKveXuAb0IFd9jFNiOauijyzY=; b=Vez0S7pajWL6j3W9sv4ihT78Hv+L6CgTLaiEDc5PAUpRTdYrjtsii6vHCQ+sYoTaek VZ5TAQS0Gw14OskOgIRMxa9+9ZKvg094k/y2nwTFwScfsMWsYqM68sGFikZKnhSZzLBO L9S5ogu6GksQtl4Lv1Im6wSDHtUsB4GWzwy9PSF/Risf/g+Oh4hXbkwrbrwBytwfYz1Q qqsdNJNxDGej0xlOD0r7b749a+nS6RY0WA+MqVwH4PeCfoqn99n/QFvgkUPsRv6VGiiA 4wwX21xVn5rlCJUtfGO+KBjb1eVtpuKQ8eAZ6a5BGLeKfSLG2hB7gUn9FgchTEya9YUa PJug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=savXqhs2uu2xmuEzviZKveXuAb0IFd9jFNiOauijyzY=; b=VVkFekyLmefQAj63dQcf68BVcvZL9xgX5KmhQ9NWkSEsA+F8gMg4PLijDIH0D9xfbX SINDrmxdUZovImg5XEaLXWYLEF1x6jvBQbZOucvYXMHSxmH7/VTxrSQScpnzW6th659/ QqMD7f+9QPNf9M+s22IhHZCK95S+bTzk91G5sAAepth7Ta3AFG0fv4+LQsQdpB9EhAfY OU9jHZw5Ze8GlEoMX+VE5bXuuYQTPwEr+4aAGLguSUgjU14Yf5cTWrZxZueENP5kgIO7 VRQM8WLE27H9UbI/QwRz2b9iWYyKSpBTxmFqw0A0yTaawBJhPFnhFrGwq52fMmBYPFHj GTRw== X-Gm-Message-State: APjAAAU3UJjFVtPUlrIZjTGBPmSt4d1eRcdswa0VTMI/Sjp9nS8+4ACI tlTbSLpBr434+QACG+jRW5Rhy/EfwAJKpbL4QBo= X-Received: by 2002:a9d:7b44:: with SMTP id f4mr928724oto.42.1566682482002; Sat, 24 Aug 2019 14:34:42 -0700 (PDT) MIME-Version: 1.0 References: <20190708173330.13217-1-martin.blumenstingl@googlemail.com> <20190708173330.13217-3-martin.blumenstingl@googlemail.com> In-Reply-To: From: Martin Blumenstingl Date: Sat, 24 Aug 2019 23:34:31 +0200 Message-ID: Subject: Re: [PATCH RFC v1 2/2] mmc: host: meson-mx-sdhc: new driver for the Amlogic Meson SDHC host To: Ulf Hansson Cc: "open list:ARM/Amlogic Meson..." , DTML , "linux-mmc@vger.kernel.org" , Rob Herring , jianxin.pan@amlogic.com, Linux Kernel Mailing List , Linux ARM , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ulf, On Thu, Aug 22, 2019 at 3:53 PM Ulf Hansson wrote: > > On Mon, 8 Jul 2019 at 19:33, Martin Blumenstingl > wrote: > > > > WiP - only partially working - see performance numbers. > > > > Odroid-C1 eMMC (HS-200): > > Amlogic's vendor driver @ Linux 3.10: > > 7781351936 bytes (7.8 GB) copied, 134.714 s, 57.8 MB/s > > This driver: > > 7781351936 bytes (7.8 GB, 7.2 GiB) copied, 189.02 s, 41.2 MB/s > > > > EC-100 eMMC (HS MMC): > > Amlogic's vendor driver @ Linux 3.10: > > 15762194432 bytes (16 GB) copied, 422.967 s, 37.3 MB/s > > This driver: > > 15762194432 bytes (16 GB, 15 GiB) copied, 9232.65 s, 1.7 MB/s > > > > 1) Amlogic's vendor driver does some magic with the divider: > > clk_div = input_rate / clk_ios - !(input_rate%clk_ios); > > if (!(clk_div & 0x01)) // if even number, turn it to an odd one > > clk_div++; > > It's not clear to me whether what the reason behind this is, what is > > supposed to be achieved with this? > > > > 2) The hardcoded RX clock phases are taken from the vendor driver. It > > seems that these are only valid when fclk_div3 is used as input > > clock (however, there are four more inputs). It's not clear to me how > > to calculate the RX clock phases in set_ios based on the input clock > > and the ios rate. > > > > 3) The hardware supports a timeout IRQ but the max_busy_timeout is not > > documented anywhere. > > > > Signed-off-by: Martin Blumenstingl > > Martin, overall this looks good to me. Once you moved from RFC to a > formal patch I will check again, of course. OK, great in the meantime I got answers to my questions (off-list) from Jianxin. also someone asked me (just this week) for the .dts patches so he could test on his own board (I have them ready but didn't send them yet) unfortunately he ran into some data corruption on writing I can reproduce it but I didn't have time to debug this yet I'll send an updated version once I have resolved that - as non-RFC > There are a couple of calls to readl_poll_timeout(), for different > reasons, that I have some questions about, but we can discuss those in > the next step. sure. feel free to ask now since I still have to debug that data corruption problem as stated above Martin