diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-09-22 17:52:18 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 22:11:57 -0400 |
commit | 315781408ef4a6ff831f8fd37c90d4bb7c234853 (patch) | |
tree | 43ee75ef4b3c1fbb1a247446ed34a5dc5f4478fb /drivers/net/fs_enet | |
parent | 83dad4c3773b2be110f9ab0c9031e6129bd2e294 (diff) |
fs-enet: remove code associated with !CONFIG_PPC_MERGE
Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove
the dead code associated with !CONFIG_PPC_MERGE.
With this change the pre_request_irq() and post_free_irq() calls became
nops so they have been removed. Also removed fs_request_irq() and
fs_free_irq() and just called request_irq() and free_irq().
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 22 | ||||
-rw-r--r-- | drivers/net/fs_enet/fs_enet.h | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fcc.c | 12 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fec.c | 30 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 26 |
5 files changed, 3 insertions, 89 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 9d461825bf4c..cb51c1fb0338 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -664,23 +664,6 @@ static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
664 | return NETDEV_TX_OK; | 664 | return NETDEV_TX_OK; |
665 | } | 665 | } |
666 | 666 | ||
667 | static int fs_request_irq(struct net_device *dev, int irq, const char *name, | ||
668 | irq_handler_t irqf) | ||
669 | { | ||
670 | struct fs_enet_private *fep = netdev_priv(dev); | ||
671 | |||
672 | (*fep->ops->pre_request_irq)(dev, irq); | ||
673 | return request_irq(irq, irqf, IRQF_SHARED, name, dev); | ||
674 | } | ||
675 | |||
676 | static void fs_free_irq(struct net_device *dev, int irq) | ||
677 | { | ||
678 | struct fs_enet_private *fep = netdev_priv(dev); | ||
679 | |||
680 | free_irq(irq, dev); | ||
681 | (*fep->ops->post_free_irq)(dev, irq); | ||
682 | } | ||
683 | |||
684 | static void fs_timeout(struct net_device *dev) | 667 | static void fs_timeout(struct net_device *dev) |
685 | { | 668 | { |
686 | struct fs_enet_private *fep = netdev_priv(dev); | 669 | struct fs_enet_private *fep = netdev_priv(dev); |
@@ -800,7 +783,8 @@ static int fs_enet_open(struct net_device *dev) | |||
800 | napi_enable(&fep->napi); | 783 | napi_enable(&fep->napi); |
801 | 784 | ||
802 | /* Install our interrupt handler. */ | 785 | /* Install our interrupt handler. */ |
803 | r = fs_request_irq(dev, fep->interrupt, "fs_enet-mac", fs_enet_interrupt); | 786 | r = request_irq(fep->interrupt, fs_enet_interrupt, IRQF_SHARED, |
787 | "fs_enet-mac", dev); | ||
804 | if (r != 0) { | 788 | if (r != 0) { |
805 | printk(KERN_ERR DRV_MODULE_NAME | 789 | printk(KERN_ERR DRV_MODULE_NAME |
806 | ": %s Could not allocate FS_ENET IRQ!", dev->name); | 790 | ": %s Could not allocate FS_ENET IRQ!", dev->name); |
@@ -842,7 +826,7 @@ static int fs_enet_close(struct net_device *dev) | |||
842 | /* release any irqs */ | 826 | /* release any irqs */ |
843 | phy_disconnect(fep->phydev); | 827 | phy_disconnect(fep->phydev); |
844 | fep->phydev = NULL; | 828 | fep->phydev = NULL; |
845 | fs_free_irq(dev, fep->interrupt); | 829 | free_irq(fep->interrupt, dev); |
846 | 830 | ||
847 | return 0; | 831 | return 0; |
848 | } | 832 | } |
diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h index db46d2e72329..85a4bab7f630 100644 --- a/drivers/net/fs_enet/fs_enet.h +++ b/drivers/net/fs_enet/fs_enet.h | |||
@@ -34,8 +34,6 @@ struct fs_ops { | |||
34 | void (*adjust_link)(struct net_device *dev); | 34 | void (*adjust_link)(struct net_device *dev); |
35 | void (*restart)(struct net_device *dev); | 35 | void (*restart)(struct net_device *dev); |
36 | void (*stop)(struct net_device *dev); | 36 | void (*stop)(struct net_device *dev); |
37 | void (*pre_request_irq)(struct net_device *dev, int irq); | ||
38 | void (*post_free_irq)(struct net_device *dev, int irq); | ||
39 | void (*napi_clear_rx_event)(struct net_device *dev); | 37 | void (*napi_clear_rx_event)(struct net_device *dev); |
40 | void (*napi_enable_rx)(struct net_device *dev); | 38 | void (*napi_enable_rx)(struct net_device *dev); |
41 | void (*napi_disable_rx)(struct net_device *dev); | 39 | void (*napi_disable_rx)(struct net_device *dev); |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 1c7ef812a8e3..22e5a847a588 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -421,16 +421,6 @@ static void stop(struct net_device *dev) | |||
421 | fs_cleanup_bds(dev); | 421 | fs_cleanup_bds(dev); |
422 | } | 422 | } |
423 | 423 | ||
424 | static void pre_request_irq(struct net_device *dev, int irq) | ||
425 | { | ||
426 | /* nothing */ | ||
427 | } | ||
428 | |||
429 | static void post_free_irq(struct net_device *dev, int irq) | ||
430 | { | ||
431 | /* nothing */ | ||
432 | } | ||
433 | |||
434 | static void napi_clear_rx_event(struct net_device *dev) | 424 | static void napi_clear_rx_event(struct net_device *dev) |
435 | { | 425 | { |
436 | struct fs_enet_private *fep = netdev_priv(dev); | 426 | struct fs_enet_private *fep = netdev_priv(dev); |
@@ -540,8 +530,6 @@ const struct fs_ops fs_fcc_ops = { | |||
540 | .set_multicast_list = set_multicast_list, | 530 | .set_multicast_list = set_multicast_list, |
541 | .restart = restart, | 531 | .restart = restart, |
542 | .stop = stop, | 532 | .stop = stop, |
543 | .pre_request_irq = pre_request_irq, | ||
544 | .post_free_irq = post_free_irq, | ||
545 | .napi_clear_rx_event = napi_clear_rx_event, | 533 | .napi_clear_rx_event = napi_clear_rx_event, |
546 | .napi_enable_rx = napi_enable_rx, | 534 | .napi_enable_rx = napi_enable_rx, |
547 | .napi_disable_rx = napi_disable_rx, | 535 | .napi_disable_rx = napi_disable_rx, |
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 0a7d1c5c6524..14e575313c89 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -313,11 +313,7 @@ static void restart(struct net_device *dev) | |||
313 | * Clear any outstanding interrupt. | 313 | * Clear any outstanding interrupt. |
314 | */ | 314 | */ |
315 | FW(fecp, ievent, 0xffc0); | 315 | FW(fecp, ievent, 0xffc0); |
316 | #ifndef CONFIG_PPC_MERGE | ||
317 | FW(fecp, ivec, (fep->interrupt / 2) << 29); | ||
318 | #else | ||
319 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); | 316 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); |
320 | #endif | ||
321 | 317 | ||
322 | /* | 318 | /* |
323 | * adjust to speed (only for DUET & RMII) | 319 | * adjust to speed (only for DUET & RMII) |
@@ -413,30 +409,6 @@ static void stop(struct net_device *dev) | |||
413 | } | 409 | } |
414 | } | 410 | } |
415 | 411 | ||
416 | static void pre_request_irq(struct net_device *dev, int irq) | ||
417 | { | ||
418 | #ifndef CONFIG_PPC_MERGE | ||
419 | immap_t *immap = fs_enet_immap; | ||
420 | u32 siel; | ||
421 | |||
422 | /* SIU interrupt */ | ||
423 | if (irq >= SIU_IRQ0 && irq < SIU_LEVEL7) { | ||
424 | |||
425 | siel = in_be32(&immap->im_siu_conf.sc_siel); | ||
426 | if ((irq & 1) == 0) | ||
427 | siel |= (0x80000000 >> irq); | ||
428 | else | ||
429 | siel &= ~(0x80000000 >> (irq & ~1)); | ||
430 | out_be32(&immap->im_siu_conf.sc_siel, siel); | ||
431 | } | ||
432 | #endif | ||
433 | } | ||
434 | |||
435 | static void post_free_irq(struct net_device *dev, int irq) | ||
436 | { | ||
437 | /* nothing */ | ||
438 | } | ||
439 | |||
440 | static void napi_clear_rx_event(struct net_device *dev) | 412 | static void napi_clear_rx_event(struct net_device *dev) |
441 | { | 413 | { |
442 | struct fs_enet_private *fep = netdev_priv(dev); | 414 | struct fs_enet_private *fep = netdev_priv(dev); |
@@ -529,8 +501,6 @@ const struct fs_ops fs_fec_ops = { | |||
529 | .set_multicast_list = set_multicast_list, | 501 | .set_multicast_list = set_multicast_list, |
530 | .restart = restart, | 502 | .restart = restart, |
531 | .stop = stop, | 503 | .stop = stop, |
532 | .pre_request_irq = pre_request_irq, | ||
533 | .post_free_irq = post_free_irq, | ||
534 | .napi_clear_rx_event = napi_clear_rx_event, | 504 | .napi_clear_rx_event = napi_clear_rx_event, |
535 | .napi_enable_rx = napi_enable_rx, | 505 | .napi_enable_rx = napi_enable_rx, |
536 | .napi_disable_rx = napi_disable_rx, | 506 | .napi_disable_rx = napi_disable_rx, |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 22f50dd8b277..008cdd9cc536 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -377,30 +377,6 @@ static void stop(struct net_device *dev) | |||
377 | fs_cleanup_bds(dev); | 377 | fs_cleanup_bds(dev); |
378 | } | 378 | } |
379 | 379 | ||
380 | static void pre_request_irq(struct net_device *dev, int irq) | ||
381 | { | ||
382 | #ifndef CONFIG_PPC_MERGE | ||
383 | immap_t *immap = fs_enet_immap; | ||
384 | u32 siel; | ||
385 | |||
386 | /* SIU interrupt */ | ||
387 | if (irq >= SIU_IRQ0 && irq < SIU_LEVEL7) { | ||
388 | |||
389 | siel = in_be32(&immap->im_siu_conf.sc_siel); | ||
390 | if ((irq & 1) == 0) | ||
391 | siel |= (0x80000000 >> irq); | ||
392 | else | ||
393 | siel &= ~(0x80000000 >> (irq & ~1)); | ||
394 | out_be32(&immap->im_siu_conf.sc_siel, siel); | ||
395 | } | ||
396 | #endif | ||
397 | } | ||
398 | |||
399 | static void post_free_irq(struct net_device *dev, int irq) | ||
400 | { | ||
401 | /* nothing */ | ||
402 | } | ||
403 | |||
404 | static void napi_clear_rx_event(struct net_device *dev) | 380 | static void napi_clear_rx_event(struct net_device *dev) |
405 | { | 381 | { |
406 | struct fs_enet_private *fep = netdev_priv(dev); | 382 | struct fs_enet_private *fep = netdev_priv(dev); |
@@ -494,8 +470,6 @@ const struct fs_ops fs_scc_ops = { | |||
494 | .set_multicast_list = set_multicast_list, | 470 | .set_multicast_list = set_multicast_list, |
495 | .restart = restart, | 471 | .restart = restart, |
496 | .stop = stop, | 472 | .stop = stop, |
497 | .pre_request_irq = pre_request_irq, | ||
498 | .post_free_irq = post_free_irq, | ||
499 | .napi_clear_rx_event = napi_clear_rx_event, | 473 | .napi_clear_rx_event = napi_clear_rx_event, |
500 | .napi_enable_rx = napi_enable_rx, | 474 | .napi_enable_rx = napi_enable_rx, |
501 | .napi_disable_rx = napi_disable_rx, | 475 | .napi_disable_rx = napi_disable_rx, |