intel_reg_read: use register access init/fini
authorBen Widawsky <ben@bwidawsk.net>
Thu, 26 Jan 2012 05:05:15 +0000 (21:05 -0800)
committerBen Widawsky <ben@bwidawsk.net>
Thu, 26 Jan 2012 05:05:15 +0000 (21:05 -0800)
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
tools/intel_reg_read.c

index 0259924..cad30ff 100644 (file)
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
                exit(1);
        }
 
-       intel_get_mmio(intel_get_pci_device());
+       intel_register_access_init(intel_get_pci_device(), 0);
 
        if (!strcmp(argv[1], "-f")) {
                dump_range(0x00000, 0x00fff);   /* VGA registers */
@@ -75,6 +75,8 @@ int main(int argc, char** argv)
                dump_range(reg, reg + 4);
        }
 
+       intel_register_access_fini();
+
        return 0;
 }