2010-02-04 15:55:36     power management and rtcwake problems

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-02-04 15:55:36     power management and rtcwake problems

Nathan Whittington (UNITED STATES)

Message: 85623   

 

So I'm pretty sure we're having issues with our RTC crystal.  It occasionally stalls during bootup and I sometimes (but not always!) see segfaults a few seconds after it has booted fully:

 

root:/> irq 10: nobody cared (try booting with the "irqpoll" option)

Hardware Trace:

   0 Target : <0x00004aa4> { _dump_stack + 0x0 }

     Source : <0x0002ab80> { ___report_bad_irq + 0x1c } CALL pcrel

   1 Target : <0x0002ab80> { ___report_bad_irq + 0x1c }

     Source : <0x0002abdc> { ___report_bad_irq + 0x78 } JUMP.S

   2 Target : <0x0002abdc> { ___report_bad_irq + 0x78 }

.

.

.

00191fc0: 0017cbfc  001ab334  0016f010  0016f004  00000000  001ab334  0016ea4c  00000013

00191fe0: 001920a8  001add84  00192000  001a09d8  00000000  00000000  00000000  ff900000

Return addresses in stack:

    address : <0x000c2fa8> { _bfin_rtc_interrupt + 0x38 }

    address : <0x0002ab84> { ___report_bad_irq + 0x20 }

   frame  1 : <0x0002acf2> { _note_interrupt + 0x112 }

    address : <0x0002b51c> { _handle_simple_irq + 0x78 }

    address : <0x000129b6> { _irq_enter + 0xa }

    address : <0xffa00304> { _asm_do_IRQ + 0x38 }

    address : <0xffa00c00> { __common_int_entry + 0x70 }

    address : <0xffa00332> { _asm_do_IRQ + 0x66 }

    address : <0x0000246a> { _do_rt_sigreturn + 0x102 }

    address : <0x0000246a> { _do_rt_sigreturn + 0x102 }

    address : <0x0002b51c> { _handle_simple_irq + 0x78 }

    address : <0xffa00332> { _asm_do_IRQ + 0x66 }

    address : <0xffa00c00> { __common_int_entry + 0x70 }

    address : <0xffa00140> { _cpu_idle + 0x20 }

handlers:

[<000c2f70>] (_bfin_rtc_interrupt+0x0/0xd8)

Disabling IRQ #10

 

 

Regardless of whether it has reported an irq 10 fault, I can't get the board to stay asleep for any appreciable amount of time (these examples both returned instantly - though I've seen some sleep for up to 5 seconds).

 

root:/> rtcwake -s 10000 -m standby

wakeup from "standby" at Sat May 23 07:54:31 2015

PM: Syncing filesystems ... done.

Freezing user space processes ... <7>rtc-bfin rtc-bfin: bfin_rtc_interrupt:187: here i am

(elapsed 0.00 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

Restarting tasks ... done.

 

root:/> echo standby > /sys/power/state

PM: Syncing filesystems ... <7>rtc-bfin rtc-bfin: bfin_rtc_interrupt:187: here i am

done.

Freezing user space processes ... (elapsed 0.00 seconds) done.

Freezing remaining freezable tasks ... <7>rtc-bfin rtc-bfin: bfin_rtc_interrupt:187: here i am

(elapsed 0.00 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

Restarting tasks ... done.

 

 

Here is the (hopefully relevant) kernel config:

 

CONFIG_RTC_LIB=y

CONFIG_RTC_CLASS=y

# CONFIG_RTC_HCTOSYS is not set

CONFIG_RTC_DEBUG=y

 

#

# RTC interfaces

#

CONFIG_RTC_INTF_SYSFS=y

# CONFIG_RTC_INTF_PROC is not set

CONFIG_RTC_INTF_DEV=y

# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set

# CONFIG_RTC_DRV_TEST is not set

#

# on-CPU RTC drivers

#

CONFIG_RTC_DRV_BFIN=y

# CONFIG_DMADEVICES is not set

# CONFIG_UIO is not set

# CONFIG_STAGING is not set

 

 

#

# Power management options

#

CONFIG_PM=y

# CONFIG_PM_DEBUG is not set

CONFIG_PM_SLEEP=y

CONFIG_SUSPEND=y

CONFIG_SUSPEND_FREEZER=y

CONFIG_ARCH_SUSPEND_POSSIBLE=y

CONFIG_PM_BFIN_SLEEP_DEEPER=y

# CONFIG_PM_BFIN_SLEEP is not set

# CONFIG_PM_WAKEUP_BY_GPIO is not set

 

 

I'm using 2009R1 on a BF536.

 

Once the board is booted I can access the RTC with 'hwclock -w'.

 

When I configured the kernel to disable the rtc and use a gpio line to wake, everything works fine.

 

Is the failure to remain in standby mode due to our messed up hardware or have I misconfigured something in the kernel?

QuoteReplyEditDelete

 

 

2010-02-04 16:09:50     power management and rtcwake problems

Michael Hennerich (GERMANY)

Message: 85624    Fix your hardware - most likely the load caps attached to your 32khz RTC crystal of choice.

In case the crystals doesn't cleanly start to oscillate you get exactly the reported behavior.

 

-Michaek

QuoteReplyEditDelete

 

 

2010-02-04 16:11:26     Re: power management and rtcwake problems

Mike Frysinger (UNITED STATES)

Message: 85625   

 

that looks more like RTC hardware issues.  you shouldnt be getting spurious interrupts from the RTC.  that's what the "nobody cared" error is coming from -- the RTC interrupt handler triggered (meaing the hardware generated an interrupt) when it shouldnt have because nothing was registered to generate the interrupt.

QuoteReplyEditDelete

 

 

2010-02-04 16:14:47     Re: power management and rtcwake problems

Robin Getz (UNITED STATES)

Message: 85626   

 

Nathan:

 

I might also check the RTC VDD - it needs to be proper as well. Otherwise - undefined results will occur. Including the possibility of interrupts coming before things are registered.

 

-Robin

QuoteReplyEditDelete

 

 

2010-02-04 16:38:41     Re: power management and rtcwake problems

Nathan Whittington (UNITED STATES)

Message: 85627   

 

Awesome, thanks for the info!  Now to go talk to the hardware guy again...

Attachments

    Outcomes