Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72413
b: refs/heads/master
c: f9fbbc1
h: refs/heads/master
i:
  72411: 4c0a00a
v: v3
  • Loading branch information
Lennert Buytenhek authored and Dale Farnsworth committed Oct 23, 2007
1 parent 46be7ea commit fdf62a4
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 126 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c1bbdfe6f70eb9132829caa9341a0294c2aee5d
refs/heads/master: f9fbbc18dfcdc6156306f475de8b0bb96f97cd0d
22 changes: 7 additions & 15 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,19 @@ static const struct ethtool_ops mv643xx_ethtool_ops;
static char mv643xx_driver_name[] = "mv643xx_eth";
static char mv643xx_driver_version[] = "1.0";

static void __iomem *mv643xx_eth_shared_base;
static void __iomem *mv643xx_eth_base;

/* used to protect MV643XX_ETH_SMI_REG, which is shared across ports */
static DEFINE_SPINLOCK(mv643xx_eth_phy_lock);

static inline u32 mv_read(int offset)
{
void __iomem *reg_base;

reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS;

return readl(reg_base + offset);
return readl(mv643xx_eth_base + offset);
}

static inline void mv_write(int offset, u32 data)
{
void __iomem *reg_base;

reg_base = mv643xx_eth_shared_base - MV643XX_ETH_SHARED_REGS;
writel(data, reg_base + offset);
writel(data, mv643xx_eth_base + offset);
}

/*
Expand Down Expand Up @@ -1470,9 +1463,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
if (res == NULL)
return -ENODEV;

mv643xx_eth_shared_base = ioremap(res->start,
MV643XX_ETH_SHARED_REGS_SIZE);
if (mv643xx_eth_shared_base == NULL)
mv643xx_eth_base = ioremap(res->start, res->end - res->start + 1);
if (mv643xx_eth_base == NULL)
return -ENOMEM;

return 0;
Expand All @@ -1481,8 +1473,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)

static int mv643xx_eth_shared_remove(struct platform_device *pdev)
{
iounmap(mv643xx_eth_shared_base);
mv643xx_eth_shared_base = NULL;
iounmap(mv643xx_eth_base);
mv643xx_eth_base = NULL;

return 0;
}
Expand Down
Loading

0 comments on commit fdf62a4

Please sign in to comment.