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 EFC9AC352A4 for ; Mon, 10 Feb 2020 08:41:08 +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 BE0A320733 for ; Mon, 10 Feb 2020 08:41:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l27soVDY"; 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 BE0A320733 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-arm-kernel-bounces+infradead-linux-arm-kernel=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=eZACidU5TAMm0wFgOKV6dO7nNR+Q3Yeoeov/NHr8F60=; b=l27soVDYGBwseW G0mEUrvJglr64XUY2MgpXtUNz35EDjCJg2sKu8QPfFu5wN4I2gqkIvLzwbdjOByFT71TtUCW3m/HL RACr4jL7Uio0lU2CWM+LI981ZZrRsODr+hei6KXjVjoZA52pCEmLM3TV2S4WSxQDykH/3Jcho/Nit fc+KMugudJ3WpxJzP5+JtmdCvzY/PG86BkxNc/pSKU1cgfOac2F3mmSpuGwVUsr+ytubsWr65JisL czrxP9dN9Q8ySArze+6bIsHCNdLNneKA/1f7p2CeHPDIFt0BCJBScWWx3yGfGSfBkNoq/wYr93As/ E5jRVnNQllAN4w48L1AQ==; 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 1j14cu-0003UK-8C; Mon, 10 Feb 2020 08:41:08 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=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-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel