]> err.no Git - linux-2.6/blobdiff - drivers/net/ucc_geth_mii.c
atl1: disable broken 64-bit DMA
[linux-2.6] / drivers / net / ucc_geth_mii.c
index 73b5a538e8f4ec6375ddd41a7ac0aa08da867727..6c257b88ce51ed8fc7206407e351f3c9f431c0ff 100644 (file)
@@ -1,12 +1,13 @@
 /*
  * drivers/net/ucc_geth_mii.c
  *
- * Gianfar Ethernet Driver -- MIIM bus implementation
- * Provides Bus interface for MIIM regs
+ * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation
+ * Provides Bus interface for MII Management regs in the UCC register space
  *
- * Author: Li Yang
+ * Copyright (C) 2007 Freescale Semiconductor, Inc.
  *
- * Copyright (c) 2002-2004 Freescale Semiconductor, Inc.
+ * Authors: Li Yang <leoli@freescale.com>
+ *         Kim Phillips <kim.phillips@freescale.com>
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
@@ -53,8 +54,8 @@
 #define vdbg(format, arg...) do {} while(0)
 #endif
 
-#define DRV_DESC "QE UCC Ethernet Controller MII Bus"
-#define DRV_NAME "fsl-uec_mdio"
+#define MII_DRV_DESC "QE UCC Ethernet Controller MII Bus"
+#define MII_DRV_NAME "fsl-uec_mdio"
 
 /* Write value to the PHY for this device to the register at regnum, */
 /* waiting until the write is done before it returns.  All PHY */
@@ -172,7 +173,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
        while ((child = of_get_next_child(np, child)) != NULL) {
                int irq = irq_of_parse_and_map(child, 0);
                if (irq != NO_IRQ) {
-                       const u32 *id = get_property(child, "reg", NULL);
+                       const u32 *id = of_get_property(child, "reg", NULL);
                        new_bus->irq[*id] = irq;
                }
        }
@@ -203,7 +204,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
                if ((res.start >= tempres.start) &&
                    (res.end <= tempres.end)) {
                        /* set this UCC to be the MII master */
-                       const u32 *id = get_property(tempnp, "device-id", NULL);
+                       const u32 *id = of_get_property(tempnp, "device-id", NULL);
                        if (id == NULL)
                                goto bus_register_fail;
 
@@ -259,10 +260,8 @@ static struct of_device_id uec_mdio_match[] = {
        {},
 };
 
-MODULE_DEVICE_TABLE(of, uec_mdio_match);
-
 static struct of_platform_driver uec_mdio_driver = {
-       .name   = DRV_NAME,
+       .name   = MII_DRV_NAME,
        .probe  = uec_mdio_probe,
        .remove = uec_mdio_remove,
        .match_table    = uec_mdio_match,
@@ -273,7 +272,8 @@ int __init uec_mdio_init(void)
        return of_register_platform_driver(&uec_mdio_driver);
 }
 
-void __exit uec_mdio_exit(void)
+/* called from __init ucc_geth_init, therefore can not be __exit */
+void uec_mdio_exit(void)
 {
        of_unregister_platform_driver(&uec_mdio_driver);
 }