kernel-ark/arch/arm/plat-omap
Benoît Cousson 5365efbe29 OMAP: hwmod: Add hardreset management support
Most processor IPs does have a hardreset signal controlled by the PRM.
This is different of the softreset used for local IP reset from the
SYSCONFIG register.
The granularity can be much finer than orginal HWMOD, for ex, the IVA
hwmod contains 3 reset lines, the IPU 3 as well, the DSP 2...
Since this granularity is needed by the driver, we have to ensure
than one hwmod exist for each hardreset line.

- Store reset lines as hwmod resources that a driver can query by name like
  an irq or sdma line.

- Add two functions for asserting / deasserting reset lines in hwmods
  processor that require manual reset control.
- Add one functions to get the current reset state.
- If an hwmod contains only one line, an automatic assertion / de-assertion
  is done.
  -> de-assert the hardreset line only during enable from disable transition
  -> assert the hardreset line only during shutdown

Note: The hwmods with hardreset line and HWMOD_INIT_NO_RESET flag must be
kept in INITIALIZED state.
They can be properly enabled only if the hardreset line is de-asserted
before.

For information here is the list of IPs with HW reset control
on an OMAP4430 device:

RM_DSP_RSTCTRL
  1,1,'RST2','RW','1','DSP - MMU, cache and slave interface reset control'
  0,0,'RST1','RW','1','DSP - DSP reset control'

RM_IVA_RSTCTRL
  2,2,'RST3','RW','1','IVA logic and SL2 reset control'
  1,1,'RST2','RW','1','IVA Sequencer2 reset control'
  0,0,'RST1','RW','1','IVA sequencer1 reset control'

RM_IPU_RSTCTRL
  2,2,'RST3','RW','1','IPU MMU and CACHE interface reset control.'
  1,1,'RST2','RW','1','IPU Cortex M3 CPU2  reset control.'
  0,0,'RST1','RW','1','IPU Cortex M3 CPU1  reset control.'

PRM_RSTCTRL
  1,1,'RST_GLOBAL_COLD_SW','RW','0','Global COLD software reset control.'
  0,0,'RST_GLOBAL_WARM_SW','RW','0','Global WARM software reset control.'

RM_CPU0_CPU0_RSTCTRL
RM_CPU1_CPU1_RSTCTRL
  0,0,'RST','RW','0','Cortex A9 CPU0&1 warm local reset control'

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
[paul@pwsan.com: made the hardreset functions static; moved the register
 twiddling into prm*.c functions in previous patches; changed the
 function names to conform with hwmod practice]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-09-21 15:12:40 -06:00
..
include/plat OMAP: hwmod: Add hardreset management support 2010-09-21 15:12:40 -06:00
clock.c OMAP4 clock: Support clk_set_parent 2010-05-20 12:31:12 -06:00
common.c omap3: introduce omap3_map_io 2010-08-04 14:43:18 +03: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 Replacing LEDS_OMAP_DEBUG with OMAP_DEBUG_LEDS 2010-07-05 17:03:58 +03:00
devices.c Removing dead OMAP_DSP 2010-07-05 16:31:54 +03:00
dma.c omap: dma: Support for prefetch in destination synchronizedtransfer 2010-08-02 14:21:40 +03:00
dmtimer.c omap: DMTIMER: Ack pending interrupt always when stopping a timer 2010-06-10 15:37:41 +03:00
fb.c ARM: OMAP: Convert OMAPFB and VRAM SDRAM reservation to LMB 2010-07-27 08:48:23 +01:00
gpio.c omap2: Fix GPIO numbers and smc91x for 2430sdp 2010-08-02 14:21:39 +03:00
i2c.c OMAP: PM constraints: add return values; add requesting device param to omap_pm_set_max_dev_wakeup_lat() 2010-07-26 16:34:34 -06:00
io.c Merge with mainline to remove plat-omap/Kconfig conflict 2010-03-01 14:19:05 -08:00
iommu-debug.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
iommu.c omap iommu: move iommu_disable at fault to the above layer 2010-06-29 07:55:07 +03:00
iopgtable.h omap iommu: Rename iopte_[p,v]addr -> iopte_page_[p,v]addr 2010-06-29 07:55:05 +03:00
iovmm.c omap iommu: Fix Memory leak 2010-06-09 13:21:27 +03:00
Kconfig Merge branch 'v2.6.35-omap-mailbox-for-next' of git://gitorious.org/~doyu/lk/mainline into omap-for-linus 2010-08-04 16:10:38 +03:00
mailbox.c omap: mailbox: reorganize headers 2010-08-04 15:50:20 +03:00
Makefile OMAP4: hwmod: Enable omap_device build for OMAP4 2010-07-26 16:34:30 -06:00
mcbsp.c OMAP3: McBSP: Use the port's buffer_size when calculating tx delay 2010-06-03 16:12:40 +01:00
mux.c omap: mux: Remove old mux code 2010-07-05 16:31:40 +03:00
ocpi.c
omap_device.c omap: device: improve errors handling 2010-08-04 14:43:51 +03:00
omap-pm-noop.c OMAP: PM constraints: add omap_pm_set_min_clk_rate() 2010-07-26 16:34:34 -06:00
sram.c omap4: Fix multiboot with CONFIG_PM and CONFIG_ARCH_OMAP3 selected 2010-05-04 13:19:16 -07:00
usb.c omap: Move omap1 USB platform init code into mach-omap1/usb.c 2010-07-05 16:31:30 +03:00