diff options
Diffstat (limited to 'arch/mips/include/asm/octeon/octeon-feature.h')
-rw-r--r-- | arch/mips/include/asm/octeon/octeon-feature.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/arch/mips/include/asm/octeon/octeon-feature.h b/arch/mips/include/asm/octeon/octeon-feature.h index 90e05a8d4b15..c4fe81f47f53 100644 --- a/arch/mips/include/asm/octeon/octeon-feature.h +++ b/arch/mips/include/asm/octeon/octeon-feature.h | |||
@@ -86,8 +86,6 @@ enum octeon_feature { | |||
86 | OCTEON_MAX_FEATURE | 86 | OCTEON_MAX_FEATURE |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static inline int cvmx_fuse_read(int fuse); | ||
90 | |||
91 | /** | 89 | /** |
92 | * Determine if the current Octeon supports a specific feature. These | 90 | * Determine if the current Octeon supports a specific feature. These |
93 | * checks have been optimized to be fairly quick, but they should still | 91 | * checks have been optimized to be fairly quick, but they should still |
@@ -105,33 +103,6 @@ static inline int octeon_has_feature(enum octeon_feature feature) | |||
105 | case OCTEON_FEATURE_SAAD: | 103 | case OCTEON_FEATURE_SAAD: |
106 | return !OCTEON_IS_MODEL(OCTEON_CN3XXX); | 104 | return !OCTEON_IS_MODEL(OCTEON_CN3XXX); |
107 | 105 | ||
108 | case OCTEON_FEATURE_ZIP: | ||
109 | if (OCTEON_IS_MODEL(OCTEON_CN30XX) | ||
110 | || OCTEON_IS_MODEL(OCTEON_CN50XX) | ||
111 | || OCTEON_IS_MODEL(OCTEON_CN52XX)) | ||
112 | return 0; | ||
113 | else if (OCTEON_IS_MODEL(OCTEON_CN38XX_PASS1)) | ||
114 | return 1; | ||
115 | else | ||
116 | return !cvmx_fuse_read(121); | ||
117 | |||
118 | case OCTEON_FEATURE_CRYPTO: | ||
119 | if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) { | ||
120 | union cvmx_mio_fus_dat2 fus_2; | ||
121 | fus_2.u64 = cvmx_read_csr(CVMX_MIO_FUS_DAT2); | ||
122 | if (fus_2.s.nocrypto || fus_2.s.nomul) { | ||
123 | return 0; | ||
124 | } else if (!fus_2.s.dorm_crypto) { | ||
125 | return 1; | ||
126 | } else { | ||
127 | union cvmx_rnm_ctl_status st; | ||
128 | st.u64 = cvmx_read_csr(CVMX_RNM_CTL_STATUS); | ||
129 | return st.s.eer_val; | ||
130 | } | ||
131 | } else { | ||
132 | return !cvmx_fuse_read(90); | ||
133 | } | ||
134 | |||
135 | case OCTEON_FEATURE_DORM_CRYPTO: | 106 | case OCTEON_FEATURE_DORM_CRYPTO: |
136 | if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) { | 107 | if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) { |
137 | union cvmx_mio_fus_dat2 fus_2; | 108 | union cvmx_mio_fus_dat2 fus_2; |
@@ -188,29 +159,6 @@ static inline int octeon_has_feature(enum octeon_feature feature) | |||
188 | && !OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X) | 159 | && !OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X) |
189 | && !OCTEON_IS_MODEL(OCTEON_CN52XX_PASS1_X); | 160 | && !OCTEON_IS_MODEL(OCTEON_CN52XX_PASS1_X); |
190 | 161 | ||
191 | case OCTEON_FEATURE_DFA: | ||
192 | if (!OCTEON_IS_MODEL(OCTEON_CN38XX) | ||
193 | && !OCTEON_IS_MODEL(OCTEON_CN31XX) | ||
194 | && !OCTEON_IS_MODEL(OCTEON_CN58XX)) | ||
195 | return 0; | ||
196 | else if (OCTEON_IS_MODEL(OCTEON_CN3020)) | ||
197 | return 0; | ||
198 | else | ||
199 | return !cvmx_fuse_read(120); | ||
200 | |||
201 | case OCTEON_FEATURE_HFA: | ||
202 | if (!OCTEON_IS_MODEL(OCTEON_CN6XXX)) | ||
203 | return 0; | ||
204 | else | ||
205 | return !cvmx_fuse_read(90); | ||
206 | |||
207 | case OCTEON_FEATURE_DFM: | ||
208 | if (!(OCTEON_IS_MODEL(OCTEON_CN63XX) | ||
209 | || OCTEON_IS_MODEL(OCTEON_CN66XX))) | ||
210 | return 0; | ||
211 | else | ||
212 | return !cvmx_fuse_read(90); | ||
213 | |||
214 | case OCTEON_FEATURE_MDIO_CLAUSE_45: | 162 | case OCTEON_FEATURE_MDIO_CLAUSE_45: |
215 | return !(OCTEON_IS_MODEL(OCTEON_CN3XXX) | 163 | return !(OCTEON_IS_MODEL(OCTEON_CN3XXX) |
216 | || OCTEON_IS_MODEL(OCTEON_CN58XX) | 164 | || OCTEON_IS_MODEL(OCTEON_CN58XX) |