This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

suspend resume issue Omap3 Beagle

Dear TI, 

HW: Omap3 Beagle

SW: Linux 3.9.6 mainline ubuntu for Beagle Xm

We are tryiong to use suspend resume feature of ubuntu on beagle XM.
 We are able to suspend using "echo mem > /sys/power/state " command.
Also, we are able to resume using a GPIO interrupt. [GPIO 126 we are using to wake up]

But, after resume from suspend Camera doesn't work. To make camera work, we need to reboot the board !!.

While inspecting this issue, we found that, Master Clock of camera is not running properly.  All the register settings of this mate clock appears to be fine. But, when we connect this CAMRA CLOCK line to Oscilloscope, we found that clock is running @ 1.2Mhz. But Initially before suspend, this camera was running @ 24Mhz. 

Appreciate  your help.

-Ravikiran

  • Please find the Kernel logs when I doi suspend and resume using "echo mem > /sys/power/state" option.

    oot@arm:~/pptech_dir# ./suspend_resume.sh
    Calling this script will suspend the processor

    [   79.618896] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:891
    [   79.618927] in_atomic(): 1, irqs_disabled(): 0, pid: 1540, name: suspend_resume.
    root@arm:~/pptech_dir#
    root@arm:~/pptech_dir#
    root@arm:~/pptech_dir#
    root@arm:~/pptech_dir#
    root@arm:~/pptech_dir#
    root@arm:~/pptech_dir# dmesg -c
    [   66.461517] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
    [   78.457366] PM: Syncing filesystems ... done.
    [   79.345184] PM: Preparing system for mem sleep
    [   79.409912] Freezing user space processes ... (elapsed 0.01 seconds) done.
    [   79.423461] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    [   79.443420] PM: Entering mem sleep
    [   79.443450] Suspending console(s) (use no_console_suspend to debug)
    [   79.492523] wlcore: down
    [   79.614318] PM: suspend of devices complete after 169.036 msecs
    [   79.616577] PM: late suspend of devices complete after 2.197 msecs
    [   79.618896] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:891
    [   79.618927] in_atomic(): 1, irqs_disabled(): 0, pid: 1540, name: suspend_resume.
    [   79.619018] [<c0014ac4>] (unwind_backtrace+0x0/0x11c) from [<c042fb18>] (__pm_runtime_idle+0x30/0xa0)
    [   79.619110] [<c04474a0>] (omap_tll_disable+0x38/0x5c) from [<c0446284>] (usbhs_runtime_suspend+0xbc/0xcc)
    [   79.619140] [<c0446284>] (usbhs_runtime_suspend+0xbc/0xcc) from [<c042ad28>] (pm_generic_runtime_suspend+0x2c/0x38)
    [   79.619171] [<c042ad28>] (pm_generic_runtime_suspend+0x2c/0x38) from [<c0029c80>] (_od_suspend_noirq+0x48/0x78)
    [   79.619232] [<c0029c80>] (_od_suspend_noirq+0x48/0x78) from [<c042c39c>] (dpm_run_callback+0x44/0x80)
    [   79.619262] [<c042c39c>] (dpm_run_callback+0x44/0x80) from [<c042d0ec>] (dpm_suspend_end+0x388/0x538)
    [   79.619293] [<c042d0ec>] (dpm_suspend_end+0x388/0x538) from [<c007e388>] (suspend_devices_and_enter+0xe8/0x430)
    [   79.619323] [<c007e388>] (suspend_devices_and_enter+0xe8/0x430) from [<c007e7e4>] (pm_suspend+0x114/0x230)
    [   79.619354] [<c007e7e4>] (pm_suspend+0x114/0x230) from [<c007d870>] (state_store+0x40/0x6c)
    [   79.619415] [<c007d870>] (state_store+0x40/0x6c) from [<c036d280>] (kobj_attr_store+0x14/0x20)
    [   79.619445] [<c036d280>] (kobj_attr_store+0x14/0x20) from [<c017e8d8>] (sysfs_write_file+0x100/0x148)
    [   79.619506] [<c017e8d8>] (sysfs_write_file+0x100/0x148) from [<c0121524>] (vfs_write+0xa8/0x178)
    [   79.619537] [<c0121524>] (vfs_write+0xa8/0x178) from [<c0121934>] (sys_write+0x38/0x64)
    [   79.619567] [<c0121934>] (sys_write+0x38/0x64) from [<c000e240>] (ret_fast_syscall+0x0/0x30)
    [   79.620086] PM: noirq suspend of devices complete after 3.479 msecs
    [   79.620117] Disabling non-boot CPUs ...
    [   79.620452] Successfully put all powerdomains to target state
    [   79.628234] PM: noirq resume of devices complete after 7.446 msecs
    [   79.630462] PM: early resume of devices complete after 1.617 msecs
    [   80.042938] vibra disabling led output
    [   80.569641] wlcore: firmware booted (Rev 6.3.10.2.115)
    [   80.647430] wlcore: Association completed.
    [   80.686401] PM: resume of devices complete after 1055.786 msecs
    [   80.706817] PM: Finishing wakeup.
    [   80.706848] Restarting tasks ... done.

  • Hi Ravikiran,

    As I looking at the log the problem appears after starting the suspend_resume.sh script:

    [   79.618896] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:891


    I suggest you to start investigating the issue by look at the row 891 in the drivers/base/power/runtime.c file. I suspect that camera subsystem not correctly goes to suspend state.

    BR

    Tsvetolin Shulev

  • Cvetolin Shulev-XID,

    Thanks for the inputs. 

    We are able to resolve the issue & it was actually the problem with PRCM module.