aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/octeon
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/octeon')
-rw-r--r--arch/mips/include/asm/octeon/octeon-feature.h17
-rw-r--r--arch/mips/include/asm/octeon/octeon.h5
2 files changed, 15 insertions, 7 deletions
diff --git a/arch/mips/include/asm/octeon/octeon-feature.h b/arch/mips/include/asm/octeon/octeon-feature.h
index c4fe81f47f53..8ebd3f579b84 100644
--- a/arch/mips/include/asm/octeon/octeon-feature.h
+++ b/arch/mips/include/asm/octeon/octeon-feature.h
@@ -46,8 +46,6 @@ enum octeon_feature {
46 OCTEON_FEATURE_SAAD, 46 OCTEON_FEATURE_SAAD,
47 /* Does this Octeon support the ZIP offload engine? */ 47 /* Does this Octeon support the ZIP offload engine? */
48 OCTEON_FEATURE_ZIP, 48 OCTEON_FEATURE_ZIP,
49 /* Does this Octeon support crypto acceleration using COP2? */
50 OCTEON_FEATURE_CRYPTO,
51 OCTEON_FEATURE_DORM_CRYPTO, 49 OCTEON_FEATURE_DORM_CRYPTO,
52 /* Does this Octeon support PCI express? */ 50 /* Does this Octeon support PCI express? */
53 OCTEON_FEATURE_PCIE, 51 OCTEON_FEATURE_PCIE,
@@ -86,6 +84,21 @@ enum octeon_feature {
86 OCTEON_MAX_FEATURE 84 OCTEON_MAX_FEATURE
87}; 85};
88 86
87enum octeon_feature_bits {
88 OCTEON_HAS_CRYPTO = 0x0001, /* Crypto acceleration using COP2 */
89};
90extern enum octeon_feature_bits __octeon_feature_bits;
91
92/**
93 * octeon_has_crypto() - Check if this OCTEON has crypto acceleration support.
94 *
95 * Returns: Non-zero if the feature exists. Zero if the feature does not exist.
96 */
97static inline int octeon_has_crypto(void)
98{
99 return __octeon_feature_bits & OCTEON_HAS_CRYPTO;
100}
101
89/** 102/**
90 * Determine if the current Octeon supports a specific feature. These 103 * Determine if the current Octeon supports a specific feature. These
91 * checks have been optimized to be fairly quick, but they should still 104 * checks have been optimized to be fairly quick, but they should still
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h
index d781f9e66884..6dfefd2d5cdf 100644
--- a/arch/mips/include/asm/octeon/octeon.h
+++ b/arch/mips/include/asm/octeon/octeon.h
@@ -44,11 +44,6 @@ extern int octeon_get_boot_num_arguments(void);
44extern const char *octeon_get_boot_argument(int arg); 44extern const char *octeon_get_boot_argument(int arg);
45extern void octeon_hal_setup_reserved32(void); 45extern void octeon_hal_setup_reserved32(void);
46extern void octeon_user_io_init(void); 46extern void octeon_user_io_init(void);
47struct octeon_cop2_state;
48extern unsigned long octeon_crypto_enable(struct octeon_cop2_state *state);
49extern void octeon_crypto_disable(struct octeon_cop2_state *state,
50 unsigned long flags);
51extern asmlinkage void octeon_cop2_restore(struct octeon_cop2_state *task);
52 47
53extern void octeon_init_cvmcount(void); 48extern void octeon_init_cvmcount(void);
54extern void octeon_setup_delays(void); 49extern void octeon_setup_delays(void);