From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Guy Subject: Re: [PATCH v4 1/2] spi: implemented driver for Cirrus EP93xx SPI controller Date: Sun, 25 Apr 2010 10:38:32 +0100 Message-ID: References: <0D753D10438DA54287A00B0270842697636D85BE26@AUSP01VMBX24.collaborationhost.net> <20100421104651.GO19534@gw.healthdatacare.com> <0D753D10438DA54287A00B0270842697636D8C8672@AUSP01VMBX24.collaborationhost.net> <20100422175503.GE26418@gw.healthdatacare.com> <0D753D10438DA54287A00B0270842697636D9410F0@AUSP01VMBX24.collaborationhost.net> <20100423052003.GF26418@gw.healthdatacare.com> <0D753D10438DA54287A00B0270842697636D9419BC@AUSP01VMBX24.collaborationhost.net> <0D753D10438DA54287A00B0270842697636D9B794A@AUSP01VMBX24.collaborationhost.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , Mika Westerberg , "ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" To: H Hartley Sweeten Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Sorry about the incomplete message. Finger trouble. On 4/25/10, Martin Guy wrote: ... > SFRMOUT will have gone high: > if (espi->tx >0 && espi->tx < t->len && !(ep93xx_spi_read_u16(espi, SSPSR) & SSPSR_BSY)) { > /* More to transmit but device has gone idle means that > * SFRMOUT will have gone high */ > printk("ep93xx-spi: Underrun\n"); > } I've also done a version that doesn't printk() in the middle of it, which affects timing, but counts the underruns and reports at end of transfer. The result is that every 512-byte block underruns at least once, sometimes twice. I'll run a few more tests, e.g. dropping the clock rate, but at this point I'd be inclined to declare it impossible to keep SFRMOUT low during a transfer, and just use the simple non-continuous code with a comment at the top of the file that explains why you can't use SFRMOUT as a chip select for devices that require CS to remain asserted for the duration of a transfer. M ------------------------------------------------------------------------------