diff options
Diffstat (limited to 'drivers/net/phy/mdio-octeon.c')
-rw-r--r-- | drivers/net/phy/mdio-octeon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c index 61a4461cbda5..f443d43edd80 100644 --- a/drivers/net/phy/mdio-octeon.c +++ b/drivers/net/phy/mdio-octeon.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 2009 Cavium Networks | 6 | * Copyright (C) 2009 Cavium Networks |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/gfp.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
@@ -87,6 +88,7 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, | |||
87 | static int __init octeon_mdiobus_probe(struct platform_device *pdev) | 88 | static int __init octeon_mdiobus_probe(struct platform_device *pdev) |
88 | { | 89 | { |
89 | struct octeon_mdiobus *bus; | 90 | struct octeon_mdiobus *bus; |
91 | union cvmx_smix_en smi_en; | ||
90 | int i; | 92 | int i; |
91 | int err = -ENOENT; | 93 | int err = -ENOENT; |
92 | 94 | ||
@@ -102,6 +104,10 @@ static int __init octeon_mdiobus_probe(struct platform_device *pdev) | |||
102 | if (!bus->mii_bus) | 104 | if (!bus->mii_bus) |
103 | goto err; | 105 | goto err; |
104 | 106 | ||
107 | smi_en.u64 = 0; | ||
108 | smi_en.s.en = 1; | ||
109 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
110 | |||
105 | /* | 111 | /* |
106 | * Standard Octeon evaluation boards don't support phy | 112 | * Standard Octeon evaluation boards don't support phy |
107 | * interrupts, we need to poll. | 113 | * interrupts, we need to poll. |
@@ -132,17 +138,22 @@ err_register: | |||
132 | 138 | ||
133 | err: | 139 | err: |
134 | devm_kfree(&pdev->dev, bus); | 140 | devm_kfree(&pdev->dev, bus); |
141 | smi_en.u64 = 0; | ||
142 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
135 | return err; | 143 | return err; |
136 | } | 144 | } |
137 | 145 | ||
138 | static int __exit octeon_mdiobus_remove(struct platform_device *pdev) | 146 | static int __exit octeon_mdiobus_remove(struct platform_device *pdev) |
139 | { | 147 | { |
140 | struct octeon_mdiobus *bus; | 148 | struct octeon_mdiobus *bus; |
149 | union cvmx_smix_en smi_en; | ||
141 | 150 | ||
142 | bus = dev_get_drvdata(&pdev->dev); | 151 | bus = dev_get_drvdata(&pdev->dev); |
143 | 152 | ||
144 | mdiobus_unregister(bus->mii_bus); | 153 | mdiobus_unregister(bus->mii_bus); |
145 | mdiobus_free(bus->mii_bus); | 154 | mdiobus_free(bus->mii_bus); |
155 | smi_en.u64 = 0; | ||
156 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
146 | return 0; | 157 | return 0; |
147 | } | 158 | } |
148 | 159 | ||