iMX28 Suspend-to-RAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX28 Suspend-to-RAM

639 Views
bdp42
Contributor IV

We have a custom imx28-based board running Linux 2.6.36. We are testing the suspend-to-ram function and we are getting an intermittent crash when attempting to go into the suspend-to-ram state.  The crash occurs in dpm_suspend_noirq when the device_suspend_noirq function is being called for all device entries on the device power management list. The contents of one of the entries is corrupted/modified, causing a crash in the list manipulation code.

Labels (1)
0 Kudos
1 Reply

481 Views
bdp42
Contributor IV

Sorry I had prematurely submitted the question before it was complete. Here is the complete question....

We have a custom imx28-based board running Linux 2.6.36. We are testing the suspend-to-ram function and we are getting an intermittent crash when attempting to go into the suspend-to-ram state.  The crash occurs in dpm_suspend_noirq when the device_suspend_noirq function is being called for all device entries on the device power management list. The contents of one of the entries is corrupted/modified, causing a crash in the list manipulation code.

This has something to do with the attempt to remove one of the MTD partitions from the system when suspending. The removal fails because they are still being used. Specifically it is failing in the attempt to remove the SYSTEM and DATA partitions.The others are removed successfully. However it looks like this failure is not being managed properly and this leads to the corruption of the associated entry on the list but only on an intermittent basis.

The code to remove the MTD entries is shown below. It's in the file gpmi-nfc-main.c. It's part of the gpmi suspend function and is only called if we have an MXS architecture and only on suspend-to-ram.

Has anyone seen this kind of error before?

This is only done if it's an MXS architecture and if suspend-to-ram. Why is this? Is there some iMX28 specific issue that is being dealt with here?

Thanks,

Bruno

/**

* gpmi_nfc_suspend() - Puts the NFC into a low power state.

*

* @pdev:  A pointer to the platform device data structure.

* @state: The new power state.

*/

static int gpmi_nfc_suspend(struct platform_device *pdev, pm_message_t state)

{

#ifdef CONFIG_ARCH_MXS

    if (mxs_pm_get_target() == PM_SUSPEND_MEM)  {

        struct gpmi_nfc_data           *this = platform_get_drvdata(pdev);

        gpmi_nfc_mil_exit(this);

        this->nfc->exit(this);

    }

#endif

    return 0;

}

0 Kudos