diff options
Diffstat (limited to 'drivers/net/ibm_newemac/mal.c')
-rw-r--r-- | drivers/net/ibm_newemac/mal.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 1839d3f154a3..ecf9798987fa 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -280,9 +280,11 @@ static irqreturn_t mal_txeob(int irq, void *dev_instance) | |||
280 | mal_schedule_poll(mal); | 280 | mal_schedule_poll(mal); |
281 | set_mal_dcrn(mal, MAL_TXEOBISR, r); | 281 | set_mal_dcrn(mal, MAL_TXEOBISR, r); |
282 | 282 | ||
283 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
283 | if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) | 284 | if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) |
284 | mtdcri(SDR0, DCRN_SDR_ICINTSTAT, | 285 | mtdcri(SDR0, DCRN_SDR_ICINTSTAT, |
285 | (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICTX)); | 286 | (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICTX)); |
287 | #endif | ||
286 | 288 | ||
287 | return IRQ_HANDLED; | 289 | return IRQ_HANDLED; |
288 | } | 290 | } |
@@ -298,9 +300,11 @@ static irqreturn_t mal_rxeob(int irq, void *dev_instance) | |||
298 | mal_schedule_poll(mal); | 300 | mal_schedule_poll(mal); |
299 | set_mal_dcrn(mal, MAL_RXEOBISR, r); | 301 | set_mal_dcrn(mal, MAL_RXEOBISR, r); |
300 | 302 | ||
303 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
301 | if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) | 304 | if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) |
302 | mtdcri(SDR0, DCRN_SDR_ICINTSTAT, | 305 | mtdcri(SDR0, DCRN_SDR_ICINTSTAT, |
303 | (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICRX)); | 306 | (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICRX)); |
307 | #endif | ||
304 | 308 | ||
305 | return IRQ_HANDLED; | 309 | return IRQ_HANDLED; |
306 | } | 310 | } |
@@ -572,9 +576,18 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
572 | goto fail; | 576 | goto fail; |
573 | } | 577 | } |
574 | 578 | ||
575 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) | 579 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) { |
580 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ | ||
581 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) | ||
576 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | | 582 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | |
577 | MAL_FTR_COMMON_ERR_INT); | 583 | MAL_FTR_COMMON_ERR_INT); |
584 | #else | ||
585 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", | ||
586 | ofdev->node->full_name); | ||
587 | err = -ENODEV; | ||
588 | goto fail; | ||
589 | #endif | ||
590 | } | ||
578 | 591 | ||
579 | mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); | 592 | mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); |
580 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); | 593 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); |