From patchwork Mon Mar 20 14:38:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9634315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E30146020B for ; Mon, 20 Mar 2017 14:40:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4CE327D8D for ; Mon, 20 Mar 2017 14:40:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8D8127CF3; Mon, 20 Mar 2017 14:40:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0265827D8D for ; Mon, 20 Mar 2017 14:40:04 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=AvQ8F9qpdPH448i4YxSblMDWNxL3tSvZscOxEaRaYzU=; b=Aq/ Ec+d8RJdWoW5cUfGYrPkjQ5w+tAzvTp8cH4sbXZ3pc1GDin7xrHil/cQYeleBRnajVk2mKSej2XyT ysk7oZpIIXA1C1xXO3zH6bVZhbgJIeq6Nfcdggxrow8p8xtqydeHyrGx/zYcDI6tW5mbYFrjnJcND ufYxKe9nQmPj5NDMptu8I5EwoeIzVPv2gI6LsOqQVOLXm2QgjtlfBLwqD9i/Zi+LfFlSQ8OYiVOf/ FH+vQ8boxwJeyRxrVXtmD5dkFbsP8rRgxTCUEuyDrMRjrqtPb6U7+9njUYA/fH+it9nRRFP42Q/Py vwPQ0tInyVYfStbQeCcMum/PIJgVarw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cpyTX-0003TZ-2O; Mon, 20 Mar 2017 14:39:59 +0000 Received: from forward14h.cmail.yandex.net ([2a02:6b8:0:f35::9f]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cpyTR-0003Pg-F0 for linux-arm-kernel@lists.infradead.org; Mon, 20 Mar 2017 14:39:56 +0000 Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward14h.cmail.yandex.net (Yandex) with ESMTP id 20D3E21F37; Mon, 20 Mar 2017 17:39:28 +0300 (MSK) Received: from smtp3h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 610AC4413B6; Mon, 20 Mar 2017 17:39:16 +0300 (MSK) Received: by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id DvynYHlu1l-d8hegSnr; Mon, 20 Mar 2017 17:39:14 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1490020756; bh=YogL/NVnjigpHSgPfmMdxwfiiJx/DiaHqU4m/cGmpso=; h=From:To:Cc:Subject:Date:Message-Id; b=K+OkkyV11nNxobFHJTuYfQRVauF7rYtx7yMKhb/tQpzq21tgsLF4pldRuIx+PhpBs 7SFUzob2WCBNHvoExUcfwkHZZVbjQ8f6xanAy9Tqck6iwo1CP5Uk31aXfzpzW0WWsY lRf5Jc6reIoZu5VNAHjThSAKaHjqGPfcSPr3xFSM= Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 0,1 0,1 0,1 1130000036118848 From: Icenowy Zheng To: Mark Brown , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH] spi: sun6i: update max transfer size reported Date: Mon, 20 Mar 2017 22:38:49 +0800 Message-Id: <20170320143849.13213-1-icenowy@aosc.xyz> X-Mailer: git-send-email 2.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170320_073953_910530_CA81B7C5 X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Ayotte , Icenowy Zheng , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The spi-sun6i driver have already got the ability to do large transfers. However, the max transfer size reported is still fifo depth - 1. Update the max transfer size reported to the max value possible. Reported-by: Martin Ayotte Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard --- drivers/spi/spi-sun6i.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 6e9ca93db9bf..03a773a9531a 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -194,9 +194,7 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable) static size_t sun6i_spi_max_transfer_size(struct spi_device *spi) { - struct sun6i_spi *sspi = spi_master_get_devdata(spi->master); - - return sspi->fifo_depth - 1; + return SUN6I_MAX_XFER_SIZE - 1; } static int sun6i_spi_transfer_one(struct spi_master *master,