diff options
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r-- | drivers/net/davinci_emac.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 9ebac35d3af0..c735b62baa03 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -487,6 +487,9 @@ struct emac_priv { | |||
487 | struct mii_bus *mii_bus; | 487 | struct mii_bus *mii_bus; |
488 | struct phy_device *phydev; | 488 | struct phy_device *phydev; |
489 | spinlock_t lock; | 489 | spinlock_t lock; |
490 | /*platform specific members*/ | ||
491 | void (*int_enable) (void); | ||
492 | void (*int_disable) (void); | ||
490 | }; | 493 | }; |
491 | 494 | ||
492 | /* clock frequency for EMAC */ | 495 | /* clock frequency for EMAC */ |
@@ -1001,6 +1004,8 @@ static void emac_int_disable(struct emac_priv *priv) | |||
1001 | emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0x0); | 1004 | emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0x0); |
1002 | emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0x0); | 1005 | emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0x0); |
1003 | /* NOTE: Rx Threshold and Misc interrupts are not disabled */ | 1006 | /* NOTE: Rx Threshold and Misc interrupts are not disabled */ |
1007 | if (priv->int_disable) | ||
1008 | priv->int_disable(); | ||
1004 | 1009 | ||
1005 | local_irq_restore(flags); | 1010 | local_irq_restore(flags); |
1006 | 1011 | ||
@@ -1020,6 +1025,9 @@ static void emac_int_disable(struct emac_priv *priv) | |||
1020 | static void emac_int_enable(struct emac_priv *priv) | 1025 | static void emac_int_enable(struct emac_priv *priv) |
1021 | { | 1026 | { |
1022 | if (priv->version == EMAC_VERSION_2) { | 1027 | if (priv->version == EMAC_VERSION_2) { |
1028 | if (priv->int_enable) | ||
1029 | priv->int_enable(); | ||
1030 | |||
1023 | emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0xff); | 1031 | emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0xff); |
1024 | emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0xff); | 1032 | emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0xff); |
1025 | 1033 | ||
@@ -2659,6 +2667,9 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
2659 | priv->phy_mask = pdata->phy_mask; | 2667 | priv->phy_mask = pdata->phy_mask; |
2660 | priv->rmii_en = pdata->rmii_en; | 2668 | priv->rmii_en = pdata->rmii_en; |
2661 | priv->version = pdata->version; | 2669 | priv->version = pdata->version; |
2670 | priv->int_enable = pdata->interrupt_enable; | ||
2671 | priv->int_disable = pdata->interrupt_disable; | ||
2672 | |||
2662 | emac_dev = &ndev->dev; | 2673 | emac_dev = &ndev->dev; |
2663 | /* Get EMAC platform data */ | 2674 | /* Get EMAC platform data */ |
2664 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2675 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |