]> git.sur5r.net Git - u-boot/blobdiff - drivers/crypto/fsl/jr.h
crypto/fsl: fix BLOB encapsulation and decapsulation
[u-boot] / drivers / crypto / fsl / jr.h
index cce2c589ce0bc8d98f3393f679202c188970c327..d897e572d6e981503db52b66823fed7cb15a9d52 100644 (file)
 #define MCFGR_SWRST       ((uint32_t)(1)<<31) /* Software Reset */
 #define MCFGR_DMA_RST     ((uint32_t)(1)<<28) /* DMA Reset */
 #define MCFGR_PS_SHIFT          16
+#define MCFGR_AWCACHE_SHIFT    8
+#define MCFGR_AWCACHE_MASK     (0xf << MCFGR_AWCACHE_SHIFT)
+#define MCFGR_ARCACHE_SHIFT    12
+#define MCFGR_ARCACHE_MASK     (0xf << MCFGR_ARCACHE_SHIFT)
+
 #define JR_INTMASK       0x00000001
 #define JRCR_RESET                  0x01
 #define JRINT_ERR_HALT_INPROGRESS   0x4
 #define JQ_ENQ_ERR             -3
 
 struct op_ring {
-       dma_addr_t desc;
+       phys_addr_t desc;
        uint32_t status;
 } __packed;
 
 struct jr_info {
-       void (*callback)(dma_addr_t desc, uint32_t status, void *arg);
-       dma_addr_t desc_phys_addr;
-       uint32_t desc_addr;
+       void (*callback)(uint32_t status, void *arg);
+       phys_addr_t desc_phys_addr;
        uint32_t desc_len;
        uint32_t op_done;
        void *arg;
@@ -71,6 +75,8 @@ struct jobring {
        int write_idx;
        /* Size of the rings. */
        int size;
+       /* Op ring size aligned to cache line size */
+       int op_size;
        /* The ip and output rings have to be accessed by SEC. So the
         * pointers will ahve to point to the housekeeping region provided
         * by SEC
@@ -84,6 +90,9 @@ struct jobring {
        /* This ring can be on the stack */
        struct jr_info info[JR_SIZE];
        struct op_ring *output_ring;
+       /* Offset in CCSR to the SEC engine to which this JR belongs */
+       uint32_t sec_offset;
+
 };
 
 struct result {