]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP3 powerdomains: remove RET from SGX power states list
authorPaul Walmsley <paul@pwsan.com>
Thu, 6 Nov 2008 11:08:44 +0000 (04:08 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 6 Nov 2008 17:01:48 +0000 (09:01 -0800)
On Wed, 5 Nov 2008, Tony Lindgren wrote:

> * Paul Walmsley <paul@pwsan.com> [081105 11:39]:
> >
> > The SGX device on OMAP3 does not support retention, so remove RET from the
> > list of possible SGX power states.  Problem debugged by Richard Woodruff
> > <r-woodruff2@ti.com>.
>
> Pushing.

Just FYI, that patch prevents the kernel from booting due to a bug in
pm34xx.c; patch below.

Even with the follwoing patch, the initial power state setup code in
pm34xx.c will bail out early since it still tries to set the SGX next
power state to retention, which it does not support.

- Paul

OMAP3 PM: use list_for_each_entry_safe() when deleting list entries

From: Paul Walmsley <paul@pwsan.com>

The error path in clkdms_setup() needs to use list_for_each_entry_safe()
when deleting entries from the list, or the kernel will crash.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jouni Högander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/pm34xx.c

index a11a6573b122b36bf718a4233d714606f2990dd0..da098d24d133f3ddc09477bbe690b0499f564365 100644 (file)
@@ -540,7 +540,7 @@ static int __init clkdms_setup(struct clockdomain *clkdm)
 
 int __init omap3_pm_init(void)
 {
-       struct power_state *pwrst;
+       struct power_state *pwrst, *tmp;
        int ret;
 
        printk(KERN_ERR "Power Management for TI OMAP3.\n");
@@ -583,7 +583,7 @@ err1:
        return ret;
 err2:
        free_irq(INT_34XX_PRCM_MPU_IRQ, NULL);
-       list_for_each_entry(pwrst, &pwrst_list, node) {
+       list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) {
                list_del(&pwrst->node);
                kfree(pwrst);
        }