Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183203
b: refs/heads/master
c: 01a9af3
h: refs/heads/master
i:
  183201: 1507af1
  183199: 2919c84
v: v3
  • Loading branch information
Sriramakrishnan authored and Kevin Hilman committed Feb 4, 2010
1 parent c155b41 commit 69a343e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ee2bf9ab792d0c02b13ca3acbd036debb7745d9
refs/heads/master: 01a9af36cd9d25fc71e28192974732d8053bd1c0
11 changes: 11 additions & 0 deletions trunk/drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ struct emac_priv {
struct mii_bus *mii_bus;
struct phy_device *phydev;
spinlock_t lock;
/*platform specific members*/
void (*int_enable) (void);
void (*int_disable) (void);
};

/* clock frequency for EMAC */
Expand Down Expand Up @@ -1001,6 +1004,8 @@ static void emac_int_disable(struct emac_priv *priv)
emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0x0);
emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0x0);
/* NOTE: Rx Threshold and Misc interrupts are not disabled */
if (priv->int_disable)
priv->int_disable();

local_irq_restore(flags);

Expand All @@ -1020,6 +1025,9 @@ static void emac_int_disable(struct emac_priv *priv)
static void emac_int_enable(struct emac_priv *priv)
{
if (priv->version == EMAC_VERSION_2) {
if (priv->int_enable)
priv->int_enable();

emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0xff);
emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0xff);

Expand Down Expand Up @@ -2659,6 +2667,9 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
priv->phy_mask = pdata->phy_mask;
priv->rmii_en = pdata->rmii_en;
priv->version = pdata->version;
priv->int_enable = pdata->interrupt_enable;
priv->int_disable = pdata->interrupt_disable;

emac_dev = &ndev->dev;
/* Get EMAC platform data */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/davinci_emac.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ struct emac_platform_data {
u32 mdio_max_freq;
u8 rmii_en;
u8 version;
void (*interrupt_enable) (void);
void (*interrupt_disable) (void);
};

enum {
Expand Down

0 comments on commit 69a343e

Please sign in to comment.