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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 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 4ED6EC352A4 for ; Mon, 10 Feb 2020 08:41:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21D5520733 for ; Mon, 10 Feb 2020 08:41:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jbUQuIdG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MlgjgnoI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21D5520733 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u4LfMVxzhq4qep5Kjvj4XX3ae82Il1RATa6GdNyu3+4=; b=jbUQuIdGuU0udQ 6bYSDedJzBkIanrjN8LPr0TKz7Sw1hfrAvZD8Q+cHk7xfe1cLjJ2BVPOVusbLMdyfusqJOd0e7cSp WdhDSUmL+83gBGaQsM3bx8iT+pSwQu0uGNmf12zjjH41aMcRqVdbR/CSRcV4RIWTNMRN1w5uYryki 1mEZoxU+p6/OxITjLtzCDvQ3BVPNW8FLaSqX8AJAROZGi7cVT4HtttDpe2nCC/C91UTc/5nd3+oPe KH0bLCXd9o8YqPA5NPQSb0M+8uJUkd8BRwhr1I3W/55MgOurLR2UgxpfjxRUv/akv4m5x2F6YimFZ mbLDPogUYpHagokop6WQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j14ct-0003Ta-GT; Mon, 10 Feb 2020 08:41:07 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j14cq-0003Sp-OI; Mon, 10 Feb 2020 08:41:06 +0000 X-UUID: 78f00cbbde854adc8629ad60cc099217-20200210 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=Jme6XnUcV22sv+Lb0GfidwDPAVP5wJkTpFliBwJ3cpI=; b=MlgjgnoIA4AD4sGad07cNjNs9aeX4kPOkUBvg6aJe/XqqKbp6z7t+WdI8EyBQG7wwk4xzFLVfTa+JAxwf9PZ2n7AHIwcbS7t1WZ32/TY3Vt36qp+4oPBYAJm/RO/vCS/hK5rMBvIQNeNet3kupcf44gHZJvloGaQBGVgtKNZf/Y=; X-UUID: 78f00cbbde854adc8629ad60cc099217-20200210 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1163598211; Mon, 10 Feb 2020 00:40:59 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Feb 2020 00:30:55 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkcas08.mediatek.inc (172.21.101.126) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Feb 2020 16:31:12 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 10 Feb 2020 16:31:12 +0800 Message-ID: <1581323455.2213.6.camel@mtksdaap41> Subject: Re: [PATCH v2] mtd: mtk-quadspi: add support for DMA reading From: Yingjoe Chen To: Chuanhong Guo Date: Mon, 10 Feb 2020 16:30:55 +0800 In-Reply-To: <20200208084022.193231-1-gch981213@gmail.com> References: <20200208084022.193231-1-gch981213@gmail.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200210_004104_796155_322B26E2 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh Raghavendra , Tudor Ambarus , Richard Weinberger , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Miquel Raynal , Matthias Brugger , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Sat, 2020-02-08 at 16:40 +0800, 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. Hi Chuanhong, Thanks for your patch, I'm checking with Guochun to see if we could release IRQ related information to you. > 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. Joe.C _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek