linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/17] ARM: sa11x0: assabet: avoid glitching GPIOs when setting outputs
Date: Fri, 03 Feb 2012 19:32:08 +0000	[thread overview]
Message-ID: <E1RtOrg-0001Bh-Hi@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20120203193059.GF14129@n2100.arm.linux.org.uk>

Avoid glitching the GPIO signals during initialization, which can
have undesirable effects.  Ensure that the desired pin state is set
before we change the GPIO pin direction to be an output.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-sa1100/assabet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 3a3282e..6356896 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -202,8 +202,8 @@ static void __init assabet_init(void)
 	/*
 	 * Ensure that the power supply is in "high power" mode.
 	 */
-	GPDR |= GPIO_GPIO16;
 	GPSR = GPIO_GPIO16;
+	GPDR |= GPIO_GPIO16;
 
 	/*
 	 * Ensure that these pins are set as outputs and are driving
@@ -211,8 +211,8 @@ static void __init assabet_init(void)
 	 * the WS latch in the CPLD, and we don't float causing
 	 * excessive power drain.  --rmk
 	 */
-	GPDR |= GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
 	GPCR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
+	GPDR |= GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
 
 	/*
 	 * Set up registers for sleep mode.
-- 
1.7.4.4

  parent reply	other threads:[~2012-02-03 19:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 19:30 [PATCH 00/17] SA11x0 cleanups (mainly assabet/neponset) Russell King - ARM Linux
2012-02-03 19:31 ` [PATCH 01/17] ARM: sa11x0: convert to use DEFINE_RES_xxx macros Russell King - ARM Linux
2012-02-03 19:31 ` [PATCH 02/17] ARM: sa11x0: assabet: deassert QMUTE to codec while codec is unpowered Russell King - ARM Linux
2012-02-03 19:32 ` Russell King - ARM Linux [this message]
2012-02-03 19:32 ` [PATCH 04/17] ARM: sa11x0: assabet: ensure that GPIO27 is driven Russell King - ARM Linux
2012-02-03 19:32 ` [PATCH 05/17] ARM: sa11x0: neponset: fix interrupt setup Russell King - ARM Linux
2012-02-03 19:33 ` [PATCH 06/17] ARM: sa11x0: neponset: provide function to manipulate NCR_0 Russell King - ARM Linux
2012-02-03 19:33 ` [PATCH 07/17] ARM: sa11x0: neponset: shuffle some code around Russell King - ARM Linux
2012-02-03 19:33 ` [PATCH 08/17] ARM: sa11x0: neponset: add driver .owner initializer Russell King - ARM Linux
2012-02-03 19:34 ` [PATCH 09/17] ARM: sa11x0: neponset: save and restore MDM_CTL_0 Russell King - ARM Linux
2012-02-03 19:34 ` [PATCH 10/17] ARM: sa11x0: neponset: dynamically create neponset child devices Russell King - ARM Linux
2012-02-03 19:34 ` [PATCH 11/17] ARM: sa11x0: neponset: implement support for sparse IRQs Russell King - ARM Linux
2012-02-03 19:35 ` [PATCH 12/17] ARM: sa11x0: neponset: get parent IRQ from neponset device resource Russell King - ARM Linux
2012-02-03 19:35 ` [PATCH 13/17] ARM: sa11x0: neponset: place smc91x and sa1111 resources in neponset device Russell King - ARM Linux
2012-02-03 19:35 ` [PATCH 14/17] ARM: sa11x0: neponset: suspend/resume in _noirq state Russell King - ARM Linux
2012-02-03 19:36 ` [PATCH 15/17] ARM: sa11x0: assabet/neponest: create neponset device in assabet.c Russell King - ARM Linux
2012-02-03 19:36 ` [PATCH 16/17] ARM: sa11x0: neponset: move register definitions to neponset.c Russell King - ARM Linux
2012-02-03 19:36 ` [PATCH 17/17] ARM: sa11x0: neponset: don't static map neponset registers Russell King - ARM Linux
2012-02-03 20:43 ` [PATCH 00/17] SA11x0 cleanups (mainly assabet/neponset) Nicolas Pitre
2012-02-03 20:53   ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1RtOrg-0001Bh-Hi@rmk-PC.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).