Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev switch to direct configuration



details:   https://anonhg.NetBSD.org/src/rev/5e8dc82302d2
branches:  trunk
changeset: 826686:5e8dc82302d2
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Sep 22 04:01:41 2017 +0000

description:
switch to direct configuration

diffstat:

 sys/arch/macppc/dev/videopll.c |  17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diffs (45 lines):

diff -r d6afe6020485 -r 5e8dc82302d2 sys/arch/macppc/dev/videopll.c
--- a/sys/arch/macppc/dev/videopll.c    Fri Sep 22 04:00:58 2017 +0000
+++ b/sys/arch/macppc/dev/videopll.c    Fri Sep 22 04:01:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: videopll.c,v 1.1 2012/01/24 04:33:11 macallan Exp $    */
+/*     $NetBSD: videopll.c,v 1.2 2017/09/22 04:01:41 macallan Exp $    */
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -27,13 +27,13 @@
 
 /*
  * A driver for the iic-controlled PLLs used in early Apple onboard video 
- * hardware. For now we support /valkyrie only but others use vary similar
+ * hardware. For now we support /valkyrie only but others use very similar
  * schemes to program their pixel clock so adding support for those should
  * be simple enough.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: videopll.c,v 1.1 2012/01/24 04:33:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: videopll.c,v 1.2 2017/09/22 04:01:41 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -70,17 +70,10 @@
 videopll_match(device_t parent, cfdata_t cfdata, void *aux)
 {
        struct i2c_attach_args *ia = aux;
-       int node;
 
-       /* we support only /valkyrie so far */
-       node = OF_finddevice("/valkyrie");
-       if (node == -1)
-               return 0;
-       /* make sure we only attach to cuda's iic bus */
-       if (!device_is_a(device_parent(parent), "cuda"))
-               return 0;
-       if (ia->ia_addr == 0x50)
+       if (strcmp(ia->ia_name, "videopll") == 0)
                return 100;
+
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index