Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4604367ybv; Mon, 10 Feb 2020 23:30:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzjhZCDpOISu6yr23S80ifyrsaz++JPvkE0yaXTn9ha9L9h5Lu07gMQvi3pva2krieWD5jQ X-Received: by 2002:a05:6830:1d6e:: with SMTP id l14mr4107317oti.32.1581406235351; Mon, 10 Feb 2020 23:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581406235; cv=none; d=google.com; s=arc-20160816; b=nYeJf+5AYrXsqHjeA4h1vtzy9amfWGUoyO8yYr8qY7w61XnsWK9/kWwZvBt7HPmf2I gDqb1VdHtBVkeAluCaM1YNNIvRs8iSTOnSRsK2UCt8qJXD3fYoSLjaO+fc/qhwpCIRvY ROBpWKLWUZZAjmsfosctWMbOMLEIU/MQnxv65e7YhGM6tgPfE3Ls/wo2NOaRWYRKCzEN qFmlMPk4m//U+EaQQRf9pAgcwJQ7eL04zVX7JnNZFHyEQatbFhtOYwksW2/eOnJ1Bnbj 9/rL4tOu61ZHmgpKN3VhLVXSJq4E8SyPzGjX7ID1v0Pcih98wjJQRO1BH2LwuvbLgDSu yN/Q== 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=0qsBaYW+8tB375NH6OQOHYpSP00PTX/24760IzgBPWM=; b=dPGrUCU202TbVQLBDwgMF9BH2g5KzBFVYg3QLNr+x2v41iZL/6OIDreMYwcJZ/NG3X seyyR6qhl2iy/EHl6+ekALo0F/I9wseMgk2PuaHJMRC7gxu1ii6y5+TFjdH0Ws8YO1+i UJ/ToHiRG7mZOenCINHHcL2vcWQqQaZqhtXce8mNr3akSgLNqpHNp2M3NzjzRk48xB7h iRKZl2FuiSwsxZPZlpqM/FCW6bMqHnKK8pz1Vh09p4cLHPgtGrLpc5IkZj/xZx4QDbU/ UTBrIz6yXFv7bxIt+dcbD3cfzzQU5Z2Xavlgff6LInsLeH0iq73drnCJFyncdMnMxTC0 V1NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g0PIYJaW; 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 w29si1723765oth.313.2020.02.10.23.30.23; Mon, 10 Feb 2020 23:30:35 -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=g0PIYJaW; 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 S1728004AbgBKGz3 (ORCPT + 99 others); Tue, 11 Feb 2020 01:55:29 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46630 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbgBKGz3 (ORCPT ); Tue, 11 Feb 2020 01:55:29 -0500 Received: by mail-ot1-f67.google.com with SMTP id g64so9022817otb.13 for ; Mon, 10 Feb 2020 22:55:28 -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=0qsBaYW+8tB375NH6OQOHYpSP00PTX/24760IzgBPWM=; b=g0PIYJaWAWx7ZYpbMTj/h5I8yC9Of7h+6G71MOTcoKwG1sXqIRCtHnj2A1Bog8F0D6 gRegnL9DOFPHP3NfmRiQphE7IsOBTlUM31AvacH3fpoDnqGnK2q8LqWAH2RR0/Q/7WzI duP1KOPfAuTlULiUAgHq6CLpSbUiTV1SO95ePO4rsRoWpQ0JplY3NS7yClKK7Cu6bwl8 pVzpg5r5EZTiEqSZ4ZQxHUcDTdJ4FA67PpBHgKvI1GDq69mKuFWRGxvx3K0fTf7J98+/ IQsiov/bIeai8YzlLGeROG8O9fZ7Fq2Ld7LVDxIjP47KB+IR1/ZBFkCo7JBoQGKe+ew2 yJEg== 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=0qsBaYW+8tB375NH6OQOHYpSP00PTX/24760IzgBPWM=; b=atfv1n017Hkxu1fVMFWOfCgSLoL7oBEu2bjhJ6clxfYpMIOKxgQnGK+af2PZ5X6OZq LEEEMCQUNOyTGcDJ6rAe15L0P2iovigoY8JvK9K06hSR/7Aq6lAScsxsJPbCgKub3rpM v5A+1gklzVH0MsGU8lhKaqiSAOYI8bqwjQQn7SDmoX/jTRfmm+Y3WRfGtlLRTZH8Frhq hTu7huyQdI0/il/B/x4ZJxUbvdFpnyEQ3derPSxb83feq8uQCWoNLThjGa1BA/l0XxJg NAHPtIx7on04L6lEUkeyvh1eVyqiGmL10haALEP7OnvlSc+b/h2zF3on3IVU/O8RxID7 6pvA== X-Gm-Message-State: APjAAAVGtBFiNSaFJtJP/UElSY0JUU5rt0E8uYkfYR2MwW7zMxNN08Pr Oyg0wWXyqLNoL4ivYje8eaFx6kYvZZt9nLLJsjmfGUnh X-Received: by 2002:a9d:3e43:: with SMTP id h3mr3925618otg.84.1581404128257; Mon, 10 Feb 2020 22:55:28 -0800 (PST) MIME-Version: 1.0 References: <20200208084022.193231-1-gch981213@gmail.com> <1581323455.2213.6.camel@mtksdaap41> In-Reply-To: <1581323455.2213.6.camel@mtksdaap41> From: Chuanhong Guo Date: Tue, 11 Feb 2020 14:55:17 +0800 Message-ID: Subject: Re: [PATCH v2] mtd: mtk-quadspi: add support for DMA reading To: Yingjoe Chen Cc: linux-mtd@lists.infradead.org, Vignesh Raghavendra , Tudor Ambarus , Richard Weinberger , open list , linux-mediatek@lists.infradead.org, Miquel Raynal , Matthias Brugger , linux-arm-kernel@lists.infradead.org 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! On Mon, Feb 10, 2020 at 4:31 PM Yingjoe Chen wrote: > > 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. > > Hi Chuanhong, > > Thanks for your patch, I'm checking with Guochun to see if we could > release IRQ related information to you. Thanks for the info. I'd like to keep using polling mode in this patch for easier reviewing. It's already a pretty lengthy patch now. I may implement IRQ support in future patches. > > > 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. > > I've checked with our HW guys. The limitation is on DRAM only. > So for read we should check buffer and length to make sure it is > aligned, but don't need to check from. My previous test on mt7629 shows that from address also needs to be aligned. e.g. If I perform a DMA read from 0x2 I actually got data starting from 0x0 instead. Regards, Chuanhong Guo