linux/arch/arm/mach-pxa
Lothar Wassmann 1ee9530a71 [ARM] 3201/1: PXA27x: Prevent hangup during resume due to inadvertedly enabling MBREQ (replaces: 3198/1)
Patch from Lothar Wassmann

The patch makes sure, that the ouptut functions of pins are restored
before restoring the Alternat Function settings, preventing pins from
being intermediately configured for undefined or unwanted alternate
functions.

Here is the original comment:
I've got a PXA270 system that uses GPIO80 as nCS4. This system did
hang on resume. Digging into the problem I found that the processor
stalled immediately when restoring the GAFR2_U register which restored
the alternate function for GPIO80. Since the GPDR registers were
restored after the GAFR registers, the offending GPIO was configured
as input at this point.
Thus the alternate function that was in effect after restoring the
GAFR was in fact the input function "MBREQ" instead of the output
function "nCS4". The "PXA27x Processor Family Developer's Manual"
(Footnote in Table 6-1 on page 6-3) states that:
"The MBREQ alternate function must not be enabled until the PSSR[RDH]
bit field is cleared. For more details, see Table 3-15, "PSSR Bit
Definitions" on page 3-71."

There is another note in the Developer's Manual (chapter 24.4.2
"GPIO operation as Alternate Function" on page 24-4)
stating that:
"Configuring a GPIO for an alternate function that is not defined for
it causes unpredictable results."

Since some GPIOs have no input function defined, and to prevent
inadvertedly programming the MBREQ function on some pin, the GAFR
registers should be restored after the GPDR registers have been
restored.

Additional provisions have to be made when the MBREQ function is
actually required. The corresponding GAFR bits should not be restored
with the regular GAFR restore, but must be set only after the PSSR
bits have been cleared.

Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-12 16:44:05 +00:00
..
akita-ioexp.c [ARM] 3160/1: SharpSL: Add driver for Akita specific GPIOs 2005-11-13 10:07:48 +00:00
corgi.c [ARM] 3093/1: SharpSL PCMCIA Updates for Cxx00 models 2005-11-08 19:15:43 +00:00
corgi_lcd.c [ARM] Include asm/hardware.h instead of asm/arch/hardware.h 2005-11-16 14:51:20 +00:00
corgi_pm.c [ARM] 3158/1: SharpSL: Add PM device driver for the SL-C7x0 machines. 2005-11-13 10:07:46 +00:00
corgi_ssp.c Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
dma.c
generic.c Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
generic.h
idp.c Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
irq.c
Kconfig [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
leds-idp.c
leds-lubbock.c
leds-mainstone.c
leds.c
leds.h
lubbock.c [ARM] 3087/1: PXA2xx flash platform device conversion 2005-11-04 17:15:45 +00:00
mainstone.c [ARM] 3087/1: PXA2xx flash platform device conversion 2005-11-04 17:15:45 +00:00
Makefile [ARM] 3160/1: SharpSL: Add driver for Akita specific GPIOs 2005-11-13 10:07:48 +00:00
Makefile.boot
pm.c [ARM] 3201/1: PXA27x: Prevent hangup during resume due to inadvertedly enabling MBREQ (replaces: 3198/1) 2005-12-12 16:44:05 +00:00
poodle.c [ARM] 3093/1: SharpSL PCMCIA Updates for Cxx00 models 2005-11-08 19:15:43 +00:00
pxa25x.c [ARM] 2787/2: PXA27x low power modes support 2005-10-28 16:25:01 +01:00
pxa27x.c Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
sharpsl.h [ARM] 3154/1: SharpSL PM Driver updates 2005-11-12 18:53:48 +00:00
sharpsl_pm.c [ARM] 3154/1: SharpSL PM Driver updates 2005-11-12 18:53:48 +00:00
sleep.S [ARM] 2787/2: PXA27x low power modes support 2005-10-28 16:25:01 +01:00
spitz.c [ARM] 3149/1: SharpSL: Add Akita (SL-C1000) machine support 2005-11-12 18:53:48 +00:00
spitz_pm.c [ARM] 3159/1: SharpSL: Add PM device driver for the SL-Cx00 machines. 2005-11-13 10:07:47 +00:00
ssp.c [ARM] 3098/1: pxa2xx disable ssp irq 2005-11-10 17:45:39 +00:00
standby.S [ARM] 2787/2: PXA27x low power modes support 2005-10-28 16:25:01 +01:00
time.c [ARM] 3135/1: harden SA11x0 and PXA2xx timer init code 2005-11-08 22:43:06 +00:00
tosa.c [ARM] 3170/1: Sharp SL-6000x: platform device conversion fixup 2005-11-21 15:17:06 +00:00