This sounds like what I am experiencing but the Kernel I am using appears to have the workaround already implemented in pm-imx6.c:
| /* |
| * ERR007265: CCM: When improper low-power sequence is used, |
| * the SoC enters low power mode before the ARM core executes WFI. |
| * |
| * Software workaround: |
| * 1) Software should trigger IRQ #32 (IOMUX) to be always pending |
| * by setting IOMUX_GPR1_GINT. |
| * 2) Software should then unmask IRQ #32 in GPC before setting CCM |
| * Low-Power mode. |
| * 3) Software should mask IRQ #32 right after CCM Low-Power mode |
| * is set (set bits 0-1 of CCM_CLPCR). |
| * |
| * Note that IRQ #32 is GIC SPI #0. |
| */ |
| imx_gpc_hwirq_unmask(0); |
| writel_relaxed(val, ccm_base + CLPCR); |
| imx_gpc_hwirq_mask(0); |
However, i did stumble upon this forum post: IMX6SX Kernel 4.1.15 suspend/resume issue
And the solution there seems to have fixed my problem, although I am not sure i completely understand why because my issue does not seem to be the same has his. For some reason moving CAAM to the gpc seems to have corrected whatever was happening for me : /. Looking at the device tree CCM has an interrupt parent of gpc still so no changes there like with the CAAM. Any insight into what is going on would be helpful so that i can make sure i fully understand the problem and it doesn't crop up on me randomly down the road.
For convenience here is the patch from Dave in that other post that fixed things for me:
--- linux-rel_imx_4.1.15_1.0.0_ga/arch/arm/boot/dts/imx6sx.dtsi.orig 2016-04-01 14:09:50.000000000 -0400
+++ linux-rel_imx_4.1.15_1.0.0_ga/arch/arm/boot/dts/imx6sx.dtsi 2016-04-01 14:10:34.000000000 -0400
@@ -928,14 +928,14 @@
sec_jr0: jr0@1000 {
compatible = "fsl,sec-v4.0-job-ring";
reg = <0x1000 0x1000>;
- interrupt-parent = <&intc>;
+ interrupt-parent = <&gpc>;
interrupts = <0 105 0x4>;
};
sec_jr1: jr1@2000 {
compatible = "fsl,sec-v4.0-job-ring";
reg = <0x2000 0x1000>;
- interrupt-parent = <&intc>;
+ interrupt-parent = <&gpc>;
interrupts = <0 106 0x4>;
};
};
--- linux-rel_imx_4.1.15_1.0.0_ga/drivers/crypto/caam/jr.c.orig 2016-04-01 12:34:12.000000000 -0400
+++ linux-rel_imx_4.1.15_1.0.0_ga/drivers/crypto/caam/jr.c 2016-04-01 15:09:58.000000000 -0400
@@ -7,6 +7,7 @@
#include <linux/of_irq.h>
#include <linux/of_address.h>
+#include <linux/imx_gpc.h>
#include "compat.h"
#include "regs.h"
@@ -543,6 +544,7 @@ static int caam_jr_suspend(struct device
struct platform_device *pdev = to_platform_device(dev);
struct caam_drv_private_jr *jrpriv = platform_get_drvdata(pdev);
+ imx_gpc_mf_request_on(jrpriv->irq, 1);
if (device_may_wakeup(&pdev->dev))
enable_irq_wake(jrpriv->irq);
@@ -554,6 +556,7 @@ static int caam_jr_resume(struct device
struct platform_device *pdev = to_platform_device(dev);
struct caam_drv_private_jr *jrpriv = platform_get_drvdata(pdev);
+ imx_gpc_mf_request_on(jrpriv->irq, 0);
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(jrpriv->irq);
Thanks,
Jarrod