1 The octeon-ethernet driver needs to check for additional chip specific
2 features, we add them to the octeon_has_feature() framework.
4 Signed-off-by: David Daney <ddaney@caviumnetworks.com>
6 arch/mips/include/asm/octeon/octeon-feature.h | 27 +++++++++++++++++++++++++
7 1 files changed, 27 insertions(+), 0 deletions(-)
9 --- a/arch/mips/include/asm/octeon/octeon-feature.h
10 +++ b/arch/mips/include/asm/octeon/octeon-feature.h
11 @@ -57,6 +57,13 @@ enum octeon_feature {
13 /* Octeon has a builtin USB */
15 + /* Octeon IPD can run without using work queue entries */
16 + OCTEON_FEATURE_NO_WPTR,
17 + /* Octeon has DFA state machines */
19 + /* Octeon MDIO block supports clause 45 transactions for 10
21 + OCTEON_FEATURE_MDIO_CLAUSE_45,
24 static inline int cvmx_fuse_read(int fuse);
25 @@ -112,6 +119,26 @@ static inline int octeon_has_feature(enu
26 case OCTEON_FEATURE_USB:
27 return !(OCTEON_IS_MODEL(OCTEON_CN38XX)
28 || OCTEON_IS_MODEL(OCTEON_CN58XX));
29 + case OCTEON_FEATURE_NO_WPTR:
30 + return (OCTEON_IS_MODEL(OCTEON_CN56XX)
31 + || OCTEON_IS_MODEL(OCTEON_CN52XX))
32 + && !OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X)
33 + && !OCTEON_IS_MODEL(OCTEON_CN52XX_PASS1_X);
34 + case OCTEON_FEATURE_DFA:
35 + if (!OCTEON_IS_MODEL(OCTEON_CN38XX)
36 + && !OCTEON_IS_MODEL(OCTEON_CN31XX)
37 + && !OCTEON_IS_MODEL(OCTEON_CN58XX))
39 + else if (OCTEON_IS_MODEL(OCTEON_CN3020))
41 + else if (OCTEON_IS_MODEL(OCTEON_CN38XX_PASS1))
44 + return !cvmx_fuse_read(120);
45 + case OCTEON_FEATURE_MDIO_CLAUSE_45:
46 + return !(OCTEON_IS_MODEL(OCTEON_CN3XXX)
47 + || OCTEON_IS_MODEL(OCTEON_CN58XX)
48 + || OCTEON_IS_MODEL(OCTEON_CN50XX));