aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:15 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:15 -0500
commitbd2122ca358fbd5c8e94869ae731a0951b36c757 (patch)
treec94a8080157eaaf52880187bbe5ce31fabb7161f /arch/arm/plat-omap
parente4156ee52fe617c2c2d80b5db993ff4bf07d7c3c (diff)
OMAP4: clockdomains: add OMAP4 PRCM data and OMAP4 support
Add PRCM partition, CM instance register address offset, and clockdomain register address offset to each OMAP4 struct clockdomain record. Add OMAP4 clockdomain code to use this new data to access registers properly. While here, clean up some nearby clockdomain code to allocate auto variables in my recollection of Linus's preferred style. The autogeneration scripts have been updated. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/clockdomain.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/include/plat/clockdomain.h b/arch/arm/plat-omap/include/plat/clockdomain.h
index a5f8579f7aa9..ec433c3aef68 100644
--- a/arch/arm/plat-omap/include/plat/clockdomain.h
+++ b/arch/arm/plat-omap/include/plat/clockdomain.h
@@ -38,12 +38,6 @@
38#define OMAP24XX_CLKSTCTRL_DISABLE_AUTO 0x0 38#define OMAP24XX_CLKSTCTRL_DISABLE_AUTO 0x0
39#define OMAP24XX_CLKSTCTRL_ENABLE_AUTO 0x1 39#define OMAP24XX_CLKSTCTRL_ENABLE_AUTO 0x1
40 40
41/* OMAP3XXX CM_CLKSTCTRL_*.CLKTRCTRL_* register bit values */
42#define OMAP34XX_CLKSTCTRL_DISABLE_AUTO 0x0
43#define OMAP34XX_CLKSTCTRL_FORCE_SLEEP 0x1
44#define OMAP34XX_CLKSTCTRL_FORCE_WAKEUP 0x2
45#define OMAP34XX_CLKSTCTRL_ENABLE_AUTO 0x3
46
47/** 41/**
48 * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode 42 * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode
49 * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only 43 * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only
@@ -94,11 +88,20 @@ struct clkdm_dep {
94 * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg 88 * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg
95 * @flags: Clockdomain capability flags 89 * @flags: Clockdomain capability flags
96 * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit 90 * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit
91 * @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers
92 * @cm_inst: (OMAP4 only) CM instance register offset
93 * @clkdm_offs: (OMAP4 only) CM clockdomain register offset
97 * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up 94 * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up
98 * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact 95 * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact
99 * @omap_chip: OMAP chip types that this clockdomain is valid on 96 * @omap_chip: OMAP chip types that this clockdomain is valid on
100 * @usecount: Usecount tracking 97 * @usecount: Usecount tracking
101 * @node: list_head to link all clockdomains together 98 * @node: list_head to link all clockdomains together
99 *
100 * @prcm_partition should be a macro from mach-omap2/prcm44xx.h (OMAP4 only)
101 * @cm_inst should be a macro ending in _INST from the OMAP4 CM instance
102 * definitions (OMAP4 only)
103 * @clkdm_offs should be a macro ending in _CDOFFS from the OMAP4 CM instance
104 * definitions (OMAP4 only)
102 */ 105 */
103struct clockdomain { 106struct clockdomain {
104 const char *name; 107 const char *name;
@@ -106,10 +109,15 @@ struct clockdomain {
106 const char *name; 109 const char *name;
107 struct powerdomain *ptr; 110 struct powerdomain *ptr;
108 } pwrdm; 111 } pwrdm;
112#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
109 void __iomem *clkstctrl_reg; 113 void __iomem *clkstctrl_reg;
110 const u16 clktrctrl_mask; 114 const u16 clktrctrl_mask;
115#endif
111 const u8 flags; 116 const u8 flags;
112 const u8 dep_bit; 117 const u8 dep_bit;
118 const u8 prcm_partition;
119 const s16 cm_inst;
120 const u16 clkdm_offs;
113 struct clkdm_dep *wkdep_srcs; 121 struct clkdm_dep *wkdep_srcs;
114 struct clkdm_dep *sleepdep_srcs; 122 struct clkdm_dep *sleepdep_srcs;
115 const struct omap_chip_id omap_chip; 123 const struct omap_chip_id omap_chip;