diff options
Diffstat (limited to 'drivers/net/ibm_emac/ibm_emac.h')
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h index 28c476f28c20..d3166da753ef 100644 --- a/drivers/net/ibm_emac/ibm_emac.h +++ b/drivers/net/ibm_emac/ibm_emac.h | |||
@@ -26,7 +26,7 @@ | |||
26 | /* This is a simple check to prevent use of this driver on non-tested SoCs */ | 26 | /* This is a simple check to prevent use of this driver on non-tested SoCs */ |
27 | #if !defined(CONFIG_405GP) && !defined(CONFIG_405GPR) && !defined(CONFIG_405EP) && \ | 27 | #if !defined(CONFIG_405GP) && !defined(CONFIG_405GPR) && !defined(CONFIG_405EP) && \ |
28 | !defined(CONFIG_440GP) && !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && \ | 28 | !defined(CONFIG_440GP) && !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && \ |
29 | !defined(CONFIG_440EP) && !defined(CONFIG_NP405H) | 29 | !defined(CONFIG_440EP) && !defined(CONFIG_NP405H) && !defined(CONFIG_440SPE) |
30 | #error "Unknown SoC. Please, check chip user manual and make sure EMAC defines are OK" | 30 | #error "Unknown SoC. Please, check chip user manual and make sure EMAC defines are OK" |
31 | #endif | 31 | #endif |
32 | 32 | ||
@@ -246,6 +246,25 @@ struct emac_regs { | |||
246 | #define EMAC_STACR_PCDA_SHIFT 5 | 246 | #define EMAC_STACR_PCDA_SHIFT 5 |
247 | #define EMAC_STACR_PRA_MASK 0x1f | 247 | #define EMAC_STACR_PRA_MASK 0x1f |
248 | 248 | ||
249 | /* | ||
250 | * For the 440SPe, AMCC inexplicably changed the polarity of | ||
251 | * the "operation complete" bit in the MII control register. | ||
252 | */ | ||
253 | #if defined(CONFIG_440SPE) | ||
254 | static inline int emac_phy_done(u32 stacr) | ||
255 | { | ||
256 | return !(stacr & EMAC_STACR_OC); | ||
257 | }; | ||
258 | #define EMAC_STACR_START EMAC_STACR_OC | ||
259 | |||
260 | #else /* CONFIG_440SPE */ | ||
261 | static inline int emac_phy_done(u32 stacr) | ||
262 | { | ||
263 | return stacr & EMAC_STACR_OC; | ||
264 | }; | ||
265 | #define EMAC_STACR_START 0 | ||
266 | #endif /* !CONFIG_440SPE */ | ||
267 | |||
249 | /* EMACx_TRTR */ | 268 | /* EMACx_TRTR */ |
250 | #if !defined(CONFIG_IBM_EMAC4) | 269 | #if !defined(CONFIG_IBM_EMAC4) |
251 | #define EMAC_TRTR_SHIFT 27 | 270 | #define EMAC_TRTR_SHIFT 27 |