kernel-ark/arch/arm
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
..
boot [ARM] compressed/head.S debugging defaults to asm/arch/debug-macro.S 2005-11-16 14:59:51 +00:00
common [ARM] sa1111.c needs asm/sizes.h 2005-11-16 18:29:51 +00:00
configs [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
kernel [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix 2005-12-10 11:59:15 +00:00
lib [ARM] Fix get_user when passed a const pointer 2005-11-18 14:22:03 +00:00
mach-aaec2000
mach-clps711x
mach-clps7500 [ARM] Shut up gcc warning in clps7500 core.c 2005-11-21 17:03:15 +00:00
mach-ebsa110
mach-epxa10db
mach-footbridge [ARM] Re-fix footbridge 2005-11-13 09:53:34 +00:00
mach-h720x
mach-imx
mach-integrator
mach-iop3xx
mach-ixp4xx [ARM] Fix IXDP425 setup bug 2005-12-01 15:50:35 +00:00
mach-ixp2000
mach-l7200
mach-lh7a40x
mach-omap1
mach-omap2
mach-pxa [ARM] 3201/1: PXA27x: Prevent hangup during resume due to inadvertedly enabling MBREQ (replaces: 3198/1) 2005-12-12 16:44:05 +00:00
mach-realview [ARM] Realview core.c does not need mach-types.h 2005-11-25 15:57:21 +00:00
mach-rpc
mach-s3c2410 [ARM] 3161/1: BAST - fix commas on end of structs 2005-11-16 15:05:12 +00:00
mach-sa1100 [ARM] Shut up gcc warning in assabet.c 2005-11-21 17:01:13 +00:00
mach-shark
mach-versatile
mm [ARM SMP] Disable lazy flush_dcache_page for SMP 2005-11-30 16:02:54 +00:00
nwfpe
oprofile
plat-omap [ARM] Include asm/hardware.h instead of asm/arch/hardware.h 2005-11-16 14:51:20 +00:00
tools [ARM] Update mach-types 2005-11-25 15:59:01 +00:00
vfp
Kconfig [ARM] Use kernel/power/Kconfig 2005-11-15 11:31:41 +00:00
Kconfig.debug
Makefile