linux/arch/arm/plat-omap
Thara Gopinath 883edfdd58 OMAP3: hwmod: Adding flag to prevent caching of sysconfig register.
In the current implementation the sysconfig value is read into
 _sysc_cache once and an actual update to the sysconfig register
happens only if the new value paased is differnt from the one in _sysc_cache.
_sysc_cache is updated only if _HWMOD_SYSCONFIG_LOADED is not set.
This can lead to the follwing issue if off mode is enabled in modules
which employs "always-retore" mechanism of context save and restore.

        a. The module sets the sysconfig register through omap_device_enable.
           Here _sysc_cache is updated with the value written to the sysconfig
           register and left.
        b. The power domain containig the module enters off mode and the
           module context is lost.
        c. The module in use becomes active and calls omap_device_enable to
           enable itself. Here a read of sysconfig register does not happen
           as _HWMOD_SYSCONFIG_LOADED flag is set. The value to be written
           to the sysconfig register will be same as the one written in step a.
           Since _sysc_cache reflects the previous written value an update
           of the sysconfig register does not happen.
This means in modules which employs "always-restore" mechanism
after off , the sysconfig regsiters will never get updated.

This patch introduces a flag SYSC_NO_CACHE which if set ensures that the
sysconfig register is always read into _sysc_cache before an update is
attempted.

This flags need to be set only by modules which does not do a context save
but re-initializes the registers every time the module is accessed. This
includes modules like i2c, smartreflex etc.

Signed-off-by: Thara Gopinath <thara@ti.com>
[paul@pwsan.com: tweaked to apply on a different head, added flag comment]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-19 17:30:51 -07:00
..
include/plat OMAP3: hwmod: Adding flag to prevent caching of sysconfig register. 2010-01-19 17:30:51 -07:00
clock.c OMAP clock/CPUFreq: add clk_exit_cpufreq_table() 2010-01-08 15:23:16 -07:00
common.c OMAP4: Fix cpu detection 2009-12-11 16:16:34 -08:00
cpu-omap.c OMAP clock/CPUFreq: add clk_exit_cpufreq_table() 2010-01-08 15:23:16 -07:00
debug-devices.c omap: use smc91x_platdata to setup smc91x 2009-12-11 16:16:33 -08:00
debug-leds.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
devices.c omap: arch/arm/plat-omap/devices.c - sort alphabetically 2009-12-11 16:16:36 -08:00
dma.c omap1: DMA: move LCD related code from plat-omap to mach-omap1 2009-12-11 16:16:33 -08:00
dmtimer.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
fb.c OMAP: DSS2: omapfb driver 2009-12-09 12:12:44 +02:00
gpio.c omap: Remove uninitialized warning for gpio.c 2010-01-08 10:29:05 -08:00
i2c.c omap: Split i2c platform init for mach-omap1 and mach-omap2 2009-12-11 16:16:32 -08:00
io.c OMAP2xxx IO mapping: mark DSP mappings as being 2420-only 2010-01-08 15:23:05 -07:00
iommu-debug.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
iommu.c omap: &&/|| confusion in iommu_put() 2010-01-08 10:29:05 -08:00
iopgtable.h omap iommu: tlb and pagetable primitives 2009-05-05 14:52:39 +03:00
iovmm.c arch/arm/plat-omap: Drop an unnecessary NULL test 2009-11-22 10:24:32 -08:00
Kconfig ARM: OMAP4: PM: Add dummy hooks for OMAP4 dpll api's 2009-12-11 17:00:46 -07:00
mailbox.c omap: mailbox: OMAP4 Mailbox-driver Patch to support tasklet implementation 2009-11-22 10:24:33 -08:00
Makefile OMAP2/3/4 core: create omap_device layer 2009-09-03 20:14:05 +03:00
mcbsp.c omap: McBSP: Fix possible port lockout 2010-01-08 10:29:04 -08:00
mux.c omap: mux: Add new style pin multiplexing code for omap3 2009-12-11 16:16:32 -08:00
ocpi.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
omap-pm-noop.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
omap_device.c OMAP: omap_device: track latency in nanoseconds 2009-12-11 17:00:44 -07:00
sram.c OMAP4: Fix SRAM base and size 2009-12-11 16:16:35 -08:00
usb.c omap1: Add omap7xx USB support 2009-12-11 16:16:34 -08:00