aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_mpc52xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fec_mpc52xx.c')
-rw-r--r--drivers/net/fec_mpc52xx.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 221f440c10f..25e6cc6840b 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -871,7 +871,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
871 priv->ndev = ndev; 871 priv->ndev = ndev;
872 872
873 /* Reserve FEC control zone */ 873 /* Reserve FEC control zone */
874 rv = of_address_to_resource(op->node, 0, &mem); 874 rv = of_address_to_resource(op->dev.of_node, 0, &mem);
875 if (rv) { 875 if (rv) {
876 printk(KERN_ERR DRIVER_NAME ": " 876 printk(KERN_ERR DRIVER_NAME ": "
877 "Error while parsing device node resource\n" ); 877 "Error while parsing device node resource\n" );
@@ -919,7 +919,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
919 919
920 /* Get the IRQ we need one by one */ 920 /* Get the IRQ we need one by one */
921 /* Control */ 921 /* Control */
922 ndev->irq = irq_of_parse_and_map(op->node, 0); 922 ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
923 923
924 /* RX */ 924 /* RX */
925 priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); 925 priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk);
@@ -942,20 +942,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
942 /* Start with safe defaults for link connection */ 942 /* Start with safe defaults for link connection */
943 priv->speed = 100; 943 priv->speed = 100;
944 priv->duplex = DUPLEX_HALF; 944 priv->duplex = DUPLEX_HALF;
945 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1; 945 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1;
946 946
947 /* The current speed preconfigures the speed of the MII link */ 947 /* The current speed preconfigures the speed of the MII link */
948 prop = of_get_property(op->node, "current-speed", &prop_size); 948 prop = of_get_property(op->dev.of_node, "current-speed", &prop_size);
949 if (prop && (prop_size >= sizeof(u32) * 2)) { 949 if (prop && (prop_size >= sizeof(u32) * 2)) {
950 priv->speed = prop[0]; 950 priv->speed = prop[0];
951 priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; 951 priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF;
952 } 952 }
953 953
954 /* If there is a phy handle, then get the PHY node */ 954 /* If there is a phy handle, then get the PHY node */
955 priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0); 955 priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
956 956
957 /* the 7-wire property means don't use MII mode */ 957 /* the 7-wire property means don't use MII mode */
958 if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) { 958 if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) {
959 priv->seven_wire_mode = 1; 959 priv->seven_wire_mode = 1;
960 dev_info(&ndev->dev, "using 7-wire PHY mode\n"); 960 dev_info(&ndev->dev, "using 7-wire PHY mode\n");
961 } 961 }
@@ -1063,9 +1063,11 @@ static struct of_device_id mpc52xx_fec_match[] = {
1063MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); 1063MODULE_DEVICE_TABLE(of, mpc52xx_fec_match);
1064 1064
1065static struct of_platform_driver mpc52xx_fec_driver = { 1065static struct of_platform_driver mpc52xx_fec_driver = {
1066 .owner = THIS_MODULE, 1066 .driver = {
1067 .name = DRIVER_NAME, 1067 .name = DRIVER_NAME,
1068 .match_table = mpc52xx_fec_match, 1068 .owner = THIS_MODULE,
1069 .of_match_table = mpc52xx_fec_match,
1070 },
1069 .probe = mpc52xx_fec_probe, 1071 .probe = mpc52xx_fec_probe,
1070 .remove = mpc52xx_fec_remove, 1072 .remove = mpc52xx_fec_remove,
1071#ifdef CONFIG_PM 1073#ifdef CONFIG_PM