Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2599871ybv; Fri, 14 Feb 2020 23:06:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxAoBmNNTalLIm23FLYvX8i2FMjwLy3iWJ/SlGf6Muko/uEIEKeWEgYcZVwGx6CKswfSJMy X-Received: by 2002:a05:6808:902:: with SMTP id w2mr4314216oih.170.1581750400029; Fri, 14 Feb 2020 23:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581750400; cv=none; d=google.com; s=arc-20160816; b=PjOjJuC5QAn3VL8wagiSlLuKxl6CCPYc83oLIS/r5MAAMnl0w8bFDeBFkQJt10ckn4 CwRR9byJI4647qkJQpq9uqdAkr2irrkoSYyi8Q91nd1qNEARzEf603oAZz0jK1fS/n4o CusowVjlRftgQP0vJnpjYu9oDtighjvSxZvs1Mm+eWZP3Pyt3Z5ldarOXE4OKGtmYH+n DgMcrp69dnK4Z18d933DU9qlJWwe0Qac/ueX+P/EgJZmnHGeU+b9eGr/BRCNDKYre6Ne baPJ+1FljM2J3drfbORy8ufLlk1ThU0LT6CZQchkKNq9yMUVYFQ1npJGwW6ita1ZTXWV QL0Q== 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=N39DpKb1zbYGk+aZJAg5ol/qxHEEKsb4pngbw2grk9s=; b=yKnDFIp7BnWCaksBVSPfc5qytgyaov6ZIUxMJc1rNdOUjaghDD0yLo2GpHOX4uB8aW nQ1DnAC+mxBAvw/ntfLEO/Ls+dPjxvjpvYQk6FUxEZcojvzw6LtFhaGMBV2t3co1Vnp/ 8FBLop/AMS4QcZR8hIBxoiBmDZIR9X6Aem1cN5A0dkgmtM7OBxJso40BYn76i0SEvMgc 71svAKPYwCL2C4zx28Nd6hT2EKzWKgwf5Md0iDkIhBHwuUicqihwJXfSIBofpgE566EL kaJbdvZme2MiVCfduDtHcLe8SbIqYjgDB4C2M5P19MCxKb17rTvv0XwUeQrjRcmzxnJU jZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eO1+UJHm; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si3820228oih.141.2020.02.14.23.06.27; Fri, 14 Feb 2020 23:06:40 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=eO1+UJHm; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725920AbgBOHGR (ORCPT + 99 others); Sat, 15 Feb 2020 02:06:17 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:45193 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbgBOHGQ (ORCPT ); Sat, 15 Feb 2020 02:06:16 -0500 Received: by mail-oi1-f195.google.com with SMTP id v19so11771035oic.12 for ; Fri, 14 Feb 2020 23:06:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N39DpKb1zbYGk+aZJAg5ol/qxHEEKsb4pngbw2grk9s=; b=eO1+UJHmEcsV312SYhyJA6ak1KgsL1IbKBC7k9lGGUS0lBeBXhmo3YzawaHWqAWyZ8 lo8ZMI9LO1z5FQyujtSwxlkfO6OhBVAupZvzFT8DkFENJZSpAH3NQqSGkd0vNsxLJ0si fR6kzV4L18SUTUbIeA9ftt2ou9EIFAQQhpX3CR3HY1kp0iOHGYH2ZoZeCvmS2BRDAv9/ fJrD/Twt6Odo36Y1Vq08UPJGR1yXvwX5MJsS5PupJ+7aCl/TwrT7ndyuPtrqNjADNJBS +yWBrd23XHbuOYXxdzD23HQBmSagx3bIq1jvzbO7lOmD4YkQ/TcJs5RYE7SkqJxUVdug kQcA== 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=N39DpKb1zbYGk+aZJAg5ol/qxHEEKsb4pngbw2grk9s=; b=h3HeVQy4VgbcXB1wAhrP4EDcQGe8/hy8KuYMZH13vYolZQyFMAQB3agqWV0bVpM5zF IYeIQz75cE+ntr3Av8LOzoQyD40lP4lIENEnEwoUytOldqcr3cXvqLXukkFa+FPiCMcc Q8KlhMh7vgVeY+nMZTAfZ5RI/O7mEHuqSGbOKIfkEMu445RihaYqxxcXmXkX653PcfQR UOhGdKZiPcBP1jYeRjJGutpt3z3PT4TEEjmH6P0LnFCnVuq+LbXsXgTx0+zrQ7o5PHFc WdVxhdiqLxFU6I1yRsIuYE4Tbzct+s6T1FwbIfHVh7QW5GTcVxORO12lpPD/P/Zv9t3O VuxQ== X-Gm-Message-State: APjAAAV+d8NUZ06e7AAnbEWiInt7rcgdOtKfHHPDXBgHrIjfO1qWv5Rv 1Lxdx1ov0sqR6WDIEf/T6/ElWUhr0fBPis/l/XU= X-Received: by 2002:aca:bc0a:: with SMTP id m10mr4335479oif.77.1581750376487; Fri, 14 Feb 2020 23:06:16 -0800 (PST) MIME-Version: 1.0 References: <20200208084022.193231-1-gch981213@gmail.com> In-Reply-To: <20200208084022.193231-1-gch981213@gmail.com> From: Chuanhong Guo Date: Sat, 15 Feb 2020 15:06:05 +0800 Message-ID: Subject: Re: [PATCH v2] mtd: mtk-quadspi: add support for DMA reading To: linux-mtd@lists.infradead.org Cc: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, open list 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 all! On Sat, Feb 8, 2020 at 4:41 PM Chuanhong Guo wrote: > > PIO reading mode on this controller is pretty inefficient > (one cmd+addr+dummy sequence reads only one byte) > This patch adds support for reading using DMA mode which increases > reading speed from 1MB/s to 4MB/s > > DMA busy checking is implemented with readl_poll_timeout because > I don't have access to IRQ-related docs. The speed increment comes > from those saved cmd+addr+dummy clocks. > > This controller requires that DMA source/destination address and > reading length should be 16-byte aligned. We use a bounce buffer if > one of them is not aligned, read more than what we need, and copy > data from corresponding buffer offset. > > Signed-off-by: Chuanhong Guo This patch is deprecated. I wrote a new spi-mem driver for this controller: https://patchwork.ozlabs.org/project/linux-mtd/list/?series=158701 and will be focus on getting that one merged instead. -- Regards, Chuanhong Guo