From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349AbdFBFjN (ORCPT ); Fri, 2 Jun 2017 01:39:13 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:57951 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbdFBFjK (ORCPT ); Fri, 2 Jun 2017 01:39:10 -0400 Date: Fri, 2 Jun 2017 07:38:52 +0200 From: Sascha Hauer To: Jiada Wang Cc: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, festevam@gmail.com Subject: Re: [PATCH linux-next v3 1/1] spi: imx: dynamic burst length adjust for PIO mode Message-ID: <20170602053852.7w4c35tn5daq7omy@pengutronix.de> References: <1495774962-2981-1-git-send-email-jiada_wang@mentor.com> <20170529095043.mytrgtyfne4dfmae@pengutronix.de> <59300177.5030908@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59300177.5030908@mentor.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 07:30:02 up 59 days, 22:12, 26 users, load average: 0.00, 0.00, 0.00 User-Agent: Mutt/1.6.2-neo (2016-06-11) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 04:58:47AM -0700, Jiada Wang wrote: > Hi Sascha > > On 05/29/2017 02:50 AM, Sascha Hauer wrote: > > Hi, > > > > On Thu, May 25, 2017 at 10:02:42PM -0700, jiada_wang@mentor.com wrote: > > > From: Jiada Wang > > > > > > previously burst length (BURST_LENGTH) is always set to equal > > > to bits_per_word, causes a 10us gap between each word in > > > transfer, which significantly affects performance. > > > > > > This patch uses 32 bits transfer to simulate lower bits transfer, > > > and adjusts burst length runtimely to use biggeest burst length > > > as possible to reduce the gaps in transfer for PIO mode. > > > > > First let me say that I'm not really looking forward to have this patch > > in the driver. It adds quite some code to already hairy code pathes in > > the imx-spi driver and I saw you have the same patch for DMA mode > > aswell. > > > > The driver has different function hooks for the different controllers. > > This patch breaks that. In some places it assumes that dynamic burst > > is only possible on i.MX51 type controllers and also that in case > > dynamic burst is enabled it must be an i.MX51 type controller. > > > > We should really see how this patch can be better integrated into the > > driver, or, how the driver can be changed to better support the dynamic > > burst usecase. > Yes, I can understand your concern, as this patch brings in a bunch of > change, > and changes the behaviour of data transfer. > how about introduce a new DTS property like "fsl,spi-dynamic-burst", > and only enables dynamic burst when this property is added. This will only reduce the testing coverage of the feature, not a good option. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |