mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-09 14:14:00 +08:00
net: mvmdio: rename base register cookie from smireg to regs
This patch renames the base register cookie in the mvmdio drive from "smireg" to "regs" since a subsequent patch is going to use an ioremap() cookie whose size is larger than a single register of 4 bytes. No functionnal code change introduced. Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7111b717a0
commit
3712b71769
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
struct orion_mdio_dev {
|
struct orion_mdio_dev {
|
||||||
struct mutex lock;
|
struct mutex lock;
|
||||||
void __iomem *smireg;
|
void __iomem *regs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Wait for the SMI unit to be ready for another operation
|
/* Wait for the SMI unit to be ready for another operation
|
||||||
@ -52,7 +52,7 @@ static int orion_mdio_wait_ready(struct mii_bus *bus)
|
|||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
val = readl(dev->smireg);
|
val = readl(dev->regs);
|
||||||
if (!(val & MVMDIO_SMI_BUSY))
|
if (!(val & MVMDIO_SMI_BUSY))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -87,12 +87,12 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
|
|||||||
writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) |
|
writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) |
|
||||||
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
|
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
|
||||||
MVMDIO_SMI_READ_OPERATION),
|
MVMDIO_SMI_READ_OPERATION),
|
||||||
dev->smireg);
|
dev->regs);
|
||||||
|
|
||||||
/* Wait for the value to become available */
|
/* Wait for the value to become available */
|
||||||
count = 0;
|
count = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
val = readl(dev->smireg);
|
val = readl(dev->regs);
|
||||||
if (val & MVMDIO_SMI_READ_VALID)
|
if (val & MVMDIO_SMI_READ_VALID)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
|
|||||||
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
|
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
|
||||||
MVMDIO_SMI_WRITE_OPERATION |
|
MVMDIO_SMI_WRITE_OPERATION |
|
||||||
(value << MVMDIO_SMI_DATA_SHIFT)),
|
(value << MVMDIO_SMI_DATA_SHIFT)),
|
||||||
dev->smireg);
|
dev->regs);
|
||||||
|
|
||||||
mutex_unlock(&dev->lock);
|
mutex_unlock(&dev->lock);
|
||||||
|
|
||||||
@ -178,8 +178,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
|
|||||||
bus->irq[i] = PHY_POLL;
|
bus->irq[i] = PHY_POLL;
|
||||||
|
|
||||||
dev = bus->priv;
|
dev = bus->priv;
|
||||||
dev->smireg = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
dev->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
||||||
if (!dev->smireg) {
|
if (!dev->regs) {
|
||||||
dev_err(&pdev->dev, "Unable to remap SMI register\n");
|
dev_err(&pdev->dev, "Unable to remap SMI register\n");
|
||||||
kfree(bus->irq);
|
kfree(bus->irq);
|
||||||
mdiobus_free(bus);
|
mdiobus_free(bus);
|
||||||
|
Loading…
Reference in New Issue
Block a user