ARM: sa11x0: assabet: avoid glitching GPIOs when setting outputs
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 24 Jan 2012 09:23:19 +0000 (09:23 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Feb 2012 15:34:12 +0000 (15:34 +0000)
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

index 3a3282e08a70b6c487ad8b38a8937a828641433b..6356896587bfd65059734bbb5490e715a3b192c9 100644 (file)
@@ -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.
This page took 0.024956 seconds and 5 git commands to generate.