#define SHA1_HMAC_BLOCK_SIZE 64
#define HASH_START IFX_HASH_CON
-static spinlock_t lock;
-#define CRTCL_SECT_INIT spin_lock_init(&lock)
-#define CRTCL_SECT_START spin_lock_irqsave(&lock, flag)
-#define CRTCL_SECT_END spin_unlock_irqrestore(&lock, flag)
-
//#define CRYPTO_DEBUG
#ifdef CRYPTO_DEBUG
extern char debug_level;
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
unsigned long flag;
- CRTCL_SECT_START;
+ CRTCL_SECT_HASH_START;
/* For context switching purposes, the previous hash output
* is loaded back into the output register
sctx->started = 1;
- CRTCL_SECT_END;
+ CRTCL_SECT_HASH_END;
}
/*! \fn static void sha1_init1(struct crypto_tfm *tfm)
/* Append length */
sha1_update (desc, bits, sizeof bits);
- CRTCL_SECT_START;
+ CRTCL_SECT_HASH_START;
*((u32 *) out + 0) = hashs->D1R;
*((u32 *) out + 1) = hashs->D2R;
*((u32 *) out + 3) = hashs->D4R;
*((u32 *) out + 4) = hashs->D5R;
- CRTCL_SECT_END;
+ CRTCL_SECT_HASH_END;
// Wipe context
memset (sctx, 0, sizeof *sctx);
if ((ret = crypto_register_shash(&ifxdeu_sha1_alg)))
goto sha1_err;
- CRTCL_SECT_INIT;
-
printk (KERN_NOTICE "IFX DEU SHA1 initialized%s.\n", disable_deudma ? "" : " (DMA)");
return ret;