Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755999AbbDOPh6 (ORCPT ); Wed, 15 Apr 2015 11:37:58 -0400 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:46847 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbbDOPhv convert rfc822-to-8bit (ORCPT ); Wed, 15 Apr 2015 11:37:51 -0400 X-Greylist: delayed 3601 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Apr 2015 11:37:50 EDT Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: [PATCH] dmaengine: bcm2835: Add slave dma support From: Martin Sperl In-Reply-To: <1429091778-26350-1-git-send-email-noralf@tronnes.org> Date: Wed, 15 Apr 2015 16:37:46 +0200 Cc: dmaengine@vger.kernel.org, vinod.koul@intel.com, linux-kernel@vger.kernel.org, jonathan@raspberrypi.org, linux-rpi-kernel@lists.infradead.org, dan.j.williams@intel.com Content-Transfer-Encoding: 8BIT Message-Id: <75BEAE20-81A9-4567-8AB2-1C1865A0B72D@sperl.org> References: <1429091778-26350-1-git-send-email-noralf@tronnes.org> To: =?utf-8?Q?Noralf_Tr=C3=B8nnes?= X-Mailer: Apple Mail (2.2070.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1133 Lines: 25 > On 15.04.2015, at 11:56, Noralf Trønnes wrote: > +#define MAX_LITE_TRANSFER (SZ_64K - 1) > +#define MAX_NORMAL_TRANSFER SZ_1G ... > + if (c->ch >= 8) /* LITE channel */ > + max_size = MAX_LITE_TRANSFER; > + else > + max_size = MAX_NORMAL_TRANSFER; > + period_len = min(period_len, max_size); > + d->frames = (buf_len - 1) / (period_len + 1); I wonder if it is wise to split the transfers on 65535 bytes for the Lite DMA-channels - especially if you are transferring to word size registers (like SPI_FIFO), you still push 16384 words into the register and the last word of this transfer (word 16384) still is assumed 4 valid bytes by the device and thus gets operated upon - even if the last byte contains garbage from the DMA-transfer point of view. So maybe it is better to separate on SZ_64K-4 or better still SZ_32K to be on a power of 2 address boundary.-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/