linux/arch/arm/mach-omap2
Paul Walmsley 0d8e2d0dad OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled
The console semaphore must be held while the OMAP UART devices are
disabled, lest a console write cause an ARM abort (and a kernel crash)
when the underlying console device is inaccessible.  These crashes
only occur when the console is on one of the OMAP internal serial
ports.

While this problem has been latent in the PM idle loop for some time,
the crash was not triggerable with an unmodified kernel until commit
6f251e9db1 ("OMAP: UART: omap_device
conversions, remove implicit 8520 assumptions").  After this patch, a
console write often occurs after the console UART has been disabled in
the idle loop, crashing the system.  Several users have encountered
this bug:

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg38396.html

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36602.html

The same commit also introduced new code that disabled the UARTs
during init, in omap_serial_init_port().  The kernel will also crash
in this code when earlyconsole and extra debugging is enabled:

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36411.html

The minimal fix for the -rc series is to hold the console semaphore
while the OMAP UARTs are disabled.  This is a somewhat overbroad fix,
since the console may not be located on an OMAP UART, as is the case
with the GPMC UART on Zoom3.  While it is technically possible to
determine which devices the console or earlyconsole is actually
running on, it is not a trivial problem to solve, and the code to do
so is not really appropriate for the -rc series.

The right long-term fix is to ensure that no code outside of the OMAP
serial driver can disable an OMAP UART.  As I understand it, code to
implement this is under development by TI.

This patch is a collaboration between Paul Walmsley <paul@pwsan.com>
and Tony Lindgren <tony@atomide.com>.  Thanks to Ming Lei
<tom.leiming@gmail.com> and Pramod <pramod.gurav@ti.com> for their
feedback on earlier versions of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Pramod <pramod.gurav@ti.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jean Pihet <jean.pihet@newoldbits.com>
Cc: Govindraj.R <govindraj.raja@ti.com>
2010-11-24 16:14:30 -08:00
..
include/mach ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
board-2430sdp.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-3430sdp.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-3630sdp.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-4430sdp.c mfd: Adding twl6030 mmc card detect support for MMC1 2010-10-29 00:29:59 +02:00
board-am3517evm.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-apollon.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-cm-t35.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-cm-t3517.c omap: complete removal of machine_desc.io_pg_offst and .phys_io 2010-10-22 12:14:12 -07:00
board-devkit8000.c OMAP2: Devkit8000: Fix mmc regulator failure 2010-11-05 12:13:10 -07:00
board-flash.c OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
board-flash.h OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
board-generic.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-h4.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-igep0020.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-igep0030.c omap: complete removal of machine_desc.io_pg_offst and .phys_io 2010-10-22 12:14:12 -07:00
board-ldp.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-n8x0.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap3beagle.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap3evm.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap3logic.c omap: complete removal of machine_desc.io_pg_offst and .phys_io 2010-10-22 12:14:12 -07:00
board-omap3pandora.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap3stalker.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap3touchbook.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-omap4panda.c omap4: pandaboard: fix up mmc card detect logic 2010-10-29 00:30:32 +02:00
board-overo.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-rx51-peripherals.c Merge git://git.infradead.org/battery-2.6 2010-10-26 10:14:23 -07:00
board-rx51-sdram.c OMAP: mach-omap2: Fix static declaration warnings 2010-10-08 09:57:40 -07:00
board-rx51-video.c OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
board-rx51.c arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
board-zoom2.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-zoom3.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
board-zoom-debugboard.c OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
board-zoom-peripherals.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
clkt2xxx_apll.c OMAP2 PRCM: convert OMAP2 PRCM macros to the _SHIFT/_MASK suffixes 2010-05-20 12:31:04 -06:00
clkt2xxx_dpllcore.c OMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpllcore.c 2010-01-26 20:13:06 -07:00
clkt2xxx_osc.c OMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c 2010-01-28 18:13:49 -07:00
clkt2xxx_sys.c OMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c 2010-01-28 18:13:49 -07:00
clkt2xxx_virt_prcm_set.c OMAP2 clock: fix recursive spinlock attempt when CONFIG_CPU_FREQ=y 2010-05-20 12:31:14 -06:00
clkt34xx_dpll3m2.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clkt_clksel.c OMAP2+ clock: clean up clkt_clksel.c 2010-05-20 12:31:06 -06:00
clkt_dpll.c OMAP2/3/4 clock: fix DPLL multiplier value errors; also copyrights, includes, documentation 2010-02-24 12:15:03 -07:00
clock2xxx.c OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code 2010-02-24 17:45:15 -07:00
clock2xxx.h OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files 2010-02-24 12:29:42 -07:00
clock3xxx_data.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2010-10-24 12:44:34 -07:00
clock3xxx.c OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code 2010-02-24 17:45:15 -07:00
clock3xxx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock34xx.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock34xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock36xx.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock36xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock44xx_data.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
clock44xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock2420_data.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
clock2430_data.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
clock2430.c OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files 2010-02-24 12:29:42 -07:00
clock3517.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock3517.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock_common_data.c OMAP3 clock: rename RATE_IN_343X, RATE_IN_3430ES2 to match reality 2010-05-20 12:31:07 -06:00
clock.c OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks 2010-10-08 11:40:20 -06:00
clock.h OMAP2+ clock: clean up clkt_clksel.c 2010-05-20 12:31:06 -06:00
clockdomain.c OMAP clockdomain: initialize clockdomain registers when the clockdomain layer starts 2010-09-23 17:14:12 -07:00
clockdomains44xx.h OMAP4: PRM: Remove MPU internal code name and apply PRCM naming convention 2010-05-20 12:31:11 -06:00
clockdomains.h omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2 2010-02-15 09:27:01 -08:00
cm4xxx.c OMAP4: PM: Declare idle modules as functional too 2010-09-24 10:23:18 -06:00
cm44xx.h OMAP4: PM: Define additional registers for ES2 2010-09-27 14:02:56 -06:00
cm-regbits-24xx.h OMAP2 PRCM: convert OMAP2 PRCM macros to the _SHIFT/_MASK suffixes 2010-05-20 12:31:04 -06:00
cm-regbits-34xx.h OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs 2010-09-29 12:43:00 -07:00
cm-regbits-44xx.h OMAP4: CM & PRM: Update PRCM register bitshifts and masks for ES2 2010-09-27 14:02:55 -06:00
cm.c OMAP24xx: CM: fix mask used for checking IDLEST status 2010-07-26 16:34:28 -06:00
cm.h OMAP4: hwmod & CM: Implement the omap4_cm_wait_module_ready function 2010-05-20 12:31:08 -06:00
common.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
control.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
control.h OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
cpuidle34xx.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
devices.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
dpll3xxx.c fix typos concerning "hierarchy" 2010-06-16 18:03:14 +02:00
dsp.c omap: add dsp platform device 2010-10-05 12:05:11 -07:00
emu.c omap2/3: Fix initcalls for multi-omap 2010-02-15 09:27:05 -08:00
gpmc-nand.c omap3 nand: cleanup virtual address usages 2010-08-02 15:30:38 +03:00
gpmc-onenand.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
gpmc-smc91x.c omap: use smc91x_platdata to setup smc91x 2009-12-11 16:16:33 -08:00
gpmc-smsc911x.c ARM: OMAP3LOGIC: Add generic smsc911x support when connected to GPMC 2010-09-28 11:39:18 -07:00
gpmc.c omap3 nand: cleanup virtual address usages 2010-08-02 15:30:38 +03:00
hsmmc.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
hsmmc.h Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
i2c.c omap: mux: Convert 2420 platform init code to use new mux code 2010-07-05 16:31:40 +03:00
id.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
io.c OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
io.h OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
iommu2.c omap iommu: move iommu_disable at fault to the above layer 2010-06-29 07:55:07 +03:00
irq.c OMAP: mach-omap2: Fix miscellaneous sparse warnings 2010-10-08 10:12:37 -07:00
Kconfig OMAP2+: Kconfig: disallow builds for boards that don't use the currently-selected SoC 2010-10-08 11:40:17 -06:00
mailbox.c arm: remove cast from void* 2010-09-28 09:54:28 -07:00
Makefile Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
Makefile.boot [ARM] 3145/1: OMAP 3a/5: Add support for omap24xx 2005-11-10 14:26:51 +00:00
mcbsp.c OMAP: McBSP: Remove null omap44xx ops comment 2010-10-08 11:40:21 -06:00
mux34xx.c OMAP: mach-omap2: Fix static declaration warnings 2010-10-08 09:57:40 -07:00
mux34xx.h omap: mux: Add 36xx CBP package support 2009-12-11 16:16:33 -08:00
mux2420.c OMAP: mach-omap2: Fix static declaration warnings 2010-10-08 09:57:40 -07:00
mux2420.h omap: mux: Add data for 2420 2010-07-05 16:31:36 +03:00
mux2430.c OMAP: mach-omap2: Fix static declaration warnings 2010-10-08 09:57:40 -07:00
mux2430.h omap: mux: Add data for 2430 2010-07-05 16:31:36 +03:00
mux.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
mux.h omap: Fix omap_mux_init_signal not to trash muxname 2010-10-01 16:35:24 -07:00
omap4-common.c Merge branch 'l2x0-pull-rmk' of git://dev.omapzoom.org/pub/scm/santosh/kernel-omap4-base into devel-stable 2010-10-28 14:42:06 +01:00
omap44xx-smc.S omap4: Add smc API to read AuxCoreBoot0 register 2010-08-02 13:18:18 +03:00
omap_hwmod_3xxx_data.c manual merge for pm-hwmod-uart due to conflicts 2010-10-01 13:24:10 -07:00
omap_hwmod_44xx_data.c manual merge for pm-hwmod-uart due to conflicts 2010-10-01 13:24:10 -07:00
omap_hwmod_2420_data.c manual merge for pm-hwmod-uart due to conflicts 2010-10-01 13:24:10 -07:00
omap_hwmod_2430_data.c manual merge for pm-hwmod-uart due to conflicts 2010-10-01 13:24:10 -07:00
omap_hwmod_common_data.c OMAP: hwmod data: add class for IVA hwmods 2010-07-26 16:34:31 -06:00
omap_hwmod_common_data.h OMAP: hwmod data: add class for IVA hwmods 2010-07-26 16:34:31 -06:00
omap_hwmod.c omap: hwmod: Handle modules with 16bit registers 2010-10-08 10:23:22 -07:00
omap-headsmp.S omap4: Add smc API to read AuxCoreBoot0 register 2010-08-02 13:18:18 +03:00
omap-hotplug.c omap4: hotplug: Add basic CPU hotplug support 2010-08-02 13:18:19 +03:00
omap-iommu.c omap iommu: update ducati mmu irq define name 2010-06-29 07:55:08 +03:00
omap-smp.c omap: Fix sev instruction usage for multi-omap 2010-08-16 09:22:04 +03:00
opp2xxx.h omap2/3: Multiboot compile fixes to compile in omap2 and omap3 2010-02-15 09:26:55 -08:00
opp2420_data.c OMAP2xxx OPP: clean up comments in OPP data 2010-01-08 15:23:15 -07:00
opp2430_data.c OMAP2xxx OPP: clean up comments in OPP data 2010-01-08 15:23:15 -07:00
pm24xx.c OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled 2010-11-24 16:14:30 -08:00
pm34xx.c OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled 2010-11-24 16:14:30 -08:00
pm44xx.c omap4: suspend: Add basic system suspend support 2010-08-02 13:18:18 +03:00
pm_bus.c OMAP2+: PM: initial runtime PM core support 2010-09-21 11:51:23 -07:00
pm-debug.c OMAP: mach-omap2: Fix static declaration warnings 2010-10-08 09:57:40 -07:00
pm.c OMAP4: pm: Change l3_main to l3_main_1 during bus device init 2010-09-23 17:14:16 -07:00
pm.h OMAP: PM: Fix build when CONFIG_PM_DEBUG isn't set 2010-10-01 13:50:34 -07:00
powerdomain.c OMAP2: powerdomain: Add break in switch statement 2010-08-03 10:21:07 +03:00
powerdomains24xx.h omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2 2010-02-15 09:27:01 -08:00
powerdomains34xx.h omap: 3630: disable TLL SAR on 3630 ES1 2010-08-04 14:43:52 +03:00
powerdomains44xx.h OMAP4: powerdomain: Update DSS logic state for ES2 2010-09-27 14:02:56 -06:00
powerdomains.h OMAP2+ powerdomains/clockdomains: prepare for multi-OMAP configs 2010-01-29 10:14:23 -07:00
prcm-common.h OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs 2010-09-29 12:43:00 -07:00
prcm.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
prm2xxx_3xxx.c OMAP2/3: PRM: add module hard reset support 2010-09-21 15:12:40 -06:00
prm44xx.c OMAP4: PRM: add module hard reset support 2010-09-21 15:12:21 -06:00
prm44xx.h OMAP4: PM: Define additional registers for ES2 2010-09-27 14:02:56 -06:00
prm-regbits-24xx.h OMAP2 PRCM: convert OMAP2 PRCM macros to the _SHIFT/_MASK suffixes 2010-05-20 12:31:04 -06:00
prm-regbits-34xx.h OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs 2010-09-29 12:43:00 -07:00
prm-regbits-44xx.h OMAP4: CM & PRM: Update PRCM register bitshifts and masks for ES2 2010-09-27 14:02:55 -06:00
prm.h OMAP2/3: PRM: add module hard reset support 2010-09-21 15:12:40 -06:00
sdram-hynix-h8mbx00u0mer-0em.h omap3: zoom: Introduce zoom3 board support 2009-11-22 10:24:33 -08:00
sdram-micron-mt46h32m32lf-6.h omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sdram-numonyx-m65kxxxxam.h omap3: SDRC: add timing data for Numonyx M65KxxxxAM 2010-02-17 17:23:20 -08:00
sdram-qimonda-hyb18m512160af-6.h omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sdrc2xxx.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sdrc.c omap2/3/4: ioremap omap_globals module 2010-02-23 10:57:40 -08:00
sdrc.h OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx* 2009-12-11 16:16:00 -07:00
serial.c OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled 2010-11-24 16:14:30 -08:00
sleep24xx.S omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sleep34xx.S OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
sram34xx.S omap3: Prevent SDRC deadlock when L3 is changing frequency 2010-09-27 14:02:59 -06:00
sram242x.S omap: Split OMAP2_IO_ADDRESS to L3 and L4 2009-10-19 15:25:31 -07:00
sram243x.S omap: Split OMAP2_IO_ADDRESS to L3 and L4 2009-10-19 15:25:31 -07:00
timer-gp.c OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
timer-gp.h OMAP2plus: Fix static function warnings 2010-10-08 10:02:49 -07:00
timer-mpu.c omap4: Use irq line defines from irq-44xx.h 2010-02-23 15:29:08 -08:00
usb-ehci.c omap: mux: Remove old mux code 2010-07-05 16:31:40 +03:00
usb-fs.c OMAP: control: move plat-omap/control.h to mach-omap2/control.h 2010-10-08 11:40:20 -06:00
usb-musb.c USB: AM35x: Add musb support 2010-10-22 10:22:16 -07:00
usb-tusb6010.c omap: mux: Convert 2420 platform init code to use new mux code 2010-07-05 16:31:40 +03:00