From patchwork Thu Apr 30 23:48:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 26722 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id B1640B707F for ; Fri, 1 May 2009 10:07:14 +1000 (EST) Received: by ozlabs.org (Postfix) id 9F99AE01BE; Fri, 1 May 2009 09:52:58 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 9DFD3E01BD for ; Fri, 1 May 2009 09:52:58 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from buildserver.ru.mvista.com (unknown [213.79.90.228]) by ozlabs.org (Postfix) with ESMTP id 9046EDF45A for ; Fri, 1 May 2009 09:48:26 +1000 (EST) Received: from localhost (unknown [10.150.0.9]) by buildserver.ru.mvista.com (Postfix) with ESMTP id 483168826; Fri, 1 May 2009 05:48:47 +0500 (SAMST) Date: Fri, 1 May 2009 03:48:24 +0400 From: Anton Vorontsov To: Kumar Gala Subject: [PATCH 3/9] spi_mpc83xx: Add small delay after asserting chip-select line Message-ID: <20090430234824.GC7901@oksana.dev.rtsoft.ru> References: <20090430234739.GA27709@oksana.dev.rtsoft.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090430234739.GA27709@oksana.dev.rtsoft.ru> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: linuxppc-dev@ozlabs.org, Andrew Morton , David Brownell , linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org This is needed for some underlaying GPIO controllers that may be a bit slow, or if chip-select signal need some time to stabilize. For what it's worth, we already have the similar delay for chip-select de-assertion case. Signed-off-by: Anton Vorontsov --- drivers/spi/spi_mpc83xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 08b49d2..d378d5e 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -383,8 +383,10 @@ static void mpc83xx_spi_work(struct work_struct *work) break; } - if (cs_change) + if (cs_change) { mpc83xx_spi_chipselect(spi, BITBANG_CS_ACTIVE); + ndelay(nsecs); + } cs_change = t->cs_change; if (t->len) status = mpc83xx_spi_bufs(spi, t);