aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c15
-rw-r--r--drivers/net/fs_enet/mac-fcc.c8
-rw-r--r--drivers/net/fs_enet/mac-fec.c4
-rw-r--r--drivers/net/fs_enet/mac-scc.c6
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c7
-rw-r--r--drivers/net/fs_enet/mii-fec.c13
6 files changed, 31 insertions, 22 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 0fb0fefcb787..309a0eaddd81 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1013,7 +1013,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1013 return -ENOMEM; 1013 return -ENOMEM;
1014 1014
1015 if (!IS_FEC(match)) { 1015 if (!IS_FEC(match)) {
1016 data = of_get_property(ofdev->node, "fsl,cpm-command", &len); 1016 data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len);
1017 if (!data || len != 4) 1017 if (!data || len != 4)
1018 goto out_free_fpi; 1018 goto out_free_fpi;
1019 1019
@@ -1025,8 +1025,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1025 fpi->rx_copybreak = 240; 1025 fpi->rx_copybreak = 240;
1026 fpi->use_napi = 1; 1026 fpi->use_napi = 1;
1027 fpi->napi_weight = 17; 1027 fpi->napi_weight = 17;
1028 fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); 1028 fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
1029 if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link", 1029 if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
1030 NULL))) 1030 NULL)))
1031 goto out_free_fpi; 1031 goto out_free_fpi;
1032 1032
@@ -1059,7 +1059,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1059 spin_lock_init(&fep->lock); 1059 spin_lock_init(&fep->lock);
1060 spin_lock_init(&fep->tx_lock); 1060 spin_lock_init(&fep->tx_lock);
1061 1061
1062 mac_addr = of_get_mac_address(ofdev->node); 1062 mac_addr = of_get_mac_address(ofdev->dev.of_node);
1063 if (mac_addr) 1063 if (mac_addr)
1064 memcpy(ndev->dev_addr, mac_addr, 6); 1064 memcpy(ndev->dev_addr, mac_addr, 6);
1065 1065
@@ -1156,8 +1156,11 @@ static struct of_device_id fs_enet_match[] = {
1156MODULE_DEVICE_TABLE(of, fs_enet_match); 1156MODULE_DEVICE_TABLE(of, fs_enet_match);
1157 1157
1158static struct of_platform_driver fs_enet_driver = { 1158static struct of_platform_driver fs_enet_driver = {
1159 .name = "fs_enet", 1159 .driver = {
1160 .match_table = fs_enet_match, 1160 .owner = THIS_MODULE,
1161 .name = "fs_enet",
1162 .of_match_table = fs_enet_match,
1163 },
1161 .probe = fs_enet_probe, 1164 .probe = fs_enet_probe,
1162 .remove = fs_enet_remove, 1165 .remove = fs_enet_remove,
1163}; 1166};
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 0ae65a2f1ab9..48e91b6242ce 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep)
88 struct fs_platform_info *fpi = fep->fpi; 88 struct fs_platform_info *fpi = fep->fpi;
89 int ret = -EINVAL; 89 int ret = -EINVAL;
90 90
91 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 91 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
92 if (fep->interrupt == NO_IRQ) 92 if (fep->interrupt == NO_IRQ)
93 goto out; 93 goto out;
94 94
95 fep->fcc.fccp = of_iomap(ofdev->node, 0); 95 fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0);
96 if (!fep->fcc.fccp) 96 if (!fep->fcc.fccp)
97 goto out; 97 goto out;
98 98
99 fep->fcc.ep = of_iomap(ofdev->node, 1); 99 fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1);
100 if (!fep->fcc.ep) 100 if (!fep->fcc.ep)
101 goto out_fccp; 101 goto out_fccp;
102 102
103 fep->fcc.fcccp = of_iomap(ofdev->node, 2); 103 fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2);
104 if (!fep->fcc.fcccp) 104 if (!fep->fcc.fcccp)
105 goto out_ep; 105 goto out_ep;
106 106
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 7eff92ef01da..7ca1642276d0 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep)
98{ 98{
99 struct of_device *ofdev = to_of_device(fep->dev); 99 struct of_device *ofdev = to_of_device(fep->dev);
100 100
101 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
103 return -EINVAL; 103 return -EINVAL;
104 104
105 fep->fec.fecp = of_iomap(ofdev->node, 0); 105 fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
106 if (!fep->fcc.fccp) 106 if (!fep->fcc.fccp)
107 return -EINVAL; 107 return -EINVAL;
108 108
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 7f0591e43cd9..a3c44544846d 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep)
98{ 98{
99 struct of_device *ofdev = to_of_device(fep->dev); 99 struct of_device *ofdev = to_of_device(fep->dev);
100 100
101 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
103 return -EINVAL; 103 return -EINVAL;
104 104
105 fep->scc.sccp = of_iomap(ofdev->node, 0); 105 fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0);
106 if (!fep->scc.sccp) 106 if (!fep->scc.sccp)
107 return -EINVAL; 107 return -EINVAL;
108 108
109 fep->scc.ep = of_iomap(ofdev->node, 1); 109 fep->scc.ep = of_iomap(ofdev->dev.of_node, 1);
110 if (!fep->scc.ep) { 110 if (!fep->scc.ep) {
111 iounmap(fep->scc.sccp); 111 iounmap(fep->scc.sccp);
112 return -EINVAL; 112 return -EINVAL;
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index 24ff9f43a62b..0f90685d3d19 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
224MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); 224MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
225 225
226static struct of_platform_driver fs_enet_bb_mdio_driver = { 226static struct of_platform_driver fs_enet_bb_mdio_driver = {
227 .name = "fsl-bb-mdio", 227 .driver = {
228 .match_table = fs_enet_mdio_bb_match, 228 .name = "fsl-bb-mdio",
229 .owner = THIS_MODULE,
230 .of_match_table = fs_enet_mdio_bb_match,
231 },
229 .probe = fs_enet_mdio_probe, 232 .probe = fs_enet_mdio_probe,
230 .remove = fs_enet_mdio_remove, 233 .remove = fs_enet_mdio_remove,
231}; 234};
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index 5944b65082cb..bddffd169b93 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
124 new_bus->write = &fs_enet_fec_mii_write; 124 new_bus->write = &fs_enet_fec_mii_write;
125 new_bus->reset = &fs_enet_fec_mii_reset; 125 new_bus->reset = &fs_enet_fec_mii_reset;
126 126
127 ret = of_address_to_resource(ofdev->node, 0, &res); 127 ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
128 if (ret) 128 if (ret)
129 goto out_res; 129 goto out_res;
130 130
@@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
135 goto out_fec; 135 goto out_fec;
136 136
137 if (get_bus_freq) { 137 if (get_bus_freq) {
138 clock = get_bus_freq(ofdev->node); 138 clock = get_bus_freq(ofdev->dev.of_node);
139 if (!clock) { 139 if (!clock) {
140 /* Use maximum divider if clock is unknown */ 140 /* Use maximum divider if clock is unknown */
141 dev_warn(&ofdev->dev, "could not determine IPS clock\n"); 141 dev_warn(&ofdev->dev, "could not determine IPS clock\n");
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
172 new_bus->parent = &ofdev->dev; 172 new_bus->parent = &ofdev->dev;
173 dev_set_drvdata(&ofdev->dev, new_bus); 173 dev_set_drvdata(&ofdev->dev, new_bus);
174 174
175 ret = of_mdiobus_register(new_bus, ofdev->node); 175 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node);
176 if (ret) 176 if (ret)
177 goto out_free_irqs; 177 goto out_free_irqs;
178 178
@@ -222,8 +222,11 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
222MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); 222MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
223 223
224static struct of_platform_driver fs_enet_fec_mdio_driver = { 224static struct of_platform_driver fs_enet_fec_mdio_driver = {
225 .name = "fsl-fec-mdio", 225 .driver = {
226 .match_table = fs_enet_mdio_fec_match, 226 .name = "fsl-fec-mdio",
227 .owner = THIS_MODULE,
228 .of_match_table = fs_enet_mdio_fec_match,
229 },
227 .probe = fs_enet_mdio_probe, 230 .probe = fs_enet_mdio_probe,
228 .remove = fs_enet_mdio_remove, 231 .remove = fs_enet_mdio_remove,
229}; 232};