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.

pm-utils

Other Parts Discussed in Thread: OMAPL138

I'm working with dsplink_linux_1_65_00_02 on omap l138 and Linux (Texas distribution).

I need to run some script before "suspend to RAM" and after the wakeup from "suspend to RAM"

Is it possible to use pm-utils to solve my problem? Are there any other ways to do it?

Thank you

  • ops, I've made a mistake, dsplink has nothing to do with it,
    I had to say that I
    'm working with ti-dvsdk_omapl138-evm_4_02_00_06


  • You will need to implement hooks in /etc/pm/sleep.d and power.d that utilize the sysfs-based power management support for the TI LSP as well as shutting down drivers in a logical manner. Enabling PM features for omapl138 kernel is described at http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1/AM1x#Power_Management . Usage info on how to use the PM commands is at http://processors.wiki.ti.com/index.php/OMAP-L1_Linux_Drivers_Usage#Power_Management 

     

  • First of all, thanks for your reply.

    I know how to use pm-utils but I didn’t know if they could be ported on my target and if there were other lighter way to do their job on embedded systems.

    As far as the latter question is concerned, I’m still wondering but at least for the first one I’ve got the solution.

    my problem pm-utils and l138 were related to the fact that they are self-configuring (usually they are configured, compiled and run on the same system) whereas I had to configure them manually on the host, cross compile them still on the host and finally upload them on my target.

    With the following command I managed to configure and compile on my target:
    /configure  --host=arm-none-linux-gnueabi  --prefix=/home/user/filesystem --exec-prefix=/home/user/filesystem

    All the resulting files, link and folders are saved in the filesystem folder which I copied to the root directory of the target file-system. I had to tune symbolic links on the target file-system (they originally referenced the folder /home/user/filesystem)

    Finally I had to modify try_lock and spin_lock functions because my busy-box doesn’t provide the utility “flock” and rewrite the function do_suspend with “rtcwake -d /dev/rtc0 -s 30 -m mem” command (I’m using LOGICPD evm).

    To test it I put some scripts in the right places and everything worked fine!

    I’m sure this is not the best way to do this porting, but at least now I know that it’s possible to do it

  • Hi,

    I am also facing the same issue with suspend to RAM command. 

    When i issued the coomand it goes to sleep mode and it is not wakeup using with this commad.

    root@am1808-evm:~# rtcwake -d /dev/rtc0 -s 30 -m mem
    wakeup from "mem" at wed 20 14:53:35 2012
    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.02 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    Suspending console(s) (use no_console_suspend to debug)

    How to wakeup from sleep to normal.

    Please give me any suggestions.

    Regards,

    Kumar

     

  • I don't know your board, but the only possible way to wake up from sleep in my board (omapl138 evm) is to wait the elapse of rto timer.

    Have you unmounted MMC? as far as I know, if MMC is mounted when you go into sleep state, kernel crashes silently.

    bye

  • Hi,

    You can do couple of things.

    Try passing "no_console_suspend" from U-Boot bootargs. This will keep the serial console alive during suspend and will printout any kernel crash messages.

    Also, before suspending, verify whether RTC is working fine on the board. This can be done by using the 'hwclock' command from Linux prompt. If RTC is working, then the time shown by hwclock will be incrementing. If RTC is not working, then apply the patch available at http://arago-project.org/git/projects/?p=linux-davinci.git;a=commit;h=72a745b1ca171314e4679bd2190284bda07667bc and try.

    Regards, Sudhakar