diff options
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 24 | ||||
-rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 1 |
2 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 09f3746902b4..4da36b8dd25c 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -765,7 +765,7 @@ static int at91ether_open(struct net_device *dev) | |||
765 | if (!is_valid_ether_addr(dev->dev_addr)) | 765 | if (!is_valid_ether_addr(dev->dev_addr)) |
766 | return -EADDRNOTAVAIL; | 766 | return -EADDRNOTAVAIL; |
767 | 767 | ||
768 | clk_enable(lp->ether_clk); /* Re-enable Peripheral clock */ | 768 | clk_enable(lp->pclk); /* Re-enable Peripheral clock */ |
769 | 769 | ||
770 | /* Clear internal statistics */ | 770 | /* Clear internal statistics */ |
771 | ctl = macb_readl(lp, NCR); | 771 | ctl = macb_readl(lp, NCR); |
@@ -817,7 +817,7 @@ static int at91ether_close(struct net_device *dev) | |||
817 | 817 | ||
818 | netif_stop_queue(dev); | 818 | netif_stop_queue(dev); |
819 | 819 | ||
820 | clk_disable(lp->ether_clk); /* Disable Peripheral clock */ | 820 | clk_disable(lp->pclk); /* Disable Peripheral clock */ |
821 | 821 | ||
822 | return 0; | 822 | return 0; |
823 | } | 823 | } |
@@ -1070,12 +1070,12 @@ static int __init at91ether_probe(struct platform_device *pdev) | |||
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | /* Clock */ | 1072 | /* Clock */ |
1073 | lp->ether_clk = clk_get(&pdev->dev, "ether_clk"); | 1073 | lp->pclk = clk_get(&pdev->dev, "ether_clk"); |
1074 | if (IS_ERR(lp->ether_clk)) { | 1074 | if (IS_ERR(lp->pclk)) { |
1075 | res = PTR_ERR(lp->ether_clk); | 1075 | res = PTR_ERR(lp->pclk); |
1076 | goto err_ioumap; | 1076 | goto err_ioumap; |
1077 | } | 1077 | } |
1078 | clk_enable(lp->ether_clk); | 1078 | clk_enable(lp->pclk); |
1079 | 1079 | ||
1080 | /* Install the interrupt handler */ | 1080 | /* Install the interrupt handler */ |
1081 | dev->irq = platform_get_irq(pdev, 0); | 1081 | dev->irq = platform_get_irq(pdev, 0); |
@@ -1173,7 +1173,7 @@ static int __init at91ether_probe(struct platform_device *pdev) | |||
1173 | else if (lp->phy_type == MII_LAN83C185_ID) | 1173 | else if (lp->phy_type == MII_LAN83C185_ID) |
1174 | printk(KERN_INFO "%s: SMSC LAN83C185 PHY\n", dev->name); | 1174 | printk(KERN_INFO "%s: SMSC LAN83C185 PHY\n", dev->name); |
1175 | 1175 | ||
1176 | clk_disable(lp->ether_clk); /* Disable Peripheral clock */ | 1176 | clk_disable(lp->pclk); /* Disable Peripheral clock */ |
1177 | 1177 | ||
1178 | return 0; | 1178 | return 0; |
1179 | 1179 | ||
@@ -1184,8 +1184,8 @@ err_free_dmamem: | |||
1184 | err_free_irq: | 1184 | err_free_irq: |
1185 | free_irq(dev->irq, dev); | 1185 | free_irq(dev->irq, dev); |
1186 | err_disable_clock: | 1186 | err_disable_clock: |
1187 | clk_disable(lp->ether_clk); | 1187 | clk_disable(lp->pclk); |
1188 | clk_put(lp->ether_clk); | 1188 | clk_put(lp->pclk); |
1189 | err_ioumap: | 1189 | err_ioumap: |
1190 | iounmap(lp->regs); | 1190 | iounmap(lp->regs); |
1191 | err_free_dev: | 1191 | err_free_dev: |
@@ -1204,7 +1204,7 @@ static int __devexit at91ether_remove(struct platform_device *pdev) | |||
1204 | unregister_netdev(dev); | 1204 | unregister_netdev(dev); |
1205 | free_irq(dev->irq, dev); | 1205 | free_irq(dev->irq, dev); |
1206 | dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys); | 1206 | dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys); |
1207 | clk_put(lp->ether_clk); | 1207 | clk_put(lp->pclk); |
1208 | 1208 | ||
1209 | platform_set_drvdata(pdev, NULL); | 1209 | platform_set_drvdata(pdev, NULL); |
1210 | free_netdev(dev); | 1210 | free_netdev(dev); |
@@ -1227,7 +1227,7 @@ static int at91ether_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
1227 | netif_stop_queue(net_dev); | 1227 | netif_stop_queue(net_dev); |
1228 | netif_device_detach(net_dev); | 1228 | netif_device_detach(net_dev); |
1229 | 1229 | ||
1230 | clk_disable(lp->ether_clk); | 1230 | clk_disable(lp->pclk); |
1231 | } | 1231 | } |
1232 | return 0; | 1232 | return 0; |
1233 | } | 1233 | } |
@@ -1238,7 +1238,7 @@ static int at91ether_resume(struct platform_device *pdev) | |||
1238 | struct macb *lp = netdev_priv(net_dev); | 1238 | struct macb *lp = netdev_priv(net_dev); |
1239 | 1239 | ||
1240 | if (netif_running(net_dev)) { | 1240 | if (netif_running(net_dev)) { |
1241 | clk_enable(lp->ether_clk); | 1241 | clk_enable(lp->pclk); |
1242 | 1242 | ||
1243 | netif_device_attach(net_dev); | 1243 | netif_device_attach(net_dev); |
1244 | netif_start_queue(net_dev); | 1244 | netif_start_queue(net_dev); |
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 5661094d1ea0..138311f9be9a 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h | |||
@@ -559,7 +559,6 @@ struct macb { | |||
559 | struct macb_platform_data board_data; /* board-specific | 559 | struct macb_platform_data board_data; /* board-specific |
560 | * configuration (shared with | 560 | * configuration (shared with |
561 | * macb for common data */ | 561 | * macb for common data */ |
562 | struct clk *ether_clk; /* clock */ | ||
563 | 562 | ||
564 | /* PHY */ | 563 | /* PHY */ |
565 | unsigned long phy_type; /* type of PHY (PHY_ID) */ | 564 | unsigned long phy_type; /* type of PHY (PHY_ID) */ |