Skip to content

Commit

Permalink
ARM: sa11x0: assabet: avoid glitching GPIOs when setting outputs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Feb 9, 2012
1 parent 7186fb9 commit 4f592e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-sa1100/assabet.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,17 @@ 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
* logic 0. This ensures that we won't inadvertently toggle
* 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.
Expand Down

0 comments on commit 4f592e6

Please sign in to comment.