diff options
author | David Barksdale <amatus@amatus.name> | 2014-08-13 16:14:13 -0500 |
---|---|---|
committer | David Barksdale <amatus@amatus.name> | 2014-08-13 16:14:13 -0500 |
commit | ace6c6d243016e272050787c14e27a83ecd94a25 (patch) | |
tree | c837edb1ca98b2552fbc7edba47aeb63f98ca1f0 /drivers/crypto/pka_4xx_access.h | |
parent | 1b6e1688bd215cd7c9cb75650fa815a1ec6567e1 (diff) |
gpl-source-mybooklive-010002-update.zipgpl-source-mybooklive-010103-update.zipgpl-source-mybooklive-010002-update.zip
Diffstat (limited to 'drivers/crypto/pka_4xx_access.h')
-rw-r--r-- | drivers/crypto/pka_4xx_access.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/drivers/crypto/pka_4xx_access.h b/drivers/crypto/pka_4xx_access.h new file mode 100644 index 00000000000..b7baa664f8c --- /dev/null +++ b/drivers/crypto/pka_4xx_access.h @@ -0,0 +1,86 @@ +/******************************************************************************* + * + * Copyright (c) 2008 Loc Ho <lho@amcc.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * + * Detail Description: + * This file defines ioctl structures for the Linux CryptoAPI interface. It + * provides user space applications accesss into the Linux CryptoAPI + * functionalities. + * + * @file pka4xx_access.h + * + * This module provides access to the AMCC SoC PKA hardware under Linux. + * + ******************************************************************************* + */ +#ifndef __PKA4XX_ACCESS_H__ +#define __PKA4XX_ACCESS_H__ + +#include <linux/types.h> +#include <linux/interrupt.h> +#include <asm/errno.h> + +#ifndef AHB_BASE_ADDR_LO + /* FIXME */ +# define AHB_BASE_ADDR_LO 0 +#endif + +/* Debugging Flags */ + +#ifndef LL_EMERG +#define LL_EMERG KERN_EMERG +#define LL_ALERT KERN_ALERT +#define LL_CRIT KERN_CRIT +#define LL_ERR KERN_ERR +#define LL_WARNING KERN_WARNING +#define LL_NOTICE KERN_NOTICE +#define LL_INFO KERN_INFO +#define LL_DEBUG KERN_DEBUG +#define LL_EXTRADEBUG KERN_DEBUG +#endif + +#define PKA4XX_HDR "PKA4XX: " +/* #define PKA4XX_DEBUG */ + +#if !defined(PKA4XX_DEBUG) +# define LPRINTF(ll, fmt, ...) +#else +# define LPRINTF(ll, fmt, ...) \ + do { \ + printk(ll PKA4XX_HDR fmt "\n", ##__VA_ARGS__); \ + } while(0); +#endif + +#ifndef RC_OK + #define RC_OK 0 + #define RC_INVALID_PARM -EINVAL + #define RC_NODEV -ENODEV + #define RC_NO_IMPLEMENTATION -ENOSYS + #define RC_ENOMEM -ENOMEM + #define RC_EINPROGRESS -EINPROGRESS + #define RC_EALREADY -EALREADY + #define RC_EBUSY -EBUSY + #define RC_EIO -EIO + + /* Error code base specify to AMCC */ + #define RC_ERROR_BASE 5000 + #define RC_HWERROR -(RC_ERROR_BASE+0) + #define RC_FATAL -(RC_ERROR_BASE+1) +#endif /* RC_OK */ + +#ifndef ASSERT + #define ASSERT(x) +#endif /* ASSERT */ + +#endif |