return caam_get_era_from_hw(ctrl);
 }
 
+/*
+ * ERRATA: imx6 devices (imx6D, imx6Q, imx6DL, imx6S, imx6DP and imx6DQ)
+ * have an issue wherein AXI bus transactions may not occur in the correct
+ * order. This isn't a problem running single descriptors, but can be if
+ * running multiple concurrent descriptors. Reworking the driver to throttle
+ * to single requests is impractical, thus the workaround is to limit the AXI
+ * pipeline to a depth of 1 (from it's default of 4) to preclude this situation
+ * from occurring.
+ */
+static void handle_imx6_err005766(u32 *mcr)
+{
+       if (of_machine_is_compatible("fsl,imx6q") ||
+           of_machine_is_compatible("fsl,imx6dl") ||
+           of_machine_is_compatible("fsl,imx6qp"))
+               clrsetbits_32(mcr, MCFGR_AXIPIPE_MASK,
+                             1 << MCFGR_AXIPIPE_SHIFT);
+}
+
 static const struct of_device_id caam_match[] = {
        {
                .compatible = "fsl,sec-v4.0",
                              (sizeof(dma_addr_t) == sizeof(u64) ?
                               MCFGR_LONG_PTR : 0));
 
+       handle_imx6_err005766(&ctrl->mcr);
+
        /*
         *  Read the Compile Time paramters and SCFGR to determine
         * if Virtualization is enabled for this platform