aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/octeon/octeon-feature.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/include/asm/octeon/octeon-feature.h b/arch/mips/include/asm/octeon/octeon-feature.h
index 04fac684069c..ef24a7b4ea57 100644
--- a/arch/mips/include/asm/octeon/octeon-feature.h
+++ b/arch/mips/include/asm/octeon/octeon-feature.h
@@ -57,6 +57,13 @@ enum octeon_feature {
57 OCTEON_FEATURE_RAID, 57 OCTEON_FEATURE_RAID,
58 /* Octeon has a builtin USB */ 58 /* Octeon has a builtin USB */
59 OCTEON_FEATURE_USB, 59 OCTEON_FEATURE_USB,
60 /* Octeon IPD can run without using work queue entries */
61 OCTEON_FEATURE_NO_WPTR,
62 /* Octeon has DFA state machines */
63 OCTEON_FEATURE_DFA,
64 /* Octeon MDIO block supports clause 45 transactions for 10
65 * Gig support */
66 OCTEON_FEATURE_MDIO_CLAUSE_45,
60}; 67};
61 68
62static inline int cvmx_fuse_read(int fuse); 69static inline int cvmx_fuse_read(int fuse);
@@ -112,6 +119,26 @@ static inline int octeon_has_feature(enum octeon_feature feature)
112 case OCTEON_FEATURE_USB: 119 case OCTEON_FEATURE_USB:
113 return !(OCTEON_IS_MODEL(OCTEON_CN38XX) 120 return !(OCTEON_IS_MODEL(OCTEON_CN38XX)
114 || OCTEON_IS_MODEL(OCTEON_CN58XX)); 121 || OCTEON_IS_MODEL(OCTEON_CN58XX));
122 case OCTEON_FEATURE_NO_WPTR:
123 return (OCTEON_IS_MODEL(OCTEON_CN56XX)
124 || OCTEON_IS_MODEL(OCTEON_CN52XX))
125 && !OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X)
126 && !OCTEON_IS_MODEL(OCTEON_CN52XX_PASS1_X);
127 case OCTEON_FEATURE_DFA:
128 if (!OCTEON_IS_MODEL(OCTEON_CN38XX)
129 && !OCTEON_IS_MODEL(OCTEON_CN31XX)
130 && !OCTEON_IS_MODEL(OCTEON_CN58XX))
131 return 0;
132 else if (OCTEON_IS_MODEL(OCTEON_CN3020))
133 return 0;
134 else if (OCTEON_IS_MODEL(OCTEON_CN38XX_PASS1))
135 return 1;
136 else
137 return !cvmx_fuse_read(120);
138 case OCTEON_FEATURE_MDIO_CLAUSE_45:
139 return !(OCTEON_IS_MODEL(OCTEON_CN3XXX)
140 || OCTEON_IS_MODEL(OCTEON_CN58XX)
141 || OCTEON_IS_MODEL(OCTEON_CN50XX));
115 } 142 }
116 return 0; 143 return 0;
117} 144}