clockdomains: add base OMAP2/3 clockdomain code
authorPaul Walmsley <paul@pwsan.com>
Sat, 19 Apr 2008 01:43:18 +0000 (19:43 -0600)
committerTony Lindgren <tony@atomide.com>
Thu, 24 Apr 2008 00:00:31 +0000 (17:00 -0700)
commit4588613a14df182013ee8557a6238697cc30b634
treecd42af1d7726206af34051c0f06f07a1ebe0a3bb
parent3d4041ff1d71b4fa20e57494fc3d680e70ec6702
clockdomains: add base OMAP2/3 clockdomain code

This patch creates an interface to the clockdomain registers in the
PRM/CM modules on OMAP2/3.  This interface is intended to be used by
PM code, e.g., pm.c; not by device drivers directly.

The patch also adds clockdomain usecount tracking.  This is intended
to be called whenever the first clock in a clockdomain is enabled, or
when the last enabled clock in a clockdomain is disabled.  If the
clockdomain is in software-supervised mode, the code will force-wakeup
or force-sleep the clockdomain.  If the clockdomain is in
hardware-supervised mode, the first clock enable will add sleep and
wakeup dependencies on a user-selectable set of parent domains (usually
MPU & IVA2), and the disable will remove them.

Each clockdomain will be defined in later patches as static
structures.  The clockdomain structures are linked into a list at boot
by clkdm_register(), similar to the OMAP clock code.

The patch adds a Kconfig option, CONFIG_OMAP_DEBUG_CLOCKDOMAIN, which
when enabled will emit verbose debug messages via pr_debug().

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/clockdomain.c [new file with mode: 0644]
arch/arm/plat-omap/Kconfig
include/asm-arm/arch-omap/clockdomain.h [new file with mode: 0644]