linux/arch
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
..
alpha [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
arm [ARM] 3201/1: PXA27x: Prevent hangup during resume due to inadvertedly enabling MBREQ (replaces: 3198/1) 2005-12-12 16:44:05 +00:00
arm26 [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
cris [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
frv [PATCH] FRV: Make the FRV arch work again 2005-11-28 14:42:23 -08:00
h8300 [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
i386 [ACPI] properly detect pmtimer on ASUS a8v motherboard 2005-11-30 22:27:16 -05:00
ia64 [IA64] Remove getting break_num by decoding instruction 2005-11-29 09:24:39 -08:00
m32r [PATCH] m32r: M3A-2170(Mappi-III) IDE support 2005-11-28 14:42:24 -08:00
m68k [PATCH] m68k: convert thread flags to use bit fields 2005-11-13 18:14:14 -08:00
m68knommu [PATCH] m68knommu: move some platform irq support out of irq.h 2005-11-07 08:00:47 -08:00
mips [MIPS] Update defconfigs to reflect Kconfig changes. 2005-12-01 11:05:19 +00:00
parisc [PARISC] Remove unused variable in signal.c 2005-11-17 16:43:52 -05:00
powerpc [PATCH] powerpc: prevent stack corruption in call_prom_ret 2005-11-30 13:55:59 +11:00
ppc [PATCH] ppc32: fix treeboot image entrypoint 2005-12-01 15:48:56 -08:00
s390 [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sh [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sh64 [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sparc [PATCH] sparc: convert IO remapping to VM_PFNMAP 2005-11-28 14:35:36 -08:00
sparc64 [SPARC64]: Fix >8K I/O mappings. 2005-11-29 13:59:03 -08:00
um [PATCH] uml: eliminate use of libc PAGE_SIZE 2005-11-22 09:13:41 -08:00
v850 [PATCH] v850: use generic hardirq code 2005-11-15 08:59:20 -08:00
x86_64 [PATCH] kprobes: Fix return probes on sys_execve 2005-11-23 16:08:39 -08:00
xtensa Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00