forked from luck/tmp_suning_uos_patched
1ee9530a71
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> |
||
---|---|---|
.. | ||
akita-ioexp.c | ||
corgi_lcd.c | ||
corgi_pm.c | ||
corgi_ssp.c | ||
corgi.c | ||
dma.c | ||
generic.c | ||
generic.h | ||
idp.c | ||
irq.c | ||
Kconfig | ||
leds-idp.c | ||
leds-lubbock.c | ||
leds-mainstone.c | ||
leds.c | ||
leds.h | ||
lubbock.c | ||
mainstone.c | ||
Makefile | ||
Makefile.boot | ||
pm.c | ||
poodle.c | ||
pxa25x.c | ||
pxa27x.c | ||
sharpsl_pm.c | ||
sharpsl.h | ||
sleep.S | ||
spitz_pm.c | ||
spitz.c | ||
ssp.c | ||
standby.S | ||
time.c | ||
tosa.c |