From patchwork Fri Sep 3 17:27:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Millbrandt X-Patchwork-Id: 63703 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id EE650B7292 for ; Sat, 4 Sep 2010 03:34:11 +1000 (EST) Received: from dekaexchange07.deka.local (mail.dekaresearch.com [208.65.175.196]) by ozlabs.org (Postfix) with ESMTP id 5D02FB714C for ; Sat, 4 Sep 2010 03:34:01 +1000 (EST) Received: from localhost.localdomain (10.1.1.72) by dekaexchange07.deka.local (10.1.1.12) with Microsoft SMTP Server id 8.1.240.5; Fri, 3 Sep 2010 13:36:59 -0400 From: Eric Millbrandt To: Grant Likely Subject: [PATCH v2] powerpc/5200: tighten up ac97 reset timing Date: Fri, 3 Sep 2010 13:27:38 -0400 Message-ID: <1283534858-17951-1-git-send-email-emillbrandt@dekaresearch.com> X-Mailer: git-send-email 1.6.3.1 MIME-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org, Eric Millbrandt X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 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@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Tighten up time timing around the gpio reset functionality. Add a 200ns delay before remuxing the pins back to ac97 to comply with the ac97 spec. Signed-off-by: Eric Millbrandt --- Scope shots availible upon request changes since v1 - amended with comments from Wolfram Sang arch/powerpc/platforms/52xx/mpc52xx_common.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) -- 1.6.3.1 -DISCLAIMER: an automatically appended disclaimer may follow. By posting- -to a public e-mail mailing list I hereby grant permission to distribute- -and copy this message.- This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email. diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index 6e90531..41f3a7e 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c @@ -325,12 +325,16 @@ int mpc5200_psc_ac97_gpio_reset(int psc_number) clrbits32(&simple_gpio->simple_dvo, sync | out); clrbits8(&wkup_gpio->wkup_dvo, reset); - /* wait at lease 1 us */ - udelay(2); + /* wait for 1 us */ + udelay(1); /* Deassert reset */ setbits8(&wkup_gpio->wkup_dvo, reset); + /* wait at least 200ns */ + /* 7 ~= (200ns * timebase) / ns2sec */ + __delay(7); + /* Restore pin-muxing */ out_be32(&simple_gpio->port_config, mux);