From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Guy Subject: Re: [PATCH v2 1/3] spi: implemented driver for Cirrus EP93xx SPI controller Date: Fri, 9 Apr 2010 19:08:16 +0100 Message-ID: References: <9de3769ae253830fb0eebc98d299137c59c69b8c.1268930557.git.mika.westerberg@iki.fi> <56d259a01003250649ubf0e32ejc15e4f3b45ec43cd@mail.gmail.com> <20100325184316.GB20512@gw.healthdatacare.com> <20100406054418.GA27465@gw.healthdatacare.com> <20100406181839.GA2685@gw.healthdatacare.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Mika Westerberg 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 Oops, I mean - unsigned n; /* Number of bytes to send to the TX FIFO */ + unsigned n; /* Number of words to send to the TX FIFO */ and - n = t->len - espi->tx; /* Total number of bytes waiting to be - * sent to the TX FIFO for this transfer */ + /* Number of words still to be sent to the TX FIFO */ + n = (t->len - espi->tx) / (bits_per_word(espi) > 8 ? 2 : 1); sorry about that. M ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev