diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-12-21 23:05:14 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-12-21 23:05:14 -0500 |
commit | a64bb9cda8b12f599766c7dfe81770d2082a133a (patch) | |
tree | 29886a8c126757dde407a315220e69d1b6a4554a /arch/arm/mach-omap2/powerdomain.c | |
parent | c4d7e58fb52c632d8e33cd23a4917d7a7f8302ac (diff) |
OMAP4: powerdomains: add PRCM partition data; use OMAP4 PRM functions
OMAP4 powerdomain control registers are split between the PRM hardware
module and the PRCM_MPU local PRCM. Add this PRCM partition
information to each OMAP4 powerdomain record, and convert the OMAP4
powerdomain function implementations to use the OMAP4 PRM instance
functions.
Also fixes a potential null pointer dereference of pwrdm->name.
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: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 8a0dcd05afeb..a76ad3f0ca65 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include "cm2xxx_3xxx.h" | 22 | #include "cm2xxx_3xxx.h" |
23 | #include "prcm44xx.h" | ||
23 | #include "cm44xx.h" | 24 | #include "cm44xx.h" |
24 | #include "prm2xxx_3xxx.h" | 25 | #include "prm2xxx_3xxx.h" |
25 | #include "prm44xx.h" | 26 | #include "prm44xx.h" |
@@ -72,12 +73,19 @@ static int _pwrdm_register(struct powerdomain *pwrdm) | |||
72 | { | 73 | { |
73 | int i; | 74 | int i; |
74 | 75 | ||
75 | if (!pwrdm) | 76 | if (!pwrdm || !pwrdm->name) |
76 | return -EINVAL; | 77 | return -EINVAL; |
77 | 78 | ||
78 | if (!omap_chip_is(pwrdm->omap_chip)) | 79 | if (!omap_chip_is(pwrdm->omap_chip)) |
79 | return -EINVAL; | 80 | return -EINVAL; |
80 | 81 | ||
82 | if (cpu_is_omap44xx() && | ||
83 | pwrdm->prcm_partition == OMAP4430_INVALID_PRCM_PARTITION) { | ||
84 | pr_err("powerdomain: %s: missing OMAP4 PRCM partition ID\n", | ||
85 | pwrdm->name); | ||
86 | return -EINVAL; | ||
87 | } | ||
88 | |||
81 | if (_pwrdm_lookup(pwrdm->name)) | 89 | if (_pwrdm_lookup(pwrdm->name)) |
82 | return -EEXIST; | 90 | return -EEXIST; |
83 | 91 | ||