diff options
author | Paul Walmsley <paul@pwsan.com> | 2009-02-03 04:10:03 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:28 -0500 |
commit | 5b74c67660dbd536a4f4e8cea12d10683ad2e432 (patch) | |
tree | bca554fd538d1bf0d984164acab73d6cc832760b /arch/arm/plat-omap/include/mach/clockdomain.h | |
parent | aeec299011da8c3f07a47fe5d988f0eafda53906 (diff) |
[ARM] OMAP2/3 clockdomains: combine pwrdm, pwrdm_name into union in struct clockdomain
struct clockdomain contains a struct powerdomain *pwrdm and const char
*pwrdm_name. The pwrdm_name is only used at initialization to look up
the appropriate pwrdm pointer. Combining these into a union saves
about 100 bytes on 3430SDP. This patch should not cause any change in
kernel function.
Updated to gracefully handle autodeps that contain invalid powerdomains,
per Russell King's review comments.
Boot-tested on BeagleBoard ES2.1.
linux-omap source commit is 718fc6cd4db902aa2242a736cc3feb8744a4c71a.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/include/mach/clockdomain.h')
-rw-r--r-- | arch/arm/plat-omap/include/mach/clockdomain.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/include/mach/clockdomain.h b/arch/arm/plat-omap/include/mach/clockdomain.h index 1f51f0173784..b9d0dd2da89b 100644 --- a/arch/arm/plat-omap/include/mach/clockdomain.h +++ b/arch/arm/plat-omap/include/mach/clockdomain.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-omap/clockdomain.h | 2 | * arch/arm/plat-omap/include/mach/clockdomain.h |
3 | * | 3 | * |
4 | * OMAP2/3 clockdomain framework functions | 4 | * OMAP2/3 clockdomain framework functions |
5 | * | 5 | * |
@@ -48,11 +48,13 @@ | |||
48 | */ | 48 | */ |
49 | struct clkdm_pwrdm_autodep { | 49 | struct clkdm_pwrdm_autodep { |
50 | 50 | ||
51 | /* Name of the powerdomain to add a wkdep/sleepdep on */ | 51 | union { |
52 | const char *pwrdm_name; | 52 | /* Name of the powerdomain to add a wkdep/sleepdep on */ |
53 | const char *name; | ||
53 | 54 | ||
54 | /* Powerdomain pointer (looked up at clkdm_init() time) */ | 55 | /* Powerdomain pointer (looked up at clkdm_init() time) */ |
55 | struct powerdomain *pwrdm; | 56 | struct powerdomain *ptr; |
57 | } pwrdm; | ||
56 | 58 | ||
57 | /* OMAP chip types that this clockdomain dep is valid on */ | 59 | /* OMAP chip types that this clockdomain dep is valid on */ |
58 | const struct omap_chip_id omap_chip; | 60 | const struct omap_chip_id omap_chip; |
@@ -64,8 +66,13 @@ struct clockdomain { | |||
64 | /* Clockdomain name */ | 66 | /* Clockdomain name */ |
65 | const char *name; | 67 | const char *name; |
66 | 68 | ||
67 | /* Powerdomain enclosing this clockdomain */ | 69 | union { |
68 | const char *pwrdm_name; | 70 | /* Powerdomain enclosing this clockdomain */ |
71 | const char *name; | ||
72 | |||
73 | /* Powerdomain pointer assigned at clkdm_register() */ | ||
74 | struct powerdomain *ptr; | ||
75 | } pwrdm; | ||
69 | 76 | ||
70 | /* CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg */ | 77 | /* CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg */ |
71 | const u16 clktrctrl_mask; | 78 | const u16 clktrctrl_mask; |
@@ -79,9 +86,6 @@ struct clockdomain { | |||
79 | /* Usecount tracking */ | 86 | /* Usecount tracking */ |
80 | atomic_t usecount; | 87 | atomic_t usecount; |
81 | 88 | ||
82 | /* Powerdomain pointer assigned at clkdm_register() */ | ||
83 | struct powerdomain *pwrdm; | ||
84 | |||
85 | struct list_head node; | 89 | struct list_head node; |
86 | 90 | ||
87 | }; | 91 | }; |